com.bigdata.rdf.internal
Interface IExtension<V extends BigdataValue>

All Known Implementing Classes:
DateTimeExtension, DerivedNumericsExtension, USDFloatExtension, XSDStringExtension

public interface IExtension<V extends BigdataValue>

IExtensions are responsible for round-tripping between an RDF Value and an LiteralExtensionIV for a particular datatype. Because of how LiteralExtensionIVs are encoded and decoded, the IExtension will need to have on hand the TermId for its datatype. This is accomplished via the IDatatypeURIResolver - the IExtension will give the resolver the datatype URI it needs resolved and the resolver will lookup (or create) the TermId. This relies on the declaration of that URI as part of the Vocabulary.


Method Summary
 V asValue(LiteralExtensionIV iv, BigdataValueFactory vf)
          Create an RDF value from an LiteralExtensionIV.
 LiteralExtensionIV createIV(Value value)
          Create an LiteralExtensionIV from an RDF value.
 Set<BigdataURI> getDatatypes()
          Return the fully resolved datatype(s) handled by this interface in the form of a BigdataURI with the TermId already set.
 

Method Detail

getDatatypes

Set<BigdataURI> getDatatypes()
Return the fully resolved datatype(s) handled by this interface in the form of a BigdataURI with the TermId already set.

Returns:
the datatype

createIV

LiteralExtensionIV createIV(Value value)
Create an LiteralExtensionIV from an RDF value.

Parameters:
value - The RDF Value
Returns:
The extension IV -or- null if the Value can not be inlined using this IExtension.

asValue

V asValue(LiteralExtensionIV iv,
          BigdataValueFactory vf)
Create an RDF value from an LiteralExtensionIV.

Parameters:
iv - The extension IV
vf - The bigdata value factory
Returns:
The RDF Value


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.