public class ItemAdapter extends AbstractAdapter
When we are configured to be non-compliant with the profile, the MET's profile is changed to reflect the deviation. The DSpace profile states that metadata should be given in MODS format. However, you can configure this adapter to use any metadata crosswalk. When that case is detected we change the profile to say that we are deviating from the standard profile and it lists what metadata has been added.
There are four parts to an item's METS document: descriptive metadata, file section, structural map, and extra sections.
Request item-support
Original Concept, JSPUI version: Universidade do Minho at www.uminho.pt
Sponsorship of XMLUI version: Instituto Oceanográfico de España at www.ieo.es
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizeService |
authorizeService |
protected BitstreamService |
bitstreamService |
protected BundleService |
bundleService |
protected ItemService |
itemService |
protected MetadataExposureService |
metadataExposureService |
contentHandler, contextPath, DIM, DIM_URI, lexicalHandler, METS, METS_DEFINED_TYPES, METS_URI, namespaces, XLINK, XLINK_URI, XSI, XSI_URI| Constructor and Description |
|---|
ItemAdapter(Context context,
Item item,
String contextPath)
Construct a new ItemAdapter
|
| Modifier and Type | Method and Description |
|---|---|
protected List<Bundle> |
findEnabledBundles()
Checks which Bundles of current item a user has requested.
|
protected static Bitstream |
findOriginalBitstream(Item item,
Bitstream derived)
For a bitstream that's a thumbnail or extracted text, find the
corresponding bitstream it was derived from, in the ORIGINAL bundle.
|
protected String |
getAmdSecID(String admSecName,
String mdType,
DSpaceObject dso) |
protected String |
getFileID(Bitstream bitstream) |
protected String |
getGroupFileID(Bitstream bitstream) |
Item |
getItem() |
protected String |
getMETSID() |
protected String |
getMETSLabel() |
protected String |
getMETSOBJEDIT() |
protected String |
getMETSOBJID() |
protected String |
getMETSProfile() |
protected void |
renderAdministrativeSection()
Render the METS administrative section.
|
protected void |
renderAmdSubSection(String amdSecName,
String mdType,
DisseminationCrosswalk crosswalk,
DSpaceObject dso)
Render a sub-section of the administrative metadata section.
|
protected void |
renderDescriptiveSection()
Render the METS descriptive section.
|
protected void |
renderExtraSections()
Render any extra METS section.
|
protected void |
renderFileSection(Context context)
Render the METS file section.
|
protected void |
renderFileWithAllowed(Item item,
Bitstream bitstream,
String fileID,
String groupID,
String admID)
Generate a METS file element for a given bitstream.
|
protected void |
renderStructureMap()
Render the item's structural map.
|
endElement, getDisseminationCrosswalk, getGenericID, isDefinedMETStype, renderBehavioralSection, renderFile, renderFile, renderHeader, renderMETS, renderStructuralLink, sendCharacters, setAmdTypes, setDigiProvMDTypes, setDmdTypes, setFileGrpTypes, setRightsMDTypes, setSections, setSourceMDTypes, setStructTypes, setTechMDTypes, startElementprotected AuthorizeService authorizeService
protected ItemService itemService
protected BundleService bundleService
protected BitstreamService bitstreamService
protected MetadataExposureService metadataExposureService
public Item getItem()
protected String getMETSOBJID()
getMETSOBJID in class AbstractAdapterprotected String getMETSOBJEDIT()
getMETSOBJEDIT in class AbstractAdapterprotected String getMETSID()
getMETSID in class AbstractAdapterprotected String getMETSProfile() throws WingException
getMETSProfile in class AbstractAdapterWingException - never.protected String getMETSLabel()
getMETSLabel in class AbstractAdapterprotected String getFileID(Bitstream bitstream)
bitstream - a Bitstream.protected String getGroupFileID(Bitstream bitstream)
bitstream - a Bitstream.protected String getAmdSecID(String admSecName, String mdType, DSpaceObject dso)
admSecName - section.mdType - type.dso - object.protected void renderDescriptiveSection()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
Example:
<dmdSec>
<mdWrap MDTYPE="MODS">
<xmlData>
... content from the crosswalk ...
</xmlDate>
</mdWrap>
</dmdSec
renderDescriptiveSection in class AbstractAdapterWingException - on XML errors.SAXException - passed through.CrosswalkException - passed through.IOException - passed through.SQLException - passed through.protected void renderAdministrativeSection()
throws WingException,
SAXException,
CrosswalkException,
IOException,
SQLException
Example:
<amdSec>
<mdWrap MDTYPE="OTHER" OTHERMDTYPE="METSRights">
<xmlData>
... content from the crosswalk ...
</xmlDate>
</mdWrap>
</amdSec>
renderAdministrativeSection in class AbstractAdapterWingException - passed through.SAXException - passed through.CrosswalkException - passed through.IOException - passed through.SQLException - passed through.protected void renderAmdSubSection(String amdSecName, String mdType, DisseminationCrosswalk crosswalk, DSpaceObject dso) throws WingException, SAXException, CrosswalkException, IOException, SQLException
Example:
<techMD>
<mdWrap MDTYPE="PREMIS">
<xmlData>
[PREMIS content ... ]
</xmlData>
</mdWrap>
</techMD>
amdSecName - Name of administrative metadata sectionmdType - Type of metadata section (e.g. PREMIS)crosswalk - The DisseminationCrosswalk to use to generate this sectiondso - The current DSpace object to use the crosswalk onWingException - on XML errors.SAXException - passed through.CrosswalkException - passed through.IOException - passed through.SQLException - passed through.protected void renderFileSection(Context context) throws SQLException, SAXException
Example:
<fileSec>
<fileGrp USE="CONTENT">
<file ... >
<fLocate ... >
</file>
</fileGrp>
<fileGrp USE="TEXT">
<file ... >
<fLocate ... >
</file>
</fileGrp>
</fileSec>
renderFileSection in class AbstractAdaptercontext - session context.SQLException - passed through.SAXException - passed through.protected void renderStructureMap()
throws SQLException,
SAXException
Example:
<structMap TYPE="LOGICAL" LABEL="DSpace">
<div TYPE="DSpace Item" DMDID="space-separated list of ids">
<fptr FILEID="primary bitstream"/>
... a div for each content bitstream.
</div>
</structMap>
renderStructureMap in class AbstractAdapterSQLException - passed through.SAXException - passed through.protected void renderExtraSections()
throws SAXException,
SQLException,
IOException
renderExtraSections in class AbstractAdapterSAXException - passed through.SQLException - passed through.IOException - passed through.protected List<Bundle> findEnabledBundles() throws SQLException
SQLException - passed through.protected static Bitstream findOriginalBitstream(Item item, Bitstream derived) throws SQLException
item - the item we're dealing withderived - the derived bitstreamSQLException - passed through.protected void renderFileWithAllowed(Item item, Bitstream bitstream, String fileID, String groupID, String admID) throws SAXException, SQLException
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 fileSAXException - passed through.SQLException - passed through.Copyright © 2016 DuraSpace. All rights reserved.