Examples of ToolInfo


Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

        }
       
        //get the tool elements
        List<Element> toolElements = element.getChildren("tool",ns);
        for(Element toolElement : toolElements) {
          ToolInfo toolInfo = new ToolInfo();
          Attribute toolNameAttr = toolElement.getAttribute("toolname");
          Attribute toolVersionAttr = toolElement.getAttribute("toolversion");
          if(toolNameAttr != null) {
            toolInfo.setName(toolNameAttr.getValue());
          }
          if(toolVersionAttr != null) {
            toolInfo.setVersion(toolVersionAttr.getValue());
          }
          fileIdentSect.addReportingTool(toolInfo);
        }
       
        //get the version elements
        List<Element> versionElements = element.getChildren("version",ns);
        for(Element versionElement : versionElements) {
          ToolInfo toolInfo = new ToolInfo();
          Attribute toolNameAttr = versionElement.getAttribute("toolname");
          Attribute toolVersionAttr = versionElement.getAttribute("toolversion");
          if(toolNameAttr != null) {
            toolInfo.setName(toolNameAttr.getValue());
          }
          if(toolVersionAttr != null) {
            toolInfo.setVersion(toolVersionAttr.getValue());
          }
          String value = versionElement.getText();
          FormatVersion formatVersion = new FormatVersion(value,toolInfo);
          fileIdentSect.addFormatVersion(formatVersion);
        }
       
        //get the externalIdentifier elements
        List<Element> xIDElements = element.getChildren("externalIdentifier",ns);
        for(Element xIDElement : xIDElements) {
          String type = xIDElement.getAttributeValue("type");
          String value = xIDElement.getText();
          ToolInfo toolInfo = new ToolInfo();
          Attribute toolNameAttr = xIDElement.getAttribute("toolname");
          Attribute toolVersionAttr = xIDElement.getAttribute("toolversion");
          if(toolNameAttr != null) {
            toolInfo.setName(toolNameAttr.getValue());
          }
          if(toolVersionAttr != null) {
            toolInfo.setVersion(toolVersionAttr.getValue());
          }
          ExternalIdentifier xid = new ExternalIdentifier(type,value,toolInfo);
          fileIdentSect.addExternalID(xid);
        }
        identities.add(fileIdentSect);
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

  public final static String genericTransform = "mediainfo_generic_to_fits.xslt";
 
  public MediaInfo() throws FitsException {
   
    String osName = System.getProperty("os.name");
    info = new ToolInfo();
    info.setName(TOOL_NAME);
    String versionOutput = null;
    List<String> infoCommand = new ArrayList<String>();
    if (osName.startsWith("Windows")) { //TODO make it work with windows
      //use provided Windows exiftool.exe
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

    catch (JhoveException e) {
      throw new FitsToolException("Error initializing Jhove",e);
    }

    //initialize tool info
    info = new ToolInfo(jhoveApp.getName(),jhoveApp.getRelease(),jhove.getDate().toString());   
    transformMap = XsltTransformMap.getMap(jhoveFitsConfig+"jhove_xslt_map.xml");
  }
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

 
  public final static String xslt = Fits.FITS_XML+"fileutility/fileutility_to_fits.xslt";

  public FileUtility() throws FitsToolException
    String osName = System.getProperty("os.name");
    info = new ToolInfo();
    String versionOutput = null;
    List<String> infoCommand = new ArrayList<String>();
    info.setName("file utility");
    if (osName.startsWith("Windows")) {
      //use provided Windows File Utility
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

 
  public final static String nlnzFitsConfig = Fits.FITS_XML+"nlnz"+File.separator+"fits"+File.separator;
  private boolean enabled = true;
 
  public MetadataExtractor() throws FitsException
    info = new ToolInfo("NLNZ Metadata Extractor","3.4GA","12/21/2007");
    transformMap = XsltTransformMap.getMap(nlnzFitsConfig+"nlnz_xslt_map.xml");
  }
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

  public final static String genericTransform = "exiftool_generic_to_fits.xslt";
 
  public Exiftool() throws FitsException {
   
    String osName = System.getProperty("os.name");
    info = new ToolInfo();
    info.setName(TOOL_NAME);
    String versionOutput = null;
    List infoCommand = new ArrayList();
    if (osName.startsWith("Windows")) {
      //use provided Windows exiftool.exe
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

      Document dom = result.getFitsXml();
      //if dom is null there is nothing to merge
      if(dom == null) {
        continue;
      }
      ToolInfo toolInfo = result.getTool().getToolInfo();
      try {
        XPath xpath = XPath.newInstance("//fits:"+element.getName());
        xpath.addNamespace("fits",Fits.XML_NAMESPACE);
        Element e = (Element)xpath.selectSingleNode(dom);
        if(e != null) {
          e.setAttribute("toolname",toolInfo.getName());
          e.setAttribute("toolversion",toolInfo.getVersion());
          fitsElements.add(e);
          e.getParent().removeContent(e);
        }
      }
      catch(JDOMException e) {
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

        }
      }
     
      for(ExternalIdentifier xId : identSection.getExternalIdentifiers()) {
        Element externalID = new Element("externalIdentifier",fitsNS);
        ToolInfo xIdInfo = xId.getToolInfo();
        externalID.setAttribute("toolname",xIdInfo.getName());
        externalID.setAttribute("toolversion",xIdInfo.getVersion());
        externalID.setAttribute("type",xId.getName());
        externalID.setText(xId.getValue());
        identElement.addContent(externalID);
      }
      //set the status of the section
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

  public final static String xslt =Fits.FITS_XML+"/ffident/ffident_to_fits.xslt";
  private boolean enabled = true;
 
  public FFIdent() throws FitsToolException{

    info = new ToolInfo("ffident","0.2","2005-10-21");
   
    try {
      File config = new File(Fits.FITS_TOOLS+"ffident/formats.txt");
      identifier = new FormatIdentification(config.getPath());
    } catch (FileNotFoundException e) {
View Full Code Here

Examples of edu.harvard.hul.ois.fits.tools.ToolInfo

  public final static String xslt = Fits.FITS_HOME+"xml/droid/droid_to_fits.xslt";
  private boolean enabled = true;
 
  public Droid() throws FitsToolException {

    info = new ToolInfo("Droid",AnalysisController.DROID_VERSION,null);   

    try {
      String droid_conf = Fits.FITS_TOOLS+"droid"+File.separator;
      URL droidConfig = new File(droid_conf+"DROID_config.xml").toURI().toURL();
      URL sigFile = new File(droid_conf+Fits.config.getString("droid_sigfile")).toURI().toURL();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.