V - Blazegraph value to expand. These are usually treated a bit
roughly by Blazegraph - lots of rawtypespublic class WikibaseDateExtension<V extends com.bigdata.rdf.model.BigdataValue> extends AbstractMultiTypeExtension<V> implements com.bigdata.rdf.internal.constraints.IMathOpHandler
IExtension implements
inlining for literals that represent xsd:dateTime literals. Unlike
DateTimeExtension on which
this is based, it stores the literals as time in seconds
since the epoch. The seconds are encoded as an inline long. Also unlike
DateTimeExtension it only supports UTC as the default time zone because UTC
is king. This is needed because Wikidata contains dates that who's
milliseconds since epoch don't fit into a long.| Modifier and Type | Field and Description |
|---|---|
protected static DatatypeFactory |
DATATYPE_FACTORY
Datatype factory cache.
|
| Constructor and Description |
|---|
WikibaseDateExtension(com.bigdata.rdf.internal.IDatatypeURIResolver resolver) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canInvokeMathOp(org.openrdf.model.Literal... args) |
protected com.bigdata.rdf.internal.impl.literal.AbstractLiteralIV |
createDelegateIV(org.openrdf.model.Literal literal,
com.bigdata.rdf.model.BigdataURI dt)
Attempts to convert the supplied value into an epoch representation and
encodes the long in a delegate
XSDNumericIV, and returns an
LiteralExtensionIV to wrap the native type. |
com.bigdata.rdf.internal.IV |
doMathOp(org.openrdf.model.Literal l1,
com.bigdata.rdf.internal.IV iv1,
org.openrdf.model.Literal l2,
com.bigdata.rdf.internal.IV iv2,
com.bigdata.rdf.internal.constraints.MathBOp.MathOp op,
com.bigdata.rdf.model.BigdataValueFactory vf) |
protected com.bigdata.rdf.model.BigdataLiteral |
safeAsValue(com.bigdata.rdf.internal.impl.literal.LiteralExtensionIV iv,
com.bigdata.rdf.model.BigdataValueFactory vf,
com.bigdata.rdf.model.BigdataURI dt)
Use the long value of the
XSDNumericIV delegate which represents
seconds since the epoch to create a WikibaseDate and then represent that
properly using xsd's string representations. |
asValue, createIV, getDatatypes, resolveDataType, resolveDataTypeprotected static final DatatypeFactory DATATYPE_FACTORY
public WikibaseDateExtension(com.bigdata.rdf.internal.IDatatypeURIResolver resolver)
protected com.bigdata.rdf.internal.impl.literal.AbstractLiteralIV createDelegateIV(org.openrdf.model.Literal literal,
com.bigdata.rdf.model.BigdataURI dt)
XSDNumericIV, and returns an
LiteralExtensionIV to wrap the native type.createDelegateIV in class AbstractMultiTypeExtension<V extends com.bigdata.rdf.model.BigdataValue>protected com.bigdata.rdf.model.BigdataLiteral safeAsValue(com.bigdata.rdf.internal.impl.literal.LiteralExtensionIV iv,
com.bigdata.rdf.model.BigdataValueFactory vf,
com.bigdata.rdf.model.BigdataURI dt)
XSDNumericIV delegate which represents
seconds since the epoch to create a WikibaseDate and then represent that
properly using xsd's string representations.safeAsValue in class AbstractMultiTypeExtension<V extends com.bigdata.rdf.model.BigdataValue>public boolean canInvokeMathOp(org.openrdf.model.Literal... args)
canInvokeMathOp in interface com.bigdata.rdf.internal.constraints.IMathOpHandlerpublic com.bigdata.rdf.internal.IV doMathOp(org.openrdf.model.Literal l1,
com.bigdata.rdf.internal.IV iv1,
org.openrdf.model.Literal l2,
com.bigdata.rdf.internal.IV iv2,
com.bigdata.rdf.internal.constraints.MathBOp.MathOp op,
com.bigdata.rdf.model.BigdataValueFactory vf)
doMathOp in interface com.bigdata.rdf.internal.constraints.IMathOpHandlerCopyright © 2016. All rights reserved.