-package org.simantics.browsing.ui.model.tests;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.exception.DatabaseException;\r
-\r
-public class HasInstanceOfTest implements Test {\r
- Resource type;\r
-\r
- public HasInstanceOfTest(Resource type) {\r
- this.type = type;\r
- }\r
-\r
- @Override\r
- public boolean isCompatible(Class<?> contentType) {\r
- return contentType == Resource.class;\r
- }\r
-\r
- @Override\r
- public boolean test(ReadGraph graph, Object content)\r
- throws DatabaseException {\r
- return graph.isInstanceOf((Resource)content, type);\r
- }\r
- \r
- \r
-}\r
+package org.simantics.browsing.ui.model.tests;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.exception.DatabaseException;
+
+public class HasInstanceOfTest implements Test {
+ Resource type;
+
+ public HasInstanceOfTest(Resource type) {
+ this.type = type;
+ }
+
+ @Override
+ public boolean isCompatible(Class<?> contentType) {
+ return contentType == Resource.class;
+ }
+
+ @Override
+ public boolean test(ReadGraph graph, Object content)
+ throws DatabaseException {
+ return graph.isInstanceOf((Resource)content, type);
+ }
+
+
+}