Interface RDFTranslator

All Known Implementing Classes:
NaturalFullRDFTranslator, NaturalRDFTranslator, RawRDFTranslator

public interface RDFTranslator
Translate (convert) RDF statements (triples) into atoms
  • Method Summary

    Modifier and Type
    Method
    Description
    statementToAtom(org.eclipse.rdf4j.model.Statement st)
    Translate (convert) RDF statements (triples) into atoms
    default Term
    toTerm(org.eclipse.rdf4j.model.Value value)
    Converts any RDF4J Value into a Term.
  • Method Details

    • statementToAtom

      Atom statementToAtom(org.eclipse.rdf4j.model.Statement st)
      Translate (convert) RDF statements (triples) into atoms
      Parameters:
      st - the rdf statement to convert
      Returns:
      the atom corresponding to the given statement according to the translator implementation
    • toTerm

      default Term toTerm(org.eclipse.rdf4j.model.Value value)
      Converts any RDF4J Value into a Term.

      - If it's a literal with a recognized datatype, parseAll via XSD (so numeric, dateTime, boolean, etc. become typed). - If it's a literal with no datatype (or a language tag), default to xsd:string. - If it's an IRI or blank node, store as a raw string literal.

      Parameters:
      value - the RDF4J value to convert
      Returns:
      the converted term