Skip to content

Commit

Permalink
solve mc
Browse files Browse the repository at this point in the history
  • Loading branch information
dschiese committed Jan 31, 2024
2 parents e44e148 + 847b610 commit 599f348
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/example/inputdatastorage/QueriesPojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ protected void setUpProperties(String item) throws IOException {
BufferedReader reader = new BufferedReader(new StringReader(item));
String line = reader.readLine();
while(line != null) {
getGraphIdFromItem(line);
getAnnotationTypeFromItem(line);
getGraphIdFromItem(line);
line = reader.readLine();
}
if(this.graphId == null && this.annotationType == null)
if(this.graphId == null || this.annotationType == null)
throw new RuntimeException("Error while creating object from pass query with graphID = " + graphId + " and annotationType = " + annotationType);
else
logger.info("Found graphId: {} and annotationType: {}", this.graphId, this.annotationType);
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/example/inputdatastorage/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,16 @@ public List<Statement> createStatementsFromQueryPojo(QueriesPojo queriesPojo, St
Resource componentResource = ResourceFactory.createResource("urn:qanary:" + component);
Literal query = ResourceFactory.createStringLiteral(queriesPojo.getQuery());
Resource annType = ResourceFactory.createResource(queriesPojo.getAnnotationType()); // was "qa:" + ...
statements.add(ResourceFactory.createStatement(
componentResource,
this.hasInputQuery,
query
));
statements.add(ResourceFactory.createStatement(
componentResource,
this.hasAnnotationType,
annType
));
statements.add(ResourceFactory.createStatement(
annType,
this.hasInputQuery,
query
));
logger.debug("Statements: {}", statements);
return statements;
}
Expand Down

0 comments on commit 599f348

Please sign in to comment.