X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph.profile%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fprofile%2FProfileUtils.java;fp=bundles%2Forg.simantics.scenegraph.profile%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fprofile%2FProfileUtils.java;h=989b7bb05d5aaff05d429a6e6d070842e73834c7;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=b35ccd9f2064b425bbece1d43566f5b2ea4a09ad;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/ProfileUtils.java b/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/ProfileUtils.java index b35ccd9f2..989b7bb05 100644 --- a/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/ProfileUtils.java +++ b/bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/ProfileUtils.java @@ -1,25 +1,25 @@ -package org.simantics.scenegraph.profile; - -import java.util.Collections; -import java.util.List; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; -import org.simantics.diagram.stubs.DiagramResource; - -public class ProfileUtils { - - public static List getProfileChildren(ReadGraph graph, Resource profile) throws DatabaseException { - DiagramResource DIA = DiagramResource.getInstance(graph); - Resource entries = graph.getPossibleObject(profile, DIA.HasEntries); - if(entries == null) return Collections.emptyList(); - return getProfileChildrenFromEntries(graph, entries); - } - - public static List getProfileChildrenFromEntries(ReadGraph graph, Resource entries) throws DatabaseException { - DiagramResource DIA = DiagramResource.getInstance(graph); - return graph.getRelatedValue2(entries, DIA.Profile_children, entries); - } - -} +package org.simantics.scenegraph.profile; + +import java.util.Collections; +import java.util.List; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.diagram.stubs.DiagramResource; + +public class ProfileUtils { + + public static List getProfileChildren(ReadGraph graph, Resource profile) throws DatabaseException { + DiagramResource DIA = DiagramResource.getInstance(graph); + Resource entries = graph.getPossibleObject(profile, DIA.HasEntries); + if(entries == null) return Collections.emptyList(); + return getProfileChildrenFromEntries(graph, entries); + } + + public static List getProfileChildrenFromEntries(ReadGraph graph, Resource entries) throws DatabaseException { + DiagramResource DIA = DiagramResource.getInstance(graph); + return graph.getRelatedValue2(entries, DIA.Profile_children, entries); + } + +}