org.w3c.rdf.util
Class ModelConsumer

java.lang.Object
  |
  +--org.w3c.rdf.util.ModelConsumer
All Implemented Interfaces:
RDFConsumer

public class ModelConsumer
extends java.lang.Object
implements RDFConsumer

A standard class used for parsing into an RDF model


Constructor Summary
ModelConsumer(Model empty)
           
 
Method Summary
 void addStatement(Statement s)
          assert is called every time a new statement within RDF data model is added
 void endModel()
          end is called when parsing of data is ended
 NodeFactory getNodeFactory()
          node factory to be used by the parser for creating resources and literals passed to addStatement
 void startModel()
          start is called when parsing of data is started
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelConsumer

public ModelConsumer(Model empty)
              throws ModelException
Parameters:
an - RDF model to fill with triples. This frequently will be an empty model.
Method Detail

startModel

public void startModel()
start is called when parsing of data is started
Specified by:
startModel in interface RDFConsumer

endModel

public void endModel()
end is called when parsing of data is ended
Specified by:
endModel in interface RDFConsumer

getNodeFactory

public NodeFactory getNodeFactory()
Description copied from interface: RDFConsumer
node factory to be used by the parser for creating resources and literals passed to addStatement
Specified by:
getNodeFactory in interface RDFConsumer

addStatement

public void addStatement(Statement s)
                  throws ModelException
assert is called every time a new statement within RDF data model is added
Specified by:
addStatement in interface RDFConsumer