1 package org.simantics.modeling;
3 import java.util.Collection;
5 import org.simantics.db.ReadGraph;
6 import org.simantics.db.Resource;
7 import org.simantics.db.common.request.ObjectsWithType;
8 import org.simantics.db.exception.DatabaseException;
9 import org.simantics.diagram.stubs.DiagramResource;
10 import org.simantics.layer0.Layer0;
12 public class GetSymbolGroups {
14 public static Collection<Resource> getSymbolGroups(ReadGraph graph, Resource model) throws DatabaseException {
15 Layer0 L0 = Layer0.getInstance(graph);
16 DiagramResource DIA = DiagramResource.getInstance(graph);
17 Collection<Resource> results = graph.syncRequest(new ObjectsWithType(model, L0.ConsistsOf, DIA.SymbolReferenceLibrary));