|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.xmlui.objectmanager.AbstractAdapter
public abstract class AbstractAdapter
This is the abstract adapter containing all the common elements between the three types of adapters: item, container, and repository. Each adapter translate a given type of DSpace object into a METS document for rendering into the DRI document. This class provides the chassis for those unique parts of the document to be build upon, there are seven rendering methods that may be overridden for each section of the METS document. Header Descriptive Section Administrative Section File Section Structure Map Structural Link Behavioral Section
| Field Summary | |
|---|---|
protected org.xml.sax.ContentHandler |
contentHandler
The SAX handlers for content and lexical events. |
protected java.lang.String |
contextPath
The contextPath of this web application, used for generating URLs. |
static Namespace |
DIM
|
static java.lang.String |
DIM_URI
|
protected org.xml.sax.ext.LexicalHandler |
lexicalHandler
|
static Namespace |
METS
|
static java.lang.String[] |
METS_DEFINED_TYPES
The METS defined types of Metadata, if a format is not listed here then it should use the string "OTHER" and provide additional attributes describing the metadata type |
static java.lang.String |
METS_URI
Namespace declaration for METS & XLINK |
protected org.xml.sax.helpers.NamespaceSupport |
namespaces
|
static Namespace |
XLINK
|
static java.lang.String |
XLINK_URI
|
static Namespace |
XSI
|
static java.lang.String |
XSI_URI
|
| Constructor Summary | |
|---|---|
AbstractAdapter(java.lang.String contextPath)
Construct a new adapter, implementers must use call this method so the appropriate internal values are insured to be set correctly. |
|
| Method Summary | |
|---|---|
protected void |
endElement(Namespace namespace,
java.lang.String name)
Send the SAX events to end this element. |
DisseminationCrosswalk |
getDisseminationCrosswalk(java.lang.String crosswalkName)
Return a dissemination crosswalk for the given name. |
protected java.lang.String |
getGenericID(java.lang.String prefix)
Generate a unique METS id. |
protected abstract java.lang.String |
getMETSID()
|
protected abstract java.lang.String |
getMETSLabel()
|
protected abstract java.lang.String |
getMETSOBJEDIT()
|
protected abstract java.lang.String |
getMETSOBJID()
|
protected abstract java.lang.String |
getMETSProfile()
|
boolean |
isDefinedMETStype(java.lang.String metadataType)
Determine if the provided metadata type is a standard METS defined type. |
protected void |
renderAdministrativeSection()
|
protected void |
renderBehavioralSection()
|
protected void |
renderDescriptiveSection()
|
protected void |
renderExtraSections()
|
protected void |
renderFile(Item item,
Bitstream bitstream,
java.lang.String fileID,
java.lang.String groupID)
Generate a METS file element for a given bitstream. |
protected void |
renderFile(Item item,
Bitstream bitstream,
java.lang.String fileID,
java.lang.String groupID,
java.lang.String admID)
Generate a METS file element for a given bitstream. |
protected void |
renderFileSection()
|
protected void |
renderHeader()
Each of the METS sections |
void |
renderMETS(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
Render the complete METS document. |
protected void |
renderStructuralLink()
|
protected void |
renderStructureMap()
|
protected void |
sendCharacters(java.lang.String characters)
Send the SAX event for these plain characters, not wrapped in any elements. |
void |
setAmdTypes(java.lang.String amdSec,
java.lang.String mdTypes)
Store information about what will be rendered in the METS administrative metadata section. |
void |
setDigiProvMDTypes(java.lang.String digiprovMDTypes)
A comma separated list of METS digital provenance metadata formats to render. |
void |
setDmdTypes(java.lang.String dmdTypes)
A comma separated list of METS descriptive metadata formats to render. |
void |
setFileGrpTypes(java.lang.String fileGrpTypes)
A comma separated list of METS fileGrps to render. |
void |
setRightsMDTypes(java.lang.String rightsMDTypes)
A comma separated list of METS intellectual property rights metadata formats to render. |
void |
setSections(java.lang.String sections)
A comma separated list of METS sections to render. |
void |
setSourceMDTypes(java.lang.String sourceMDTypes)
A comma separated list of METS source metadata formats to render. |
void |
setStructTypes(java.lang.String structTypes)
A comma separated list of METS structural types to render. |
void |
setTechMDTypes(java.lang.String techMDTypes)
A comma separated list of METS technical metadata formats to render. |
protected void |
startElement(Namespace namespace,
java.lang.String name,
AttributeMap... attributes)
Send the SAX events to start this element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String METS_URI
public static final Namespace METS
public static final java.lang.String XLINK_URI
public static final Namespace XLINK
public static final java.lang.String XSI_URI
public static final Namespace XSI
public static final java.lang.String DIM_URI
public static final Namespace DIM
protected java.lang.String contextPath
protected org.xml.sax.ContentHandler contentHandler
protected org.xml.sax.ext.LexicalHandler lexicalHandler
protected org.xml.sax.helpers.NamespaceSupport namespaces
public static final java.lang.String[] METS_DEFINED_TYPES
| Constructor Detail |
|---|
public AbstractAdapter(java.lang.String contextPath)
contextPath - The contextPath of this web application.| Method Detail |
|---|
public final void setSections(java.lang.String sections)
sections - Comma separated list of METS sections.public final void setDmdTypes(java.lang.String dmdTypes)
dmdTypes - Comma separated list of METS metadata types.
public final void setAmdTypes(java.lang.String amdSec,
java.lang.String mdTypes)
amdSec - Section of mdTypes - Comma separated list of METS metadata types.public final void setTechMDTypes(java.lang.String techMDTypes)
techMDTypes - Comma separated list of METS metadata types.public final void setRightsMDTypes(java.lang.String rightsMDTypes)
rightsMDTypes - Comma separated list of METS metadata types.public final void setSourceMDTypes(java.lang.String sourceMDTypes)
sourceMDTypes - Comma separated list of METS metadata types.public final void setDigiProvMDTypes(java.lang.String digiprovMDTypes)
digiprovMDTypes - Comma separated list of METS metadata types.public final void setFileGrpTypes(java.lang.String fileGrpTypes)
fileGrpTypes - Comma separated list of METS file groups.public final void setStructTypes(java.lang.String structTypes)
structTypes - Comma separated list of METS structure types.
protected abstract java.lang.String getMETSOBJID()
throws WingException
WingExceptionprotected abstract java.lang.String getMETSOBJEDIT()
protected abstract java.lang.String getMETSID()
throws WingException
WingException
protected abstract java.lang.String getMETSProfile()
throws WingException
WingException
protected abstract java.lang.String getMETSLabel()
throws WingException
WingException
public final void renderMETS(org.xml.sax.ContentHandler contentHandler,
org.xml.sax.ext.LexicalHandler lexicalHandler)
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderHeader()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderDescriptiveSection()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderAdministrativeSection()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderFileSection()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderStructureMap()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderStructuralLink()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderBehavioralSection()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.io.IOException,
java.sql.SQLException
WingException
org.xml.sax.SAXException
CrosswalkException
java.io.IOException
java.sql.SQLException
protected void renderExtraSections()
throws WingException,
org.xml.sax.SAXException,
CrosswalkException,
java.sql.SQLException,
java.io.IOException
WingException
org.xml.sax.SAXException
CrosswalkException
java.sql.SQLException
java.io.IOException
protected final void renderFile(Item item,
Bitstream bitstream,
java.lang.String fileID,
java.lang.String groupID)
throws org.xml.sax.SAXException
item - If the bitstream is associated with an item provide the item
otherwise leave null.bitstream - The bitstream to build a file element for.fileID - The unique file id for this file.groupID - The group id for this file, if it is derived from another file
then they should share the same groupID.
org.xml.sax.SAXException
protected final void renderFile(Item item,
Bitstream bitstream,
java.lang.String fileID,
java.lang.String groupID,
java.lang.String admID)
throws org.xml.sax.SAXException
item - If the bitstream is associated with an item provide the item
otherwise leave null.bitstream - The bitstream to build a file element for.fileID - The unique file id for this file.groupID - The group id for this file, if it is derived from another file
then they should share the same groupID.admID - The IDs of the administrative metadata sections which pertain
to this file
org.xml.sax.SAXExceptionprotected final java.lang.String getGenericID(java.lang.String prefix)
prefix - Prefix to prepend to the id for readability.
public final DisseminationCrosswalk getDisseminationCrosswalk(java.lang.String crosswalkName)
throws WingException
crosswalkName -
WingExceptionpublic final boolean isDefinedMETStype(java.lang.String metadataType)
metadataType - type name
protected final void startElement(Namespace namespace,
java.lang.String name,
AttributeMap... attributes)
throws org.xml.sax.SAXException
namespace - (Required) The namespace of this element.name - (Required) The local name of this element.attributes - (May be null) Attributes for this element
org.xml.sax.SAXException
protected final void sendCharacters(java.lang.String characters)
throws org.xml.sax.SAXException
characters - (May be null) Characters to send.
org.xml.sax.SAXException
protected final void endElement(Namespace namespace,
java.lang.String name)
throws org.xml.sax.SAXException
namespace - (Required) The namespace of this element.name - (Required) The local name of this element.
org.xml.sax.SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||