Examples of DmdSec


Examples of edu.harvard.hul.ois.mets.DmdSec

            metsHdr.getContent().add(agent);

            mets.getContent().add(metsHdr);

            DmdSec dmdSec = new DmdSec();
            dmdSec.setID("DMD_hdl_" + item.getHandle());

            MdWrap mdWrap = new MdWrap();
            mdWrap.setMDTYPE(Mdtype.MODS);

            XmlData xmlData = new XmlData();
            createMODS(item, xmlData);

            mdWrap.getContent().add(xmlData);
            dmdSec.getContent().add(mdWrap);
            mets.getContent().add(dmdSec);

            // amdSec
            AmdSec amdSec = new AmdSec();
            amdSec.setID("TMD_hdl_" + item.getHandle());
View Full Code Here

Examples of edu.harvard.hul.ois.mets.DmdSec

                if (xwalk == null)
                    throw new PackageValidationException("Cannot find "+dmdTypes[i]+" crosswalk plugin!");
                else
                    crosswalkToMets(xwalk, item, xmlData);

                DmdSec dmdSec = new DmdSec();
                dmdSec.setID(dmdId[i]);
                dmdSec.setGROUPID(dmdGroup);
                MdWrap mdWrap = new MdWrap();
                setMdType(mdWrap, metsName);
                mdWrap.getContent().add(xmlData);
                dmdSec.getContent().add(mdWrap);
                mets.getContent().add(dmdSec);
            }
        
            // Only add license AMD section if there are any licenses.
            // Catch authorization failures accessing license bitstreams
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_4.DmdSec

            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
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_4.DmdSec

            } else {
                division.setId(div.getID());
            }
            metsObj.getCompositeItemMap().put(division.getId(), division);
            if (div.getDMDIDCount() == 1) {
                DmdSec dmd = (DmdSec) div.getDMDID(0);
                division.setDmdID(dmd.getID());
            }

            Div[] divs = div.getDiv();
            division.setChildren(new ArrayList<AbstractItem>(divs.length));
            for (int i = 0; i < divs.length; i++) {
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_5.DmdSec

           
            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
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_5.DmdSec

            } else {
                division.setId(div.getID());
            }
            metsObj.getCompositeItemMap().put(division.getId(), division);
            if (div.getDMDIDCount() == 1) {
                DmdSec dmd = (DmdSec) div.getDMDID(0);
                division.setDmdID(dmd.getID());
            }

            Div[] divs = div.getDiv();
            division.setChildren(new ArrayList<AbstractItem>(divs.length));
            for (int i = 0; i < divs.length; i++) {
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_6.DmdSec

           
            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
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_6.DmdSec

            } else {
                division.setId(div.getID());
            }
            metsObj.getCompositeItemMap().put(division.getId(), division);
            if (div.getDMDIDCount() == 1) {
                DmdSec dmd = (DmdSec) div.getDMDID(0);
                division.setDmdID(dmd.getID());
            }

            Div[] divs = div.getDiv();
            division.setChildren(new ArrayList<AbstractItem>(divs.length));
            for (int i = 0; i < divs.length; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.