Package com.thinkaurelius.titan.graphdb.internal

Examples of com.thinkaurelius.titan.graphdb.internal.InternalRelation


                List<TitanVertex> vertices = new ArrayList<TitanVertex>(numVertices);
                List<InternalRelation> relations = new ArrayList<InternalRelation>();
                TitanVertex old = null;
                for (int i = 0; i < numVertices; i++) {
                    TitanVertex next = (TitanVertex) graph.addVertex(null);
                    InternalRelation edge = null;
                    if (old != null) {
                        edge = (InternalRelation) graph.addEdge(null, old, next, "knows");
                    }
                    InternalRelation property = (InternalRelation) next.addProperty("age", 25);
                    if (flush) {
                        idAssigner.assignID((InternalVertex) next);
                        idAssigner.assignID(property);
                        if (edge != null) idAssigner.assignID(edge);
                    } else {
View Full Code Here


    }


    private Entry serialize(StandardTitanGraph graph, TitanEdge e, int pos) {
        EdgeSerializer edgeSerializer = graph.getEdgeSerializer();
        InternalRelation r = (InternalRelation)e;
        return edgeSerializer.writeRelation(r,pos,r.tx());
    }
View Full Code Here

    private final Entry data;

    @Override
    public InternalRelation it() {
        InternalRelation it = null;
        InternalVertex startVertex = getVertex(0);

        if (startVertex.hasAddedRelations() && startVertex.hasRemovedRelations()) {
            //Test whether this relation has been replaced
            final long id = super.getID();
View Full Code Here

        return u;
    }

    @Override
    public long getID() {
        InternalRelation it = it();
        return (it == this) ? super.getID() : it.getID();
    }
View Full Code Here

    public InternalRelation it() {
        InternalVertex v = getVertex(0);
        if (v == v.it())
            return this;

        InternalRelation next = (InternalRelation) RelationIdentifier.get(v, type, super.getID()).findRelation(tx());
        if (next == null)
            throw new InvalidElementException("Relation has been removed", this);

        return next;
    }
View Full Code Here

    private final Entry data;

    @Override
    public InternalRelation it() {
        InternalRelation it = null;
        InternalVertex startVertex = getVertex(0);

        if (startVertex.hasAddedRelations() && startVertex.hasRemovedRelations()) {
            //Test whether this relation has been replaced
            final long id = super.getID();
View Full Code Here

        return u;
    }

    @Override
    public long getID() {
        InternalRelation it = it();
        return (it == this) ? super.getID() : it.getID();
    }
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.graphdb.internal.InternalRelation

Copyright © 2018 www.massapicom. 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.