+/*******************************************************************************
+ * 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;
public final Resource predicate;
public final String name;
public final boolean isHasProperty;
+ public final boolean isFunctional;
public final Set<String> classifications;
public final VariableBuilder builder;
public final Resource literalRange;
public final Map<String,Pair<Resource, ChildReference>> subliteralPredicates;
public final ValueAccessor valueAccessor;
public final boolean hasEnumerationRange;
- public PropertyInfo(Resource predicate, String name, boolean isHasProperty, Set<String> classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Binding defaultBinding, Map<String,Pair<Resource, ChildReference>> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) {
+ public PropertyInfo(Resource predicate, String name, boolean isFunctional, boolean isHasProperty, Set<String> classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Binding defaultBinding, Map<String,Pair<Resource, ChildReference>> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) {
this.predicate = predicate;
this.name = name;
+ this.isFunctional = isFunctional;
this.isHasProperty = isHasProperty;
this.classifications = classifications;
this.builder = builder;
this.valueAccessor = valueAccessor;
this.hasEnumerationRange = hasEnumerationRange;
}
- public static PropertyInfo make(ReadGraph graph, Resource predicate, String name, boolean isHasProperty, Set<String> classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Map<String,Pair<Resource, ChildReference>> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) throws DatabaseException {
+ public static PropertyInfo make(ReadGraph graph, Resource predicate, String name, boolean isFunctional, boolean isHasProperty, Set<String> classifications, VariableBuilder builder, Resource literalRange, Datatype requiredDatatype, String definedUnit, String requiredValueType, Map<String,Pair<Resource, ChildReference>> subliteralPredicates, ValueAccessor valueAccessor, boolean hasEnumerationRange) throws DatabaseException {
Layer0 L0 = Layer0.getInstance(graph);
if(literalRange != null) {
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) {
.append(requiredValueType)
.append(", predicate=")
.append(predicate)
+ .append(", isFunctional=")
+ .append(isFunctional)
.append(", isHasProperty=")
.append(isHasProperty)
.append(", hasEnumerationRange=")