protected final List<EncodingDefinition> createEncodingDefinitions(String xmlFileResource){
  try {
    Encodings encodings=loadEncodingsFromXml(xmlFileResource);
    if (encodings == null) {
      return Collections.emptyList();
    }
    List<EncodingDefinition> encodingSet=new ArrayList<EncodingDefinition>();
    for (    EncodingDefinitionType definition : encodings.getEncodingDefinition()) {
      final EncodingDefinition encoding=createEncodingDefinition(definition);
      if (encoding != null) {
        encodingSet.add(encoding);
      }
    }
    return encodingSet;
  }
 catch (  JAXBException e) {
    logger.fatal(String.format("Error loading encoding definition from %s",xmlFileResource),e);
    return Collections.emptyList();
  }
}

protected final List < EncodingDefinition > createEncodingDefinitions ( String xmlFileResource ) { try { Encodings encodings = loadEncodingsFromXml ( xmlFileResource ) ; if ( encodings == null ) { return Collections . emptyList ( ) ; } List < EncodingDefinition > encodingSet = new ArrayList < EncodingDefinition > ( ) ; for ( EncodingDefinitionType definition : encodings . getEncodingDefinition ( ) ) { final EncodingDefinition encoding = createEncodingDefinition ( definition ) ; if ( encoding != null ) { encodingSet . add ( encoding ) ; } } return encodingSet ; } catch ( JAXBException e ) { logger . fatal ( String . format ( "Error loading encoding definition from %s" , xmlFileResource ) , e ) ; return Collections . emptyList ( ) ; } }
creates all encodings listed in xmlfileresource .
