ITPub博客

首页 > 数据库 > > Java TinkerGraph类代码示例

Java TinkerGraph类代码示例

作者:gaokeke123 时间:2022-04-25 15:44:50 0 删除 编辑

本文整理汇总了Java中com.tinkerpop.blueprints.impls.tg.TinkerGraph类的典型用法代码示例。如果您正苦于以下问题:Java TinkerGraph类的具体用法?Java TinkerGraph怎么用?Java TinkerGraph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。 


示例1: exportFunction

 
import com.tinkerpop.blueprints.impls.tg.TinkerGraph; //导入依赖的package包/类
private void exportFunction(Vertex vertex) throws IOException
{

    executor.execute(() -> {
        Graph graph = orientConnector.getNoTxGraphInstance();
        try
        {
            Vertex functionRoot = graph.getVertex(vertex);
            Graph subgraph = new TinkerGraph();
            copyFunctionNodes(subgraph, functionRoot);
            copyFunctionEdges(subgraph, functionRoot);
            subgraph.shutdown();
            Path out = Paths.get(outputDirectory.toString(), "func" +
                    functionRoot.getId().toString().split(":")[1] +
                    "." + format);
            writeGraph(subgraph, out);
        } catch (IOException e)
        {
            e.printStackTrace();
        } finally
        {
            graph.shutdown();
        }
    });

}
 
开发者ID:octopus-platform,项目名称:bjoern,代码行数:27,代码来源:FunctionExportPlugin.java


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26692020/viewspace-3165352/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: hugegraph属性解释
请登录后发表评论 登录
全部评论
大家好

注册时间:2013-08-14

  • 博文量
    1432
  • 访问量
    31681