Interface ValueConverter<V extends Value>

Type Parameters:
V - the type of Wikibase value converted by this class
All Known Implementing Classes:
AbstractValueConverter, AnyValueConverter, BufferedValueConverter, EntityIdValueConverter, GlobeCoordinatesValueConverter, MonolingualTextValueConverter, QuantityValueConverter, StringValueConverter, TimeValueConverter

public interface ValueConverter<V extends Value>
Interface for classes that convert one type of Wikibase data value into a RDF.
Author:
Markus Kroetzsch
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.rdf4j.model.Value
    getRdfValue(V value, PropertyIdValue propertyIdValue, boolean simple)
    Returns an RDF value that should be used to represent the given Wikibase data value in RDF.
    void
    Writes auxiliary triples that might be needed to encode a Wikibase value in RDF.
  • Method Details

    • getRdfValue

      org.eclipse.rdf4j.model.Value getRdfValue(V value, PropertyIdValue propertyIdValue, boolean simple)
      Returns an RDF value that should be used to represent the given Wikibase data value in RDF.
      Parameters:
      value - the value to convert
      propertyIdValue - the property for which this value was used; this provides important context information for the conversion
      simple - if true, use a simplified conversion to RDF and do not convert values that are inherently complex
      Returns:
      the RDF value to use for representing the data value in RDF
    • writeAuxiliaryTriples

      void writeAuxiliaryTriples() throws org.eclipse.rdf4j.rio.RDFHandlerException
      Writes auxiliary triples that might be needed to encode a Wikibase value in RDF.
      Throws:
      org.eclipse.rdf4j.rio.RDFHandlerException - if there is a problem writing the triples