diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/AAS.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/AAS.java index 9979eda..4afedca 100644 --- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/AAS.java +++ b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/AAS.java @@ -62,6 +62,8 @@ static Value toRdfValue(Object value, ValueFactory vf) { Base64.getEncoder().encodeToString(idStr.getBytes(StandardCharsets.UTF_8))); default: // do not convert the reference to an IRI + // drop id string + idStr = null; } } } diff --git a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/query/AasEvaluationStrategy.java b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/query/AasEvaluationStrategy.java index fcfb5c3..5598f5c 100644 --- a/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/query/AasEvaluationStrategy.java +++ b/bundles/io.github.linkedfactory.core/src/main/java/io/github/linkedfactory/core/rdf4j/aas/query/AasEvaluationStrategy.java @@ -91,11 +91,12 @@ public CloseableIteration evaluate(Stateme @Override public boolean hasNext() throws QueryEvaluationException { - if (next == null && it.hasNext()) { + while (next == null && it.hasNext()) { Record r = it.next(); Value newObjectValue = toRdfValue(r.getValue()); if (objectValue != null && !objectValue.equals(newObjectValue)) { - return false; + // try next value + continue; } CompositeBindingSet newBs = new CompositeBindingSet(bs);