Resource projectResource = ProConfUI.getProject().getResource();\r
Stack<Resource> handling = new Stack<Resource>();\r
handling.push(projectResource);\r
+ \r
+ // this is just a hack to get equipment defined in ontologies\r
+ Resource projectsLib = g.getObjects(projectResource, g.getBuiltins().PartOf).iterator().next();\r
+ Collection<Resource> projects = g.getObjects(projectsLib, g.getBuiltins().ConsistsOf);\r
+ Resource typeSystemProject = null;\r
+ for (Resource project : projects) {\r
+ IEntity ent = EntityFactory.create(g,project);\r
+ String name = ent.getName();\r
+ if(name.equals("Type System Project")) {\r
+ typeSystemProject = project;\r
+ break;\r
+ }\r
+ }\r
+ Collection<Resource> ontologies = g.getObjects(typeSystemProject, g.getBuiltins().ConsistsOf);\r
+ for (Resource ontology : ontologies) {\r
+ if(g.isInstanceOf(ontology, g.getBuiltins().Ontology))\r
+ handling.add(ontology);\r
+ }\r
+ \r
while (!handling.isEmpty()) {\r
final Resource node = handling.pop();\r
if (g.isInstanceOf(node,primaryType)) {\r