for (Iterator iterSa = schemaAssignments.iterator(); iterSa.hasNext();)
{
SchemaAssignment schemaAssignment = (SchemaAssignment) iterSa.next();
String configurationPointId = IdUtils.qualify(sourceModule.getId(), schemaAssignment.getConfigurationId());
ConfigurationPointDefinition cpd = _definition.getConfigurationPoint(configurationPointId);
if (cpd == null) {
throw new ApplicationRuntimeException(XmlImplMessages.unknownConfigurationPointOfSchemaAssignment(configurationPointId, schemaAssignment));
}
String schemaId = IdUtils.qualify(sourceModule.getId(), schemaAssignment.getSchemaId());
Schema schema = getSchema(schemaId, sourceModule.getId(), schemaAssignment.getLocation());
if (schema != null) {
// TODO: check if schema has already been set
// TODO: more type related error handling, check root type of schema
// Add parser constructor with direct reference to schema
ConfigurationParserDefinition parserDef = new ConfigurationParserDefinitionImpl(
sourceModule, schemaAssignment.getLocation(), HiveMindSchemaParser.INPUT_FORMAT_NAME,
new HiveMindSchemaParserConstructor(schema));
cpd.addParser(parserDef);
// For backward compatibility change the configuration to Map if the schema uses a map too
if (HashMap.class.getName().equals(schema.getRootElementClassName())
|| UniqueHashMap.class.getName().equals(schema.getRootElementClassName())) {
// The schema assignments are mainly used for backward compatibility so we can