Skip to content

Commit

Permalink
[#1438] Improve GDL error handling (#1473)
Browse files Browse the repository at this point in the history
fixes #1438
  • Loading branch information
Kevin Gómez committed Jan 21, 2020
1 parent b936844 commit a32d88c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.gradoop.common.model.impl.id.GradoopIdSet;
import org.gradoop.common.model.impl.properties.Properties;
import org.s1ck.gdl.GDLHandler;
import org.s1ck.gdl.exceptions.BailSyntaxErrorStrategy;
import org.s1ck.gdl.model.Graph;
import org.s1ck.gdl.model.GraphElement;

Expand Down Expand Up @@ -139,6 +140,7 @@ AsciiGraphLoader<G, V, E> fromString(String asciiGraph,
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromString(asciiGraph),
elementFactoryProvider);
}
Expand All @@ -164,6 +166,7 @@ AsciiGraphLoader<G, V, E> fromFile(String fileName,
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromFile(fileName),
elementFactoryProvider);
}
Expand All @@ -189,6 +192,7 @@ AsciiGraphLoader<G, V, E> fromStream(InputStream inputStream,
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromStream(inputStream),
elementFactoryProvider);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.gradoop.flink.model.impl.operators.matching.common.query.predicates.CNF;
import org.gradoop.flink.model.impl.operators.matching.common.query.predicates.QueryPredicate;
import org.s1ck.gdl.GDLHandler;
import org.s1ck.gdl.exceptions.BailSyntaxErrorStrategy;
import org.s1ck.gdl.model.Edge;
import org.s1ck.gdl.model.GraphElement;
import org.s1ck.gdl.model.Vertex;
Expand Down Expand Up @@ -101,6 +102,7 @@ public QueryHandler(String gdlString) {
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromString(gdlString);
edgeCache = gdlHandler.getEdgeCache(true, true);
vertexCache = gdlHandler.getVertexCache(true, true);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<dep.commons-cli.version>1.4</dep.commons-cli.version>
<dep.commons-lang.version>2.6</dep.commons-lang.version>
<dep.flink.version>1.7.2</dep.flink.version>
<dep.gdl.version>0.3</dep.gdl.version>
<dep.gdl.version>0.3.2</dep.gdl.version>
<dep.guava.version>11.0.2</dep.guava.version>
<dep.hbase.version>1.4.3</dep.hbase.version>
<dep.javafastpfor.version>0.1.10</dep.javafastpfor.version>
Expand Down

0 comments on commit a32d88c

Please sign in to comment.