DataLocationType[] arTypes = getAllowedTypes(locatable, st);
return new DefaultComboBoxModel(arTypes);
}
private DataLocationType[] getAllowedTypes(Locatable locatable, SourceTarget st) {
DataLocationMetaData md = DataLocationMetaData.getInstance();
EnumSet<DataLocationType> types = (st == SourceTarget.Source) ?
md.getSupportedSourceTypes() : md.getSupportedTargetTypes();
for (Iterator<DataLocationType> it = types.iterator(); it.hasNext(); ) {
DataLocationType type = it.next();
if (!locatable.isLocationTypeAllowed(type)) {
it.remove();
}