1 package org.simantics.graph.compiler.internal.procedures;
\r
3 import gnu.trove.procedure.TObjectProcedure;
\r
5 import org.simantics.graph.query.Paths;
\r
6 import org.simantics.graph.store.GraphStore;
\r
7 import org.simantics.graph.store.IdentityStore;
\r
8 import org.simantics.graph.store.IdentityStore.ConsistsOf;
\r
9 import org.simantics.graph.store.StatementStore;
\r
11 public class AddConsistsOf implements Runnable {
\r
16 public AddConsistsOf(Paths paths, GraphStore store) {
\r
23 final IdentityStore identities = store.identities;
\r
24 final int consistsOf = identities.createPathToId(paths.ConsistsOf);
\r
25 final StatementStore statements = store.statements;
\r
26 identities.forEachChild(new TObjectProcedure<IdentityStore.ConsistsOf>() {
\r
29 public boolean execute(ConsistsOf co) {
\r
30 if(identities.isNewResource(co.child))
\r
31 statements.add(co.parent, consistsOf, co.child);
\r