package org.simantics.document.ui.test; import org.simantics.browsing.ui.model.tests.Test; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; import org.simantics.document.DocumentResource; public class DocumentOldTest implements Test{ @Override public boolean isCompatible(Class contentType) { return contentType == Resource.class; } @Override public boolean test(ReadGraph graph, Object content) throws DatabaseException { Resource resource = (Resource)content; DocumentResource doc = DocumentResource.getInstance(graph); return graph.hasStatement(resource, doc.HasNewerVersion); } }