當前位置: 首頁>>代碼示例>>Java>>正文


Java EdgePropertyFeatures類代碼示例

本文整理匯總了Java中org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures的典型用法代碼示例。如果您正苦於以下問題:Java EdgePropertyFeatures類的具體用法?Java EdgePropertyFeatures怎麽用?Java EdgePropertyFeatures使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EdgePropertyFeatures類屬於org.apache.tinkerpop.gremlin.structure.Graph.Features包,在下文中一共展示了EdgePropertyFeatures類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: shouldReadGraphMLWithAllSupportedDataTypes

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_FLOAT_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_BOOLEAN_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_LONG_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_DOUBLE_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
public void shouldReadGraphMLWithAllSupportedDataTypes() throws IOException {
    final GraphReader reader = GraphMLReader.build().create();
    try (final InputStream stream = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "graph-types.xml")) {
        reader.readGraph(stream, graph);
    }

    final Vertex v = graph.vertices().next();
    assertEquals(123.45d, v.value("d"), 0.000001d);
    assertEquals("some-string", v.<String>value("s"));
    assertEquals(29, v.<Integer>value("i").intValue());
    assertEquals(true, v.<Boolean>value("b"));
    assertEquals(123.54f, v.value("f"), 0.000001f);
    assertEquals(10000000l, v.<Long>value("l").longValue());
    assertEquals("junk", v.<String>value("n"));
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:26,代碼來源:IoTest.java

示例2: shouldReadGraphMLWithoutStrictOption

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_FLOAT_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_BOOLEAN_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_LONG_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_DOUBLE_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
public void shouldReadGraphMLWithoutStrictOption() throws IOException {
    final GraphReader reader = GraphMLReader.build().strict(false).create();
    try (final InputStream stream = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "graph-types-bad.xml")) {
        reader.readGraph(stream, graph);
    }

    final Vertex v = graph.vertices().next();
    assertFalse(v.values("d").hasNext());
    assertEquals("some-string", v.<String>value("s"));
    assertFalse(v.values("i").hasNext());
    assertEquals(false, v.<Boolean>value("b"));
    assertFalse(v.values("f").hasNext());
    assertFalse(v.values("l").hasNext());
    assertEquals("junk", v.<String>value("n"));
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:26,代碼來源:IoTest.java

示例3: shouldReadGraphMLWithStrictOption

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test(expected = NumberFormatException.class)
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_FLOAT_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_BOOLEAN_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_LONG_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_DOUBLE_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
public void shouldReadGraphMLWithStrictOption() throws IOException {
    final GraphReader reader = GraphMLReader.build().strict(true).create();
    try (final InputStream stream = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "graph-types-bad.xml")) {
        reader.readGraph(stream, graph);
    }
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:17,代碼來源:IoTest.java

示例4: shouldWriteNormalizedGraphML

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
/**
 * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
 */
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
@LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
public void shouldWriteNormalizedGraphML() throws Exception {
    try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
        final GraphMLWriter w = GraphMLWriter.build().normalize(true).create();
        w.writeGraph(bos, graph);

        final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "tinkerpop-classic-normalized.xml"));
        assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
    }
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:22,代碼來源:IoTest.java

示例5: shouldReadWriteSelfLoopingEdges

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
public void shouldReadWriteSelfLoopingEdges() throws Exception {
    final Graph source = graph;
    final Vertex v1 = source.addVertex();
    final Vertex v2 = source.addVertex();
    v1.addEdge("CONTROL", v2);
    v1.addEdge("SELFLOOP", v1);

    final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
    final Graph target = graphProvider.openTestGraph(targetConf);
    try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
        source.io(IoCore.graphml()).writer().create().writeGraph(os, source);
        try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {
            target.io(IoCore.graphml()).reader().create().readGraph(is, target);
        }
    } catch (IOException ioe) {
        throw new RuntimeException(ioe);
    }

    assertEquals(IteratorUtils.count(source.vertices()), IteratorUtils.count(target.vertices()));
    assertEquals(IteratorUtils.count(source.edges()), IteratorUtils.count(target.edges()));
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:26,代碼來源:IoTest.java

