Package org.apache.jena.rdfxml.xmlinput
Interface ExtendedHandler
- All Known Subinterfaces:
ARPEventHandler
public interface ExtendedHandler
Extended callbacks from a reader to an RDF application.
This reports:
- when a blank node goes out of scope, allowing its anonymous ID to be freed by external applications.
- when a rdf:RDF start and end tag is seen
-
Method Summary
Modifier and TypeMethodDescriptionboolean
This method is used to modify the behaviour of ARP concerning its reporting of bnode scopeendBNodeScope(org.apache.jena.rdfxml.xmlinput.AResource)
.void
endBNodeScope
(AResource bnode) After this call, no more triples will be reported which usebnode
.void
endRDF()
Called when the </rdf:RDF> tag is seen.void
startRDF()
Called when the <rdf:RDF> tag is seen.
-
Method Details
-
endBNodeScope
After this call, no more triples will be reported which usebnode
. This is called exactly once for each blank nodes. Whether this includes nodes with anrdf:nodeID
is controlled bydiscardNodesWithNodeID()
.The contract is robust against syntax errors in input, and exceptions being thrown by the StatementHandler.
- Parameters:
bnode
- A blank node going out of scope.
-
discardNodesWithNodeID
boolean discardNodesWithNodeID()This method is used to modify the behaviour of ARP concerning its reporting of bnode scopeendBNodeScope(org.apache.jena.rdfxml.xmlinput.AResource)
.If this returns true then blank nodes with an
rdf:nodeID
are not reported as they go out of scope at the end of file. This eliminates the unbounded memory cost of remembering such nodes.If this returns false then the contract of
endBNodeScope(org.apache.jena.rdfxml.xmlinput.AResource)
is honoured uniformly independent of whether a blank node has a nodeID or not.If this method returns different values during the parsing of a single file, then the behaviour is undefined.
- Returns:
- Desired behaviour of endBNodeScope.
-
startRDF
void startRDF()Called when the <rdf:RDF> tag is seen. (Also called when there is an implicit start of RDF content when the file consists only of RDF but omits the rdf:RDF tag). -
endRDF
void endRDF()Called when the </rdf:RDF> tag is seen. (Also called when there is an implicit end of RDF content e.g. when the file consists only of RDF but omits the rdf:RDF tag, or if there is an unrecoverable syntax error mid-file).Robust against syntax errors in input, and exceptions being thrown by the StatementHandler.
-