|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fuberlin.wiwiss.ng4j.trix.TriXReaderWithExtensions
public class TriXReaderWithExtensions
Reads TriX files (see
TriX
specification) into NamedGraphSet
s.
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 | |
---|---|
TriXReaderWithExtensions()
|
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 TriXReaderWithExtensions()
Method Detail |
---|
public void read(NamedGraphSet namedGraphSet, Reader source, String baseURI, String defaultGraphName)
NamedGraphSetReader
read
in interface NamedGraphSetReader
namedGraphSet
- 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 NamedGraphSetReader
namedGraphSet
- 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 ParserCallback
uris
- zero or more names of the graph, as stringspublic void endGraph()
ParserCallback
endGraph
in interface ParserCallback
public void subjectURI(String uri)
ParserCallback
subjectURI
in interface ParserCallback
uri
- the subject URI of the triplepublic void subjectBNode(String id)
ParserCallback
subjectBNode
in interface ParserCallback
id
- the subject blank node ID of the triplepublic void subjectPlainLiteral(String value, String lang)
ParserCallback
subjectPlainLiteral
in interface ParserCallback
value
- the subject literal value of the triplelang
- the language tag of the subject literal, or null
if none was givenpublic void subjectTypedLiteral(String value, String datatypeURI)
ParserCallback
subjectTypedLiteral
in interface ParserCallback
value
- the subject literal value of the tripledatatypeURI
- the datatype URI of the subject literalpublic void predicate(String uri)
ParserCallback
predicate
in interface ParserCallback
uri
- the predicate URI of the triple.public void objectURI(String uri)
ParserCallback
objectURI
in interface ParserCallback
uri
- the object URI of the triplepublic void objectBNode(String id)
ParserCallback
objectBNode
in interface ParserCallback
id
- the object blank node ID of the triplepublic void objectPlainLiteral(String value, String lang)
ParserCallback
objectPlainLiteral
in interface ParserCallback
value
- the object literal value of the triplelang
- the language tag of the object literal, or null
if none was givenpublic void objectTypedLiteral(String value, String datatypeURI)
ParserCallback
objectTypedLiteral
in interface ParserCallback
value
- 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 |