*
* @see gov.nasa.jpl.oodt.cas.metadata.AbstractMetExtractor#extractMetadata(java.io.File)
*/
public Metadata extrMetadata(File file) throws MetExtractionException {
if (this.config == null) {
throw new MetExtractionException(
"No config file defined: unable to copy and rewrite metadata!");
}
Metadata met = null;
try {
met = new SerializableMetadata(new File(PathUtils
.replaceEnvVariables(((CopyAndRewriteConfig) this.config)
.getProperty("orig.met.file.path"))).toURL()
.openStream());
} catch (Exception e) {
e.printStackTrace();
throw new MetExtractionException(
"error parsing original met file: ["
+ ((CopyAndRewriteConfig) this.config)
.getProperty("orig.met.file.path")
+ "]: Message: " + e.getMessage());
}