public class Term2IdTupleSerializer extends DefaultTupleSerializer
Value space.
The index assigns term identifiers, and those term identifiers are stored in
the values of the index.| Constructor and Description |
|---|
Term2IdTupleSerializer()
De-serialization ctor.
|
Term2IdTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
Uses the caller's
IKeyBuilderFactory. |
Term2IdTupleSerializer(Properties properties)
Configures the
IKeyBuilderFactory from the caller's properties. |
| Modifier and Type | Method and Description |
|---|---|
IV |
deserialize(ITuple tuple)
|
Object |
deserializeKey(ITuple tuple)
You can not decode the term:id keys since they include Unicode sort keys
and that is a lossy transform.
|
LexiconKeyBuilder |
getLexiconKeyBuilder()
Thread-local object for constructing keys for the lexicon.
|
LexiconKeyBuilder |
getLexiconPrimaryKeyBuilder()
Return a
LexiconKeyBuilder that is setup with collation strength
PRIMARY. |
void |
readExternal(ObjectInput in) |
byte[] |
serializeKey(Object obj)
Return the unsigned byte[] key for an RDF
Value. |
byte[] |
serializeVal(Object obj)
Return the byte[] value, which is a term identifier written as a packed
long integer.
|
void |
writeExternal(ObjectOutput out) |
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, getPrimaryKeyBuilder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toStringpublic Term2IdTupleSerializer()
public Term2IdTupleSerializer(Properties properties)
IKeyBuilderFactory from the caller's properties.properties - public Term2IdTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
IKeyBuilderFactory.keyBuilderFactory - public LexiconKeyBuilder getLexiconKeyBuilder()
public LexiconKeyBuilder getLexiconPrimaryKeyBuilder()
LexiconKeyBuilder that is setup with collation strength
PRIMARY.public Object deserializeKey(ITuple tuple)
deserializeKey in interface ITupleSerializerdeserializeKey in class DefaultTupleSerializerUnsupportedOperationException - alwayspublic byte[] serializeKey(Object obj)
Value.serializeKey in interface ITupleSerializerserializeKey in class DefaultTupleSerializerobj - The RDF Value.null (
null keys are not allowed into an index).public byte[] serializeVal(Object obj)
serializeVal in interface ITupleSerializerserializeVal in class DefaultTupleSerializerobj - A term identifier expressed as a TermId.null if the reference is null.public IV deserialize(ITuple tuple)
ITuple as a IV whose value is the
term identifier associated with the key. The key itself is not decodable.deserialize in interface ITupleSerializerdeserialize in class DefaultTupleSerializertuple - The tuple.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DefaultTupleSerializerIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class DefaultTupleSerializerIOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.