1 package org.simantics.browsing.ui.model.tests;
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.exception.DatabaseException;
7 public class HasInstanceOfTest implements Test {
10 public HasInstanceOfTest(Resource type) {
15 public boolean isCompatible(Class<?> contentType) {
16 return contentType == Resource.class;
20 public boolean test(ReadGraph graph, Object content)
21 throws DatabaseException {
22 return graph.isInstanceOf((Resource)content, type);