if (dmwToPackageMapping == null){
dmwToPackageMapping = new TreeMap<String, StringToString>();
Iterator<StringToString> mapping = getDmwTypeToPackage();
if (mapping != null){
while(mapping.hasNext()){
StringToString curr = mapping.next();
StringToString existing = dmwToPackageMapping.get(curr.getKey());
if (existing != null)
throw(new IllegalStateException("Multiple dmwTypeToPackage values with same key in schema: " + getName()));
dmwToPackageMapping.put(curr.getKeyAsString(), curr);
}
}
if (getDmwPackage() != null){
// Backwards compatibility
StringToString entry = new StringToString("dmw",getDmwPackage());
dmwToPackageMapping.put(entry.getKeyAsString(), entry);
}
}
StringToString existing = dmwToPackageMapping.get(context);
if (existing == null)
return(null);
return(existing.getValue());
}