Examples of RexProBindings


Examples of com.tinkerpop.rexster.protocol.msg.RexProBindings

* @author Blake Eggleston (bdeggleston.github.com)
*/
public class BindingsTemplate implements JsonTemplate<RexProBindings> {
    @Override
    public RexProBindings deserialize(JsonNode json) {
        return new RexProBindings((Map<String, Object>) JsonConverter.fromJsonNode(json));
    }
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.RexProBindings

    public void write(Packer pk, RexProBindings v) throws IOException {
        write(pk, v, false);
    }

    public void write(final Packer pk, final RexProBindings v, final boolean required) throws IOException {
        RexProBindings bindings = v;
        if (bindings == null) {
            bindings = new RexProBindings();
        }
        pk.writeMapBegin(bindings.size());
        for (Map.Entry pair : bindings.entrySet()) {
            pk.write(pair.getKey());
            try {
                ResultsConverter.serializeObject(pair.getValue(), pk);
            } catch (Exception ex) {
                throw new IOException(ex.toString());
View Full Code Here

Examples of com.tinkerpop.rexster.protocol.msg.RexProBindings

    public RexProBindings read(final Unpacker u, final RexProBindings to, final boolean required) throws IOException {
        if (!required && u.trySkipNil()) {
            return null;
        }

        RexProBindings bindings;
        if (to != null) {
            bindings = to;
            bindings.clear();
        } else {
            bindings = new RexProBindings();
        }

        int n = u.readMapBegin();
        for (int i=0; i<n; i++) {
            final String key = u.read(Templates.TString);
            final Object val = ResultsConverter.deserializeObject(u.read(Templates.TValue));
            bindings.put(key, val);
        }
        u.readMapEnd();

        return bindings;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.