X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FGUIDExclusionFunction.java;h=08620b71987cd18095e0084e10b0701e00c60979;hb=3a10ce856f7124f83cf03d6e7f7576da237a7cbb;hp=3d19fc6a796b14589e5cde5d680b505a03d25298;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/GUIDExclusionFunction.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/GUIDExclusionFunction.java index 3d19fc6a7..08620b719 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/GUIDExclusionFunction.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/GUIDExclusionFunction.java @@ -1,40 +1,40 @@ -/******************************************************************************* - * Copyright (c) 2016 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Semantum Oy - initial API and implementation - *******************************************************************************/ -package org.simantics.db.layer0.util; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Statement; -import org.simantics.db.layer0.util.DomainProcessor3.ExclusionDecision; -import org.simantics.layer0.Layer0; -import org.simantics.scl.runtime.function.Function1; - -/** - * @author Antti Villberg - * @since 1.22 - */ -public class GUIDExclusionFunction implements Function1 { - - final private Layer0 L0; - - public GUIDExclusionFunction(ReadGraph graph) { - L0 = Layer0.getInstance(graph); - } - - @Override - public ExclusionDecision apply(Statement p0) { - if(L0.identifier.equals(p0.getPredicate())) - return ExclusionDecision.EXCLUDE_OBJECT; - else - return ExclusionDecision.INCLUDE; - } - +/******************************************************************************* + * Copyright (c) 2016 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.db.layer0.util; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Statement; +import org.simantics.db.layer0.util.DomainProcessor3.ExclusionDecision; +import org.simantics.layer0.Layer0; +import org.simantics.scl.runtime.function.Function1; + +/** + * @author Antti Villberg + * @since 1.22 + */ +public class GUIDExclusionFunction implements Function1 { + + final private Layer0 L0; + + public GUIDExclusionFunction(ReadGraph graph) { + L0 = Layer0.getInstance(graph); + } + + @Override + public ExclusionDecision apply(Statement p0) { + if(L0.identifier.equals(p0.getPredicate())) + return ExclusionDecision.EXCLUDE_OBJECT; + else + return ExclusionDecision.INCLUDE; + } + } \ No newline at end of file