Package org.hobbit.utils.rdf
Class HashingRDFVisitor
java.lang.Object
org.hobbit.utils.rdf.HashingRDFVisitor
- All Implemented Interfaces:
org.apache.jena.rdf.model.RDFVisitor
A class for serializing URI and literal nodes
in the format used for hashing.
- Author:
- Denis Kuchelev
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvisitBlank(org.apache.jena.rdf.model.Resource r, org.apache.jena.rdf.model.AnonId id) Method to call when visiting a blank node r with identifier id.visitLiteral(org.apache.jena.rdf.model.Literal l) Method to call when visiting a literal RDF node l.Method to call when visiting a URI node r with the given uri.
-
Field Details
-
instance
-
-
Constructor Details
-
HashingRDFVisitor
public HashingRDFVisitor()
-
-
Method Details
-
visitBlank
Method to call when visiting a blank node r with identifier id. This implementation does not expect any blank nodes.- Specified by:
visitBlankin interfaceorg.apache.jena.rdf.model.RDFVisitor- Parameters:
r- the blank RDF node being visitedid- the identifier of that node- Throws:
IllegalStateException
-
visitURI
Method to call when visiting a URI node r with the given uri.- Specified by:
visitURIin interfaceorg.apache.jena.rdf.model.RDFVisitor- Parameters:
r- the URI node being visiteduri- the URI string of that node- Returns:
- value to be returned from the visit
-
visitLiteral
Method to call when visiting a literal RDF node l.- Specified by:
visitLiteralin interfaceorg.apache.jena.rdf.model.RDFVisitor- Parameters:
l- the RDF Literal node- Returns:
- a value to be returned from the visit
-