Class RDF4JValueConverter
java.lang.Object
fr.inria.rules.integraal.storage.rdf4j.value.converter.RDF4JValueConverter
Converts RDF4J values into InteGraal terms.
-
Constructor Summary
ConstructorsConstructorDescriptionRDF4JValueConverter(TermFactory termFactory) Creates a converter backed by the supplied term factory. -
Method Summary
Modifier and TypeMethodDescriptionconvertToTerm(org.eclipse.rdf4j.model.Value rdf4j_value) Converts a RDF4J Value into a Term, if possible.static RDF4JValueConverterReturns the shared converter instance.
-
Constructor Details
-
RDF4JValueConverter
Creates a converter backed by the supplied term factory.- Parameters:
termFactory- the factory used to create InteGraal terms
-
-
Method Details
-
getDefaultInstance
Returns the shared converter instance.- Returns:
- the default converter
-
convertToTerm
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
-