Package com.thinkaurelius.titan.core

Examples of com.thinkaurelius.titan.core.TitanType


                        .indexed(Edge.class)
                        .make();
            }

            // NamedMetadata keys
            TitanType name = tx.getType("name");
            if (name == null) {
                name = tx.makeKey("name")
                        .dataType(String.class)
                        .indexed(Vertex.class)
                        .indexed(Edge.class)
                        .make();
            }

            if (tx.getType("typeAndName") == null) {
                tx.makeKey("typeAndName")
                        .dataType(String.class)
                        .unique()
                        .indexed(Vertex.class)
                        .make();
            }

            // ProjectMetadata keys
            TitanType creationTime = tx.getType("creationTime");
            if (creationTime == null) {
                creationTime = tx.makeKey("creationTime")
                        .dataType(Date.class)
                        .indexed(Vertex.class)
                        .make();
View Full Code Here


        metaGraphTx.commit();

        // Make sure the indexes got copied.
        DendriteGraphTx dstTx = dstGraph.newTransaction();

        TitanType dstType = dstTx.getType("name");
        Assert.assertNotNull(dstType);
        Assert.assertTrue(dstType instanceof TitanKey);

        TitanKey dstKey = (TitanKey) dstType;
        Assert.assertEquals(dstKey.getName(), "name");
View Full Code Here

TOP

Related Classes of com.thinkaurelius.titan.core.TitanType

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.