- int candidateS = map.data[0];
- int candidateP = map.data[1];
- int candidateO = map.data[2];
-
- IntSet candidateIs = null;
- try {
- candidateIs = QueryCache.resultSuperTypes(graph, candidateS, parent, null);
- } catch (DatabaseException e) {
- procedure.exception(graph, e);
- return;
- }
-
- for(int i=3;i<map.size();i+=3) {
-
- int nextS = map.data[i];
- int nextP = map.data[i+1];
- int nextO = map.data[i+2];
-
- if(nextS != candidateS) {
-
- if(candidateIs.contains(nextS)) {
-
- // Next is a super type of candidate => ignore next
-
- } else {
-
- IntSet nextIs = null;
- try {
- nextIs = QueryCache.resultSuperTypes(graph, nextS, parent, null);
- } catch (DatabaseException e) {
- procedure.exception(graph, e);
- return;
- }
-
- if(nextIs.contains(candidateS)) {
-
- // Candidate is a super type of next => next is the new candidate
-
- candidateS = nextS;
- candidateP = nextP;
- candidateO = nextO;
- candidateIs = nextIs;
-
- } else {
- // candidate and next are unrelated => error
- ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has conflicting assertions.", r1);
- procedure.exception(graph, exception);
- return;
- }
-
- }
-
- }
-
- }
-
+ int candidateS = map.data[0];
+ int candidateP = map.data[1];
+ int candidateO = map.data[2];
+
+ IntSet candidateIs = null;
+ try {
+ candidateIs = QueryCache.resultSuperTypes(graph, candidateS, parent, null);
+ } catch (DatabaseException e) {
+ procedure.exception(graph, e);
+ return;
+ }
+
+ for(int i=3;i<map.size();i+=3) {
+
+ int nextS = map.data[i];
+ int nextP = map.data[i+1];
+ int nextO = map.data[i+2];
+
+ if(nextS != candidateS) {
+
+ if(candidateIs.contains(nextS)) {
+
+ // Next is a super type of candidate => ignore next
+
+ } else {
+
+ IntSet nextIs = null;
+ try {
+ nextIs = QueryCache.resultSuperTypes(graph, nextS, parent, null);
+ } catch (DatabaseException e) {
+ procedure.exception(graph, e);
+ return;
+ }
+
+ if(nextIs.contains(candidateS)) {
+
+ // Candidate is a super type of next => next is the new candidate
+
+ candidateS = nextS;
+ candidateP = nextP;
+ candidateO = nextO;
+ candidateIs = nextIs;
+
+ } else {
+ // candidate and next are unrelated => error
+ ManyObjectsForFunctionalRelationException exception = new ManyObjectsForFunctionalRelationException("Functional relation has conflicting assertions.", r1);
+ procedure.exception(graph, exception);
+ return;
+ }
+
+ }
+
+ }
+
+ }
+