Examples of TitanKeyVertex


Examples of com.thinkaurelius.titan.graphdb.types.vertices.TitanKeyVertex

        TitanTransaction srcTx = srcGraph.newTransaction();
        DendriteGraphTx dstTx = dstGraph.newTransaction();

        for(TitanKey titanKey: srcTx.getTypes(TitanKey.class)) {
            if (titanKey instanceof TitanKeyVertex) {
                TitanKeyVertex keyVertex = (TitanKeyVertex) titanKey;
                TypeAttribute.Map definition = getDefinition(keyVertex);
                if (dstTx.getType(keyVertex.getName()) == null) {
                    dstTx.makePropertyKey(keyVertex.getName(), definition);
                }
            }
        }

        for(TitanLabel titanLabel: srcTx.getTypes(TitanLabel.class)) {
            TitanLabelVertex keyVertex = (TitanLabelVertex) titanLabel;
            TypeAttribute.Map definition = getDefinition(keyVertex);
            if (dstTx.getType(keyVertex.getName()) == null) {
                dstTx.makeEdgeLabel(keyVertex.getName(), definition);
            }
        }

        dstTx.commit();
        srcTx.commit();
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.types.vertices.TitanKeyVertex

        verifyOpen();
        Preconditions.checkArgument(StringUtils.isNotBlank(name));
        TitanTypeVertex type;
        if (typeClass == TitanTypeClass.KEY) {
            TypeAttribute.isValidKeyDefinition(definition);
            type = new TitanKeyVertex(this, temporaryID.decrementAndGet(), ElementLifeCycle.New);
        } else {
            Preconditions.checkArgument(typeClass == TitanTypeClass.LABEL);
            TypeAttribute.isValidLabelDefinition(definition);
            type = new TitanLabelVertex(this, temporaryID.decrementAndGet(), ElementLifeCycle.New);
        }
View Full Code Here

Examples of com.thinkaurelius.titan.graphdb.types.vertices.TitanKeyVertex

            }

            InternalVertex vertex = null;
            if (idInspector.isTypeID(vertexid)) {
                if (idInspector.isPropertyKeyID(vertexid)) {
                    vertex = new TitanKeyVertex(StandardTitanTx.this, vertexid, lifecycle);
                } else {
                    Preconditions.checkArgument(idInspector.isEdgeLabelID(vertexid));
                    vertex = new TitanLabelVertex(StandardTitanTx.this, vertexid, lifecycle);
                }
                //If its a newly created type, add to type cache
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.