Search in sources :

Example 6 with DefaultCustomPropertyFunctionEntity

use of eu.esdihumboldt.hale.common.align.custom.DefaultCustomPropertyFunctionEntity in project hale by halestudio.

the class CustomPropertyFunctionEntityEditor method getValue.

@Override
public DefaultCustomPropertyFunctionEntity getValue() {
    DefaultCustomPropertyFunctionEntity result = new DefaultCustomPropertyFunctionEntity();
    result.setName(nameText.getText());
    result.setEager(eagerSelect.getSelection());
    result.setMaxOccurrence((unboundedSelect.getSelection()) ? (ParameterDefinition.UNBOUNDED) : (maxSpinner.getSelection()));
    result.setMinOccurrence(minSpinner.getSelection());
    // binding type
    BindingOrType bot = bindingOrType.getValue();
    if (bot.isUseBinding()) {
        result.setBindingType(null);
        result.setBindingClass(bot.getBinding());
    } else {
        result.setBindingClass(null);
        result.setBindingType(bot.getType());
    }
    result.setBindingClass(String.class);
    return result;
}
Also used : DefaultCustomPropertyFunctionEntity(eu.esdihumboldt.hale.common.align.custom.DefaultCustomPropertyFunctionEntity)

Aggregations

DefaultCustomPropertyFunctionEntity (eu.esdihumboldt.hale.common.align.custom.DefaultCustomPropertyFunctionEntity)6 DefaultCustomPropertyFunction (eu.esdihumboldt.hale.common.align.custom.DefaultCustomPropertyFunction)2 InstanceAccessorArrayList (eu.esdihumboldt.cst.functions.groovy.internal.InstanceAccessorArrayList)1 DefaultCustomFunctionExplanation (eu.esdihumboldt.hale.common.align.custom.DefaultCustomFunctionExplanation)1 DefaultCustomPropertyFunctionParameter (eu.esdihumboldt.hale.common.align.custom.DefaultCustomPropertyFunctionParameter)1 EntityDefinition (eu.esdihumboldt.hale.common.align.model.EntityDefinition)1 PropertyEntityDefinition (eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition)1 ParameterBinding (eu.esdihumboldt.hale.common.align.model.impl.mdexpl.ParameterBinding)1 PropertyValue (eu.esdihumboldt.hale.common.align.transformation.function.PropertyValue)1 Text (eu.esdihumboldt.hale.common.core.io.Text)1 Value (eu.esdihumboldt.hale.common.core.io.Value)1 PropertyDefinition (eu.esdihumboldt.hale.common.schema.model.PropertyDefinition)1 TypeDefinition (eu.esdihumboldt.hale.common.schema.model.TypeDefinition)1 DefaultPropertyDefinition (eu.esdihumboldt.hale.common.schema.model.impl.DefaultPropertyDefinition)1 DefaultTypeDefinition (eu.esdihumboldt.hale.common.schema.model.impl.DefaultTypeDefinition)1 TypeProvider (eu.esdihumboldt.hale.ui.functions.groovy.internal.TypeStructureTray.TypeProvider)1 Binding (groovy.lang.Binding)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1