public class ColorsEnumExtension<V extends BigdataValue> extends Object implements IExtension<V>
XSDByteIV.| Modifier and Type | Class and Description |
|---|---|
static class |
ColorsEnumExtension.Color
Simple demonstration enum for some common colors.
|
| Modifier and Type | Field and Description |
|---|---|
static org.openrdf.model.URI |
COLOR
The datatype URI for the colors enum extension.
|
| Constructor and Description |
|---|
ColorsEnumExtension(IDatatypeURIResolver resolver) |
| Modifier and Type | Method and Description |
|---|---|
V |
asValue(LiteralExtensionIV iv,
BigdataValueFactory vf)
Attempt to convert the
AbstractLiteralIV.byteValue() back into
a ColorsEnumExtension.Color, and then use the string value of the ColorsEnumExtension.Color to
create an RDF literal. |
LiteralExtensionIV |
createIV(org.openrdf.model.Value value)
Attempts to convert the supplied RDF value into a colors enum
representation.
|
Set<BigdataURI> |
getDatatypes()
Return the fully resolved datatype(s) handled by this interface in the
form of a
BigdataURI with the TermId already set. |
public static final transient org.openrdf.model.URI COLOR
public ColorsEnumExtension(IDatatypeURIResolver resolver)
public Set<BigdataURI> getDatatypes()
IExtensionBigdataURI with the TermId already set.getDatatypes in interface IExtension<V extends BigdataValue>public LiteralExtensionIV createIV(org.openrdf.model.Value value)
ColorsEnumExtension.Color enum
based on the string value of the literal's label. Each ColorsEnumExtension.Color
in the enum maps to a particular byte. This byte is encoded in a
delegate XSDByteIV, and an LiteralExtensionIV is returned that
wraps the native type.createIV in interface IExtension<V extends BigdataValue>value - The RDF ValueIV -or- null if the
Value can not be inlined using this IExtension.public V asValue(LiteralExtensionIV iv, BigdataValueFactory vf)
AbstractLiteralIV.byteValue() back into
a ColorsEnumExtension.Color, and then use the string value of the ColorsEnumExtension.Color to
create an RDF literal.asValue in interface IExtension<V extends BigdataValue>iv - The extension IVvf - The bigdata value factoryValueCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.