edu.harvard.hul.ois.mets
Class Mets

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.helper.MetsIDElement
              extended byedu.harvard.hul.ois.mets.Mets
All Implemented Interfaces:
MetsIdentifiable, MetsSerializable, MetsValidatable

public class Mets
extends MetsIDElement

METS (Metadata Encoding and Transmission Standard) is intended to provide a standardized XML format for transmission of complex digital library objects between systems. This class encapsulates the document root <mets> element. See <http://www.loc.gov/standards/mets/>.


Field Summary
 
Fields inherited from class edu.harvard.hul.ois.mets.helper.MetsIDElement
_ID
 
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
Mets()
          Instantiate a new Mets object.
Mets(boolean noSchema)
          Instantiate a new Mets object.
 
Method Summary
 java.lang.String getLABEL()
          Return document label.
 java.lang.String getOBJID()
          Return document object ID
 java.lang.String getPROFILE()
          Return document profile.
 java.lang.String getTYPE()
          Return document object type
 void read(MetsReader r)
          De-serialize the content of the file into this element using the given reader.
static Mets reader(MetsReader r)
          Instantiate a Mets object de-serialized from the input stream.
static Mets reader(MetsReader r, boolean noSchema)
          Instantiate a Mets object de-serialized from the input stream.
 void setLABEL(java.lang.String LABEL)
          Set document object label.
 void setOBJID(java.lang.String OBJID)
          Set document object ID.
 void setPROFILE(java.lang.String PROFILE)
          Set document object profile.
 void setTYPE(java.lang.String TYPE)
          Set document object type.
 void validateThis(MetsValidator v)
          Validate this element using the given validator.
 void write(MetsWriter w)
          Serialize the content of this element using the given writer.
 void write(MetsWriter w, boolean noXmlDecl)
          Serialize the content of this element using the given writer.
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsIDElement
getID, setID
 
Methods inherited from class edu.harvard.hul.ois.mets.helper.MetsVElement
isValid, validate, validateIDREFs, validateThisIDREFs
 
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

Mets

public Mets()
Instantiate a new Mets object.


Mets

public Mets(boolean noSchema)
Instantiate a new Mets object.

Parameters:
noSchema - If true, suppress the METS, XLink, and XSI schemas
Method Detail

getLABEL

public java.lang.String getLABEL()
Return document label.

Returns:
Label

getOBJID

public java.lang.String getOBJID()
Return document object ID

Returns:
Object ID

getPROFILE

public java.lang.String getPROFILE()
Return document profile.

Returns:
Profile

getTYPE

public java.lang.String getTYPE()
Return document object type

Returns:
Object type

setLABEL

public void setLABEL(java.lang.String LABEL)
Set document object label.

Parameters:
LABEL - Object label

setOBJID

public void setOBJID(java.lang.String OBJID)
Set document object ID.

Parameters:
OBJID - Object id

setPROFILE

public void setPROFILE(java.lang.String PROFILE)
Set document object profile.

Parameters:
PROFILE - Object profile

setTYPE

public void setTYPE(java.lang.String TYPE)
Set document object type.

Parameters:
TYPE - Object type

reader

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

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

reader

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

Parameters:
r - Reader
noSchema - If true, suppress the METS, XLink, and XSI schemas
Returns:
Mets 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

write

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

Parameters:
w - Writer
noXmlDecl - If true, suppress the XML declaration
Throws:
MetsException

validateThis

public void validateThis(MetsValidator v)
                  throws MetsException
Validate this element using the given validator. Include global validation of all IDREFs to IDs.

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