当前位置: 首页>>代码示例>>Java>>正文


Java Graph.Features方法代码示例

本文整理汇总了Java中org.apache.tinkerpop.gremlin.structure.Graph.Features方法的典型用法代码示例。如果您正苦于以下问题:Java Graph.Features方法的具体用法?Java Graph.Features怎么用?Java Graph.Features使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tinkerpop.gremlin.structure.Graph的用法示例。


在下文中一共展示了Graph.Features方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: featureString

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
public static String featureString(final Graph.Features features) {
    final StringBuilder sb = new StringBuilder("FEATURES");
    final Predicate<Method> supportMethods = (m) -> m.getModifiers() == Modifier.PUBLIC && m.getName().startsWith(featuresStartWith) && !m.getName().equals(featuresStartWith);
    sb.append(LINE_SEPARATOR);

    Stream.of(Pair.with(Graph.Features.GraphFeatures.class, features.graph()),
            Pair.with(Graph.Features.VariableFeatures.class, features.graph().variables()),
            Pair.with(Graph.Features.VertexFeatures.class, features.vertex()),
            Pair.with(Graph.Features.VertexPropertyFeatures.class, features.vertex().properties()),
            Pair.with(Graph.Features.EdgeFeatures.class, features.edge()),
            Pair.with(Graph.Features.EdgePropertyFeatures.class, features.edge().properties())).forEach(p -> {
        printFeatureTitle(p.getValue0(), sb);
        Stream.of(p.getValue0().getMethods())
                .filter(supportMethods)
                .map(createTransform(p.getValue1()))
                .forEach(sb::append);
    });

    return sb.toString();
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:21,代码来源:StringFactory.java

示例2: create

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
public static GraphTraversal create(final Class<? extends Element> clazz) {
    final Graph mockedGraph = mock(Graph.class);
    final Graph.Features features = mock(Graph.Features.class);
    final Graph.Features.VertexFeatures vertexFeatures = mock(Graph.Features.VertexFeatures.class);
    when(mockedGraph.features()).thenReturn(features);
    when(features.vertex()).thenReturn(vertexFeatures);
    when(vertexFeatures.getCardinality(any())).thenReturn(VertexProperty.Cardinality.single);
    final DefaultGraphTraversal t = new DefaultGraphTraversal<>(mockedGraph);
    if (clazz != null) t.asAdmin().addStep(new GraphStep<>(t.asAdmin(), clazz, true));
    return t;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:12,代码来源:PartitionStrategyTraverseTest.java

示例3: features

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
@Override
public Graph.Features features() {
    return bitsyFeatures;
}
 
开发者ID:lambdazen,项目名称:bitsy,代码行数:5,代码来源:BitsyGraph.java

示例4: features

import org.apache.tinkerpop.gremlin.structure.Graph; //导入方法依赖的package包/类
@Override
public Graph.Features features() {
    return graph.features();
}
 
开发者ID:lambdazen,项目名称:bitsy,代码行数:5,代码来源:BitsyAutoReloadingGraph.java


注:本文中的org.apache.tinkerpop.gremlin.structure.Graph.Features方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。