X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Frequest%2FClassificationsRequest.java;h=7e71efd85c31f9d119ff604a4d5d2a515b20310d;hb=27cae6bcf184f7e27822886f5a7320f771913b71;hp=e88b5675907fd1ba7c9143b49f6195af8438647d;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ClassificationsRequest.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ClassificationsRequest.java index e88b56759..7e71efd85 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ClassificationsRequest.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ClassificationsRequest.java @@ -1,30 +1,30 @@ -package org.simantics.db.layer0.request; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.common.request.UnaryRead; -import org.simantics.db.exception.DatabaseException; - -public class ClassificationsRequest extends UnaryRead, Set> { - - public ClassificationsRequest(Collection principalTypes) { - super(principalTypes); - } - - @Override - public Set perform(ReadGraph graph) throws DatabaseException { - Set result = new HashSet(parameter.size()); - Set allTypes = new HashSet(parameter); - for(Resource principalType : parameter) allTypes.addAll(graph.getSupertypes(principalType)); - for(Resource type : allTypes) { - String uri = graph.getPossibleURI(type); - if(uri != null) result.add(uri); - } - return result; - } - -} +package org.simantics.db.layer0.request; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.common.request.UnaryRead; +import org.simantics.db.exception.DatabaseException; + +public class ClassificationsRequest extends UnaryRead, Set> { + + public ClassificationsRequest(Collection principalTypes) { + super(principalTypes); + } + + @Override + public Set perform(ReadGraph graph) throws DatabaseException { + Set result = new HashSet(parameter.size()); + Set allTypes = new HashSet(parameter); + for(Resource principalType : parameter) allTypes.addAll(graph.getSupertypes(principalType)); + for(Resource type : allTypes) { + String uri = graph.getPossibleURI(type); + if(uri != null) result.add(uri); + } + return result; + } + +}