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, java.lang.String contextPath)
          Construct a new CommunityCollectionMETSAdapter.
 
Method Summary
 DSpaceObject getContainer()
          Return the container, community or collection, object
protected  java.lang.String getFileID(Bitstream bitstream)
          Return a unique id for the given bitstream
protected  java.lang.String getGroupFileID(Bitstream bitstream)
          Return a group id for the given bitstream
protected  java.lang.String getMETSID()
          Use the handle as the id for this METS document
protected  java.lang.String getMETSLabel()
          Return a friendly label for the METS document to say we are a community or collection.
protected  java.lang.String getMETSOBJEDIT()
           
protected  java.lang.String getMETSOBJID()
          Return the URL of this community/collection in the interface
protected  java.lang.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,
                        java.lang.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 java.lang.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 java.lang.String getMETSOBJEDIT()
Specified by:
getMETSOBJEDIT in class AbstractAdapter
Returns:
Return the URL for editing this item

getMETSID

protected java.lang.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 java.lang.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 java.lang.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 java.lang.String getFileID(Bitstream bitstream)
Return a unique id for the given bitstream


getGroupFileID

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


renderDescriptiveSection

protected void renderDescriptiveSection()
                                 throws WingException,
                                        org.xml.sax.SAXException,
                                        CrosswalkException,
                                        java.io.IOException,
                                        java.sql.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
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException

renderFileSection

protected void renderFileSection()
                          throws org.xml.sax.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:
org.xml.sax.SAXException

renderStructureMap

protected void renderStructureMap()
                           throws java.sql.SQLException,
                                  org.xml.sax.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:
java.sql.SQLException
org.xml.sax.SAXException


Copyright © 2010 DuraSpace. All Rights Reserved.