]> gerrit.simantics Code Review - simantics/district.git/blob
c1a9394fb5e043d00936635fb66f755de636ef4d
[simantics/district.git] /
1 package org.simantics.district.network.profile;
2
3 import java.util.HashSet;
4 import java.util.List;
5 import java.util.Set;
6
7 import org.simantics.Simantics;
8 import org.simantics.db.ReadGraph;
9 import org.simantics.db.Resource;
10 import org.simantics.db.common.request.ResourceRead;
11 import org.simantics.db.exception.DatabaseException;
12
13 public class MidBranchEdgeSetRequest extends ResourceRead<Set<Resource>> {
14         public MidBranchEdgeSetRequest(Resource resource) {
15                 super(resource);
16         }
17
18         @Override
19         public Set<Resource> perform(ReadGraph graph) throws DatabaseException {
20                 List<Resource> edges = Simantics.applySCL("Simantics/District/Algorithm", "midBranchEdges", graph, resource);
21                 return new HashSet<>(edges);
22         }
23 }