de.hedenus.rdf.serialize
Class GraphBuilder
java.lang.Object
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
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 |
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.
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 subjectsubjectType
- the node type of the subject, either NODETYPE_URIREF
or NODETYPE_BLANK_NODE
predicate
- the triple's predicateobject
- the triple's predicateobjectType
- 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