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, toString
public 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 ITupleSerializer
deserializeKey
in class DefaultTupleSerializer
UnsupportedOperationException
- alwayspublic byte[] serializeKey(Object obj)
Value
.serializeKey
in interface ITupleSerializer
serializeKey
in class DefaultTupleSerializer
obj
- The RDF Value
.null
(
null
keys are not allowed into an index).public byte[] serializeVal(Object obj)
serializeVal
in interface ITupleSerializer
serializeVal
in class DefaultTupleSerializer
obj
- 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 ITupleSerializer
deserialize
in class DefaultTupleSerializer
tuple
- The tuple.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class DefaultTupleSerializer
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class DefaultTupleSerializer
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.