|
||||||||||
| 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 chasses for those unique parts of the document to be build upon, there are seven rendering methods that may be overriden 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 webapplication, used for generateing 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 approprate 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 stardard 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 seperated list of METS digital provenance metadata formats to render. |
void |
setDmdTypes(String dmdTypes)
A comma seperated list of METS descriptive metadata formats to render. |
void |
setFileGrpTypes(String fileGrpTypes)
A comma seperated list of METS fileGrps to render. |
void |
setRightsMDTypes(String rightsMDTypes)
A comma seperated list of METS intellectual property rights metadata formats to render. |
void |
setSections(String sections)
A comma seperated list of METS sections to render. |
void |
setSourceMDTypes(String sourceMDTypes)
A comma seperated list of METS source metadata formats to render. |
void |
setStructTypes(String structTypes)
A comma seperated list of METS structural types to render. |
void |
setTechMDTypes(String techMDTypes)
A comma seperated 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 String[] METS_DEFINED_TYPES
| Constructor Detail |
|---|
public AbstractAdapter(String contextPath)
contextPath - The contextPath of this web application.| Method Detail |
|---|
public void setSections(String sections)
sections - Comma seperated list of METS sections.public void setDmdTypes(String dmdTypes)
sections - Comma seperated list of METS metadata types.
public void setAmdTypes(String amdSec,
String mdTypes)
amdSec - Section of mdTypes - Comma seperated list of METS metadata types.public void setTechMDTypes(String techMDTypes)
techMDTypes - Comma seperated list of METS metadata types.public void setRightsMDTypes(String rightsMDTypes)
rightsMDTypes - Comma seperated list of METS metadata types.public void setSourceMDTypes(String sourceMDTypes)
sourceMDTypes - Comma seperated list of METS metadata types.public void setDigiProvMDTypes(String digiprovMDTypes)
digiprovMDTypes - Comma seperated list of METS metadata types.public void setFileGrpTypes(String fileGrpTypes)
sections - Comma seperated list of METS file groups.public void setStructTypes(String structTypes)
sections - Comma seperated 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 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 void renderFile(Item item,
Bitstream bitstream,
String fileID,
String groupID)
throws SAXException
item - If the bitstream is associated with an item provid 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 void renderFile(Item item,
Bitstream bitstream,
String fileID,
String groupID,
String admID)
throws SAXException
item - If the bitstream is associated with an item provid 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 String getGenericID(String prefix)
prefix - Prefix to prepend to the id for readability.
public DisseminationCrosswalk getDisseminationCrosswalk(String crosswalkName)
throws WingException
crosswalkName -
WingExceptionpublic boolean isDefinedMETStype(String metadataType)
metadataType - type name
protected void startElement(Namespace namespace,
String name,
AttributeMap... attributes)
throws SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.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 void sendCharacters(String characters)
throws SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.characters - (May be null) Characters to send.
SAXException
protected void endElement(Namespace namespace,
String name)
throws SAXException
contentHandler - (Required) The registered contentHandler where SAX events
should be routed too.namespaces - (Required) SAX Helper class to keep track of namespaces able
to determine the correct prefix for a given namespace URI.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 | |||||||||