org.dspace.app.xmlui.objectmanager
Class ContainerAdapter

java.lang.Object
  extended by org.dspace.app.xmlui.objectmanager.AbstractAdapter
      extended by org.dspace.app.xmlui.objectmanager.ContainerAdapter

public class ContainerAdapter
extends AbstractAdapter

This is an adapter which translates DSpace containers (communities & collections) into METS documents. This adapter follows the DSpace METS profile however that profile does not define how a community or collection should be described, but we make the obvious decisions to deviate when nessasary from the profile. The METS document consists of three parts: descriptive metadata section, file section, and a structural map. The descriptive metadata sections holds metadata about the item being adapted using DSpace crosswalks. This is the same way the item adapter works. However the file section and structural map are a bit different. In these casses the the only files listed is the one logo that may be attached to a community or collection.

Author:
Scott Phillips

Field Summary
 
Fields inherited from class org.dspace.app.xmlui.objectmanager.AbstractAdapter
contentHandler, contextPath, DIM, DIM_URI, lexicalHandler, METS, METS_DEFINED_TYPES, METS_URI, namespaces, XLINK, XLINK_URI, XSI, XSI_URI
 
Constructor Summary
ContainerAdapter(Context context, DSpaceObject dso, String contextPath)
          Construct a new CommunityCollectionMETSAdapter.
 
Method Summary
 DSpaceObject getContainer()
          Return the container, community or collection, object
protected  String getFileID(Bitstream bitstream)
          Return a unique id for the given bitstream
protected  String getGroupFileID(Bitstream bitstream)
          Return a group id for the given bitstream
protected  String getMETSID()
          Use the handle as the id for this METS document
protected  String getMETSLabel()
          Return a friendly label for the METS document to say we are a community or collection.
protected  String getMETSOBJEDIT()
           
protected  String getMETSOBJID()
          Return the URL of this community/collection in the interface
protected  String getMETSProfile()
          Return the profile to use for communities and collections.
protected  void renderDescriptiveSection()
          Render the METS descriptive section.
protected  void renderFileSection()
          Render the METS file section.
protected  void renderStructureMap()
          Render the container's structural map.
 
Methods inherited from class org.dspace.app.xmlui.objectmanager.AbstractAdapter
endElement, getDisseminationCrosswalk, getGenericID, isDefinedMETStype, renderAdministrativeSection, renderBehavioralSection, renderExtraSections, renderFile, renderFile, renderHeader, renderMETS, renderStructuralLink, sendCharacters, setAmdTypes, setDigiProvMDTypes, setDmdTypes, setFileGrpTypes, setRightsMDTypes, setSections, setSourceMDTypes, setStructTypes, setTechMDTypes, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerAdapter

public ContainerAdapter(Context context,
                        DSpaceObject dso,
                        String contextPath)
Construct a new CommunityCollectionMETSAdapter.

Parameters:
dso - A DSpace Community or Collection to adapt.
contextPath - The contextPath of this webapplication.
Method Detail

getContainer

public DSpaceObject getContainer()
Return the container, community or collection, object


getMETSOBJID

protected String getMETSOBJID()
Return the URL of this community/collection in the interface

Specified by:
getMETSOBJID in class AbstractAdapter
Returns:
the URL for this item in the interface

getMETSOBJEDIT

protected String getMETSOBJEDIT()
Specified by:
getMETSOBJEDIT in class AbstractAdapter
Returns:
Return the URL for editing this item

getMETSID

protected String getMETSID()
Use the handle as the id for this METS document

Specified by:
getMETSID in class AbstractAdapter
Returns:
the METS ID of the mets document.

getMETSProfile

protected String getMETSProfile()
                         throws WingException
Return the profile to use for communities and collections.

Specified by:
getMETSProfile in class AbstractAdapter
Returns:
The Profile this METS document conforms too.
Throws:
WingException

getMETSLabel

protected String getMETSLabel()
Return a friendly label for the METS document to say we are a community or collection.

Specified by:
getMETSLabel in class AbstractAdapter
Returns:
The label of this METS document.

getFileID

protected String getFileID(Bitstream bitstream)
Return a unique id for the given bitstream


getGroupFileID

protected String getGroupFileID(Bitstream bitstream)
Return a group id for the given bitstream


renderDescriptiveSection

protected void renderDescriptiveSection()
                                 throws WingException,
                                        SAXException,
                                        CrosswalkException,
                                        IOException,
                                        SQLException
Render the METS descriptive section. This will create a new metadata section for each crosswalk configured. Example: ... content from the crosswalk ...
Overrides:
renderDescriptiveSection in class AbstractAdapter
Throws:
WingException
SAXException
CrosswalkException
IOException
SQLException

renderFileSection

protected void renderFileSection()
                          throws SAXException
Render the METS file section. If a logo is present for this container then that single bitstream is listed in the file section. Example:

Overrides:
renderFileSection in class AbstractAdapter
Throws:
SAXException

renderStructureMap

protected void renderStructureMap()
                           throws SQLException,
                                  SAXException
Render the container's structural map. This includes a refrence to the container's logo, if available, otherwise it is an empty division that just states it is a DSpace community or Collection. Examlpe:

Overrides:
renderStructureMap in class AbstractAdapter
Throws:
SQLException
SAXException


Copyright © 2013 DuraSpace. All Rights Reserved.