Package org.hobbit.utils.rdf
Class HashingRDFVisitor
- java.lang.Object
-
- org.hobbit.utils.rdf.HashingRDFVisitor
-
- All Implemented Interfaces:
org.apache.jena.rdf.model.RDFVisitor
public class HashingRDFVisitor extends Object implements 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 Modifier and Type Field Description static HashingRDFVisitorinstance
-
Constructor Summary
Constructors Constructor Description HashingRDFVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringvisitBlank(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.StringvisitLiteral(org.apache.jena.rdf.model.Literal l)Method to call when visiting a literal RDF node l.StringvisitURI(org.apache.jena.rdf.model.Resource r, String uri)Method to call when visiting a URI node r with the given uri.
-
-
-
Field Detail
-
instance
public static HashingRDFVisitor instance
-
-
Method Detail
-
visitBlank
public String visitBlank(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. 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
public String visitURI(org.apache.jena.rdf.model.Resource r, String uri)
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
public String visitLiteral(org.apache.jena.rdf.model.Literal l)
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
-
-