Package org.wikidata.wdtk.rdf.values
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 TypeMethodDescriptionorg.eclipse.rdf4j.model.ValuegetRdfValue(V value, PropertyIdValue propertyIdValue, boolean simple) Returns an RDF value that should be used to represent the given Wikibase data value in RDF.voidWrites auxiliary triples that might be needed to encode a Wikibase value in RDF.
-
Method Details
-
getRdfValue
Returns an RDF value that should be used to represent the given Wikibase data value in RDF.- Parameters:
value- the value to convertpropertyIdValue- the property for which this value was used; this provides important context information for the conversionsimple- 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.RDFHandlerExceptionWrites 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
-