-package org.simantics.db.common.request;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-public class PossibleNearestOwner extends ResourceRead2<Resource> {\r
-\r
- public PossibleNearestOwner(Resource resource, Resource type) {\r
- super(resource, type);\r
- }\r
-\r
- @Override\r
- public Resource perform(ReadGraph graph) throws DatabaseException {\r
- Resource owner = graph.syncRequest(new PossibleOwner(resource));\r
- if(owner == null) return null;\r
- if(graph.isInstanceOf(owner, resource2)) return owner;\r
- return graph.syncRequest(new PossibleNearestOwner(owner, resource2));\r
- }\r
- \r
+package org.simantics.db.common.request;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.exception.DatabaseException;
+
+public class PossibleNearestOwner extends ResourceRead2<Resource> {
+
+ public PossibleNearestOwner(Resource resource, Resource type) {
+ super(resource, type);
+ }
+
+ @Override
+ public Resource perform(ReadGraph graph) throws DatabaseException {
+ Resource owner = graph.syncRequest(new PossibleOwner(resource));
+ if(owner == null) return null;
+ if(graph.isInstanceOf(owner, resource2)) return owner;
+ return graph.syncRequest(new PossibleNearestOwner(owner, resource2));
+ }
+
}
\ No newline at end of file