public class DateTimeExtension<V extends BigdataValue> extends Object implements IExtension<V>
IExtension
implements inlining for literals
that represent xsd:dateTime literals. These literals will be stored as time
in milliseconds since the epoch. The milliseconds are encoded as an inline
long.Modifier and Type | Field and Description |
---|---|
static DatatypeFactory |
datatypeFactorySingleton
Singleton.
|
Constructor and Description |
---|
DateTimeExtension(IDatatypeURIResolver resolver,
TimeZone defaultTZ) |
Modifier and Type | Method and Description |
---|---|
V |
asValue(LiteralExtensionIV iv,
BigdataValueFactory vf)
Use the long value of the
XSDLongIV delegate (which represents
milliseconds since the epoch) to create a an XMLGregorianCalendar
object (GMT timezone). |
LiteralExtensionIV |
createIV(long timestamp,
org.openrdf.model.URI dt) |
LiteralExtensionIV |
createIV(org.openrdf.model.Value value)
Attempts to convert the supplied value into an epoch 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. |
static long |
getTimestamp(String dateTime)
Convert an xsd:dateTime into its milliseconds from the epoch
representation.
|
static long |
getTimestamp(String dateTime,
TimeZone defaultTZ)
Convert an xsd:dateTime into its milliseconds from the epoch
representation.
|
public static final DatatypeFactory datatypeFactorySingleton
public DateTimeExtension(IDatatypeURIResolver resolver, TimeZone defaultTZ)
public Set<BigdataURI> getDatatypes()
IExtension
BigdataURI
with the TermId
already set.getDatatypes
in interface IExtension<V extends BigdataValue>
public LiteralExtensionIV createIV(org.openrdf.model.Value value)
XSDLongIV
, and returns an LiteralExtensionIV
to wrap the native
type.createIV
in interface IExtension<V extends BigdataValue>
value
- The RDF Value
IV
-or- null
if the
Value
can not be inlined using this IExtension
.public static long getTimestamp(String dateTime, TimeZone defaultTZ)
public static long getTimestamp(String dateTime)
public LiteralExtensionIV createIV(long timestamp, org.openrdf.model.URI dt)
public V asValue(LiteralExtensionIV iv, BigdataValueFactory vf)
XSDLongIV
delegate (which represents
milliseconds since the epoch) to create a an XMLGregorianCalendar
object (GMT timezone). Use the XMLGregorianCalendar to create a datatype
literal value with the appropriate datatype.asValue
in interface IExtension<V extends BigdataValue>
iv
- The extension IV
vf
- The bigdata value factoryValue
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.