|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fuberlin.wiwiss.ng4j.trix.TriXReader
public class TriXReader
Reads TriX files (see
TriX
specification) into NamedGraphSets.
Ignores additional graph names if there are more than one name per graph. Doesn't allow the same name for multiple graphs. Graphs without name get assigned a default name given by the caller.
TODO: Discuss if above cases are really wanted for TriX and move them up into the SAXHandler
| Constructor Summary | |
|---|---|
TriXReader()
|
|
| Method Summary | |
|---|---|
void |
endGraph()
Called at the end of each trix:graph element |
void |
objectBNode(String id)
Called for each trix:triple element whose object is a trix:id. |
void |
objectPlainLiteral(String value,
String lang)
Called for each trix:triple element whose object is a trix:plainLiteral. |
void |
objectTypedLiteral(String value,
String datatypeURI)
Called for each trix:triple element whose object is a trix:typedLiteral. |
void |
objectURI(String uri)
Called for each trix:triple element whose object is a trix:uri. |
void |
predicate(String uri)
Called for the predicate of each trix:triple. |
void |
read(NamedGraphSet namedGraphSet,
InputStream source,
String baseURI,
String defaultGraphName)
Reads Named Graphs from an InputStream into a NamedGraphSet. |
void |
read(NamedGraphSet namedGraphSet,
Reader source,
String baseURI,
String defaultGraphName)
Reads Named Graphs from a Reader into a NamedGraphSet. |
void |
startGraph(List uris)
Called at the beginning of each trix:graph element. |
void |
subjectBNode(String id)
Called for each trix:triple element whose subject is a trix:id. |
void |
subjectPlainLiteral(String value,
String lang)
Called for each trix:triple element whose subject is a trix:plainLiteral. |
void |
subjectTypedLiteral(String value,
String datatypeURI)
Called for each trix:triple element whose subject is a trix:typedLiteral. |
void |
subjectURI(String uri)
Called for each trix:triple element whose subject is a trix:uri. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TriXReader()
| Method Detail |
|---|
public void read(NamedGraphSet namedGraphSet,
Reader source,
String baseURI,
String defaultGraphName)
NamedGraphSetReader
read in interface NamedGraphSetReadernamedGraphSet - Graphs read from the source will be stored
into this NamedGraphSetsource - The source of the input serializationbaseURI - The URI from where the input was readdefaultGraphName - If a graph in the input has no name attached,
then this will be used. When in doubt, use the baseURI.
public void read(NamedGraphSet namedGraphSet,
InputStream source,
String baseURI,
String defaultGraphName)
NamedGraphSetReader
read in interface NamedGraphSetReadernamedGraphSet - Graphs read from the source will be stored
into this NamedGraphSetsource - The source of the input serializationbaseURI - The URI from where the input was readdefaultGraphName - If a graph in the input has no name attached,
then this will be used. When in doubt, use the baseURI.public void startGraph(List uris)
ParserCallback
startGraph in interface ParserCallbackuris - zero or more names of the graph, as stringspublic void endGraph()
ParserCallback
endGraph in interface ParserCallbackpublic void subjectURI(String uri)
ParserCallback
subjectURI in interface ParserCallbackuri - the subject URI of the triplepublic void subjectBNode(String id)
ParserCallback
subjectBNode in interface ParserCallbackid - the subject blank node ID of the triple
public void subjectPlainLiteral(String value,
String lang)
ParserCallback
subjectPlainLiteral in interface ParserCallbackvalue - the subject literal value of the triplelang - the language tag of the subject literal, or null
if none was given
public void subjectTypedLiteral(String value,
String datatypeURI)
ParserCallback
subjectTypedLiteral in interface ParserCallbackvalue - the subject literal value of the tripledatatypeURI - the datatype URI of the subject literalpublic void predicate(String uri)
ParserCallback
predicate in interface ParserCallbackuri - the predicate URI of the triple.public void objectURI(String uri)
ParserCallback
objectURI in interface ParserCallbackuri - the object URI of the triplepublic void objectBNode(String id)
ParserCallback
objectBNode in interface ParserCallbackid - the object blank node ID of the triple
public void objectPlainLiteral(String value,
String lang)
ParserCallback
objectPlainLiteral in interface ParserCallbackvalue - the object literal value of the triplelang - the language tag of the object literal, or null
if none was given
public void objectTypedLiteral(String value,
String datatypeURI)
ParserCallback
objectTypedLiteral in interface ParserCallbackvalue - the object literal value of the tripledatatypeURI - the datatype URI of the object literal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||