|
||||||||||
| 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 ContentHandler |
contentHandler
The SAX handlers for content and lexical events. |
protected String |
contextPath
The contextPath of this web application, used for generating URLs. |
static Namespace |
DIM
|
static String |
DIM_URI
|
protected LexicalHandler |
lexicalHandler
|
static Namespace |
METS
|
static 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 String |
METS_URI
Namespace declaration for METS & XLINK |
protected NamespaceSupport |
namespaces
|
static Namespace |
XLINK
|
static String |
XLINK_URI
|
static Namespace |
XSI
|
static String |
XSI_URI
|
| Constructor Summary | |
|---|---|
AbstractAdapter(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,
String name)
Send the SAX events to end this element. |
DisseminationCrosswalk |
getDisseminationCrosswalk(String crosswalkName)
Return a dissemination crosswalk for the given name. |
protected String |
getGenericID(String prefix)
Generate a unique METS id. |
protected abstract String |
getMETSID()
|
protected abstract String |
getMETSLabel()
|
protected abstract String |
getMETSOBJEDIT()
|
protected abstract String |
getMETSOBJID()
|
protected abstract String |
getMETSProfile()
|
boolean |
isDefinedMETStype(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,
String fileID,
String groupID)
Generate a METS file element for a given bitstream. |
protected void |
renderFile(Item item,
Bitstream bitstream,
String fileID,
String groupID,
String admID)
Generate a METS file element for a given bitstream. |
protected void |
renderFileSection()
|
protected void |
renderHeader()
Each of the METS sections |
void |
renderMETS(ContentHandler contentHandler,
LexicalHandler lexicalHandler)
Render the complete METS document. |
protected void |
renderStructuralLink()
|
protected void |
renderStructureMap()
|
protected void |
sendCharacters(String characters)
Send the SAX event for these plain characters, not wrapped in any elements. |
void |
setAmdTypes(String amdSec,
String mdTypes)
Store information about what will be rendered in the METS administrative metadata section. |
void |
setDigiProvMDTypes(String digiprovMDTypes)
A comma separated list of METS digital provenance metadata formats to render. |
void |
setDmdTypes(String dmdTypes)
A comma separated list of METS descriptive metadata formats to render. |
void |
setFileGrpTypes(String fileGrpTypes)
A comma separated list of METS fileGrps to render. |
void |
setRightsMDTypes(String rightsMDTypes)
A comma separated list of METS intellectual property rights metadata formats to render. |
void |
setSections(String sections)
A comma separated list of METS sections to render. |
void |
setSourceMDTypes(String sourceMDTypes)
A comma separated list of METS source metadata formats to render. |
void |
setStructTypes(String structTypes)
A comma separated list of METS structural types to render. |
void |
setTechMDTypes(String techMDTypes)
A comma separated list of METS technical metadata formats to render. |
protected void |
startElement(Namespace namespace,
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 String METS_URI
public static final Namespace METS
public static final String XLINK_URI
public static final Namespace XLINK
public static final String XSI_URI
public static final Namespace XSI
public static final String DIM_URI
public static final Namespace DIM
protected String contextPath
protected ContentHandler contentHandler
protected LexicalHandler lexicalHandler
protected NamespaceSupport namespaces
public static final String[] METS_DEFINED_TYPES
| Constructor Detail |
|---|
public AbstractAdapter(String contextPath)
contextPath - The contextPath of this web application.| Method Detail |
|---|
public final void setSections(String sections)
sections - Comma separated list of METS sections.public final void setDmdTypes(String dmdTypes)
dmdTypes - Comma separated list of METS metadata types.
public final void setAmdTypes(String amdSec,
String mdTypes)
amdSec - Section of mdTypes - Comma separated list of METS metadata types.public final void setTechMDTypes(String techMDTypes)
techMDTypes - Comma separated list of METS metadata types.public final void setRightsMDTypes(String rightsMDTypes)
rightsMDTypes - Comma separated list of METS metadata types.public final void setSourceMDTypes(String sourceMDTypes)
sourceMDTypes - Comma separated list of METS metadata types.public final void setDigiProvMDTypes(String digiprovMDTypes)
digiprovMDTypes - Comma separated list of METS metadata types.public final void setFileGrpTypes(String fileGrpTypes)
fileGrpTypes - Comma separated list of METS file groups.public final void setStructTypes(String structTypes)
structTypes - Comma separated list of METS structure types.
protected abstract String getMETSOBJID()
throws WingException
WingExceptionprotected abstract String getMETSOBJEDIT()
protected abstract String getMETSID()
throws WingException
WingException
protected abstract String getMETSProfile()
throws WingException
WingException
protected abstract String getMETSLabel()
throws WingException
WingException
public final void renderMETS(ContentHandler contentHandler,
LexicalHandler lexicalHandler)
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderHeader()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderDescriptiveSection()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderAdministrativeSection()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderFileSection()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderStructureMap()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderStructuralLink()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderBehavioralSection()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
WingException
SAXException
CrosswalkException
IOException
SQLException
protected void renderExtraSections()
throws WingException,
SAXException,
CrosswalkException,
SQLException,
IOException
WingException
SAXException
CrosswalkException
SQLException
IOException
protected final void renderFile(Item item,
Bitstream bitstream,
String fileID,
String groupID)
throws 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.
SAXException
protected final void renderFile(Item item,
Bitstream bitstream,
String fileID,
String groupID,
String admID)
throws 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
SAXExceptionprotected final String getGenericID(String prefix)
prefix - Prefix to prepend to the id for readability.
public final DisseminationCrosswalk getDisseminationCrosswalk(String crosswalkName)
throws WingException
crosswalkName -
WingExceptionpublic final boolean isDefinedMETStype(String metadataType)
metadataType - type name
protected final void startElement(Namespace namespace,
String name,
AttributeMap... attributes)
throws SAXException
namespace - (Required) The namespace of this element.name - (Required) The local name of this element.attributes - (May be null) Attributes for this element
SAXException
protected final void sendCharacters(String characters)
throws SAXException
characters - (May be null) Characters to send.
SAXException
protected final void endElement(Namespace namespace,
String name)
throws SAXException
namespace - (Required) The namespace of this element.name - (Required) The local name of this element.
SAXException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||