public class LexiconKeyOrder extends AbstractKeyOrder<BigdataValue>
LexiconRelation
.Modifier and Type | Field and Description |
---|---|
static LexiconKeyOrder |
BLOBS
Keys are
BlobIV s. |
static LexiconKeyOrder |
ID2TERM
Keys are
TermId s. |
static int |
SLOT_IV
The positional index corresponding to the
IV in a
LexPredicate . |
static int |
SLOT_TERM
The positional index corresponding to the
BigdataValue in a
LexPredicate . |
static LexiconKeyOrder |
TERM2ID
Keys are RDF
Value s. |
Modifier and Type | Method and Description |
---|---|
protected void |
appendKeyComponent(IKeyBuilder keyBuilder,
int i,
Object keyComponent)
Encodes an value into the key.
|
Comparator<BigdataValue> |
getComparator()
Operation is not supported.
|
String |
getIndexName()
The base name for the index.
|
int |
getKeyArity()
Return the #of elements in the key for this natural order.
|
int |
getKeyOrder(int keyPos)
Return the index of the slot in the
IPredicate which appears at
the specified position in the key. |
int |
index()
The integer used to represent the
LexiconKeyOrder . |
String |
toString()
Return
getIndexName() 's value. |
static LexiconKeyOrder |
valueOf(int index)
Returns the singleton corresponding to the index.
|
getFromKey, getKey, getToKey
public static final transient LexiconKeyOrder TERM2ID
Value
s. Values are TermId
s. Note that the
keys of this index CAN NOT be decoded (they are unicode sort keys).public static final transient LexiconKeyOrder ID2TERM
TermId
s. Values are RDF Value
s (which MAY be
stored on raw records, which is transparent to the user if it occurs).public static final transient LexiconKeyOrder BLOBS
BlobIV
s. Values are RDF Value
s which are
typically stored on raw records.
The index whose keys are formed from the hash code of the RDF
Value
plus a counter (to break ties on the hash code). The
IV
for an entry in the TERMS index is formed by wrapping this
key. The values are the RDF Value
s and are often represented by
raw records on the backing Journal
. This index is only used for
"large" Value
s. Most RDF Value
s wind up inlined into the
statement indices.
public static final transient int SLOT_TERM
BigdataValue
in a
LexPredicate
.public static final transient int SLOT_IV
IV
in a
LexPredicate
.public static LexiconKeyOrder valueOf(int index)
index
- The index.LexiconKeyOrder
having that index.IllegalArgumentException
- if the index is not valid.public String getIndexName()
public String toString()
getIndexName()
's value.public int index()
LexiconKeyOrder
.public final int getKeyArity()
IKeyOrder
public final int getKeyOrder(int keyPos)
IKeyOrder
IPredicate
which appears at
the specified position in the key.keyPos
- The index into the key that is being generated.IPredicate
.public final Comparator<BigdataValue> getComparator()
Note: The TERMS index key order is defined by the BlobIV
keys.
They are formed from the VTE
, the hashCode (of the
BigdataValue
), and a collision counter. The collision counter is
not known unless you actually scan the collision bucket in the TERMS
index. So there is no way to provide a comparator for the TERMS index
unless all of the BigdataValue
s have been resolved to their
BlobIV
s.
UnsupportedOperationException
protected void appendKeyComponent(IKeyBuilder keyBuilder, int i, Object keyComponent)
IKeyBuilder
. If you need to specialize how a value
gets encoded into the key then you can override this method.
Overridden to handle the encoding of the IV
for the index.
appendKeyComponent
in class AbstractKeyOrder<BigdataValue>
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.