Package edu.harvard.hul.ois.fits.exceptions

Examples of edu.harvard.hul.ois.fits.exceptions.FitsToolException


       
        out.flush();
        try {
      out.close();
    } catch (IOException e) {
      throw new FitsToolException("Error closing Exiftool XML output stream",e);
    }
        Document doc = null;
    try {
      doc = saxBuilder.build(new StringReader(out.toString()));
    } catch (Exception e) {
      throw new FitsToolException("Error parsing Exiftool XML Output",e);
    }
        return doc;
    }
View Full Code Here


    int magicNum = -1;
    try {
      magicNum = tasteMagicNumber(file);
    }
    catch(IOException e) {
      throw new FitsToolException("Error getting magic number for file", e);
    }
    if(magicNum == 0x57415645) {
      doWav(root,file);
    }
    else {
View Full Code Here

    WAVEFile wav = null;
    try {
      wav = new WAVEFile(file.getPath());
    }
    catch (FileNotFoundException e) {
      throw new FitsToolException("File "+file.getName() + " not found",e);
    }
   
    Element metadata = new Element("metadata",fitsNS);
    Element audioMetadata = new Element("audio",fitsNS);
   
View Full Code Here

      try {
        saxBuilder.setFeature("http://apache.org/xml/features/validation/schema",false);
        saxBuilder.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
        xml = saxBuilder.build(file);
      } catch (Exception e) {
        throw new FitsToolException("Error parsing "+file.getPath(),e);
      }
      if(xml != null) {
        //assume we have at least well formed XML
        Element identification = new Element("identification",fitsNS);
        Element identity = new Element("identity",fitsNS);
View Full Code Here

   
    try {
      File config = new File(Fits.FITS_TOOLS+"ffident/formats.txt");
      identifier = new FormatIdentification(config.getPath());
    } catch (FileNotFoundException e) {
      throw new FitsToolException(Fits.FITS_TOOLS+"ffident/formats.txt could not be found",e);
    }
  }
View Full Code Here

        out.write("\n");
        out.flush();
        try {
      out.close();
    } catch (IOException e) {
      throw new FitsToolException("Error closing ffident XML output stream",e);
    }
   
        Document doc = null;
    try {
      doc = saxBuilder.build(new StringReader(out.toString()));
    } catch (Exception e) {
      throw new FitsToolException("Error parsing ffident XML Output",e);
    }
        return doc;
    }
View Full Code Here

      // The Droid(URL configFile, URL sigFileURL) constructor is broken
      //  So create droid instance and read signature file manually.
      droid = new uk.gov.nationalarchives.droid.Droid(droidConfig);
      droid.readSignatureFile(sigFile);
    } catch (Exception e) {
      throw new FitsToolException("Error initilizing DROID",e);
    }
  }
View Full Code Here

        out.flush();
    
    try {
      out.close();
    } catch (IOException e) {
      throw new FitsToolException("Error closing DROID XML output stream",e);
    }
   
        Document doc = null;
    try {
      doc = saxBuilder.build(new StringReader(out.toString()));
    } catch (Exception e) {
      throw new FitsToolException("Error parsing DROID XML Output",e);
    }
        return doc;
    }
View Full Code Here

TOP

Related Classes of edu.harvard.hul.ois.fits.exceptions.FitsToolException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.