1 package org.simantics.db.layer0.request;
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.common.request.ResourceRead;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.operation.Layer0X;
9 public class IsModelActive extends ResourceRead<Boolean> {
11 public IsModelActive(Resource resource) {
16 public Boolean perform(ReadGraph graph) throws DatabaseException {
17 Resource model = graph.sync(new PossibleModel(resource));
18 if(model == null) return false;
19 return graph.hasStatement(model, Layer0X.getInstance(graph).IsActivatedBy);