catch ( FileNotFoundException e ) {
throw new MappingNotFoundException( "file", xmlFile.toString() );
}
LOG.readingMappingsFromFile( xmlFile.getPath() );
XmlDocument metadataXml = add( inputSource, "file", name );
try {
LOG.debugf( "Writing cache file for: %s to: %s", xmlFile, cachedFile );
SerializationHelper.serialize( ( Serializable ) metadataXml.getDocumentTree(), new FileOutputStream( cachedFile ) );
}
catch ( Exception e ) {
LOG.unableToWriteCachedFile( cachedFile.getPath(), e.getMessage() );
}