Class RDF4JValueConverter

java.lang.Object
fr.inria.rules.integraal.storage.rdf4j.value.converter.RDF4JValueConverter

public class RDF4JValueConverter extends Object
Converts RDF4J values into InteGraal terms.
  • Constructor Details

    • RDF4JValueConverter

      public RDF4JValueConverter(TermFactory termFactory)
      Creates a converter backed by the supplied term factory.
      Parameters:
      termFactory - the factory used to create InteGraal terms
  • Method Details

    • getDefaultInstance

      public static RDF4JValueConverter getDefaultInstance()
      Returns the shared converter instance.
      Returns:
      the default converter
    • convertToTerm

      public Term convertToTerm(org.eclipse.rdf4j.model.Value rdf4j_value)
      Converts a RDF4J Value into a Term, if possible.

      - If it's a literal with a recognized datatype, parse 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, store it as a constant - If it's a blank node, store it as a variable

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