X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Frequest%2FPropertyInfo.java;h=4d208b4571d14faaac8772dc30e3e0df241d1ef9;hb=33b30297f751e06e9abac260d31313e2f833fedc;hp=f3753ce80bfc3949c84914c234c14f76520c29e4;hpb=a1696e5257fae039410c924155fdeffc1ce1b3e9;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java index f3753ce80..4d208b457 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PropertyInfo.java @@ -1,3 +1,14 @@ +/******************************************************************************* + * Copyright (c) 2019 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.request; import java.util.Collection; @@ -20,6 +31,7 @@ public class PropertyInfo { public final Resource predicate; public final String name; public final boolean isHasProperty; + public final boolean isFunctional; public final Set classifications; public final VariableBuilder builder; public final Resource literalRange; @@ -30,9 +42,10 @@ public class PropertyInfo { public final Map> subliteralPredicates; public final ValueAccessor valueAccessor; public final boolean hasEnumerationRange; - public PropertyInfo(Resource predicate, String name, boolean isHasProperty, Set classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Binding defaultBinding, Map> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) { + public PropertyInfo(Resource predicate, String name, boolean isFunctional, boolean isHasProperty, Set classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Binding defaultBinding, Map> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) { this.predicate = predicate; this.name = name; + this.isFunctional = isFunctional; this.isHasProperty = isHasProperty; this.classifications = classifications; this.builder = builder; @@ -45,7 +58,7 @@ public class PropertyInfo { this.valueAccessor = valueAccessor; this.hasEnumerationRange = hasEnumerationRange; } - public static PropertyInfo make(ReadGraph graph, Resource predicate, String name, boolean isHasProperty, Set classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Map> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) throws DatabaseException { + public static PropertyInfo make(ReadGraph graph, Resource predicate, String name, boolean isFunctional, boolean isHasProperty, Set classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Map> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) throws DatabaseException { Layer0 L0 = Layer0.getInstance(graph); if(literalRange != null) { @@ -58,7 +71,7 @@ public class PropertyInfo { Binding defaultBinding = requiredDatatype != null ? Bindings.getBinding(requiredDatatype) : null; - return new PropertyInfo(predicate, name, isHasProperty, classifications, builder, literalRange, requiredDatatype, definedUnit, requiredValueType, defaultBinding, subliteralPredicates, valueAccessor, hasEnumerationRange); + return new PropertyInfo(predicate, name, isFunctional, isHasProperty, classifications, builder, literalRange, requiredDatatype, definedUnit, requiredValueType, defaultBinding, subliteralPredicates, valueAccessor, hasEnumerationRange); } public boolean hasClassification(String classification) { @@ -75,6 +88,8 @@ public class PropertyInfo { .append(requiredValueType) .append(", predicate=") .append(predicate) + .append(", isFunctional=") + .append(isFunctional) .append(", isHasProperty=") .append(isHasProperty) .append(", hasEnumerationRange=")