Package org.neo4j.cypher.export

Examples of org.neo4j.cypher.export.SubGraphExporter


    //Creates the cyper representation for this database
    StringWriter out = new StringWriter();
    try ( Transaction tx = db.beginTx() ) {
      final SubGraph graph = DatabaseSubGraph.from( db );
      new SubGraphExporter( graph ).export( new PrintWriter( out ) );
      tx.success();
    }
    return out.toString();
  }
View Full Code Here


        File file = BaseProjectResolver.getOutputFile(baseProject, exportFile, EXPORT_FILE);
        getLog().info("Exporting database to '" + file.getAbsolutePath() + "'");
        store.beginTransaction();
        SubGraph graph = DatabaseSubGraph.from(databaseService);
        try {
            new SubGraphExporter(graph).export(new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8")));
        } catch (IOException e) {
            throw new MojoExecutionException("Cannot export database.", e);
        } finally {
            store.commitTransaction();
        }
View Full Code Here

    //Creates the cyper representation for this database
    StringWriter out = new StringWriter();
    try ( Transaction tx = db.beginTx() ) {
      final SubGraph graph = DatabaseSubGraph.from( db );
      new SubGraphExporter( graph ).export( new PrintWriter( out ) );
      tx.success();
    }
    return out.toString();
  }
View Full Code Here

    @Override
    public ElementCounter dump(SubGraph graph, Writer writer, Reporter reporter, Config config) {
        try (Transaction tx = db.beginTx()) {
            PrintWriter out = new PrintWriter(writer);
            new SubGraphExporter(graph).export(out);
            tx.success();
            return reporter.getTotal();
        }
    }
View Full Code Here

    @Override
    public ElementCounter dump(SubGraph graph, Writer writer, Reporter reporter, Config config) {
        try (Transaction tx = db.beginTx()) {
            PrintWriter out = new PrintWriter(writer);
            new SubGraphExporter(graph).export(out);
            tx.success();
            return reporter.getTotal();
        }
    }
View Full Code Here

TOP

Related Classes of org.neo4j.cypher.export.SubGraphExporter

Copyright © 2018 www.massapicom. 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.