V
- public class LiteralExtensionIV<V extends BigdataLiteral> extends AbstractInlineExtensionIV<V,Object> implements org.openrdf.model.Literal, InlineLiteralIV<V,Object>
Literal
s for which an
IExtension
was registered. An LiteralExtensionIV
always has the inline and extension bits
set. An instance of this class bundles together an inline value of some
primitive data type declared by DTE
with the IV
of the
datatype URI for the datatype literal. LiteralExtensionIV
are fully inline
since the datatype URI can be materialized by the IExtension
while
DTE
identifies the value space and the point in the value space is
directly inline.flags
Constructor and Description |
---|
LiteralExtensionIV(AbstractLiteralIV<BigdataLiteral,?> delegate,
IV<BigdataURI,?> datatype) |
Modifier and Type | Method and Description |
---|---|
int |
_compareTo(IV o)
Compare two
IV s having the same intrinsic datatype. |
V |
asValue(LexiconRelation lex)
Defer to the
ILexiconConfiguration which has specific knowledge
of how to generate an RDF value from this general purpose extension IV. |
boolean |
booleanValue() |
int |
byteLength()
Return the length of the datatype IV plus the length of the delegate IV.
|
byte |
byteValue() |
XMLGregorianCalendar |
calendarValue() |
IV<V,Object> |
clone(boolean clearCache)
Return a copy of this
IV . |
BigDecimal |
decimalValue() |
double |
doubleValue() |
boolean |
equals(Object o)
Return true iff the two
IV s are the same point in the same value
space. |
float |
floatValue() |
org.openrdf.model.URI |
getDatatype() |
AbstractLiteralIV<BigdataLiteral,?> |
getDelegate() |
DTEExtension |
getDTEX()
IFF
IV.getDTE() returns DTE.Extension then this method will
report the DTEExtension value that specifies the intrinsic
datatype for this IV. |
IV<BigdataURI,?> |
getExtensionIV()
Extension IV is the datatype for this literal.
|
Object |
getInlineValue()
Return the Java
Object corresponding to the inline value. |
String |
getLabel() |
String |
getLanguage() |
int |
hashCode()
Return the hash code of the long epoch value.
|
BigInteger |
integerValue() |
int |
intValue() |
long |
longValue() |
boolean |
needsMaterialization()
Even though Literal extension IVs are fully inline (no data in the
lexicon indices), we do need materialization to answer the openrdf
Literal interface correctly.
|
short |
shortValue() |
String |
stringValue() |
String |
toString() |
isInline
compareTo, encode, flags, getDTE, getDTE, getInternalValueTypeEnum, getValue, getValueCache, getVTE, getVTE, hasValue, isBigNumeric, isBNode, isExtension, isExtension, isFixedNumeric, isFloatingPointNumeric, isInline, isLiteral, isNullIV, isNumeric, isResource, isSignedNumeric, isStatement, isUnsignedNumeric, isURI, isVocabulary, setValue, toFlags
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
encode, flags, getDTE, getVTE, isBigNumeric, isBNode, isExtension, isFixedNumeric, isFloatingPointNumeric, isInline, isLiteral, isNullIV, isNumeric, isResource, isSignedNumeric, isStatement, isUnsignedNumeric, isURI, isVocabulary
compareTo
public LiteralExtensionIV(AbstractLiteralIV<BigdataLiteral,?> delegate, IV<BigdataURI,?> datatype)
public IV<V,Object> clone(boolean clearCache)
IV
.
Note: This method exists to defeat the hard reference from the IV
to the cached BigdataValue
in order to avoid a memory leak when
the IV
is used as the key in a weak value cache whose value is
the BigdataValue
. Therefore, certain IV
implementations
MAY return this when they are used for limited collections. The
vocabulary IVs are the primary example. For the same reason, we do not
need to recursively break the link from the IV
to the
BigdataValue
for IV
s which embed other IV
s.
Note: The extensionIV and delegateIV are NOT cloned. The rationale is
that we are only cloning to break the hard reference from the IV
to to cached value. If that needs to be done for the extensionIV and
delegateIV, then it will be done separately for those objects when they
are inserted into the termsCache.
clone
in interface IVCache<V extends BigdataLiteral,Object>
clearCache
- When true
the cached reference (if any) will NOT
be set on the copy.(Thread-local
cache combined with unbounded thread pools causes effective memory
leak)
public boolean needsMaterialization()
needsMaterialization
in interface IV<V extends BigdataLiteral,Object>
public AbstractLiteralIV<BigdataLiteral,?> getDelegate()
public Object getInlineValue()
IV
Object
corresponding to the inline value.getInlineValue
in interface IV<V extends BigdataLiteral,Object>
Object
.public DTEExtension getDTEX()
IV
IV.getDTE()
returns DTE.Extension
then this method will
report the DTEExtension
value that specifies the intrinsic
datatype for this IV.getDTEX
in interface IV<V extends BigdataLiteral,Object>
getDTEX
in class AbstractIV<V extends BigdataLiteral,Object>
(Implement support for DTE extension types for URIs)
,
( DTEExtension for compressed timestamp)
public IV<BigdataURI,?> getExtensionIV()
getExtensionIV
in interface IExtensionIV
public int hashCode()
hashCode
in interface org.openrdf.model.Literal
hashCode
in class AbstractIV<V extends BigdataLiteral,Object>
public boolean equals(Object o)
AbstractIV
IV
s are the same point in the same value
space. Points in different value spaces (as identified by different
datatype URIs) are NOT equal even if they have the same value in the
corresponding primitive data type.
Note: The IV
implementations typically DO NOT compare equals()
with BigdataValue
s. Therefore you MUST NOT mix IV
s and
BigdataValue
s in the keys of a map or the values of a set.
equals
in interface org.openrdf.model.Literal
equals
in class AbstractIV<V extends BigdataLiteral,Object>
public int _compareTo(IV o)
AbstractIV
IV
s having the same intrinsic datatype._compareTo
in class AbstractIV<V extends BigdataLiteral,Object>
public int byteLength()
byteLength
in interface IV<V extends BigdataLiteral,Object>
public V asValue(LexiconRelation lex)
ILexiconConfiguration
which has specific knowledge
of how to generate an RDF value from this general purpose extension IV.
If the value is not already cached, then inflate an inline RDF value to a
BigdataValue
and cache it on a private field.
Note: Query plans are responsible for ensuring that IV
s have been
materialized before operators are evaluated which invoke this method.
This pattern ensures that efficient batch operators are used to
materialize Value
s, and thereby avoids heavy RMI overhead in
scale-out, and provides operators which use IVCache.getValue()
with a
simple method signature which does not require access to the lexicon.
Query plans are also responsible for dropping variables once they are no
longer needed or, in the case of large values and BLOBs, dropping the
cached BigdataValue
when possible in order to avoid excess
network and heap overhead.
asValue
in interface IVCache<V extends BigdataLiteral,Object>
lex
- The lexicon relation (this is required in order to access the
BigdataValueFactory
for the namespace associated with
lexicon when we materialize an inline IV
).BigdataValue
.public String stringValue()
stringValue
in interface org.openrdf.model.Value
public boolean booleanValue()
booleanValue
in interface org.openrdf.model.Literal
public byte byteValue()
byteValue
in interface org.openrdf.model.Literal
public XMLGregorianCalendar calendarValue()
calendarValue
in interface org.openrdf.model.Literal
public BigDecimal decimalValue()
decimalValue
in interface org.openrdf.model.Literal
public double doubleValue()
doubleValue
in interface org.openrdf.model.Literal
public float floatValue()
floatValue
in interface org.openrdf.model.Literal
public org.openrdf.model.URI getDatatype()
getDatatype
in interface org.openrdf.model.Literal
public String getLabel()
getLabel
in interface org.openrdf.model.Literal
public String getLanguage()
getLanguage
in interface org.openrdf.model.Literal
public int intValue()
intValue
in interface org.openrdf.model.Literal
public BigInteger integerValue()
integerValue
in interface org.openrdf.model.Literal
public long longValue()
longValue
in interface org.openrdf.model.Literal
public short shortValue()
shortValue
in interface org.openrdf.model.Literal
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.