return "QueryIndex " + parameter + " " + parameter2 + " " + parameter3;
}
- @Override
- public boolean isImmutable(ReadGraph graph) throws DatabaseException {
- // TODO Auto-generated method stub
- return false;
- }
+ @Override
+ public boolean isImmutable(ReadGraph graph) throws DatabaseException {
+ return graph.isImmutable(parameter);
+ }
@Override
public int getType() {
import org.simantics.db.common.request.ObjectsWithType;
import org.simantics.db.common.request.ResourceRead;
import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.request.RequestFlags;
import org.simantics.layer0.Layer0;
public class OntologiesFromLibrary extends ResourceRead<List<Resource>> {
Layer0 L0 = Layer0.getInstance(graph);
ArrayList<Resource> result = new ArrayList<Resource>();
for(Resource r : graph.syncRequest(new ObjectsWithType(resource, L0.ConsistsOf, L0.Library))) {
- if(graph.isInstanceOf(r, L0.Ontology))
- result.add(r);
- else
+ if(graph.isInstanceOf(r, L0.IndexRoot)) {
+ if(graph.isInstanceOf(r, L0.Ontology)) {
+ result.add(r);
+ }
+ } else {
result.addAll(graph.syncRequest(new OntologiesFromLibrary(r)));
+ }
}
return result;
}
+ @Override
+ public int getType() {
+ return RequestFlags.IMMEDIATE_UPDATE;
+ }
+
}