FilterType[] items = fst.getItem();
if (items != null) {
// -> each filter can have one or more values associated with it
for (FilterType item : items) {
EC2Filter oneFilter = new EC2Filter();
String filterName = item.getName();
oneFilter.setName( filterName );
ValueSetType vst = item.getValueSet();
ValueType[] valueItems = vst.getItem();
for (ValueType valueItem : valueItems) {
oneFilter.addValueEncoded( valueItem.getValue());
}
vfs.addFilter( oneFilter );
}
}
return vfs;