Package edu.indiana.dlib.metsnav.mets.v1_5.descriptors

Examples of edu.indiana.dlib.metsnav.mets.v1_5.descriptors.MdRefDescriptor


        this._identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileSec target = (FileSec) object;
                return target.getID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileSec target = (FileSec) 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);
        //-- initialize element descriptors
       
        //-- _fileGrpList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.FileGrp.class, "_fileGrpList", "fileGrp", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileSec target = (FileSec) object;
                return target.getFileGrp();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileSec target = (FileSec) object;
                    target.addFileGrp( (edu.indiana.dlib.metsnav.mets.v1_5.FileGrp) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    FileSec target = (FileSec) object;
                    target.removeAllFileGrp();
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
View Full Code Here


        this._identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) 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.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _ID
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
            org.exolab.castor.xml.validators.IdValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.IdValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _MIMETYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_MIMETYPE", "MIMETYPE", 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
            {
                FileType target = (FileType) object;
                return target.getMIMETYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setMIMETYPE( (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: _MIMETYPE
        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);
        //-- _SEQ
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Integer.TYPE, "_SEQ", "SEQ", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                if (!target.hasSEQ()) { return null; }
                return new java.lang.Integer(target.getSEQ());
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    // if null, use delete method for optional primitives
                    if (value == null) {
                        target.deleteSEQ();
                        return;
                    }
                    target.setSEQ( ((java.lang.Integer) value).intValue());
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setSchemaType("int");
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _SEQ
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            org.exolab.castor.xml.validators.IntValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.IntValidator();
            fieldValidator.setValidator(typeValidator);
            typeValidator.setMinInclusive(-2147483648);
            typeValidator.setMaxInclusive(2147483647);
        }
        desc.setValidator(fieldValidator);
        //-- _SIZE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_SIZE", "SIZE", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                if (!target.hasSIZE()) { return null; }
                return new java.lang.Long(target.getSIZE());
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    // if null, use delete method for optional primitives
                    if (value == null) {
                        target.deleteSIZE();
                        return;
                    }
                    target.setSIZE( ((java.lang.Long) value).longValue());
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setSchemaType("long");
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _SIZE
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            org.exolab.castor.xml.validators.LongValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.LongValidator();
            fieldValidator.setValidator(typeValidator);
            typeValidator.setMinInclusive(-9223372036854775808L);
            typeValidator.setMaxInclusive(9223372036854775807L);
        }
        desc.setValidator(fieldValidator);
        //-- _CREATED
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_CREATED", "CREATED", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getCREATED();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setCREATED( (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: _CREATED
        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);
        //-- _CHECKSUM
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_CHECKSUM", "CHECKSUM", 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
            {
                FileType target = (FileType) object;
                return target.getCHECKSUM();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setCHECKSUM( (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: _CHECKSUM
        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);
        //-- _CHECKSUMTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.types.FileTypeCHECKSUMTYPEType.class, "_CHECKSUMTYPE", "CHECKSUMTYPE", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getCHECKSUMTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setCHECKSUMTYPE( (edu.indiana.dlib.metsnav.mets.v1_5.types.FileTypeCHECKSUMTYPEType) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(edu.indiana.dlib.metsnav.mets.v1_5.types.FileTypeCHECKSUMTYPEType.class, handler);
        desc.setImmutable(true);
        desc.setSchemaType("FileTypeCHECKSUMTYPEType");
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _CHECKSUMTYPE
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _OWNERID
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_OWNERID", "OWNERID", 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
            {
                FileType target = (FileType) object;
                return target.getOWNERID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setOWNERID( (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: _OWNERID
        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);
        //-- _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
            {
                FileType target = (FileType) object;
                return target.getADMID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) 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 {
                    FileType target = (FileType) 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);
        //-- _DMDID
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_DMDID", "DMDID", 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
            {
                FileType target = (FileType) object;
                return target.getDMDID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.addDMDID( (java.lang.Object) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    FileType target = (FileType) object;
                    target.removeAllDMDID();
                } 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: _DMDID
        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);
        //-- _GROUPID
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_GROUPID", "GROUPID", 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
            {
                FileType target = (FileType) object;
                return target.getGROUPID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setGROUPID( (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: _GROUPID
        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);
        //-- _USE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_USE", "USE", 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
            {
                FileType target = (FileType) object;
                return target.getUSE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setUSE( (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: _USE
        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
       
        //-- _FLocatList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.FLocat.class, "_FLocatList", "FLocat", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getFLocat();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.addFLocat( (edu.indiana.dlib.metsnav.mets.v1_5.FLocat) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    FileType target = (FileType) object;
                    target.removeAllFLocat();
                } 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_5.FLocat();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.FLocat");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(true);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _FLocatList
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(0);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _FContent
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.FContent.class, "_FContent", "FContent", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getFContent();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.setFContent( (edu.indiana.dlib.metsnav.mets.v1_5.FContent) value);
                } 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_5.FContent();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.FContent");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _FContent
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _streamList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.Stream.class, "_streamList", "stream", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getStream();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.addStream( (edu.indiana.dlib.metsnav.mets.v1_5.Stream) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    FileType target = (FileType) object;
                    target.removeAllStream();
                } 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_5.Stream();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.Stream");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(true);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _streamList
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(0);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _transformFileList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.TransformFile.class, "_transformFileList", "transformFile", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getTransformFile();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.addTransformFile( (edu.indiana.dlib.metsnav.mets.v1_5.TransformFile) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    FileType target = (FileType) object;
                    target.removeAllTransformFile();
                } 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_5.TransformFile();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.TransformFile");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(true);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _transformFileList
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(0);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _fileList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.File.class, "_fileList", "file", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                FileType target = (FileType) object;
                return target.getFile();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    FileType target = (FileType) object;
                    target.addFile( (edu.indiana.dlib.metsnav.mets.v1_5.File) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    FileType target = (FileType) object;
                    target.removeAllFile();
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
View Full Code Here

        this._identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                Fptr target = (Fptr) object;
                return target.getID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    Fptr target = (Fptr) 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);
        //-- _FILEID
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_FILEID", "FILEID", 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
            {
                Fptr target = (Fptr) object;
                return target.getFILEID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    Fptr target = (Fptr) object;
                    target.setFILEID( (java.lang.Object) value);
                } 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.setSchemaType("IDREF");
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _FILEID
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            org.exolab.castor.xml.validators.IdRefValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.IdRefValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _CONTENTIDSList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_CONTENTIDSList", "CONTENTIDS", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                Fptr target = (Fptr) object;
                return target.getCONTENTIDS();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    Fptr target = (Fptr) object;
                    target.addCONTENTIDS( (java.lang.String) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {
                try {
                    Fptr target = (Fptr) object;
                    target.removeAllCONTENTIDS();
                } 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("anyURI");
        desc.setHandler(handler);
        desc.setMultivalued(true);
        addFieldDescriptor(desc);
       
        //-- validation code for: _CONTENTIDSList
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(0);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- initialize element descriptors
       
        //-- _par
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.Par.class, "_par", "par", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                Fptr target = (Fptr) object;
                return target.getPar();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    Fptr target = (Fptr) object;
                    target.setPar( (edu.indiana.dlib.metsnav.mets.v1_5.Par) value);
                } 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_5.Par();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.Par");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _par
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _seq
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.Seq.class, "_seq", "seq", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                Fptr target = (Fptr) object;
                return target.getSeq();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    Fptr target = (Fptr) object;
                    target.setSeq( (edu.indiana.dlib.metsnav.mets.v1_5.Seq) value);
                } 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_5.Seq();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.Seq");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _seq
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _area
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.Area.class, "_area", "area", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                Fptr target = (Fptr) object;
                return target.getArea();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    Fptr target = (Fptr) object;
                    target.setArea( (edu.indiana.dlib.metsnav.mets.v1_5.Area) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
View Full Code Here

     */
    protected Object parseLogicalStruct(String oid, Div div, CompositeItem parent)
            throws DAOException {
        if ("page".equals(div.getTYPE()) || div.getDivCount() == 0) {
            if (div.getFptrCount() > 0) {
                Fptr fptr = div.getFptr(0);
                File file = (File) fptr.getFILEID();
                String groupId = file.getGROUPID();
                AtomicItem item = metsObj.getAtomicItemByID(groupId);
                item.setParent(parent);
                return item;
            } else if (div.getMptrCount() > 0) {
View Full Code Here

        AtomicItem page = new AtomicItem();

        HashMap<String, String> map = new HashMap<String, String>();
        Fptr[] fptrs = pageDiv.getFptr();
        for (int i = 0; i < fptrs.length; i++) {
            Fptr fptr = fptrs[i];
            File file = (File) fptr.getFILEID();
            if (file != null) {
                FLocat locat = file.getFLocat(0);
                String group = file.getUSE();
                map.put(group, locat.getHref());
            }
View Full Code Here

        // Sort the divs
        List<AtomicItem> list = new ArrayList<AtomicItem>(divs.length);
        for (int index = 0; index < divs.length; index++) {
            Div d = divs[index];
            if ("page".equals(d.getTYPE())) {
                Fptr fptr = d.getFptr(0);
                File file = (File) fptr.getFILEID();
                String groupId = file.getGROUPID();
                int size = list.size();
                if (size == 0 || (size > 0 && !(groupId.equals(list.get(size - 1).getId())))) {
                    AtomicItem item = parsePage(d);
                    item.setId(groupId);
View Full Code Here

        this._identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdRef target = (MdRef) object;
                return target.getID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) 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);
        //-- _MIMETYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_MIMETYPE", "MIMETYPE", 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
            {
                MdRef target = (MdRef) object;
                return target.getMIMETYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setMIMETYPE( (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: _MIMETYPE
        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);
        //-- _LABEL
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_LABEL", "LABEL", 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
            {
                MdRef target = (MdRef) object;
                return target.getLABEL();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setLABEL( (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: _LABEL
        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);
        //-- _XPTR
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_XPTR", "XPTR", 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
            {
                MdRef target = (MdRef) object;
                return target.getXPTR();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setXPTR( (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: _XPTR
        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);
        //-- _LOCTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.types.LOCATIONLOCTYPEType.class, "_LOCTYPE", "LOCTYPE", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdRef target = (MdRef) object;
                return target.getLOCTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setLOCTYPE( (edu.indiana.dlib.metsnav.mets.v1_5.types.LOCATIONLOCTYPEType) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(edu.indiana.dlib.metsnav.mets.v1_5.types.LOCATIONLOCTYPEType.class, handler);
        desc.setImmutable(true);
        desc.setSchemaType("LOCATIONLOCTYPEType");
        desc.setHandler(handler);
        desc.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _LOCTYPE
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _OTHERLOCTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_OTHERLOCTYPE", "OTHERLOCTYPE", 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
            {
                MdRef target = (MdRef) object;
                return target.getOTHERLOCTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setOTHERLOCTYPE( (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: _OTHERLOCTYPE
        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);
        //-- _type
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", 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
            {
                MdRef target = (MdRef) object;
                return target.getType();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setType( (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.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _type
        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.setFixed("simple");
            typeValidator.setWhiteSpace("preserve");
        }
        desc.setValidator(fieldValidator);
        //-- _href
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_href", "href", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdRef target = (MdRef) object;
                return target.getHref();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setHref( (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("anyURI");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _href
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _role
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_role", "role", 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
            {
                MdRef target = (MdRef) object;
                return target.getRole();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setRole( (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.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _role
        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);
        //-- _arcrole
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_arcrole", "arcrole", 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
            {
                MdRef target = (MdRef) object;
                return target.getArcrole();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setArcrole( (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.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _arcrole
        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);
        //-- _title
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_title", "title", 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
            {
                MdRef target = (MdRef) object;
                return target.getTitle();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setTitle( (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.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _title
        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);
        //-- _show
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.types.ShowType.class, "_show", "show", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdRef target = (MdRef) object;
                return target.getShow();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setShow( (edu.indiana.dlib.metsnav.mets.v1_5.types.ShowType) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(edu.indiana.dlib.metsnav.mets.v1_5.types.ShowType.class, handler);
        desc.setImmutable(true);
        desc.setSchemaType("MptrShowType");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _show
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _actuate
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.types.ActuateType.class, "_actuate", "actuate", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdRef target = (MdRef) object;
                return target.getActuate();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setActuate( (edu.indiana.dlib.metsnav.mets.v1_5.types.ActuateType) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(edu.indiana.dlib.metsnav.mets.v1_5.types.ActuateType.class, handler);
        desc.setImmutable(true);
        desc.setSchemaType("MptrActuateType");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.w3.org/1999/xlink");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _actuate
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _MDTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.types.METADATAMDTYPEType.class, "_MDTYPE", "MDTYPE", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdRef target = (MdRef) object;
                return target.getMDTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setMDTYPE( (edu.indiana.dlib.metsnav.mets.v1_5.types.METADATAMDTYPEType) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(edu.indiana.dlib.metsnav.mets.v1_5.types.METADATAMDTYPEType.class, handler);
        desc.setImmutable(true);
        desc.setSchemaType("METADATAMDTYPEType");
        desc.setHandler(handler);
        desc.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _MDTYPE
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _OTHERMDTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_OTHERMDTYPE", "OTHERMDTYPE", 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
            {
                MdRef target = (MdRef) object;
                return target.getOTHERMDTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdRef target = (MdRef) object;
                    target.setOTHERMDTYPE( (java.lang.String) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
View Full Code Here

        this._identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdSecType target = (MdSecType) object;
                return target.getID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) 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.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _ID
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
            org.exolab.castor.xml.validators.IdValidator typeValidator;
            typeValidator = new org.exolab.castor.xml.validators.IdValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _GROUPID
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_GROUPID", "GROUPID", 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
            {
                MdSecType target = (MdSecType) object;
                return target.getGROUPID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) object;
                    target.setGROUPID( (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: _GROUPID
        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);
        //-- _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
            {
                MdSecType target = (MdSecType) object;
                return target.getADMID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) 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 {
                    MdSecType target = (MdSecType) 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);
        //-- _CREATED
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.util.Date.class, "_CREATED", "CREATED", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdSecType target = (MdSecType) object;
                return target.getCREATED();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) object;
                    target.setCREATED( (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: _CREATED
        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);
        //-- _STATUS
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_STATUS", "STATUS", 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
            {
                MdSecType target = (MdSecType) object;
                return target.getSTATUS();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) object;
                    target.setSTATUS( (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: _STATUS
        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
       
        //-- _mdRef
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.MdRef.class, "_mdRef", "mdRef", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdSecType target = (MdSecType) object;
                return target.getMdRef();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) object;
                    target.setMdRef( (edu.indiana.dlib.metsnav.mets.v1_5.MdRef) value);
                } 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_5.MdRef();
            }
        };
        desc.setSchemaType("edu.indiana.dlib.metsnav.mets.v1_5.MdRef");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _mdRef
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _mdWrap
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.MdWrap.class, "_mdWrap", "mdWrap", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdSecType target = (MdSecType) object;
                return target.getMdWrap();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdSecType target = (MdSecType) object;
                    target.setMdWrap( (edu.indiana.dlib.metsnav.mets.v1_5.MdWrap) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
View Full Code Here

        this._identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdWrap target = (MdWrap) object;
                return target.getID();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) 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);
        //-- _MIMETYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_MIMETYPE", "MIMETYPE", 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
            {
                MdWrap target = (MdWrap) object;
                return target.getMIMETYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) object;
                    target.setMIMETYPE( (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: _MIMETYPE
        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);
        //-- _LABEL
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_LABEL", "LABEL", 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
            {
                MdWrap target = (MdWrap) object;
                return target.getLABEL();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) object;
                    target.setLABEL( (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: _LABEL
        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);
        //-- _MDTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.types.METADATAMDTYPEType.class, "_MDTYPE", "MDTYPE", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdWrap target = (MdWrap) object;
                return target.getMDTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) object;
                    target.setMDTYPE( (edu.indiana.dlib.metsnav.mets.v1_5.types.METADATAMDTYPEType) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(edu.indiana.dlib.metsnav.mets.v1_5.types.METADATAMDTYPEType.class, handler);
        desc.setImmutable(true);
        desc.setSchemaType("METADATAMDTYPEType");
        desc.setHandler(handler);
        desc.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
       
        //-- validation code for: _MDTYPE
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _OTHERMDTYPE
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_OTHERMDTYPE", "OTHERMDTYPE", 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
            {
                MdWrap target = (MdWrap) object;
                return target.getOTHERMDTYPE();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) object;
                    target.setOTHERMDTYPE( (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: _OTHERMDTYPE
        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
       
        //-- _binData
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(byte[].class, "_binData", "binData", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdWrap target = (MdWrap) object;
                return target.getBinData();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) object;
                    target.setBinData( (byte[]) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setSchemaType("base64Binary");
        desc.setHandler(handler);
        desc.setNameSpaceURI("http://www.loc.gov/METS/");
        desc.setMultivalued(false);
        addFieldDescriptor(desc);
        addSequenceElement(desc);
       
        //-- validation code for: _binData
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _xmlData
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(edu.indiana.dlib.metsnav.mets.v1_5.XmlData.class, "_xmlData", "xmlData", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue( java.lang.Object object )
                throws IllegalStateException
            {
                MdWrap target = (MdWrap) object;
                return target.getXmlData();
            }
            public void setValue( java.lang.Object object, java.lang.Object value)
                throws IllegalStateException, IllegalArgumentException
            {
                try {
                    MdWrap target = (MdWrap) object;
                    target.setXmlData( (edu.indiana.dlib.metsnav.mets.v1_5.XmlData) value);
                } catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }
            public java.lang.Object newInstance(java.lang.Object parent) {
View Full Code Here

    public MetsObject getMetsObject(String oid) throws DAOException {
        metsObj = new MetsObject();
        metsObj.setId(oid);

        try {
            Mets mets = unmarshallMets(oid);
           
            metsObj.setObjId(mets.getOBJID());
            metsObj.setMetsId(mets.getID());

            DmdSec[] dmdSecs = mets.getDmdSec();
            DmdSec fullLinkDmd = null;
            Map<String, DescriptiveMetadata> dmdMap = new HashMap<String, DescriptiveMetadata>();
            for (int i = 0; i < dmdSecs.length; i++) {
                if ("dmdSec_fullRecordLink".equals(dmdSecs[i].getID())) {
                    fullLinkDmd = dmdSecs[i];
                } else {
                    if (dmdSecs[i].getMdWrap().getXmlData().getAnyObjectCount() == 1) {
                        AnyNode anyNode = (AnyNode) dmdSecs[i].getMdWrap().getXmlData()
                                .getAnyObject(0);
                        int type = dmdSecs[i].getMdWrap().getMDTYPE().getType();
                        DescriptiveMetadata dmd = new DescriptiveMetadata(anyNode, type);
                        String id = dmdSecs[i].getID();
                        dmdMap.put(id, dmd);
                    }
                }
            }

            metsObj.setDmdMap(dmdMap);
            if (fullLinkDmd != null) {
                metsObj.setLinkBackUrl((String) fullLinkDmd.getMdRef().getHref());
            }

            StructMap[] maps = mets.getStructMap();

            // Always build the physicalStrcut first
            for (int i = 0; i < maps.length; i++) {
                StructMap structMap = maps[i];
                Div div = structMap.getDiv();
                String type = structMap.getTYPE();
                if (MetsConstants.PHYSICAL.equals(type)) {
                    List<AtomicItem> list = parsePhysicalStruct(div);
                    metsObj.setPhysicalStruct(list);
                    Map<String, Integer> aimap = new HashMap<String, Integer>();
                    for (int j = 0; j < list.size(); j++) {
                        aimap.put(list.get(j).getId(), j);
                    }
                    metsObj.setAtomicItemIDIndexMap(aimap);
                    metsObj.setDescription(div.getLABEL());
                   
                    Fptr[] fptrs = div.getFptr();
                    ParameterMap dataStream = config.getDataStream();
                    if (dataStream != null) {
                        Map<String, Map<String, String>> valueMap = dataStream.getValueMap();
                        for (Map.Entry<String, Map<String, String>> entry : valueMap.entrySet()) {
                            Map<String, String> stream = new HashMap<String, String>();
                            for (Fptr fptr2: fptrs) {
                                File file = (File)fptr2.getFILEID();
                                String use = file.getUSE();
                                if (entry.getValue().get(use) != null) {
                                    stream.put(use, file.getFLocat(0).getHref());
                                }
                            }
                            metsObj.getDataStreamsMap().put(entry.getKey(), stream);
                        }
                    }                   
                }
            }
           
            // Now we can process logicalStruct
            for (int i = 0; i < maps.length; i++) {
                StructMap structMap = maps[i];
                Div div = structMap.getDiv();
                String type = structMap.getTYPE();
                if (MetsConstants.LOGICAL.equals(type)) {
                    Map<String, CompositeItem> cimap = new HashMap<String, CompositeItem>();               
                    metsObj.setCompositeItemMap(cimap);
                    metsObj.setDescription(div.getLABEL());
                   
                    Fptr[] fptrs = div.getFptr();
                    ParameterMap dataStream = config.getDataStream();
                    if (dataStream != null) {
                        Map<String, Map<String, String>> valueMap = dataStream.getValueMap();
                        for (Map.Entry<String, Map<String, String>> entry : valueMap.entrySet()) {
                            Map<String, String> stream = new HashMap<String, String>();
                            for (Fptr fptr2: fptrs) {
                                File file = (File)fptr2.getFILEID();
                                String use = file.getUSE();
                                if (entry.getValue().get(use) != null) {
                                    stream.put(use, file.getFLocat(0).getHref());
                                }
                            }
                            metsObj.getDataStreamsMap().put(entry.getKey(), stream);
                        }
                    }
                   
                    metsObj.setLogicalStruct((CompositeItem) parseLogicalStruct(oid, div, null));
                } else if (MetsConstants.RELATED.equals(type)) {
                    Map<String, Related> rmap = new HashMap<String, Related>();
                    metsObj.setRelatedMap(rmap);
                    Div[] divs = div.getDiv();
                    for (Div div2 : divs) {
                        Related related = new Related();
                        related.setType(div2.getTYPE());
                        related.setLabel(div2.getLABEL());
                        Mptr[] mptrs = div2.getMptr();
                        if (mptrs.length == 1) {
                            related.setPurl(mptrs[0].getHref());
                            rmap.put(div2.getTYPE(), related);
                        }
                    }
                }
            }

            if (mets.getFileSec() != null) {
                FileGrp[] filegrp = mets.getFileSec().getFileGrp(0).getFileGrp();
                for (int i = 0; i < filegrp.length; i++) {
                    if (StringUtils.equals(filegrp[i].getUSE(), "printable")) {
                        String url = (String) filegrp[i].getFile(0).getFLocat(0).getHref();
                        metsObj.setPrintableUrl(url);
                    }
View Full Code Here

TOP

Related Classes of edu.indiana.dlib.metsnav.mets.v1_5.descriptors.MdRefDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.