|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.DefaultTupleSerializer<IV,BigdataValue>
com.bigdata.rdf.lexicon.Id2TermTupleSerializer
public class Id2TermTupleSerializer
Encapsulates key and value formation for the reverse lexicon index.
| Constructor Summary | |
|---|---|
Id2TermTupleSerializer()
De-serialization ctor. |
|
Id2TermTupleSerializer(String namespace,
BigdataValueFactory valueFactory)
|
|
Id2TermTupleSerializer(String namespace,
BigdataValueFactory valueFactory,
IKeyBuilderFactory keyBuilderFactory,
IRabaCoder leafKeysCoder,
IRabaCoder leafValsCoder)
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class com.bigdata.btree.DefaultTupleSerializer |
|---|
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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)
| Method Detail |
|---|
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>IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class DefaultTupleSerializer<IV,BigdataValue>IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||