@Test public void testFromFile() throws Exception { String file = URLDecoder.decode( getClass().getResource("/data/gdl/example.gdl").getFile(), StandardCharsets.UTF_8.name()); AsciiGraphLoader<EPGMGraphHead, EPGMVertex, EPGMEdge> asciiGraphLoader = AsciiGraphLoader.fromFile(file, getEPGMElementFactoryProvider()); validateCollections(asciiGraphLoader, 1, 2, 1); validateCaches(asciiGraphLoader, 0, 0, 0); }
public static <G extends GraphHead, V extends Vertex, E extends Edge> AsciiGraphLoader<G, V, E> fromFile(String fileName, ElementFactoryProvider<G, V, E> elementFactoryProvider) throws IOException { return new AsciiGraphLoader<>(new GDLHandler.Builder() .setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL) .setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL) .setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL) .setErrorStrategy(new BailSyntaxErrorStrategy()) .buildFromFile(fileName), elementFactoryProvider); }
AsciiGraphLoader { public static <G extends GraphHead, V extends Vertex, E extends Edge> AsciiGraphLoader<G, V, E> fromFile(String fileName, ElementFactoryProvider<G, V, E> elementFactoryProvider) throws IOException { return new AsciiGraphLoader<>(new GDLHandler.Builder() .setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL) .setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL) .setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL) .setErrorStrategy(new BailSyntaxErrorStrategy()) .buildFromFile(fileName), elementFactoryProvider); } }
AsciiGraphLoader { public static <G extends GraphHead, V extends Vertex, E extends Edge> AsciiGraphLoader<G, V, E> fromFile(String fileName, ElementFactoryProvider<G, V, E> elementFactoryProvider) throws IOException { return new AsciiGraphLoader<>(new GDLHandler.Builder() .setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL) .setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL) .setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL) .setErrorStrategy(new BailSyntaxErrorStrategy()) .buildFromFile(fileName), elementFactoryProvider); } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); }
AsciiGraphLoader { public static <G extends GraphHead, V extends Vertex, E extends Edge> AsciiGraphLoader<G, V, E> fromFile(String fileName, ElementFactoryProvider<G, V, E> elementFactoryProvider) throws IOException { return new AsciiGraphLoader<>(new GDLHandler.Builder() .setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL) .setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL) .setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL) .setErrorStrategy(new BailSyntaxErrorStrategy()) .buildFromFile(fileName), elementFactoryProvider); } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromString(String asciiGraph,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromFile(String fileName,
                                     ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromStream(InputStream inputStream,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); void appendFromString(String asciiGraph); Collection<G> getGraphHeads(); G getGraphHeadByVariable(String variable); Collection<G> getGraphHeadsByVariables(String... variables); Collection<V> getVertices(); V getVertexByVariable(String variable); Collection<V> getVerticesByVariables(String... variables); Collection<V> getVerticesByGraphIds(GradoopIdSet graphIds); Collection<V> getVerticesByGraphVariables(String... graphVariables); Collection<E> getEdges(); E getEdgeByVariable(String variable); Collection<E> getEdgesByVariables(String... variables); Collection<E> getEdgesByGraphIds(GradoopIdSet graphIds); Collection<E> getEdgesByGraphVariables(String... variables); Map<String, G> getGraphHeadCache(); Map<String, V> getVertexCache(); Map<String, E> getEdgeCache(); }
AsciiGraphLoader { public static <G extends GraphHead, V extends Vertex, E extends Edge> AsciiGraphLoader<G, V, E> fromFile(String fileName, ElementFactoryProvider<G, V, E> elementFactoryProvider) throws IOException { return new AsciiGraphLoader<>(new GDLHandler.Builder() .setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL) .setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL) .setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL) .setErrorStrategy(new BailSyntaxErrorStrategy()) .buildFromFile(fileName), elementFactoryProvider); } private  AsciiGraphLoader(GDLHandler gdlHandler,
                           ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromString(String asciiGraph,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromFile(String fileName,
                                     ElementFactoryProvider<G, V, E> elementFactoryProvider); static AsciiGraphLoader<G, V, E> fromStream(InputStream inputStream,
                                       ElementFactoryProvider<G, V, E> elementFactoryProvider); void appendFromString(String asciiGraph); Collection<G> getGraphHeads(); G getGraphHeadByVariable(String variable); Collection<G> getGraphHeadsByVariables(String... variables); Collection<V> getVertices(); V getVertexByVariable(String variable); Collection<V> getVerticesByVariables(String... variables); Collection<V> getVerticesByGraphIds(GradoopIdSet graphIds); Collection<V> getVerticesByGraphVariables(String... graphVariables); Collection<E> getEdges(); E getEdgeByVariable(String variable); Collection<E> getEdgesByVariables(String... variables); Collection<E> getEdgesByGraphIds(GradoopIdSet graphIds); Collection<E> getEdgesByGraphVariables(String... variables); Map<String, G> getGraphHeadCache(); Map<String, V> getVertexCache(); Map<String, E> getEdgeCache();  }