edu.harvard.hul.ois.mets
Class TransformFile

java.lang.Object
  extended byedu.harvard.hul.ois.mets.helper.MetsElement
      extended byedu.harvard.hul.ois.mets.helper.MetsVElement
          extended byedu.harvard.hul.ois.mets.TransformFile
All Implemented Interfaces:
MetsSerializable, MetsValidatable

public class TransformFile
extends MetsVElement

This class encapsulates the <transformFile> element. See <http://www.loc.gov/standards/mets/>.


Field Summary
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
_valid
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsElement
_attrs, _content, _localName, _namespace, _qName, _schema
 
Constructor Summary
TransformFile()
          Instantiate a new TransformFile object.
 
Method Summary
 java.lang.String getTRANSFORMALGORITHM()
          Return transformation algorithm.
 java.util.Map getTRANSFORMBEHAVIOR()
          Return map of IDREF to transformation behavior.
 java.lang.String getTRANSFORMKEY()
          Return transformation key.
 int getTRANSFORMORDER()
          Return transformation order.
 Transformtype getTRANSFORMTYPE()
          Return transformation type.
 void read(MetsReader r)
          De-serialize the content of the file into this element using the given reader.
static TransformFile reader(MetsReader r)
          Instantiate a TransformFile object de-serialized from the input stream.
 void setTRANSFORMALGORITHM(java.lang.String algorithm)
          Transformation algorithm.
 void setTRANSFORMBEHAVIOR(java.lang.String TRANSFORMBEHAVIOR)
          Set TRANSFORMBEHAVIOR of Behavior element.
 void setTRANSFORMBEHAVIOR(java.lang.String TRANSFORMBEHAVIOR, Behavior behavior)
          Set TRANSFORMBEHAVIOR of Behavior element, with referenced element.
 void setTRANSFORMKEY(java.lang.String key)
          Transformation key.
 void setTRANSFORMORDER(int order)
          Transformation order.
 void setTRANSFORMTYPE(Transformtype type)
          Transformation type.
 void validateThis(MetsValidator v)
          Validate this element using the given validator.
 void validateThisIDREFs(MetsValidator v)
          Validate ID/IDREF consistency with the given validator.
 void write(MetsWriter w)
          Serialize the content of this element using the given writer.
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
isValid, validate, validateIDREFs
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsElement
getContent, getLocalName, getNamespace, getQName, getSchemas, init, setSchema, setSchema, writeSchemas
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformFile

public TransformFile()
Instantiate a new TransformFile object.

Method Detail

getTRANSFORMALGORITHM

public java.lang.String getTRANSFORMALGORITHM()
Return transformation algorithm.

Returns:
Algorithm

getTRANSFORMBEHAVIOR

public java.util.Map getTRANSFORMBEHAVIOR()
Return map of IDREF to transformation behavior.

Returns:
Map

getTRANSFORMKEY

public java.lang.String getTRANSFORMKEY()
Return transformation key.

Returns:
Key

getTRANSFORMORDER

public int getTRANSFORMORDER()
                      throws MetsException
Return transformation order.

Returns:
Order
Throws:
MetsException

getTRANSFORMTYPE

public Transformtype getTRANSFORMTYPE()
Return transformation type.

Returns:
Type

setTRANSFORMALGORITHM

public void setTRANSFORMALGORITHM(java.lang.String algorithm)
Transformation algorithm.

Parameters:
algorithm - Algorithm

setTRANSFORMBEHAVIOR

public void setTRANSFORMBEHAVIOR(java.lang.String TRANSFORMBEHAVIOR)
Set TRANSFORMBEHAVIOR of Behavior element.

Parameters:
TRANSFORMBEHAVIOR - Behavior IDREF

setTRANSFORMBEHAVIOR

public void setTRANSFORMBEHAVIOR(java.lang.String TRANSFORMBEHAVIOR,
                                 Behavior behavior)
Set TRANSFORMBEHAVIOR of Behavior element, with referenced element. The map is clear'ed first to ensure a single ID/IDREF pair.

Parameters:
TRANSFORMBEHAVIOR - Behavior IDREF
behavior - Behavior element (or NULL)

setTRANSFORMKEY

public void setTRANSFORMKEY(java.lang.String key)
Transformation key.

Parameters:
key - Key

setTRANSFORMORDER

public void setTRANSFORMORDER(int order)
Transformation order.

Parameters:
order - Order

setTRANSFORMTYPE

public void setTRANSFORMTYPE(Transformtype type)
Transformation type.

Parameters:
type - Type

reader

public static TransformFile reader(MetsReader r)
                            throws MetsException
Instantiate a TransformFile object de-serialized from the input stream.

Parameters:
r - Reader
Returns:
TransformFile object
Throws:
MetsException - De-serializing exception

read

public void read(MetsReader r)
          throws MetsException
De-serialize the content of the file into this element using the given reader.

Specified by:
read in interface MetsSerializable
Specified by:
read in class MetsElement
Parameters:
r - Reader
Throws:
MetsException

write

public void write(MetsWriter w)
           throws MetsException
Serialize the content of this element using the given writer.

Specified by:
write in interface MetsSerializable
Specified by:
write in class MetsElement
Parameters:
w - Writer
Throws:
MetsException

validateThis

public void validateThis(MetsValidator v)
                  throws MetsException
Validate this element using the given validator.

Specified by:
validateThis in interface MetsValidatable
Overrides:
validateThis in class MetsVElement
Parameters:
v - Validator
Throws:
MetsException - Validation exception

validateThisIDREFs

public void validateThisIDREFs(MetsValidator v)
                        throws MetsException
Validate ID/IDREF consistency with the given validator.

Overrides:
validateThisIDREFs in class MetsVElement
Parameters:
v - Validator
Throws:
MetsException - Validation exception