/** Sets all the element and property list mappings to their default values. */
 private void setupDefaultMappings() {
   // add mappings from available services
   Iterator<String> providers = Service.providerNames(ElementMapping.class);
   if (providers != null) {
     while (providers.hasNext()) {
       String mapping = providers.next();
       try {
         addElementMapping(mapping);
       } catch (IllegalArgumentException e) {
         LOG.warn("Error while adding element mapping", e);
       }
     }
   }
 }
Beispiel #2
0
 /** Discovers XMLHandler implementations through the classpath and dynamically registers them. */
 private void discoverXMLHandlers() {
   // add mappings from available services
   Iterator<Object> providers = Service.providers(XMLHandler.class);
   if (providers != null) {
     while (providers.hasNext()) {
       XMLHandler handler = (XMLHandler) providers.next();
       try {
         if (log.isDebugEnabled()) {
           log.debug("Dynamically adding XMLHandler: " + handler.getClass().getName());
         }
         addXMLHandler(handler);
       } catch (IllegalArgumentException e) {
         log.error("Error while adding XMLHandler", e);
       }
     }
   }
 }