Examples of label()


Examples of com.tinkerpop.gremlin.structure.Vertex.label()

            m.put(GraphSONTokens.PROPERTIES, properties);
            m.put(GraphSONTokens.HIDDENS, hiddens);

            final Vertex inV = edge.iterators().vertexIterator(Direction.IN).next();
            m.put(GraphSONTokens.IN, inV.id());
            m.put(GraphSONTokens.IN_LABEL, inV.label());

            final Vertex outV = edge.iterators().vertexIterator(Direction.OUT).next();
            m.put(GraphSONTokens.OUT, outV.id());
            m.put(GraphSONTokens.OUT_LABEL, outV.label());
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.label()

            m.put(GraphSONTokens.IN, inV.id());
            m.put(GraphSONTokens.IN_LABEL, inV.label());

            final Vertex outV = edge.iterators().vertexIterator(Direction.OUT).next();
            m.put(GraphSONTokens.OUT, outV.id());
            m.put(GraphSONTokens.OUT_LABEL, outV.label());

            jsonGenerator.writeObject(m);
        }
    }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.label()

        assertEquals(1, deserializedMap.size());

        final Vertex deserializedMarko = deserializedMap.keySet().iterator().next();
        assertEquals("marko", deserializedMarko.iterators().valueIterator("name").next().toString());
        assertEquals(1, deserializedMarko.id());
        assertEquals(Vertex.DEFAULT_LABEL, deserializedMarko.label());
        assertEquals(new Integer(29), (Integer) deserializedMarko.iterators().valueIterator("age").next());
        assertEquals(2, StreamFactory.stream(deserializedMarko.iterators().propertyIterator()).count());

        assertEquals(new Integer(1000), deserializedMap.values().iterator().next());
    }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.Vertex.label()

        final Map<String, Object> deserializedEdge = edgeList.get(0);
        assertEquals(e.id(), deserializedEdge.get(GraphSONTokens.ID));
        assertEquals(v1.id(), deserializedEdge.get(GraphSONTokens.OUT));
        assertEquals(v2.id(), deserializedEdge.get(GraphSONTokens.IN));
        assertEquals(v1.label(), deserializedEdge.get(GraphSONTokens.OUT_LABEL));
        assertEquals(v2.label(), deserializedEdge.get(GraphSONTokens.IN_LABEL));
        assertEquals(e.label(), deserializedEdge.get(GraphSONTokens.LABEL));
        assertEquals(GraphSONTokens.EDGE, deserializedEdge.get(GraphSONTokens.TYPE));

        final Map<String, Object> properties = (Map<String, Object>) deserializedEdge.get(GraphSONTokens.PROPERTIES);
        assertNotNull(properties);
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.util.detached.DetachedEdge.label()

                detachedEdge.iterators().propertyIterator().forEachRemaining(p -> edgeArgs.addAll(Arrays.asList(p.key(), p.value())));
                detachedEdge.iterators().hiddenPropertyIterator().forEachRemaining(p -> edgeArgs.addAll(Arrays.asList(Graph.Key.hide(p.key()), p.value())));

                appendToArgList(edgeArgs, T.id, detachedEdge.id());

                vOut.addEdge(detachedEdge.label(), inV, edgeArgs.toArray());

                next = kryo.readClassAndObject(input);
            }

            // vertex terminator
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.util.detached.DetachedEdge.label()

        final List<DetachedEdge> edgeList = (List<DetachedEdge>) response.getResult().getData();
        assertEquals(1, edgeList.size());

        final DetachedEdge deserializedEdge = edgeList.get(0);
        assertEquals(2l, deserializedEdge.id());
        assertEquals("test", deserializedEdge.label());

        assertEquals(new Integer(123), (Integer) deserializedEdge.value("abc"));
        assertEquals(1, StreamFactory.stream(deserializedEdge.iterators().propertyIterator()).count());
        assertEquals(0l, deserializedEdge.iterators().vertexIterator(Direction.OUT).next().id());
        assertEquals(Vertex.DEFAULT_LABEL, deserializedEdge.iterators().vertexIterator(Direction.OUT).next().label());
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.util.detached.DetachedVertex.label()

            if (hasSomeVertices) {
                while (!input.eof()) {
                    final List<Object> vertexArgs = new ArrayList<>();
                    final DetachedVertex current = (DetachedVertex) kryo.readClassAndObject(input);
                    appendToArgList(vertexArgs, T.id, current.id());
                    appendToArgList(vertexArgs, T.label, current.label());

                    final Vertex v = graph.addVertex(vertexArgs.toArray());
                    current.iterators().propertyIterator().forEachRemaining(p -> createVertexProperty(graphToWriteTo, v, p, false));
                    current.iterators().hiddenPropertyIterator().forEachRemaining(p -> createVertexProperty(graphToWriteTo, v, p, true));
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.util.detached.DetachedVertex.label()

        final List<DetachedVertex> vertexList = (List<DetachedVertex>) response.getResult().getData();
        assertEquals(1, vertexList.size());

        final DetachedVertex deserializedVertex = vertexList.get(0);
        assertEquals(0l, deserializedVertex.id());
        assertEquals(Vertex.DEFAULT_LABEL, deserializedVertex.label());

        assertEquals(1, StreamFactory.stream(deserializedVertex.iterators().propertyIterator()).count());

        final List<Object> deserializedInnerList = (List<Object>) deserializedVertex.iterators().valueIterator("friends").next();
        assertEquals(3, deserializedInnerList.size());
View Full Code Here

Examples of de.innovationgate.wgpublisher.webtml.utils.TMLContext.label()

   
    public static String localLabel(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGException {
        TMLContext context = WGAGlobal.fetchInitialContext(cx);
        Arguments parsedArgs = _localLabelVarargs.parse(args);
        WGDatabase localDB = localDB(cx, thisObj, new Object[] {parsedArgs.get("currentObject")}, funObj);
        return context.label(localDB, (String) parsedArgs.get("container"), (String) parsedArgs.get("file"), (String) parsedArgs.get("key"), (List) parsedArgs.get("params"));

    }
   
    public static void registerGlobal(Context cx, Scriptable thisObj, java.lang.Object[] args, Function funObj) throws JavaScriptException, WGException {
        Design.registerGlobal(cx, Design.getCurrent(), args, funObj);
View Full Code Here

Examples of edu.stanford.nlp.ling.RVFDatum.label()

    // Try the obvious (should get train data with 100% acc)
    for (RVFDatum<String, String> datum : datums)
      Assert.assertEquals(datum.label(), lc.classOf(datum));

    // Test data
    Assert.assertEquals(td1.label(), lc.classOf(td1));
  }
}
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.