public class Id2TermTupleSerializer extends DefaultTupleSerializer<IV,BigdataValue>
| Constructor and Description |
|---|
Id2TermTupleSerializer()
De-serialization ctor.
|
Id2TermTupleSerializer(String namespace,
BigdataValueFactory valueFactory) |
Id2TermTupleSerializer(String namespace,
BigdataValueFactory valueFactory,
IKeyBuilderFactory keyBuilderFactory,
IRabaCoder leafKeysCoder,
IRabaCoder leafValsCoder) |
| Modifier and Type | Method and Description |
|---|---|
BigdataValue |
deserialize(ITuple tuple)
De-serializes the
ITuple as a BigdataValue, including
the term identifier extracted from the unsigned byte[] key, and sets
the appropriate BigdataValueFactoryImpl reference on that object. |
IV |
deserializeKey(ITuple tuple)
Decodes the term identifier key to a term identifier.
|
byte[] |
id2key(TermId<?> tid)
Generates an unsigned byte[] key from a
TermId. |
void |
readExternal(ObjectInput in) |
byte[] |
serializeKey(Object obj)
Return the unsigned byte[] key for a term identifier.
|
byte[] |
serializeVal(BigdataValue obj)
Return the
byte[] value, which is the serialization of an
RDF Value. |
void |
writeExternal(ObjectOutput out) |
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, getPrimaryKeyBuilder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toStringpublic Id2TermTupleSerializer()
public Id2TermTupleSerializer(String namespace, BigdataValueFactory valueFactory)
keyBuilderFactory - A factory that does not support unicode and has an
initialCapacity of .public Id2TermTupleSerializer(String namespace, BigdataValueFactory valueFactory, IKeyBuilderFactory keyBuilderFactory, IRabaCoder leafKeysCoder, IRabaCoder leafValsCoder)
public byte[] id2key(TermId<?> tid)
TermId.
Note: The code that handles efficient batch insertion of terms into the database replicates the logic for encoding the term identifier as an unsigned long integer.
id - The term identifier.#key2Id()public IV deserializeKey(ITuple tuple)
deserializeKey in interface ITupleSerializer<IV,BigdataValue>deserializeKey in class DefaultTupleSerializer<IV,BigdataValue>key - The key for an entry in the id:term index.public byte[] serializeKey(Object obj)
serializeKey in interface ITupleSerializer<IV,BigdataValue>serializeKey in class DefaultTupleSerializer<IV,BigdataValue>obj - The term identifier as a TermId.null (
null keys are not allowed into an index).public byte[] serializeVal(BigdataValue obj)
byte[] value, which is the serialization of an
RDF Value.serializeVal in interface ITupleSerializer<IV,BigdataValue>serializeVal in class DefaultTupleSerializer<IV,BigdataValue>obj - An RDF Value.null if the reference is null.public BigdataValue deserialize(ITuple tuple)
ITuple as a BigdataValue, including
the term identifier extracted from the unsigned byte[] key, and sets
the appropriate BigdataValueFactoryImpl reference on that object.deserialize in interface ITupleSerializer<IV,BigdataValue>deserialize in class DefaultTupleSerializer<IV,BigdataValue>tuple - The tuple.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DefaultTupleSerializer<IV,BigdataValue>IOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class DefaultTupleSerializer<IV,BigdataValue>IOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.