Class OAIDCIngestionCrosswalk
- All Implemented Interfaces:
IngestionCrosswalk
Processes Dublic Core metadata encased in an oai_dc:dc wrapper
- Version:
- $Revision: 1 $
- Author:
- Alexey Maslov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidingest(Context context, DSpaceObject dso, List<org.jdom2.Element> metadata, boolean createMissingMetadataFields) Crosswalk metadata from external XML representation to DSpace internal representations.voidingest(Context context, DSpaceObject dso, org.jdom2.Element root, boolean createMissingMetadataFields) Crosswalk metadata from external XML representation to DSpace internal representations.
-
Field Details
-
itemService
-
-
Constructor Details
-
OAIDCIngestionCrosswalk
public OAIDCIngestionCrosswalk()
-
-
Method Details
-
ingest
public void ingest(Context context, DSpaceObject dso, List<org.jdom2.Element> metadata, boolean createMissingMetadataFields) throws CrosswalkException, IOException, SQLException, AuthorizeException Description copied from interface:IngestionCrosswalkCrosswalk metadata from external XML representation to DSpace internal representations. This version accepts metadata as aListof JDOM XML elements. It interprets the contents of each element and adds the appropriate values to the DSpace Object's internal metadata representation.Note that this method may be called several times for the same target Item, if the metadata comes as several lists of elements, so it should not add fixed metadata values on each or they may appear multiples times.
NOTE:
Most XML metadata standards (e.g. MODS) are defined as a "root" element which contains a sequence of "fields" that have the descriptive information. Some metadata containers have a "disembodied" list of fields, rather than the root element, so thisingestmethod is intended to accept that bare list of fields. However, it must also accept a list containing only the "root" element for the metadata structure (e.g. the "mods:mods" wrapper in a MODS expression) as a member of the list. It can handle this case by calling the single-element version of ingest() on the "root" element.Some callers of the crosswalk plugin may not be careful about (or capable of) choosing whether the list or element version should be called.
- Specified by:
ingestin interfaceIngestionCrosswalk- Parameters:
context- DSpace context.dso- DSpace Object (Item, Bitstream, etc) to which new metadata gets attached.metadata- List of XML Elements of metadatacreateMissingMetadataFields- whether to create missing fields- Throws:
CrosswalkInternalException- (CrosswalkException) failure of the crosswalk itself.CrosswalkObjectNotSupported- (CrosswalkException) Cannot crosswalk into this kind of DSpace object.MetadataValidationException- (CrosswalkException) metadata format was not acceptable or missing required elements.IOException- I/O failure in services this callsSQLException- Database failure in services this callsAuthorizeException- current user not authorized for this operation.CrosswalkException
-
ingest
public void ingest(Context context, DSpaceObject dso, org.jdom2.Element root, boolean createMissingMetadataFields) throws CrosswalkException, IOException, SQLException, AuthorizeException Description copied from interface:IngestionCrosswalkCrosswalk metadata from external XML representation to DSpace internal representations. This version accepts a single "root" element of the XML metadata.It is otherwise just like the
Listform ofingest()above.- Specified by:
ingestin interfaceIngestionCrosswalk- Parameters:
context- DSpace context.dso- DSpace Object (usually an Item) to which new metadata gets attached.root- root Element of metadata document.createMissingMetadataFields- whether to create missing fields- Throws:
CrosswalkInternalException- (CrosswalkException) failure of the crosswalk itself.CrosswalkObjectNotSupported- (CrosswalkException) Cannot crosswalk into this kind of DSpace object.MetadataValidationException- (CrosswalkException) metadata format was not acceptable or missing required elements.IOException- I/O failure in services this callsSQLException- Database failure in services this callsAuthorizeException- current user not authorized for this operation.CrosswalkException
-