com.bigdata.rdf.rules
Class SPOBindingSetSerializer
java.lang.Object
com.bigdata.rdf.rules.SPOBindingSetSerializer
- All Implemented Interfaces:
- IStreamSerializer<IBindingSet[]>, Serializable
public class SPOBindingSetSerializer
- extends Object
- implements IStreamSerializer<IBindingSet[]>
A class that provides (relatively) compact serialization for a chunk of
IBindingSets.
FIXME This implementation is not complete and is not tested.
- Version:
- $Id: SPOBindingSetSerializer.java 3448 2010-08-18 20:55:58Z thompsonbry $
- Author:
- Bryan Thompson
- See Also:
- Serialized Form
- TODO:
- for a general purpose solution, this could use extSer for a compact
serialization and that will work well with joins binding variables with
many different data types. the set of serializers actually used would
have to be sent as part of the serialized state as any assigned
classIds., unit tests and performance comparisons of serialization options., factor out the variable declarations. binding sets coming from joins
tend to have natural order based on the sequence in which the variables
are becoming bound. Leverage that order to produce a much more compact
serialization since duplicate bindings can be elided., given all the options for
IBindingSet (and ISolution)
serialization, these classes really need to version their own
serialization formats., for RDF, this can of course be optimized quite a bit since we know that
all the values are long integers., do a version for ISolutions as well that accepts the same
constraints (variable bindings are long integers), but also factor out
the rule (which is optional) and the materialized element (which will
be an SPO and which is also optional). Note that all
ISolutions that are (de-)serialized together will share the
same flags for whether the rule, bindingset, or element are present.
The serialization of the binding sets themselves can be done with the
SPOBindingSetSerializer.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final transient IStreamSerializer<IBindingSet[]> INSTANCE
deserialize
public IBindingSet[] deserialize(ObjectInput in)
- Description copied from interface:
IStreamSerializer
- De-serialize an object.
- Specified by:
deserialize in interface IStreamSerializer<IBindingSet[]>
- Parameters:
in - The stream from which the object's state will be read.
- Returns:
- The object.
serialize
public void serialize(ObjectOutput out,
IBindingSet[] obj)
- Description copied from interface:
IStreamSerializer
- Serialize an object.
Note: All state required to de-serialize the object must be written onto
the stream. That may include serializer state as well, such as dictionary
that will be used on the other end to decode the object. In such cases
the serializer needs to know how to de-serialize both the dictionary and
the data. Stateful serializers such as extSer must encapsulate
all requisite state on the output stream.
- Specified by:
serialize in interface IStreamSerializer<IBindingSet[]>
- Parameters:
out - The stream onto which the object's state will be written.obj - The object.
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.