return null;
}
@Override
public Schema getSchemaByNameInternal(String name) throws MetaModelException {
CompositeSchema compositeSchema = _compositeSchemas.get(name);
if (compositeSchema != null) {
return compositeSchema;
}
List<Schema> matchingSchemas = new ArrayList<Schema>();
for (DataContext dc : _delegates) {
Schema schema = dc.getSchemaByName(name);
if (schema != null) {
matchingSchemas.add(schema);
}
}
if (matchingSchemas.size() == 1) {
return matchingSchemas.iterator().next();
}
if (matchingSchemas.size() > 1) {
if (logger.isInfoEnabled()) {
logger.info("Name-clash detected for Schema '{}'. Creating CompositeSchema.");
}
compositeSchema = new CompositeSchema(name, matchingSchemas);
_compositeSchemas.put(name, compositeSchema);
return compositeSchema;
}
return null;
}