Search in sources :

Example 1 with InstanceTestValues

use of eu.esdihumboldt.hale.ui.scripting.groovy.InstanceTestValues in project hale by halestudio.

the class RegexAnalysisParameterPage method setDefaultData.

private void setDefaultData(Cell unfinishedCell) {
    InstanceTestValues instanceTestValues = new InstanceTestValues();
    Entity entity = CellUtil.getFirstEntity(unfinishedCell.getSource());
    if (entity != null) {
        EntityDefinition edef = entity.getDefinition();
        if (edef instanceof PropertyEntityDefinition) {
            PropertyEntityDefinition property = (PropertyEntityDefinition) edef;
            Object object = instanceTestValues.get(property);
            if (object != null) {
                String sampleData = object.toString();
                _inputText.setText(sampleData);
            }
        }
    }
}
Also used : Entity(eu.esdihumboldt.hale.common.align.model.Entity) PropertyEntityDefinition(eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition) EntityDefinition(eu.esdihumboldt.hale.common.align.model.EntityDefinition) InstanceTestValues(eu.esdihumboldt.hale.ui.scripting.groovy.InstanceTestValues) PropertyEntityDefinition(eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition)

Aggregations

Entity (eu.esdihumboldt.hale.common.align.model.Entity)1 EntityDefinition (eu.esdihumboldt.hale.common.align.model.EntityDefinition)1 PropertyEntityDefinition (eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition)1 InstanceTestValues (eu.esdihumboldt.hale.ui.scripting.groovy.InstanceTestValues)1