org.dspace.content.crosswalk
Class XSLTIngestionCrosswalk
java.lang.Object
org.dspace.core.SelfNamedPlugin
org.dspace.content.crosswalk.XSLTCrosswalk
org.dspace.content.crosswalk.XSLTIngestionCrosswalk
- All Implemented Interfaces:
- IngestionCrosswalk
public class XSLTIngestionCrosswalk
- extends XSLTCrosswalk
- implements IngestionCrosswalk
Configurable XSLT-driven ingestion Crosswalk
See the XSLTCrosswalk superclass for details on configuration.
- Version:
- $Revision: 4365 $
- Author:
- Larry Stone
- See Also:
XSLTCrosswalk
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSLTIngestionCrosswalk
public XSLTIngestionCrosswalk()
getPluginNames
public static String[] getPluginNames()
ingest
public void ingest(Context context,
DSpaceObject dso,
List metadata)
throws CrosswalkException,
IOException,
SQLException,
AuthorizeException
- Translate metadata with XSL stylesheet and ingest it.
Translation produces a list of DIM "field" elements;
these correspond directly to Item.addMetadata() calls so
they are simply executed.
- Specified by:
ingest in interface IngestionCrosswalk
- Parameters:
context - DSpace context.dso - DSpace Object (Item, Bitstream, etc) to which new metadata gets attached.metadata - List of XML Elements of metadata
- 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 calls
SQLException - Database failure in services this calls
AuthorizeException - current user not authorized for this operation.
CrosswalkException
ingest
public void ingest(Context context,
DSpaceObject dso,
org.jdom.Element root)
throws CrosswalkException,
IOException,
SQLException,
AuthorizeException
- Ingest a whole document. Build Document object around root element,
and feed that to the transformation, since it may get handled
differently than a List of metadata elements.
- Specified by:
ingest in interface IngestionCrosswalk
- Parameters:
context - DSpace context.dso - DSpace Object (usually an Item) to which new metadata gets attached.root - root Element of metadata document.
- 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 calls
SQLException - Database failure in services this calls
AuthorizeException - current user not authorized for this operation.
CrosswalkException
main
public static void main(String[] argv)
throws Exception
- Simple command-line rig for testing the DIM output of a stylesheet.
Usage: java XSLTIngestionCrosswalk
- Throws:
Exception
Copyright © 2010 DuraSpace. All Rights Reserved.