Search in sources :

Example 1 with Parameter

use of eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter in project hale by halestudio.

the class OmlRdfReader method getParameters.

private List<IParameter> getParameters(List<ParamType> param) {
    List<IParameter> params = new ArrayList<IParameter>(param.size());
    Iterator<ParamType> iterator = param.iterator();
    ParamType paramType;
    IParameter parameter;
    while (iterator.hasNext()) {
        paramType = iterator.next();
        List<String> values = paramType.getValue();
        String value;
        if (values != null && !values.isEmpty()) {
            value = values.get(0);
        } else {
            // TODO what should be the default empty value?
            value = null;
        // null or empty string?
        }
        parameter = new Parameter(paramType.getName(), value);
        params.add(parameter);
    }
    return params;
}
Also used : IParameter(eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter) ArrayList(java.util.ArrayList) Parameter(eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter) IParameter(eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter) ParamType(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.ParamType)

Example 2 with Parameter

use of eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter in project hale by halestudio.

the class FeatureClass method deepCopy.

@Override
public IEntity deepCopy() {
    FeatureClass result = new FeatureClass(new About(this.getAbout().getAbout()));
    Transformation t = new Transformation(this.getTransformation().getService());
    List<IParameter> parameters = new ArrayList<IParameter>();
    for (IParameter p : this.getTransformation().getParameters()) {
        parameters.add(new Parameter(p.getName(), p.getValue()));
    }
    t.setParameters(parameters);
    result.setTransformation(t);
    List<String> newLabels = new ArrayList<String>();
    for (String label : this.getLabel()) {
        newLabels.add(label);
    }
    result.setLabel(newLabels);
    return result;
}
Also used : Transformation(eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Transformation) IParameter(eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter) ArrayList(java.util.ArrayList) IParameter(eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter) Parameter(eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter) IAbout(eu.esdihumboldt.hale.io.oml.internal.model.rdf.IAbout) About(eu.esdihumboldt.hale.io.oml.internal.goml.rdf.About)

Example 3 with Parameter

use of eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter in project hale by halestudio.

the class Property method deepCopy.

@Override
public IEntity deepCopy() {
    Property result = new Property(new About(this.getAbout().getAbout()));
    Transformation t = new Transformation(this.getTransformation().getService());
    List<IParameter> parameters = new ArrayList<IParameter>();
    for (IParameter p : this.getTransformation().getParameters()) {
        parameters.add(new Parameter(p.getName(), p.getValue()));
    }
    t.setParameters(parameters);
    result.setTransformation(t);
    List<String> newLabels = new ArrayList<String>();
    for (String label : this.getLabel()) {
        newLabels.add(label);
    }
    result.setLabel(newLabels);
    return result;
}
Also used : Transformation(eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Transformation) IParameter(eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter) ArrayList(java.util.ArrayList) IParameter(eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter) Parameter(eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter) IAbout(eu.esdihumboldt.hale.io.oml.internal.model.rdf.IAbout) DetailedAbout(eu.esdihumboldt.hale.io.oml.internal.goml.rdf.DetailedAbout) About(eu.esdihumboldt.hale.io.oml.internal.goml.rdf.About)

Aggregations

Parameter (eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Parameter)3 IParameter (eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IParameter)3 ArrayList (java.util.ArrayList)3 Transformation (eu.esdihumboldt.hale.io.oml.internal.goml.oml.ext.Transformation)2 About (eu.esdihumboldt.hale.io.oml.internal.goml.rdf.About)2 IAbout (eu.esdihumboldt.hale.io.oml.internal.model.rdf.IAbout)2 DetailedAbout (eu.esdihumboldt.hale.io.oml.internal.goml.rdf.DetailedAbout)1 ParamType (eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.ParamType)1