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();
}
}
return types.toArray(new DataLocationType[types.size()]);