1 /*******************************************************************************
2 * Copyright (c) 2016 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Semantum Oy - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.layer0.util;
14 import org.simantics.db.ReadGraph;
15 import org.simantics.db.Statement;
16 import org.simantics.db.layer0.util.DomainProcessor3.ExclusionDecision;
17 import org.simantics.layer0.Layer0;
18 import org.simantics.scl.runtime.function.Function1;
21 * @author Antti Villberg
24 public class GUIDExclusionFunction implements Function1<Statement, ExclusionDecision> {
26 final private Layer0 L0;
28 public GUIDExclusionFunction(ReadGraph graph) {
29 L0 = Layer0.getInstance(graph);
33 public ExclusionDecision apply(Statement p0) {
34 if(L0.identifier.equals(p0.getPredicate()))
35 return ExclusionDecision.EXCLUDE_OBJECT;
37 return ExclusionDecision.INCLUDE;