edu.harvard.hul.ois.mets
Class Agent

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.Agent
All Implemented Interfaces:
MetsIdentifiable, MetsSerializable, MetsValidatable

public class Agent
extends MetsIDElement

This class encapsulates the <agent> 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
Agent()
          Instantiate an Agent object.
 
Method Summary
 java.lang.String getOTHERROLE()
          Return other agent role.
 java.lang.String getOTHERTYPE()
          Return other agent type.
 Role getROLE()
          Return pre-defined agent role.
 Type getTYPE()
          Return pre-defined agent type.
 void read(MetsReader r)
          De-serialize the content of the instance document into this element using the given reader.
static Agent reader(MetsReader r)
          Instantiate a Agent object de-serialized from the input stream.
 void setOTHERROLE(java.lang.String role)
          Set other agent role.
 void setOTHERTYPE(java.lang.String type)
          Set other agent type.
 void setROLE(Role role)
          Set pre-defined agent role.
 void setTYPE(Type type)
          Set pre-defined agent type.
 void validateThis(MetsValidator v)
          Validate this element using the given validator.
 void write(MetsWriter w)
          Serialize this element and its content model 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

Agent

public Agent()
Instantiate an Agent object.

Method Detail

getOTHERROLE

public java.lang.String getOTHERROLE()
Return other agent role.

Returns:
Role

getOTHERTYPE

public java.lang.String getOTHERTYPE()
Return other agent type.

Returns:
Type

getROLE

public Role getROLE()
Return pre-defined agent role.

Returns:
Role

getTYPE

public Type getTYPE()
Return pre-defined agent type.

Returns:
Type

setOTHERROLE

public void setOTHERROLE(java.lang.String role)
Set other agent role.

Parameters:
role - Role

setOTHERTYPE

public void setOTHERTYPE(java.lang.String type)
Set other agent type.

Parameters:
type - Type

setROLE

public void setROLE(Role role)
Set pre-defined agent role.

Parameters:
role - Role

setTYPE

public void setTYPE(Type type)
Set pre-defined agent type.

Parameters:
type - Type

reader

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

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

read

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

Specified by:
read in interface MetsSerializable
Specified by:
read in class MetsElement
Parameters:
r - Reader
Throws:
MetsException - I/O exception

write

public void write(MetsWriter w)
           throws MetsException
Serialize this element and its content model using the given writer

Specified by:
write in interface MetsSerializable
Specified by:
write in class MetsElement
Parameters:
w - Writer
Throws:
MetsException - I/O exception

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