示例6: shouldWriteNormalizedGraphSON

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
/**
 * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
 */
@Test
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
@FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_USER_SUPPLIED_IDS)
@FeatureRequirement(featureClass = Graph.Features.VariableFeatures.class, feature = FEATURE_VARIABLES)
@LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
public void shouldWriteNormalizedGraphSON() throws Exception {
    try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
        final GraphSONMapper mapper = graph.io(graphson).mapper().normalize(true).create();
        final GraphSONWriter w = graph.io(graphson).writer().mapper(mapper).create();
        w.writeGraph(bos, graph);

        final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphSONResourceAccess.class) + "tinkerpop-classic-normalized.json"));
        assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
    }
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:23,代碼來源:IoTest.java

示例7: shouldAllowRemovalFromEdgeWhenAlreadyRemoved

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_REMOVE_PROPERTY)
@FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = Graph.Features.EdgePropertyFeatures.FEATURE_INTEGER_VALUES)
public void shouldAllowRemovalFromEdgeWhenAlreadyRemoved() {
    final Vertex v = graph.addVertex("name", "marko");
    tryCommit(graph);
    final Vertex v1 = graph.vertices(v.id()).next();

    try {
        final Edge edge = v1.addEdge("knows", graph.addVertex());
        final Property p = edge.property("stars", 5);
        p.remove();
        p.remove();
        edge.property("stars").remove();
        edge.property("stars").remove();
    } catch (Exception ex) {
        fail("Removing an edge property that was already removed should not throw an exception");
    }
}
 
開發者ID:apache,項目名稱:tinkerpop,代碼行數:21,代碼來源:PropertyTest.java

示例8: shouldTransformGraphMLV2ToV3ViaXSLT

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
public void shouldTransformGraphMLV2ToV3ViaXSLT() throws Exception {
    final InputStream stylesheet = Thread.currentThread().getContextClassLoader().getResourceAsStream("tp2-to-tp3-graphml.xslt");
    final InputStream datafile = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "tinkerpop-classic-tp2.xml");
    final ByteArrayOutputStream output = new ByteArrayOutputStream();

    final TransformerFactory tFactory = TransformerFactory.newInstance();
    final StreamSource stylesource = new StreamSource(stylesheet);
    final Transformer transformer = tFactory.newTransformer(stylesource);

    final StreamSource source = new StreamSource(datafile);
    final StreamResult result = new StreamResult(output);
    transformer.transform(source, result);

    final GraphReader reader = GraphMLReader.build().create();
    reader.readGraph(new ByteArrayInputStream(output.toByteArray()), graph);
    assertClassicGraph(graph, false, true);
}
 
開發者ID:apache,項目名稱:tinkerpop,代碼行數:24,代碼來源:IoTest.java

示例9: shouldWriteNormalizedGraphSON

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
/**
 * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
 */
@Test
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
@FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_USER_SUPPLIED_IDS)
@FeatureRequirement(featureClass = Graph.Features.VariableFeatures.class, feature = FEATURE_VARIABLES)
@LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
public void shouldWriteNormalizedGraphSON() throws Exception {
    try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
        final GraphSONMapper mapper = graph.io(graphson).mapper().version(GraphSONVersion.V1_0).normalize(true).create();
        final GraphSONWriter w = graph.io(graphson).writer().mapper(mapper).create();
        w.writeGraph(bos, graph);

        final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphSONResourceAccess.class) + "tinkerpop-classic-normalized-v1d0.json"));
        assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
    }
}
 
開發者ID:apache,項目名稱:tinkerpop,代碼行數:23,代碼來源:IoTest.java

