de.hedenus.rdf.serialize
Class GraphBuilder

java.lang.Object
  extended by de.hedenus.rdf.serialize.GraphBuilder
All Implemented Interfaces:
RDFEventListener

public class GraphBuilder
extends java.lang.Object
implements RDFEventListener

A RDF event listener which add statements the a RDF graph.

Author:
Michael Hedenus

Field Summary
 
Fields inherited from interface de.hedenus.rdf.serialize.RDFEventListener
NODETYPE_BLANK_NODE, NODETYPE_LITERAL, NODETYPE_URIREF
 
Constructor Summary
GraphBuilder(RDFGraph graph)
          Creates a new graph builder for asserted statements.
GraphBuilder(RDFGraph graph, int statementType)
          Creates a new graph builder for statements of the specified type.
 
Method Summary
 void newStatement(java.lang.String subject, int subjectType, java.lang.String predicate, java.lang.String object, int objectType, java.lang.String datatype, java.lang.String lang)
          Call-back invoked when a RDF parser parsed a new statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphBuilder

public GraphBuilder(RDFGraph graph)
Creates a new graph builder for asserted statements.


GraphBuilder

public GraphBuilder(RDFGraph graph,
                    int statementType)
Creates a new graph builder for statements of the specified type.

Method Detail

newStatement

public void newStatement(java.lang.String subject,
                         int subjectType,
                         java.lang.String predicate,
                         java.lang.String object,
                         int objectType,
                         java.lang.String datatype,
                         java.lang.String lang)
Description copied from interface: RDFEventListener
Call-back invoked when a RDF parser parsed a new statement.

Specified by:
newStatement in interface RDFEventListener
Parameters:
subject - the triple's subject
subjectType - the node type of the subject, either NODETYPE_URIREF or NODETYPE_BLANK_NODE
predicate - the triple's predicate
object - the triple's predicate
objectType - the node type of the object, either NODETYPE_URIREF, NODETYPE_BLANK_NODE or NODETYPE_LITERAL
datatype - the datatype of the object (if it is a literal) or null
lang - the language tag of the object (if it is a literal) or null