本文整理汇总了Java中org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph类的典型用法代码示例。如果您正苦于以下问题:Java WrappedGraph类的具体用法?Java WrappedGraph怎么用?Java WrappedGraph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WrappedGraph类属于org.apache.tinkerpop.gremlin.structure.util.wrapped包,在下文中一共展示了WrappedGraph类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setProperty
import org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph; //导入依赖的package包/类
@Override
public <V> Property<V> setProperty(final Neo4jVertexProperty vertexProperty, final String key, final V value) {
final Neo4jNode vertexPropertyNode = Neo4jHelper.getVertexPropertyNode(vertexProperty);
if (null != vertexPropertyNode) {
vertexPropertyNode.setProperty(key, value);
return new Neo4jProperty<>(vertexProperty, key, value);
} else {
final Neo4jNode vertexNode = ((Neo4jVertex) vertexProperty.element()).getBaseVertex();
final Neo4jNode newVertexPropertyNode = ((WrappedGraph<Neo4jGraphAPI>) vertexProperty.element().graph()).getBaseGraph().createNode(VERTEX_PROPERTY_LABEL, vertexProperty.label());
newVertexPropertyNode.setProperty(T.key.getAccessor(), vertexProperty.key());
newVertexPropertyNode.setProperty(T.value.getAccessor(), vertexProperty.value());
newVertexPropertyNode.setProperty(vertexProperty.key(), vertexProperty.value());
newVertexPropertyNode.setProperty(key, value);
vertexNode.connectTo(newVertexPropertyNode, Graph.Hidden.hide(vertexProperty.key()));
vertexNode.setProperty(vertexProperty.key(), VERTEX_PROPERTY_TOKEN);
Neo4jHelper.setVertexPropertyNode(vertexProperty, newVertexPropertyNode);
return new Neo4jProperty<>(vertexProperty, key, value);
}
}
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:20,代码来源:MultiMetaNeo4jTrait.java
示例2: clear
import org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph; //导入依赖的package包/类
@Override
public void clear(Graph g, final Configuration configuration) throws Exception {
if (null != g) {
while (g instanceof WrappedGraph) g = ((WrappedGraph<? extends Graph>) g).getBaseGraph();
TitanGraph graph = (TitanGraph) g;
if (graph.isOpen()) {
if (g.tx().isOpen()) g.tx().rollback();
g.close();
}
}
WriteConfiguration config = new CommonsConfiguration(configuration);
BasicConfiguration readConfig = new BasicConfiguration(GraphDatabaseConfiguration.ROOT_NS, config, BasicConfiguration.Restriction.NONE);
if (readConfig.has(GraphDatabaseConfiguration.STORAGE_BACKEND)) {
TitanGraphBaseTest.clearGraph(config);
}
}
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:18,代码来源:AbstractTitanGraphProvider.java
示例3: testGetGraph
import org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph; //导入依赖的package包/类
@Test
public void testGetGraph() {
WrappedGraph actualDelegate = delegatingTx.getGraph();
Mockito.verifyZeroInteractions(gremlinTx, framedGraph);
Assert.assertEquals(framedGraph, actualDelegate);
}
开发者ID:Syncleus,项目名称:Ferma,代码行数:7,代码来源:DelegatingTransactionTest.java
注:本文中的org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论