public enum DTE extends Enum<DTE>
If a data type is not inlined, then the representation of the value must be
materialized. Non-inline values are BlobIV
s and are materialized by
looking IV
in the TERMS index. More recently, we are also permitting
indirection from the TERMS index. For example, very large objects may be
stored in the file system, in S3, etc. In those cases, you must still resolve
the IV
against the TERMS index. Now the resulting object may be a
BigdataValue
. However, the object materialized from the TERMS index
may also provide indirection into the file system, S3, etc.
The VTE
has 4 distinctions (URI, Literal, BlankNode, and SID) and is
coded in the high 2 bits of a byte while the DTE
has 16 possible
distinctions, one of which is reserved against future use and one of which is
reserved against extensibility in the set of intrinsic types.
Note: Unicode values CAN NOT be inlined because (a) Unicode sort keys are not decodable; and (b) the collation rules for Unicode depend on the lexicon configuration, which specifies parameters such as Locale, Strength, etc.
Blanks nodes (their IDs are UUIDs) and data types with larger values (UUIDs) or varying length values (xsd:integer, xsd:decimanl) can be inlined. Whether it makes sense to do so is a question which trades off redundancy in the statement indices for faster materialization of the data type values and a smaller lexicon. UUIDs for purposes other than blank nodes can also be inlined, however they will have a different prefix to indicate that they are Literals rather than blank nodes.
Note: While multidimensional data types (such as points or rectangles) could be inlined (in the sense that their values could be converted to unsigned byte[] keys and the keys could be decoded), they can not be placed into a total order which has meaningful semantics by a single index. For example, geo:point describes a 2-dimensional location and lacks any meaningful locality when inlined into the index. The only reason to inline such data types is to avoid indirection through the lexicon to materialize their values. Efficiently resolving points in a region requires the use of a spatial index.
http://www.w3.org/TR/xmlschema-2/
Enum Constant and Description |
---|
Extension
This provides an extension of the intrinsic data types.
|
UUID
The "inline" value is a
UUID . |
XSDBoolean
The "inline" value is a boolean (xsd:boolean).
|
XSDByte
The "inline" value is a signed byte (xsd:byte).
|
XSDDecimal
The "inline" value is an xsd:decimal.
|
XSDDouble
The "inline" value is a double precision floating point number
(xsd:double).
|
XSDFloat
The "inline" value is a single precision floating point number
(xsd:float).
|
XSDInt
The "inline" value is a signed 4 byte integer (xsd:int).
|
XSDInteger
The "inline" value is an xsd:integer, which is equivalent to
BigInteger . |
XSDLong
The "inline" value is a signed 8 byte integer (xsd:long).
|
XSDShort
The "inline" value is a signed short (xsd:short).
|
XSDString
The "inline" value is a compressed Unicode string.
|
XSDUnsignedByte
The "inline" value is an unsigned byte (xsd:unsignedByte).
|
XSDUnsignedInt
The "inline" value is an unsigned 4 byte integer (xsd:unsignedInt).
|
XSDUnsignedLong
The "inline" value is an unsigned 8 byte integer (xsd:unsignedLong).
|
XSDUnsignedShort
The "inline" value is a unsigned short (xsd:unsignedShort).
|
Modifier and Type | Method and Description |
---|---|
Class<?> |
getCls()
The class of the Java object used to represent instances of the coded
data type.
|
org.openrdf.model.URI |
getDatatypeURI()
The corresponding datatype
URI . |
boolean |
isBigNumeric()
true for xsd:integer and xsd:decimal. |
boolean |
isFixedNumeric()
This is
!isBigNumeric() and is true for any of
the fixed length numeric data types (xsd:byte, xsd:unsignedByte,
xsd:short, xsd:unsignedShort, xsd:int, xsd:unsignedInt, xsd:long,
xsd:unsignedLong, xsd:float, xsd:double ). |
boolean |
isFloatingPointNumeric()
true for xsd:float, xsd:double, and xsd:decimal. |
boolean |
isNumeric()
true for any of the numeric data types (xsd:byte,
xsd:unsignedByte, xsd:short, xsd:unsignedShort, xsd:int, xsd:unsignedInt,
xsd:long, xsd:unsignedLong, xsd:float, xsd:double, xsd:integer, and
xsd:decimal). |
boolean |
isSignedNumeric()
true for an signed numeric datatype ( xsd:byte,
xsd:short, xsd:int, xsd:long, xsd:float, xsd:double, xsd:integer, and
xsd:decimal). |
boolean |
isUnsignedNumeric()
true for an unsigned numeric datatype ( xsd:unsignedByte,
xsd:unsignedShort, xsd:unsignedInt, xsd:unsignedLong). |
int |
len()
The length of the data type value when represented as a component in an
unsigned byte[] key -or- ZERO iff the key component has a variable length
for that data type.
|
byte |
v()
An
byte value whose whose lower 6 bits code the
DTE . |
static DTE |
valueOf(byte b) |
static DTE |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DTE |
valueOf(org.openrdf.model.URI datatype)
Return the
DTE for the datatype URI . |
static DTE[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DTE XSDBoolean
public static final DTE XSDByte
public static final DTE XSDShort
public static final DTE XSDInt
public static final DTE XSDLong
public static final DTE XSDUnsignedByte
public static final DTE XSDUnsignedShort
public static final DTE XSDUnsignedInt
public static final DTE XSDUnsignedLong
public static final DTE XSDFloat
public static final DTE XSDDouble
public static final DTE XSDInteger
BigInteger
.public static final DTE XSDDecimal
BigDecimal
, but unlike that Java class, xsd:decimal DOES NOT
preserve the precision of the value. (This fact is convenient for indices
since BigDecimal
has, among other things, many distinct
representations of ZERO with different precision, etc. If we had to
represent the precision, we could not use xsd:decimal in an index!)public static final DTE UUID
UUID
.http://lists.xml.org/archives/xml-dev/201003/msg00027.html
public static final DTE XSDString
LexiconRelation
to materialize the RDF Value
. Further,
there is a practical upper bound on the size of a key in the B+Tree.
Therefore, inlining of Unicode values having between 32 and 64 characters
is suggested as a recommended practice. Beyond that, inlining can
contribute significantly to the growth in the B+Tree leaf size and have a
negative impact on join performance for the statement indices.
This DTE
may be used in combination with VTE
as follows:
VTE.BNODE
VTE.LITERAL
VTE.LITERAL
plus the extension bitVTE.URI
plus the extension bitURI
's namespace and local
name (basically, everything after the last '/' in the URI path or after
the '#' if there is a URI anchor).public static final DTE Extension
DTEExtension
.
Note: This is NOT the same as the AbstractIV#isExtension()
bit.
The latter always indicates that an IV
follows
the flags
byte and indicates the actual datatype URI. In
contrast, Extension
gives you another byte which you can use
to handle additional "intrinsic" types.
DTEExtension
,
(Implement support for DTE extension types for URIs)
public static DTE[] values()
for (DTE c : DTE.values()) System.out.println(c);
public static DTE valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static final DTE valueOf(byte b)
public static final DTE valueOf(org.openrdf.model.URI datatype)
DTE
for the datatype URI
.datatype
- The datatype URI
.DTE
for that datatype -or- Extension
if the
datatype is null
(there is no specific datatype for
an extension since extensions by their nature can handle any
datatype) -or- null
if the datatype URI
is
none of the datatypes for which native support is provided.public final byte v()
byte
value whose whose lower 6 bits code the
DTE
.public final int len()
public final Class<?> getCls()
public final org.openrdf.model.URI getDatatypeURI()
URI
.public boolean isNumeric()
true
for any of the numeric data types (xsd:byte,
xsd:unsignedByte, xsd:short, xsd:unsignedShort, xsd:int, xsd:unsignedInt,
xsd:long, xsd:unsignedLong, xsd:float, xsd:double, xsd:integer, and
xsd:decimal).public boolean isSignedNumeric()
true
for an signed numeric datatype ( xsd:byte,
xsd:short, xsd:int, xsd:long, xsd:float, xsd:double, xsd:integer, and
xsd:decimal).public boolean isUnsignedNumeric()
true
for an unsigned numeric datatype ( xsd:unsignedByte,
xsd:unsignedShort, xsd:unsignedInt, xsd:unsignedLong).public boolean isFixedNumeric()
!isBigNumeric()
and is true
for any of
the fixed length numeric data types (xsd:byte, xsd:unsignedByte,
xsd:short, xsd:unsignedShort, xsd:int, xsd:unsignedInt, xsd:long,
xsd:unsignedLong, xsd:float, xsd:double
).public boolean isBigNumeric()
true
for xsd:integer and xsd:decimal.public boolean isFloatingPointNumeric()
true
for xsd:float, xsd:double, and xsd:decimal.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.