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;
}
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;
}
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;
}
Aggregations