Add the new SWORD module to the 1.5.x branch. This includes the SWORD code, re-structured to meet the standards already laid out for the 1.5 release (top level project, with sub api and webapp projects). In addition to this the following additions have been made to the main part of DSpace, which will need to be removed again if SWORD is modularised out again:

- sword-swap-ingest.xsl has been included into config/crosswalks
- sword configuration has been added to dspace.cfg
- loading of the required fields for swap ingest has been added to the main build.xml
- references to dspace-sword have been added to all the relevant pom.xml files in the main for DSpace

Furthermore, this commit includes the source code for the common sword libraries.  These need really to be in the main maven repository, which I will work on as soon as possible before the 1.5 beta release.

This module has been tested to work previously, so it has not been extensively tested again.  Dependency issues in the build system may remain, which have notyet been discovered.

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2598 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Richard Jones
2008-02-07 14:04:21 +00:00
parent 6a4f72cb39
commit f2c42fea07
69 changed files with 10455 additions and 3 deletions

View File

@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- sord-swap-ingest.xsl
*
* Copyright (c) 2007, Aberystwyth University
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above
* copyright notice, this list of conditions and the
* following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* - Neither the name of the Centre for Advanced Software and
* Intelligent Systems (CASIS) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:epdcx="http://purl.org/eprint/epdcx/2006-11-16/"
version="1.0">
<!-- NOTE: This stylesheet is a work in progress, and does not
cover all aspects of the SWAP and EPDCX specification/schema.
It is used principally to demonstrate the SWORD ingest
process -->
<!-- This stylesheet converts incoming DC metadata in a SWAP
profile into the DSpace Interal Metadata format (DIM) -->
<!-- Catch all. This template will ensure that nothing
other than explicitly what we want to xwalk will be dealt
with -->
<xsl:template match="text()"></xsl:template>
<!-- match the top level descriptionSet element and kick off the
template matching process -->
<xsl:template match="/epdcx:descriptionSet">
<dim:dim>
<xsl:apply-templates/>
</dim:dim>
</xsl:template>
<!-- general matcher for all "statement" elements -->
<xsl:template match="/epdcx:descriptionSet/epdcx:description/epdcx:statement">
<!-- title element: dc.title -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/elements/1.1/title'">
<dim:field mdschema="dc" element="title">
<xsl:value-of select="epdcx:valueString"/>
</dim:field>
</xsl:if>
<!-- abstract element: dc.description.abstract -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/terms/abstract'">
<dim:field mdschema="dc" element="description" qualifier="abstract">
<xsl:value-of select="epdcx:valueString"/>
</dim:field>
</xsl:if>
<!-- creator element: dc.contributor.author -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/elements/1.1/creator'">
<dim:field mdschema="dc" element="contributor" qualifier="author">
<xsl:value-of select="epdcx:valueString"/>
</dim:field>
</xsl:if>
<!-- identifier element: dc.identifier.* -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/elements/1.1/identifier'">
<xsl:element name="dim:field">
<xsl:attribute name="mdschema">dc</xsl:attribute>
<xsl:attribute name="element">identifier</xsl:attribute>
<xsl:if test="epdcx:valueString[epdcx:sesURI]='http://purl.org/dc/terms/URI'">
<xsl:attribute name="qualifier">uri</xsl:attribute>
</xsl:if>
<xsl:value-of select="epdcx:valueString"/>
</xsl:element>
</xsl:if>
<!-- language element: dc.language.iso -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/elements/1.1/language' and ./@epdcx:vesURI='http://purl.org/dc/terms/RFC3066'">
<dim:field mdschema="dc" element="language" qualifier="rfc3066">
<xsl:value-of select="epdcx:valueString"/>
</dim:field>
</xsl:if>
<!-- item type element: dc.type -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/elements/1.1/type' and ./@epdcx:vesURI='http://purl.org/eprint/terms/Type'">
<xsl:if test="./@epdcx:valueURI='http://purl.org/eprint/type/JournalArticle'">
<dim:field mdschema="dc" element="type">
Journal Article
</dim:field>
</xsl:if>
</xsl:if>
<!-- date available element: dc.date.issued -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/dc/terms/available'">
<dim:field mdschema="dc" element="date" qualifier="issued">
<xsl:value-of select="epdcx:valueString"/>
</dim:field>
</xsl:if>
<!-- publication status element: dc.description.version -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/eprint/terms/status' and ./@epdcx:vesURI='http://purl.org/eprint/terms/Status'">
<xsl:if test="./@epdcx:valueURI='http://purl.org/eprint/status/PeerReviewed'">
<dim:field mdschema="dc" element="description" qualifier="version">
Peer Reviewed
</dim:field>
</xsl:if>
</xsl:if>
<!-- copyright holder element: dc.rights.holder -->
<xsl:if test="./@epdcx:propertyURI='http://purl.org/eprint/terms/copyrightHolder'">
<dim:field mdschema="dc" element="rights" qualifier="holder">
<xsl:value-of select="epdcx:valueString"/>
</dim:field>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@@ -1068,3 +1068,58 @@ event.consumer.eperson.filters = EPerson+Create
#xmlui.bitstream.mets = true
#####################################################################
# SWORD Configuration
#####################################################################
#
# tell the SWORD METS implementation which package ingester to use
# to install deposited content. This should refer to one of the
# classes configured for:
#
# plugin.named.org.dspace.content.packager.PackageIngester
#
# The value of sword.mets-ingester.package-ingester tells the
# system which named plugin for this interface should be used
# to ingest SWORD METS packages
#
# The default is METS
#
# sword.mets-ingester.package-ingester = METS
# Define the metadata type EPDCX (EPrints DC XML)
# to be handled by the SWORD crosswalk configuration
#
mets.submission.crosswalk.EPDCX = SWORD
# define the stylesheet which will be used by the self-named
# XSLTIngestionCrosswalk class when asked to load the SWORD
# configuration (as specified above). This will use the
# specified stylesheet to crosswalk the incoming SWAP metadata
# to the DIM format for ingestion
#
crosswalk.submission.SWORD.stylesheet = crosswalks/sword-swap-ingest.xsl
# The base URL of the SWORD deposit. This is the URL from
# which DSpace will construct the deposit location urls for
# collections.
#
# The default is {dspace.url}/dspace-sword/deposit
#
# In the event that you are not deploying DSpace as the ROOT
# application in the servlet container, this will generate
# incorrect URLs, and you should override the functionality
# by specifying in full as below:
#
# sword.deposit.url = http://www.myu.ac.uk/dspace-sword/deposit
# The metadata field in which to store the updated date for
# items deposited via SWORD.
#
sword.updated.field = dc.date.updated
# The metadata field in which to store the value of the slug
# header if it is supplied
#
sword.slug.field = dc.identifier.slug
#####################################################################

