this._identity = desc;
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getID();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.setID( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return new java.lang.String();
}
};
desc.setSchemaType("ID");
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _ID
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.IdValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.IdValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
//-- _ADMID
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_ADMID", "ADMID", org.exolab.castor.xml.NodeType.Attribute);
desc.setReference(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getADMID();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.addADMID( (java.lang.Object) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
MetsHdr target = (MetsHdr) object;
target.removeAllADMID();
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return new java.lang.Object();
}
};
desc.setMultivalued(true);
desc.setSchemaType("IDREF");
desc.setHandler(handler);
desc.setMultivalued(true);
addFieldDescriptor(desc);
//-- validation code for: _ADMID
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(0);
{ //-- local scope
org.exolab.castor.xml.validators.IdRefsValidator typeValidator = new org.exolab.castor.xml.validators.IdRefsValidator();
fieldValidator.setValidator(typeValidator);
desc.setValidator(fieldValidator);
}
desc.setValidator(fieldValidator);
//-- _CREATEDATE
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_CREATEDATE", "CREATEDATE", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getCREATEDATE();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.setCREATEDATE( (java.util.Date) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return new java.util.Date();
}
};
handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler);
desc.setImmutable(true);
desc.setSchemaType("dateTime");
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _CREATEDATE
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.DateTimeValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
//-- _LASTMODDATE
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_LASTMODDATE", "LASTMODDATE", org.exolab.castor.xml.NodeType.Attribute);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getLASTMODDATE();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.setLASTMODDATE( (java.util.Date) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return new java.util.Date();
}
};
handler = new org.exolab.castor.xml.handlers.DateFieldHandler(handler);
desc.setImmutable(true);
desc.setSchemaType("dateTime");
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _LASTMODDATE
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.DateTimeValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.DateTimeValidator();
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);
//-- _RECORDSTATUS
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_RECORDSTATUS", "RECORDSTATUS", org.exolab.castor.xml.NodeType.Attribute);
desc.setImmutable(true);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getRECORDSTATUS();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.setRECORDSTATUS( (java.lang.String) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return null;
}
};
desc.setSchemaType("string");
desc.setHandler(handler);
desc.setMultivalued(false);
addFieldDescriptor(desc);
//-- validation code for: _RECORDSTATUS
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
org.exolab.castor.xml.validators.StringValidator typeValidator;
typeValidator = new org.exolab.castor.xml.validators.StringValidator();
fieldValidator.setValidator(typeValidator);
typeValidator.setWhiteSpace("preserve");
}
desc.setValidator(fieldValidator);
//-- initialize element descriptors
//-- _agentList
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_6.Agent.class, "_agentList", "agent", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getAgent();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.addAgent( (edu.indiana.dlib.metsnav.mets.v1_6.Agent) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
MetsHdr target = (MetsHdr) object;
target.removeAllAgent();
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {
return new edu.indiana.dlib.metsnav.mets.v1_6.Agent();
}
};
desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_6.Agent");
desc.setHandler(handler);
desc.setNameSpaceURI("http://www.loc.gov/METS/");
desc.setMultivalued(true);
addFieldDescriptor(desc);
addSequenceElement(desc);
//-- validation code for: _agentList
fieldValidator = new org.exolab.castor.xml.FieldValidator();
fieldValidator.setMinOccurs(0);
{ //-- local scope
}
desc.setValidator(fieldValidator);
//-- _altRecordIDList
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_6.AltRecordID.class, "_altRecordIDList", "altRecordID", org.exolab.castor.xml.NodeType.Element);
handler = new org.exolab.castor.xml.XMLFieldHandler() {
public java.lang.Object getValue( java.lang.Object object )
throws IllegalStateException
{
MetsHdr target = (MetsHdr) object;
return target.getAltRecordID();
}
public void setValue( java.lang.Object object, java.lang.Object value)
throws IllegalStateException, IllegalArgumentException
{
try {
MetsHdr target = (MetsHdr) object;
target.addAltRecordID( (edu.indiana.dlib.metsnav.mets.v1_6.AltRecordID) value);
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
try {
MetsHdr target = (MetsHdr) object;
target.removeAllAltRecordID();
} catch (java.lang.Exception ex) {
throw new IllegalStateException(ex.toString());
}
}
public java.lang.Object newInstance(java.lang.Object parent) {