// map all classes
List classMappings = new ArrayList();
for (Iterator iter = searchableGrailsDomainClasses.iterator(); iter.hasNext(); ) {
GrailsDomainClass grailsDomainClass = (GrailsDomainClass) iter.next();
CompassClassMapping classMapping = classMapper.getCompassClassMapping(grailsDomainClass, allSearchableGrailsDomainClasses);
classMappings.add(classMapping);
}
// resolve aliases
CompassMappingUtils.resolveAliases(classMappings, allSearchableGrailsDomainClasses, compassConfiguration);
// add completed mappings to compass
for (Iterator iter = classMappings.iterator(); iter.hasNext(); ) {
CompassClassMapping classMapping = (CompassClassMapping) iter.next();
InputStream inputStream = compassClassMappingXmlBuilder.buildClassMappingXml(classMapping);
LOG.debug("Adding [" + classMapping.getMappedClass().getName() + "] mapping to CompassConfiguration");
compassConfiguration.addInputStream(inputStream, classMapping.getMappedClass().getName().replaceAll("\\.", "/") + ".cpm.xml");
}
}