View File

@@ -212,6 +212,54 @@
</modules>
</profile>
<!--
Builds SWORD WAR for DSpace
-->
<profile>
<id>sword-api</id>
<activation>
<file>
<exists>../dspace-sword-api/pom.xml</exists>
</file>
</activation>
<modules>
<module>../dspace-sword-api</module>
</modules>
</profile>
<!--
Builds SWORD WAR for DSpace
-->
<profile>
<id>sword-webapp</id>
<activation>
<file>
<exists>../dspace-sword-webapp/pom.xml</exists>
</file>
</activation>
<modules>
<module>../dspace-sword-webapp</module>
</modules>
</profile>
<!--
Builds SWORD WAR for DSpace
-->
<profile>
<id>sword</id>
<activation>
<file>
<exists>../dspace-sword/pom.xml</exists>
</file>
</activation>
<modules>
<module>../dspace-sword</module>
</modules>
</profile>
<!--
Builds each separate XMLUI module for the XMLUI war (for development/Eclipse)
-->

View File

@@ -226,7 +226,7 @@ Common usage:
UI web applications from ${dspace.dir}/webapps/, then you
can jump straight to restarting your Web servlet container
* Otherwise, you will need to copy any web applications from
* Otherwise, you will need to copy any web applications from
${dspace.dir}/webapps/ to the appropriate place for your servlet
container. (e.g. '$CATALINA_HOME/webapps' for Tomcat)
@@ -364,8 +364,17 @@ Common usage:
<sysproperty key="dspace.configuration" value="${config}"/>
<arg line="-f ${dspace.dir}/config/registries/dublin-core-types.xml"/>
</java>
</target>
<!-- FIXME: this should be more modular -->
<!-- import the SWORD required metadata -->
<java classname="org.dspace.administer.MetadataImporter" classpathref="class.path" fork="yes" failonerror="yes">
<sysproperty key="log4j.configuration" value="file:config/log4j-console.properties"/>
<sysproperty key="dspace.log.init.disable" value="true"/>
<sysproperty key="dspace.configuration" value="${config}"/>
<arg line="-f ${dspace.dir}/config/registries/sword-metadata.xml"/>
</java>
</target>
<!-- ============================================================= -->