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