edu.uiuc.ndiipp.hubandspoke.utils.jhove
Class BaseApplicator

java.lang.Object
  extended by edu.uiuc.ndiipp.hubandspoke.utils.jhove.BaseApplicator
Direct Known Subclasses:
PDFBaseApplicator

public class BaseApplicator
extends java.lang.Object

JhoveXSLApplicators that produce "base" metadata, i.e. the PREMIS object piece of the metadata that we need for all files.

Author:
Howard Ding

Constructor Summary
BaseApplicator()
           
 
Method Summary
 org.w3c.dom.Node parameterTransform(org.w3c.dom.Node jhoveInput, java.lang.String idType, java.lang.String idValue)
          This is a convenience method since these two parameters will always need to be suppplied in the creation of the PREMIS metadata.
 org.w3c.dom.Node transform(org.w3c.dom.Node jhoveInput)
          Actually perform the transform.
 org.w3c.dom.Node transform(org.w3c.dom.Node jhoveInput, java.lang.String... parameters)
          This class needed to be synchronized because is changes the javax parser DocumentBuilderFactory from the Saxon to the Xerces implementation and then back to Saxon before it returns.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseApplicator

public BaseApplicator()
Method Detail

parameterTransform

public org.w3c.dom.Node parameterTransform(org.w3c.dom.Node jhoveInput,
                                           java.lang.String idType,
                                           java.lang.String idValue)
                                    throws javax.xml.transform.TransformerConfigurationException,
                                           javax.xml.transform.TransformerException
This is a convenience method since these two parameters will always need to be suppplied in the creation of the PREMIS metadata.

Parameters:
jhoveInput - The raw Jhove XML input
idType - The file ID type required by PREMIS
idValue - The file ID value required by PREMIS
Returns:
a DOM Node resulting from the transformation
Throws:
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException

transform

public org.w3c.dom.Node transform(org.w3c.dom.Node jhoveInput,
                                  java.lang.String... parameters)
                           throws javax.xml.transform.TransformerConfigurationException,
                                  javax.xml.transform.TransformerException
This class needed to be synchronized because is changes the javax parser DocumentBuilderFactory from the Saxon to the Xerces implementation and then back to Saxon before it returns. Without the synchronization, this property change could cause side effects in XMLBeans, which requires the Saxon implementation of DocumentBuilderFactory.

Parameters:
jhoveInput - The raw Jhove XML to transform
parameters - Variable length. Consists of parameter-name, parameter-value pairs of strings (so should always be an even number) to be passed to the stylesheet.
Returns:
A DOM Node containing the results of the transformation.
Throws:
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException

transform

public org.w3c.dom.Node transform(org.w3c.dom.Node jhoveInput)
                           throws javax.xml.transform.TransformerConfigurationException,
                                  javax.xml.transform.TransformerException
Actually perform the transform. This is what clients will presumably use.

Parameters:
jhoveInput - The raw Jhove XML to transform.
Returns:
A DOM Node containing the results of transformation.
Throws:
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException


Copyright © 2006, University of Illinois.