+ public static Collection<DynamicArrowObject> dynamicEdgeArrowObjects(ReadGraph graph) throws DatabaseException {
+
+ List<Resource> sharedOntologies = Simantics.applySCL("Simantics/SharedOntologies", "getSharedOntologies", graph, Tuple0.INSTANCE);
+
+ List<DynamicArrowObject> results = new ArrayList<>();
+
+ for (Resource sharedOntology : sharedOntologies) {
+ Collection<Resource> findByType = graph.syncRequest(new ObjectsWithSupertype(sharedOntology, Layer0.getInstance(graph).ConsistsOf, StructuralResource2.getInstance(graph).Component));
+ //Collection<Resource> findByType = QueryIndexUtils.searchByType(graph, sharedOntology, );
+ for (Resource find : findByType) {
+ NamedResource moduleType = new NamedResource(NameLabelUtil.modalName(graph, find), find);
+ DynamicArrowObject dynamicarrowObject = dynamicEdgeArrowObject(graph, moduleType);
+ if (dynamicarrowObject != null)
+ results.add(dynamicarrowObject);
+ }
+ }
+ return results;
+ }
+
+ private static DynamicArrowObject dynamicEdgeArrowObject(ReadGraph graph, NamedResource moduleType) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(graph);
+ Resource sclModule = Layer0Utils.getPossibleChild(graph, moduleType.getResource(), L0.SCLModule, DYNAMIC_VISUALISATIONS_CONTRIBUTION_MODULE);
+ if (sclModule != null) {
+ String moduleURI = graph.getURI(sclModule);
+ return new DynamicArrowObject(moduleType, getDynamicEdgeArrowContributionSupplier(moduleURI, ARROW_CONTRIBUTION));
+ }
+ return null;
+ }
+