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 Details

  • Constructor Details

    • HashingRDFVisitor

      public HashingRDFVisitor()
  • Method Details

    • 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:
      visitBlank in interface org.apache.jena.rdf.model.RDFVisitor
      Parameters:
      r - the blank RDF node being visited
      id - 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:
      visitURI in interface org.apache.jena.rdf.model.RDFVisitor
      Parameters:
      r - the URI node being visited
      uri - 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:
      visitLiteral in interface org.apache.jena.rdf.model.RDFVisitor
      Parameters:
      l - the RDF Literal node
      Returns:
      a value to be returned from the visit