use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.ParamType 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.model.generated.oml.ParamType in project hale by halestudio.
the class OmlRdfGenerator method getParameters.
/**
* Converts from List of OML IParameter to the collecion of the JAXB
* ParameterType
*
* @param parameters
* @return
*/
private Collection<? extends ParamType> getParameters(List<IParameter> parameters) {
if (parameters != null) {
ArrayList<ParamType> pTypes = new ArrayList<ParamType>(parameters.size());
ParamType pType;
IParameter param;
Iterator<?> iterator = parameters.iterator();
while (iterator.hasNext()) {
param = (IParameter) iterator.next();
pType = getParameterType(param);
pTypes.add(pType);
}
return pTypes;
}
return new ArrayList<ParamType>();
}
Aggregations