gr.forth.ics.rdfsuite.vrp.corevrp.parser
Class SBagent

java.lang.Object
  extended by gr.forth.ics.rdfsuite.vrp.corevrp.parser.SBagent

public class SBagent
extends java.lang.Object

This class can be used for a stream based usage of the VRP parser part only. You need to set the streamBased option of the parser which will case the parser to call for each found triple the producer (SBproducer). The triples will then send to the agent. The agent (SBagent) is also accessed by a consumer who will retrieve the triples when ready. An example consumer (SBconsumer) are part of this package.


Nested Class Summary
static class SBagent.FinEx
          Exception to notify that the producer is finished.
 
Constructor Summary
SBagent()
           
 
Method Summary
 void end()
          Will be called by the producer to tell the agent he finished.
 void enter(Triple t)
          Used by the producer to send the triples to the agent.
 Triple next()
          Used by the consumer to retrieve the triples generated by the producer.
 void setDebug(boolean b)
          To switch between verbose and not verbose output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SBagent

public SBagent()
Method Detail

enter

public void enter(Triple t)
Used by the producer to send the triples to the agent.

Parameters:
t -

next

public Triple next()
            throws SBagent.FinEx
Used by the consumer to retrieve the triples generated by the producer.

Returns:
The triples of the RDF file.
Throws:
SBagent.FinEx - Notification that the producer finished.

end

public void end()
Will be called by the producer to tell the agent he finished.


setDebug

public void setDebug(boolean b)
To switch between verbose and not verbose output.

Parameters:
b -