edu.indiana.dlib.metsnav.mets.v1_5
Class Agent

java.lang.Object
  extended by edu.indiana.dlib.metsnav.mets.v1_5.Agent
All Implemented Interfaces:
Serializable

public class Agent
extends Object
implements Serializable

agent: METS agent. The agent element allows for various parties and their roles with respect to the METS document to be recorded.

See Also:
Serialized Form

Constructor Summary
Agent()
           
 
Method Summary
 void addNote(int index, String vNote)
          Method addNote
 void addNote(String vNote)
          Method addNote
 void clearNote()
          Method clearNote
 Enumeration enumerateNote()
          Method enumerateNote
 String getID()
          Returns the value of field 'ID'.
 String getName()
          Returns the value of field 'name'.
 String[] getNote()
          Method getNote
 String getNote(int index)
          Method getNote
 int getNoteCount()
          Method getNoteCount
 String getOTHERROLE()
          Returns the value of field 'OTHERROLE'.
 String getOTHERTYPE()
          Returns the value of field 'OTHERTYPE'.
 AgentROLEType getROLE()
          Returns the value of field 'ROLE'.
 AgentTYPEType getTYPE()
          Returns the value of field 'TYPE'.
 boolean isValid()
          Method isValid
 void marshal(ContentHandler handler)
          Method marshal
 void marshal(Writer out)
          Method marshal
 boolean removeNote(String vNote)
          Method removeNote
 void setID(String ID)
          Sets the value of field 'ID'.
 void setName(String name)
          Sets the value of field 'name'.
 void setNote(int index, String vNote)
          Method setNote
 void setNote(String[] noteArray)
          Method setNote
 void setOTHERROLE(String OTHERROLE)
          Sets the value of field 'OTHERROLE'.
 void setOTHERTYPE(String OTHERTYPE)
          Sets the value of field 'OTHERTYPE'.
 void setROLE(AgentROLEType ROLE)
          Sets the value of field 'ROLE'.
 void setTYPE(AgentTYPEType TYPE)
          Sets the value of field 'TYPE'.
