|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParserCallback
Callback that is fed by TriXParser
with graphs and triples from
a TriX file (see
TriX
specification). Implement this if you want to do something
with data from TriX files.
A TriX file contains zero or more named graphs, each of whom
might contain zero or more triples. For each graph, first
startGraph(java.util.List)
is called, then all triples are processed,
then endGraph()
is called. Processing of triples works
like this: For each triple within a graph, first one of the
subjectXXX methods is called (for example,
subjectURI(java.lang.String)
), then predicate(java.lang.String)
is called, and
finally one of the objectXXX methods is called (for example,
objectPlainLiteral(java.lang.String, java.lang.String)
).
Graphs and triples are processed in the same order as they are encountered in the file.
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 |
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. |
Method Detail |
---|
void startGraph(List uris)
uris
- zero or more names of the graph, as stringsvoid endGraph()
void subjectURI(String uri)
uri
- the subject URI of the triplevoid subjectBNode(String id)
id
- the subject blank node ID of the triplevoid subjectPlainLiteral(String value, String lang)
value
- the subject literal value of the triplelang
- the language tag of the subject literal, or null
if none was givenvoid subjectTypedLiteral(String value, String datatypeURI)
value
- the subject literal value of the tripledatatypeURI
- the datatype URI of the subject literalvoid predicate(String uri)
uri
- the predicate URI of the triple.void objectURI(String uri)
uri
- the object URI of the triplevoid objectBNode(String id)
id
- the object blank node ID of the triplevoid objectPlainLiteral(String value, String lang)
value
- the object literal value of the triplelang
- the language tag of the object literal, or null
if none was givenvoid objectTypedLiteral(String value, String datatypeURI)
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 |