示例10: shouldThrowOnGraphAddEdge

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = FEATURE_PROPERTIES)
public void shouldThrowOnGraphAddEdge() throws Exception {
    try {
        final Vertex v = this.graph.addVertex();
        v.addEdge("self", v, arguments);
        fail(String.format("Call to addVertex should have thrown an exception with these arguments [%s]", arguments));
    } catch (Exception ex) {
        validateException(expectedException, ex);
    }
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:14,代碼來源:PropertyTest.java

示例11: shouldThrowOnGraphEdgeSetPropertyStandard

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = FEATURE_PROPERTIES)
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
public void shouldThrowOnGraphEdgeSetPropertyStandard() throws Exception {
    try {
        final Vertex v = this.graph.addVertex();
        v.addEdge("self", v).property(key, val);
        fail(String.format("Call to Edge.setProperty should have thrown an exception with these arguments [%s, %s]", key, val));
    } catch (Exception ex) {
        validateException(expectedException, ex);
    }
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:15,代碼來源:PropertyTest.java

示例12: shouldSetValueOnEdge

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
public void shouldSetValueOnEdge() throws Exception {
    assumeThat(graph.features().supports(EdgePropertyFeatures.class, featureName), is(true));
    final Edge edge = createEdgeForPropertyFeatureTests();
    edge.property("aKey", value);
    assertPropertyValue(edge);
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:11,代碼來源:PropertyTest.java

示例13: shouldSetValueOnEdgeOnAdd

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
public void shouldSetValueOnEdgeOnAdd() throws Exception {
    assumeThat(graph.features().supports(EdgePropertyFeatures.class, featureName), is(true));
    final Edge edge = createEdgeForPropertyFeatureTests("aKey", value);
    assertPropertyValue(edge);
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:9,代碼來源:PropertyTest.java

示例14: shouldEnableFeatureOnEdgeIfNotEnabled

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
@FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
@FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = EdgeFeatures.FEATURE_ADD_PROPERTY)
public void shouldEnableFeatureOnEdgeIfNotEnabled() throws Exception {
    assumeThat(graph.features().supports(EdgePropertyFeatures.class, featureName), is(false));
    try {
        final Edge edge = createEdgeForPropertyFeatureTests();
        edge.property("aKey", value);
        fail(String.format(INVALID_FEATURE_SPECIFICATION, EdgePropertyFeatures.class.getSimpleName(), featureName));
    } catch (Exception e) {
        validateException(Property.Exceptions.dataTypeOfPropertyValueNotSupported(value), e);
    }
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:15,代碼來源:FeatureSupportTest.java

示例15: shouldSupportADataTypeIfEdgeHasPropertyEnabled

import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures; //導入依賴的package包/類
@Test
@FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_PROPERTIES)
public void shouldSupportADataTypeIfEdgeHasPropertyEnabled() {
    assertEquals(edgePropertyFeatures.supportsProperties(), (edgePropertyFeatures.supportsBooleanValues() || edgePropertyFeatures.supportsDoubleValues()
            || edgePropertyFeatures.supportsFloatValues() || edgePropertyFeatures.supportsIntegerValues()
            || edgePropertyFeatures.supportsLongValues() || edgePropertyFeatures.supportsMapValues()
            || edgePropertyFeatures.supportsMixedListValues() || edgePropertyFeatures.supportsByteValues()
            || edgePropertyFeatures.supportsBooleanArrayValues() || edgePropertyFeatures.supportsByteArrayValues()
            || edgePropertyFeatures.supportsDoubleArrayValues() || edgePropertyFeatures.supportsFloatArrayValues()
            || edgePropertyFeatures.supportsIntegerArrayValues() || edgePropertyFeatures.supportsLongArrayValues()
            || edgePropertyFeatures.supportsSerializableValues() || edgePropertyFeatures.supportsStringValues()
            || edgePropertyFeatures.supportsUniformListValues() || edgePropertyFeatures.supportsStringArrayValues()));
}
 
開發者ID:PKUSilvester,項目名稱:LiteGraph,代碼行數:14,代碼來源:FeatureSupportTest.java


注:本文中的org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。