static Object unmarshal(Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Agent

public Agent()
Method Detail

addNote

public void addNote(String vNote)
             throws IndexOutOfBoundsException
Method addNote

Parameters:
vNote -
Throws:
IndexOutOfBoundsException

addNote

public void addNote(int index,
                    String vNote)
             throws IndexOutOfBoundsException
Method addNote

Parameters:
index -
vNote -
Throws:
IndexOutOfBoundsException

clearNote

public void clearNote()
Method clearNote


enumerateNote

public Enumeration enumerateNote()
Method enumerateNote

Returns:
Enumeration

getID

public String getID()
Returns the value of field 'ID'. The field 'ID' has the following description: ID: an optional XML ID

Returns:
String

getName

public String getName()
Returns the value of field 'name'. The field 'name' has the following description: name:The full name of the METS document agent.

Returns:
String

getNote

public String getNote(int index)
               throws IndexOutOfBoundsException
Method getNote

Parameters:
index -
Returns:
String
Throws:
IndexOutOfBoundsException

getNote

public String[] getNote()
Method getNote

Returns:
String

getNoteCount

public int getNoteCount()
Method getNoteCount

Returns:
int

getOTHERROLE

public String getOTHERROLE()
Returns the value of field 'OTHERROLE'. The field 'OTHERROLE' has the following description: OTHERROLE: an optional string attribute to specify the particular role an agent plays with respect to a METS object or its sources, to be used if the ROLE attribute has a value of OTHER.

Returns:
String

getOTHERTYPE

public String getOTHERTYPE()
Returns the value of field 'OTHERTYPE'. The field 'OTHERTYPE' has the following description: OTHERTYPE: an optional string to indicate the particular type of agent, to be used if a value of OTHER is indicated in the agent's TYPE attribute.

Returns:
String

getROLE

public AgentROLEType getROLE()
Returns the value of field 'ROLE'. The field 'ROLE' has the following description: ROLE: a required attribute specifying the role played by the agent with respect to the METS object. ROLE must have one of the following seven values: CREATOR: an agent responsible for creating the METS document EDITOR: an agent responsible for editing the METS document ARCHIVIST: an agent with archival responsibility for the METS document and/or the original sources used to create the METS object PRESERVATION: an agent responsible for preserving the METS object and/or the original sources used to create the METS object DISSEMINATOR: an agent responsible for distributing or publishing the METS object CUSTODIAN: an agent with custodial responsibility for the METS object IPOWNER: an agent with intellectual property rights in the METS object or some of its components. OTHER: an agent with other rights/responsibilities with respect to the METS object not set forth above.

Returns:
AgentROLEType

getTYPE

public AgentTYPEType getTYPE()
Returns the value of field 'TYPE'. The field 'TYPE' has the following description: TYPE: an optional attribute to specify the nature of the agent acting with respect to the METS object. It can take one of three values: INDIVIDUAL: a single, human agent ORGANIZATION: a collective entity OTHER: some other form of agent (e.g., a software agent)

Returns:
AgentTYPEType

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(Writer out)
             throws MarshalException,
                    ValidationException
Method marshal

Parameters:
out -
Throws:
MarshalException
ValidationException

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    MarshalException,
                    ValidationException
Method marshal

Parameters:
handler -
Throws:
IOException
MarshalException
ValidationException

removeNote

public boolean removeNote(String vNote)
Method removeNote

Parameters:
vNote -
Returns:
boolean

setID

public void setID(String ID)
Sets the value of field 'ID'. The field 'ID' has the following description: ID: an optional XML ID

Parameters:
ID - the value of field 'ID'.

setName

public void setName(String name)
Sets the value of field 'name'. The field 'name' has the following description: name:The full name of the METS document agent.

Parameters:
name - the value of field 'name'.

setNote

public void setNote(int index,
                    String vNote)
             throws IndexOutOfBoundsException
Method setNote

Parameters:
index -
vNote -
Throws:
IndexOutOfBoundsException

setNote

public void setNote(String[] noteArray)
Method setNote

Parameters:
noteArray -

setOTHERROLE

public void setOTHERROLE(String OTHERROLE)
Sets the value of field 'OTHERROLE'. The field 'OTHERROLE' has the following description: OTHERROLE: an optional string attribute to specify the particular role an agent plays with respect to a METS object or its sources, to be used if the ROLE attribute has a value of OTHER.

Parameters:
OTHERROLE - the value of field 'OTHERROLE'.

setOTHERTYPE

public void setOTHERTYPE(String OTHERTYPE)
Sets the value of field 'OTHERTYPE'. The field 'OTHERTYPE' has the following description: OTHERTYPE: an optional string to indicate the particular type of agent, to be used if a value of OTHER is indicated in the agent's TYPE attribute.

Parameters:
OTHERTYPE - the value of field 'OTHERTYPE'.

setROLE

public void setROLE(AgentROLEType ROLE)
Sets the value of field 'ROLE'. The field 'ROLE' has the following description: ROLE: a required attribute specifying the role played by the agent with respect to the METS object. ROLE must have one of the following seven values: CREATOR: an agent responsible for creating the METS document EDITOR: an agent responsible for editing the METS document ARCHIVIST: an agent with archival responsibility for the METS document and/or the original sources used to create the METS object PRESERVATION: an agent responsible for preserving the METS object and/or the original sources used to create the METS object DISSEMINATOR: an agent responsible for distributing or publishing the METS object CUSTODIAN: an agent with custodial responsibility for the METS object IPOWNER: an agent with intellectual property rights in the METS object or some of its components. OTHER: an agent with other rights/responsibilities with respect to the METS object not set forth above.

Parameters:
ROLE - the value of field 'ROLE'.

setTYPE

public void setTYPE(AgentTYPEType TYPE)
Sets the value of field 'TYPE'. The field 'TYPE' has the following description: TYPE: an optional attribute to specify the nature of the agent acting with respect to the METS object. It can take one of three values: INDIVIDUAL: a single, human agent ORGANIZATION: a collective entity OTHER: some other form of agent (e.g., a software agent)

Parameters:
TYPE - the value of field 'TYPE'.

unmarshal

public static Object unmarshal(Reader reader)
                        throws MarshalException,
                               ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
MarshalException
ValidationException

validate

public void validate()
              throws ValidationException
Method validate

Throws:
ValidationException


Copyright © 2005 Trustees of Indiana University. All Rights Reserved.