org.mindswap.pellet.tableau.completion.queue
Class BasicCompletionQueue

java.lang.Object
  extended by org.mindswap.pellet.IndividualIterator
      extended by org.mindswap.pellet.tableau.completion.queue.CompletionQueue
          extended by org.mindswap.pellet.tableau.completion.queue.BasicCompletionQueue
All Implemented Interfaces:
java.util.Iterator<Individual>

public class BasicCompletionQueue
extends CompletionQueue

A basic queue for individuals that need to have completion rules applied


Field Summary
static java.util.logging.Logger log
           
 
Constructor Summary
BasicCompletionQueue(ABox abox)
          Constructor - create queue
 
Method Summary
 void add(QueueElement x)
          Add an element to all queues
 void add(QueueElement x, NodeSelector s)
          Add an element to the queue
 void clearQueue(NodeSelector s)
          Clear the queue
 BasicCompletionQueue copy()
          Copy the queue
 void flushQueue()
          Flush the queue
 boolean hasNext()
          Test if there is another element on the queue to process
 void incrementBranch(int branch)
          Set branch pointers to current pointer.
 Individual next()
          Get the next element of a queue of a given type
 Node nextLiteral()
          Get the next element of a queue of a given type
 void print()
          Print method for entire queue
 void print(int type)
          Print method for a given queue type
 void remove()
          Remove method for abstract class
 void reset(NodeSelector s)
          Reset the cutoff for a given type index
 void restore(int branch)
          Reset the queue to be the current nodes in the abox; Also reset the type index to 0
 void setABox(ABox ab)
          Set the abox for the queue
 
Methods inherited from class org.mindswap.pellet.tableau.completion.queue.CompletionQueue
printBranchInfo, setAllowLiterals, setClosed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final java.util.logging.Logger log
Constructor Detail

BasicCompletionQueue

public BasicCompletionQueue(ABox abox)
Constructor - create queue

Parameters:
abox -
Method Detail

hasNext

public boolean hasNext()
Test if there is another element on the queue to process

Specified by:
hasNext in interface java.util.Iterator<Individual>
Overrides:
hasNext in class IndividualIterator
Parameters:
type -
Returns:

restore

public void restore(int branch)
Reset the queue to be the current nodes in the abox; Also reset the type index to 0

Specified by:
restore in class CompletionQueue
Parameters:
branch -

next

public Individual next()
Get the next element of a queue of a given type

Specified by:
next in interface java.util.Iterator<Individual>
Overrides:
next in class IndividualIterator
Parameters:
type -
Returns:

nextLiteral

public Node nextLiteral()
Get the next element of a queue of a given type

Specified by:
nextLiteral in class CompletionQueue
Parameters:
type -
Returns:

add

public void add(QueueElement x,
                NodeSelector s)
Description copied from class: CompletionQueue
Add an element to the queue

Specified by:
add in class CompletionQueue

add

public void add(QueueElement x)
Description copied from class: CompletionQueue
Add an element to all queues

Specified by:
add in class CompletionQueue

reset

public void reset(NodeSelector s)
Reset the cutoff for a given type index

Specified by:
reset in class CompletionQueue
Parameters:
type -

incrementBranch

public void incrementBranch(int branch)
Set branch pointers to current pointer. This is done whenever abox.incrementBranch is called

Specified by:
incrementBranch in class CompletionQueue
Parameters:
branch -

copy

public BasicCompletionQueue copy()
Copy the queue

Specified by:
copy in class CompletionQueue
Returns:

setABox

public void setABox(ABox ab)
Set the abox for the queue

Overrides:
setABox in class CompletionQueue
Parameters:
ab -

print

public void print(int type)
Print method for a given queue type

Specified by:
print in class CompletionQueue
Parameters:
type -

print

public void print()
Print method for entire queue

Specified by:
print in class CompletionQueue

remove

public void remove()
Remove method for abstract class

Specified by:
remove in interface java.util.Iterator<Individual>
Overrides:
remove in class IndividualIterator

flushQueue

public void flushQueue()
Description copied from class: CompletionQueue
Flush the queue

Specified by:
flushQueue in class CompletionQueue

clearQueue

public void clearQueue(NodeSelector s)
Description copied from class: CompletionQueue
Clear the queue

Specified by:
clearQueue in class CompletionQueue


Copyright © 2004 Evren Sirin. All Rights Reserved.