org.dspace.app.xmlui.objectmanager
Class RepositoryAdapter

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

public class RepositoryAdapter
extends AbstractAdapter

This is an an adapter which translates a DSpace repository into a METS document. Unfortunately there is no real definition of what this is. So we just kind of made it up based upon what we saw for the item profile. The basic structure is simply two parts, the descriptive metadata and a structural map. The descriptive metadata is a place to put metadata about the whole repository. The structural map is used to map relationships between communities & collections in dspace.

Author:
Scott Phillips

Field Summary
static Namespace MODS
           
static String MODS_URI
          MODS namespace
 
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
RepositoryAdapter(Context context, String contextPath)
          Construct a new RepositoryAdapter
 
Method Summary
protected  String getMETSID()
          Return the handle prefix as the identifier.
protected  String getMETSLabel()
          Return a friendly label for the METS document stating that this is a DSpace repository.
protected  String getMETSOBJEDIT()
           
protected  String getMETSOBJID()
          The OBJID is used to encode the URL to the object, in this case the repository which is just at the contextPath.
protected  String getMETSProfile()
          Return the profile this METS document conforms too...
protected  void renderDescriptiveSection()
          Render the repository's descriptive metadata section.
protected  void renderStructureMap()
          Render the repository's structure map.
 
Methods inherited from class org.dspace.app.xmlui.objectmanager.AbstractAdapter
endElement, getDisseminationCrosswalk, getGenericID, isDefinedMETStype, renderAdministrativeSection, renderBehavioralSection, renderExtraSections, renderFile, renderFile, renderFileSection, 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
 

Field Detail

MODS_URI

public static final String MODS_URI
MODS namespace

See Also:
Constant Field Values

MODS

public static final Namespace MODS
Constructor Detail

RepositoryAdapter

public RepositoryAdapter(Context context,
                         String contextPath)
Construct a new RepositoryAdapter

Parameters:
context - The DSpace context to look up communities / collections.
contextPath - The contextPath of this webapplication.
Method Detail

getMETSID

protected String getMETSID()
Return the handle prefix as the identifier.

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

getMETSOBJID

protected String getMETSOBJID()
                       throws WingException
The OBJID is used to encode the URL to the object, in this case the repository which is just at the contextPath.

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

getMETSOBJEDIT

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

getMETSProfile

protected String getMETSProfile()
Return the profile this METS document conforms too... FIXME: It dosn't conform to a profile. This needs to be fixed.

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

getMETSLabel

protected String getMETSLabel()
Return a friendly label for the METS document stating that this is a DSpace repository.

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

renderDescriptiveSection

protected void renderDescriptiveSection()
                                 throws SAXException
Render the repository's descriptive metadata section. For a the DSPace repository we just grab a few items from the config file and put them into the descriptive section, such as the name, hostname, handle prefix, and default language.

Overrides:
renderDescriptiveSection in class AbstractAdapter
Throws:
SAXException

renderStructureMap

protected void renderStructureMap()
                           throws SQLException,
                                  SAXException
Render the repository's structure map. This map will include a reference to all the community and collection objects showing how they are related to one another.

Overrides:
renderStructureMap in class AbstractAdapter
Throws:
SQLException
SAXException


Copyright © 2011 DuraSpace. All Rights Reserved.