diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/ParameterizedDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/ParameterizedDisseminationCrosswalk.java
new file mode 100644
index 0000000000..315f2f655f
--- /dev/null
+++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/ParameterizedDisseminationCrosswalk.java
@@ -0,0 +1,49 @@
+/**
+ * The contents of this file are subject to the license and copyright
+ * detailed in the LICENSE and NOTICE files at the root of the source
+ * tree and available online at
+ *
+ * http://www.dspace.org/license/
+ */
+package org.dspace.content.crosswalk;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.Map;
+import org.dspace.authorize.AuthorizeException;
+import org.dspace.content.DSpaceObject;
+import org.dspace.core.Context;
+import org.jdom.Element;
+
+/**
+ * Translate DSpace native metadata into an external XML format, with parameters.
+ * This extends {@link DisseminationCrosswalk} by accepting a table of XSL-T global
+ * parameter names and values, which will be passed to the selected transform.
+ *
+ * @author mhwood
+ */
+public interface ParameterizedDisseminationCrosswalk
+ extends DisseminationCrosswalk
+{
+ /**
+ * Execute crosswalk, returning one XML root element as
+ * a JDOM Element
object.
+ * This is typically the root element of a document.
+ *
+ *
+ * @param context
+ * @param dso the DSpace Object whose metadata to export.
+ * @param parameters
+ * names and values of parameters to be passed into the transform.
+ * @return root Element of the target metadata, never null
.
+ *
+ * @throws CrosswalkInternalException (CrosswalkException
) failure of the crosswalk itself.
+ * @throws CrosswalkObjectNotSupported (CrosswalkException
) Cannot crosswalk this kind of DSpace object.
+ * @throws IOException I/O failure in services this calls
+ * @throws SQLException Database failure in services this calls
+ * @throws AuthorizeException current user not authorized for this operation.
+ */
+ public Element disseminateElement(Context context, DSpaceObject dso,
+ Map parameters)
+ throws CrosswalkException, IOException, SQLException, AuthorizeException;
+}
diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTCrosswalk.java
index 03ea056930..72afa73328 100644
--- a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTCrosswalk.java
+++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTCrosswalk.java
@@ -8,16 +8,24 @@
package org.dspace.content.crosswalk;
import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stax.StAXSource;
import org.apache.log4j.Logger;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.SelfNamedPlugin;
import org.jdom.Namespace;
-import org.jdom.transform.XSLTransformException;
-import org.jdom.transform.XSLTransformer;
/**
* Configurable XSLT-driven Crosswalk
@@ -81,7 +89,7 @@ import org.jdom.transform.XSLTransformer;
public abstract class XSLTCrosswalk extends SelfNamedPlugin
{
/** log4j category */
- private static Logger log = Logger.getLogger(XSLTCrosswalk.class);
+ private static final Logger log = Logger.getLogger(XSLTCrosswalk.class);
/**
* DSpace XML Namespace in JDOM form.
@@ -96,16 +104,19 @@ public abstract class XSLTCrosswalk extends SelfNamedPlugin
/**
* Derive list of plugin name from DSpace configuration entries
- * for crosswalks. The direction parameter should be either
- * "dissemination" or "submission", so it looks for keys like
- * crosswalk.submission.{NAME}.stylesheet
+ * for crosswalks.
+ *
+ * @param direction
+ * "dissemination" or "submission", so it looks for keys like
+ * crosswalk.submission.{NAME}.stylesheet
+ * @return names to be given to the plugins of that direction.
*/
protected static String[] makeAliases(String direction)
{
String prefix = CONFIG_PREFIX+direction+".";
String suffix = CONFIG_STYLESHEET;
- List aliasList = new ArrayList();
+ List aliasList = new ArrayList<>();
Enumeration pe = (Enumeration)ConfigurationManager.propertyNames();
log.debug("XSLTCrosswalk: Looking for config prefix = "+prefix);
@@ -121,7 +132,7 @@ public abstract class XSLTCrosswalk extends SelfNamedPlugin
return aliasList.toArray(new String[aliasList.size()]);
}
- private XSLTransformer transformer = null;
+ private Transformer transformer = null;
private File transformerFile = null;
private long transformerLastModified = 0;
@@ -131,7 +142,7 @@ public abstract class XSLTCrosswalk extends SelfNamedPlugin
* "dissemination"
* @return transformer or null if there was error initializing.
*/
- protected XSLTransformer getTransformer(String direction)
+ protected Transformer getTransformer(String direction)
{
if (transformerFile == null)
{
@@ -165,10 +176,18 @@ public abstract class XSLTCrosswalk extends SelfNamedPlugin
{
log.debug((transformer == null ? "Loading " : "Reloading")+
getPluginInstanceName()+" XSLT stylesheet from "+transformerFile.toString());
- transformer = new XSLTransformer(transformerFile);
+ Reader transformReader = new FileReader(transformerFile);
+
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ XMLStreamReader xsltReader
+ = inputFactory.createXMLStreamReader(transformReader);
+
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ transformer = transformerFactory.newTransformer(
+ new StAXSource(xsltReader));
transformerLastModified = transformerFile.lastModified();
}
- catch (XSLTransformException e)
+ catch (TransformerConfigurationException | XMLStreamException | FileNotFoundException e)
{
log.error("Failed to initialize XSLTCrosswalk("+getPluginInstanceName()+"):"+e.toString());
}
diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java
index 5ba290e95d..6febf696ce 100644
--- a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java
+++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java
@@ -14,7 +14,11 @@ import java.io.OutputStream;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
import org.apache.commons.lang.ArrayUtils;
import org.apache.log4j.Logger;
@@ -36,8 +40,8 @@ import org.jdom.Namespace;
import org.jdom.Verifier;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
-import org.jdom.transform.XSLTransformException;
-import org.jdom.transform.XSLTransformer;
+import org.jdom.transform.JDOMResult;
+import org.jdom.transform.JDOMSource;
/**
* Configurable XSLT-driven dissemination Crosswalk
@@ -65,16 +69,15 @@ import org.jdom.transform.XSLTransformer;
* @author Larry Stone
* @author Scott Phillips
* @author Pascal-Nicolas Becker
- * @version $Revision$
* @see XSLTCrosswalk
*/
public class XSLTDisseminationCrosswalk
extends XSLTCrosswalk
- implements DisseminationCrosswalk
+ implements ParameterizedDisseminationCrosswalk
{
/** log4j category */
- private static Logger log = Logger.getLogger(XSLTDisseminationCrosswalk.class);
-
+ private static final Logger log = Logger.getLogger(XSLTDisseminationCrosswalk.class);
+
/** DSpace context, will be created if XSLTDisseminationCrosswalk had been started by command-line. */
private static Context context;
@@ -84,7 +87,7 @@ public class XSLTDisseminationCrosswalk
protected static final CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
protected static final ItemService itemService = ContentServiceFactory.getInstance().getItemService();
- private static String aliases[] = makeAliases(DIRECTION);
+ private static final String aliases[] = makeAliases(DIRECTION);
public static String[] getPluginNames()
{
@@ -124,7 +127,7 @@ public class XSLTDisseminationCrosswalk
{
log.warn("No schemaLocation for crosswalk="+myAlias+", key="+prefix+"schemaLocation");
}
-
+
// sanity check: schemaLocation should have space.
else if (schemaLocation.length() > 0 && schemaLocation.indexOf(' ') < 0)
{
@@ -137,7 +140,7 @@ public class XSLTDisseminationCrosswalk
// crosswalk.diss.{PLUGIN_NAME}.namespace.{PREFIX} = {URI}
String nsPrefix = prefix + "namespace.";
Enumeration pe = (Enumeration)ConfigurationManager.propertyNames();
- List nsList = new ArrayList();
+ List nsList = new ArrayList<>();
while (pe.hasMoreElements())
{
String key = pe.nextElement();
@@ -190,13 +193,16 @@ public class XSLTDisseminationCrosswalk
return schemaLocation;
}
- /**
- * Disseminate the DSpace item, collection, or community.
- *
- * @see DisseminationCrosswalk
- */
@Override
public Element disseminateElement(Context context, DSpaceObject dso)
+ throws CrosswalkException, IOException, SQLException, AuthorizeException
+ {
+ return disseminateElement(context, dso, new HashMap());
+ }
+
+ @Override
+ public Element disseminateElement(Context context, DSpaceObject dso,
+ Map parameters)
throws CrosswalkException,
IOException, SQLException, AuthorizeException
{
@@ -210,21 +216,27 @@ public class XSLTDisseminationCrosswalk
init();
- XSLTransformer xform = getTransformer(DIRECTION);
+ Transformer xform = getTransformer(DIRECTION);
if (xform == null)
{
throw new CrosswalkInternalException("Failed to initialize transformer, probably error loading stylesheet.");
}
+ for (Map.Entry parameter : parameters.entrySet())
+ {
+ xform.setParameter(parameter.getKey(), parameter.getValue());
+ }
+
try
{
Document ddim = new Document(createDIM(dso));
- Document result = xform.transform(ddim);
- Element root = result.getRootElement();
+ JDOMResult result = new JDOMResult();
+ xform.transform(new JDOMSource(ddim), result);
+ Element root = result.getDocument().getRootElement();
root.detach();
return root;
}
- catch (XSLTransformException e)
+ catch (TransformerException e)
{
log.error("Got error: "+e.toString());
throw new CrosswalkInternalException("XSL translation failed: "+e.toString(), e);
@@ -251,7 +263,7 @@ public class XSLTDisseminationCrosswalk
init();
- XSLTransformer xform = getTransformer(DIRECTION);
+ Transformer xform = getTransformer(DIRECTION);
if (xform == null)
{
throw new CrosswalkInternalException("Failed to initialize transformer, probably error loading stylesheet.");
@@ -259,9 +271,11 @@ public class XSLTDisseminationCrosswalk
try
{
- return xform.transform(createDIM(dso).getChildren());
+ JDOMResult result = new JDOMResult();
+ xform.transform(new JDOMSource(createDIM(dso).getChildren()), result);
+ return result.getResult();
}
- catch (XSLTransformException e)
+ catch (TransformerException e)
{
log.error("Got error: "+e.toString());
throw new CrosswalkInternalException("XSL translation failed: "+e.toString(), e);
@@ -494,7 +508,7 @@ public class XSLTDisseminationCrosswalk
return result.toString();
}
}
-
+
/**
* Simple command-line rig for testing the DIM output of a stylesheet.
* Usage: java XSLTDisseminationCrosswalk [output-file]
@@ -508,7 +522,7 @@ public class XSLTDisseminationCrosswalk
log.error("You started Dissemination Crosswalk Test/Export with a wrong number of parameters.");
System.exit(1);
}
-
+
String xwalkname = argv[0];
String handle = argv[1];
OutputStream out = System.out;
@@ -525,18 +539,20 @@ public class XSLTDisseminationCrosswalk
}
}
- DisseminationCrosswalk xwalk = (DisseminationCrosswalk) CoreServiceFactory.getInstance().getPluginService().getNamedPlugin(
- DisseminationCrosswalk.class, xwalkname);
+ DisseminationCrosswalk xwalk
+ = (DisseminationCrosswalk) CoreServiceFactory.getInstance()
+ .getPluginService()
+ .getNamedPlugin(DisseminationCrosswalk.class, xwalkname);
if (xwalk == null)
{
System.err.println("Error: Cannot find a DisseminationCrosswalk plugin for: \"" + xwalkname + "\"");
log.error("Cannot find the Dissemination Crosswalk plugin.");
System.exit(1);
}
-
+
context = new Context();
context.turnOffAuthorisationSystem();
-
+
DSpaceObject dso = null;
try
{
@@ -547,26 +563,26 @@ public class XSLTDisseminationCrosswalk
System.err.println("Error: A problem with the database connection occurred, check logs for further information.");
System.exit(1);
}
-
+
if (null == dso)
{
System.err.println("Can't find a DSpaceObject with the handle \"" + handle + "\"");
System.exit(1);
}
-
+
if (!xwalk.canDisseminate(dso))
{
System.err.println("Dissemination Crosswalk can't disseminate this DSpaceObject.");
log.error("Dissemination Crosswalk can't disseminate this DSpaceObject.");
System.exit(1);
}
-
+
Element root = null;
try
{
root = xwalk.disseminateElement(context, dso);
}
- catch (Exception e)
+ catch (CrosswalkException | IOException | SQLException | AuthorizeException e)
{
// as this script is for testing dissemination crosswalks, we want
// verbose information in case of an exception.
@@ -581,7 +597,7 @@ public class XSLTDisseminationCrosswalk
log.error(e.getStackTrace());
System.exit(1);
}
-
+
try
{
XMLOutputter xmlout = new XMLOutputter(Format.getPrettyFormat());
@@ -603,7 +619,7 @@ public class XSLTDisseminationCrosswalk
log.error(e.getStackTrace());
System.exit(1);
}
-
+
context.complete();
if (out instanceof FileOutputStream)
{
diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java
index c3cfbd0d64..08f90d803f 100644
--- a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java
+++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java
@@ -12,6 +12,8 @@ import java.io.IOException;
import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
import org.apache.commons.lang.ArrayUtils;
import org.apache.log4j.Logger;
@@ -36,8 +38,8 @@ import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
-import org.jdom.transform.XSLTransformException;
-import org.jdom.transform.XSLTransformer;
+import org.jdom.transform.JDOMResult;
+import org.jdom.transform.JDOMSource;
/**
* Configurable XSLT-driven ingestion Crosswalk
@@ -45,7 +47,6 @@ import org.jdom.transform.XSLTransformer;
* See the XSLTCrosswalk superclass for details on configuration.
*
* @author Larry Stone
- * @version $Revision$
* @see XSLTCrosswalk
*/
public class XSLTIngestionCrosswalk
@@ -57,7 +58,7 @@ public class XSLTIngestionCrosswalk
private static final String DIRECTION = "submission";
- private static String aliases[] = makeAliases(DIRECTION);
+ private static final String aliases[] = makeAliases(DIRECTION);
private static final CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
private static final CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService();
@@ -106,7 +107,7 @@ public class XSLTIngestionCrosswalk
{
qualifier = null;
}
-
+
if ((authority != null && authority.length() > 0) ||
(sconf != null && sconf.length() > 0))
{
@@ -127,21 +128,23 @@ public class XSLTIngestionCrosswalk
* they are simply executed.
*/
@Override
- public void ingest(Context context, DSpaceObject dso, List metadata, boolean createMissingMetadataFields)
+ public void ingest(Context context, DSpaceObject dso, List metadata,
+ boolean createMissingMetadataFields)
throws CrosswalkException,
IOException, SQLException, AuthorizeException
{
- XSLTransformer xform = getTransformer(DIRECTION);
+ Transformer xform = getTransformer(DIRECTION);
if (xform == null)
{
throw new CrosswalkInternalException("Failed to initialize transformer, probably error loading stylesheet.");
}
try
{
- List dimList = xform.transform(metadata);
- ingestDIM(context, dso, dimList, createMissingMetadataFields);
+ JDOMResult result = new JDOMResult();
+ xform.transform(new JDOMSource(metadata), result);
+ ingestDIM(context, dso, result.getResult(), createMissingMetadataFields);
}
- catch (XSLTransformException e)
+ catch (TransformerException e)
{
log.error("Got error: "+e.toString());
throw new CrosswalkInternalException("XSL Transformation failed: "+e.toString(), e);
@@ -157,17 +160,20 @@ public class XSLTIngestionCrosswalk
public void ingest(Context context, DSpaceObject dso, Element root, boolean createMissingMetadataFields)
throws CrosswalkException, IOException, SQLException, AuthorizeException
{
- XSLTransformer xform = getTransformer(DIRECTION);
+ Transformer xform = getTransformer(DIRECTION);
if (xform == null)
{
throw new CrosswalkInternalException("Failed to initialize transformer, probably error loading stylesheet.");
}
try
{
- Document dimDoc = xform.transform(new Document((Element)root.clone()));
+ JDOMSource source = new JDOMSource(new Document((Element)root.cloneContent()));
+ JDOMResult result = new JDOMResult();
+ xform.transform(source, result);
+ Document dimDoc = result.getDocument();
ingestDIM(context, dso, dimDoc.getRootElement().getChildren(), createMissingMetadataFields);
}
- catch (XSLTransformException e)
+ catch (TransformerException e)
{
log.error("Got error: "+e.toString());
throw new CrosswalkInternalException("XSL Transformation failed: "+e.toString(), e);
@@ -295,7 +301,7 @@ public class XSLTIngestionCrosswalk
System.exit(1);
}
- XSLTransformer xform = ((XSLTIngestionCrosswalk)xwalk).getTransformer(DIRECTION);
+ Transformer xform = ((XSLTIngestionCrosswalk)xwalk).getTransformer(DIRECTION);
if (xform == null)
{
throw new CrosswalkInternalException("Failed to initialize transformer, probably error loading stylesheet.");
@@ -304,16 +310,21 @@ public class XSLTIngestionCrosswalk
SAXBuilder builder = new SAXBuilder();
Document inDoc = builder.build(new FileInputStream(argv[i+1]));
XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
- Document dimDoc = null;
- List dimList = null;
+ List dimList;
if (list)
{
- dimList = xform.transform(inDoc.getRootElement().getChildren());
+ JDOMSource source = new JDOMSource(inDoc.getRootElement().getChildren());
+ JDOMResult result = new JDOMResult();
+ xform.transform(source, result);
+ dimList = result.getResult();
outputter.output(dimList, System.out);
}
else
{
- dimDoc = xform.transform(inDoc);
+ JDOMSource source = new JDOMSource(inDoc);
+ JDOMResult result = new JDOMResult();
+ xform.transform(source, result);
+ Document dimDoc = result.getDocument();
outputter.output(dimDoc, System.out);
dimList = dimDoc.getRootElement().getChildren();
}
diff --git a/dspace-api/src/main/java/org/dspace/identifier/DataCiteXMLCreator.java b/dspace-api/src/main/java/org/dspace/identifier/DataCiteXMLCreator.java
index 67c445cc8b..9446217653 100644
--- a/dspace-api/src/main/java/org/dspace/identifier/DataCiteXMLCreator.java
+++ b/dspace-api/src/main/java/org/dspace/identifier/DataCiteXMLCreator.java
@@ -8,24 +8,33 @@
package org.dspace.identifier;
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.log4j.Logger;
+import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
+import org.dspace.content.crosswalk.CrosswalkException;
import org.dspace.content.crosswalk.DisseminationCrosswalk;
+import org.dspace.content.crosswalk.ParameterizedDisseminationCrosswalk;
import org.dspace.core.Context;
import org.dspace.core.factory.CoreServiceFactory;
+import org.dspace.services.ConfigurationService;
+import org.dspace.utils.DSpace;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
/**
* Provide XML based metadata crosswalk for EZID Identifier provider module.
- *
+ *
* @author mohideen
*/
public class DataCiteXMLCreator
{
/** log4j category */
- private static Logger log = Logger.getLogger(DataCiteXMLCreator.class);
+ private static final Logger log = Logger.getLogger(DataCiteXMLCreator.class);
/**
* Name of crosswalk to convert metadata into DataCite Metadata Scheme.
@@ -37,7 +46,7 @@ public class DataCiteXMLCreator
* name of the crosswalk is set by {@link setDisseminationCrosswalk(String)
* setDisseminationCrosswalk} which instantiates the crosswalk.
*/
- protected DisseminationCrosswalk xwalk;
+ protected ParameterizedDisseminationCrosswalk xwalk;
public String getXMLString(Context context, DSpaceObject dso)
{
@@ -57,12 +66,26 @@ public class DataCiteXMLCreator
return null;
}
- Element root = null;
+ // Set the transform's parameters.
+ // XXX Should the actual list be configurable?
+ ConfigurationService cfg = new DSpace().getConfigurationService();
+ Map parameters = new HashMap<>();
+ if (null != cfg.getProperty("identifier.doi.prefix"))
+ parameters.put("prefix", cfg.getProperty("identifier.doi.prefix"));
+ if (null != cfg.getProperty("crosswalk.dissemination.DataCite.publisher"))
+ parameters.put("publisher", cfg.getProperty("crosswalk.dissemination.DataCite.publisher"));
+ if (null != cfg.getProperty("crosswalk.dissemination.DataCite.dataManager"))
+ parameters.put("datamanager", cfg.getProperty("crosswalk.dissemination.DataCite.dataManager"));
+ if (null != cfg.getProperty("crosswalk.dissemination.DataCite.hostingInstitution"))
+ parameters.put("hostinginstitution", cfg.getProperty("crosswalk.dissemination.DataCite.hostingInstitution"));
+
+ // Transform the metadata
+ Element root;
try
{
- root = xwalk.disseminateElement(context, dso);
+ root = xwalk.disseminateElement(context, dso, parameters);
}
- catch (Exception e)
+ catch (CrosswalkException | IOException | SQLException | AuthorizeException e)
{
log.error(
"Exception while crosswolking DSO " + "with type "
@@ -73,13 +96,12 @@ public class DataCiteXMLCreator
XMLOutputter xOut = new XMLOutputter();
return xOut.outputString(root);
-
}
/**
* Set the name of the dissemination crosswalk used to convert the metadata
* into DataCite Metadata Schema. Used by spring dependency injection.
- *
+ *
* @param CROSSWALK_NAME
* The name of the dissemination crosswalk to use.
*/
@@ -93,8 +115,9 @@ public class DataCiteXMLCreator
if (null != this.xwalk)
return;
- this.xwalk = (DisseminationCrosswalk) CoreServiceFactory.getInstance().getPluginService().getNamedPlugin(
- DisseminationCrosswalk.class, this.CROSSWALK_NAME);
+ this.xwalk = (ParameterizedDisseminationCrosswalk) CoreServiceFactory
+ .getInstance().getPluginService()
+ .getNamedPlugin(DisseminationCrosswalk.class, this.CROSSWALK_NAME);
if (this.xwalk == null)
{
diff --git a/dspace/config/crosswalks/DIM2DataCite.xsl b/dspace/config/crosswalks/DIM2DataCite.xsl
index 0c25adfb4c..701eacb195 100644
--- a/dspace/config/crosswalks/DIM2DataCite.xsl
+++ b/dspace/config/crosswalks/DIM2DataCite.xsl
@@ -12,25 +12,25 @@
xmlns:dspace="http://www.dspace.org/xmlns/dspace/dim"
xmlns="http://datacite.org/schema/kernel-2.2"
version="1.0">
-
+
- My University
+ My University
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+ -->
-
@@ -70,9 +70,9 @@
-
@@ -84,8 +84,8 @@
-
-
@@ -93,7 +93,7 @@
-
@@ -112,31 +112,31 @@
-
-
+ -->
-
+ -->
DataManager
-
+
HostingInstitution
@@ -147,10 +147,10 @@
-
+ -->
@@ -163,10 +163,10 @@
-
@@ -177,18 +177,18 @@
@@ -205,7 +205,7 @@
-
+
@@ -213,7 +213,7 @@
-
+
@@ -233,14 +233,14 @@
-
@@ -252,12 +252,12 @@
-
-
+
Editor
@@ -267,7 +267,7 @@
-
@@ -303,7 +303,7 @@
-
@@ -366,7 +366,7 @@
-
@@ -400,7 +400,7 @@
-
@@ -410,7 +410,7 @@
-
@@ -419,15 +419,15 @@
-
-
-
+
Abstract
Other
@@ -435,5 +435,5 @@
-
+
diff --git a/dspace/config/crosswalks/DIM2EZID.xsl b/dspace/config/crosswalks/DIM2EZID.xsl
index 9fbea7fc87..08bfad45ec 100644
--- a/dspace/config/crosswalks/DIM2EZID.xsl
+++ b/dspace/config/crosswalks/DIM2EZID.xsl
@@ -11,25 +11,25 @@
xmlns:dspace="http://www.dspace.org/xmlns/dspace/dim"
xmlns="http://datacite.org/schema/kernel-2.2"
version="1.0">
-
+
- My University
+ My University
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+ -->
-
@@ -68,9 +68,9 @@
-
@@ -82,8 +82,8 @@
-
-
@@ -91,7 +91,7 @@
-
@@ -110,31 +110,31 @@
-
-
+ -->
-
+ -->
DataManager
-
+
HostingInstitution
@@ -145,10 +145,10 @@
-
+ -->
@@ -161,10 +161,10 @@
-
@@ -175,18 +175,18 @@
@@ -203,7 +203,7 @@
-
+
@@ -211,7 +211,7 @@
-
+
@@ -231,14 +231,14 @@
-
@@ -250,12 +250,12 @@
-
-
+
Editor
@@ -265,7 +265,7 @@
-
@@ -301,7 +301,7 @@
-
@@ -364,7 +364,7 @@
-
@@ -398,7 +398,7 @@
-
@@ -408,7 +408,7 @@
-
@@ -417,15 +417,15 @@
-
-
-
+
Abstract
Other
@@ -433,5 +433,5 @@
-
+
diff --git a/dspace/config/dspace.cfg b/dspace/config/dspace.cfg
index af69b17fd6..85959e799a 100644
--- a/dspace/config/dspace.cfg
+++ b/dspace/config/dspace.cfg
@@ -44,7 +44,7 @@ dspace.ui = xmlui
dspace.url = ${dspace.baseUrl}/${dspace.ui}
# Optional: DSpace URL for mobile access
-# This
+# This
#dspace.mobileUrl = http://mobile.example.com
# Name of the site
@@ -192,7 +192,7 @@ loglevel.other = INFO
# To mint DOIs you have to use a DOI registration agency like DataCite. Several
# DataCite members offers services as DOI registration agency, so f.e. EZID or
# TIB Hannover. To mint DOIs with DSpace you have to get an agreement with an
-# DOI registration agency. You have to edit
+# DOI registration agency. You have to edit
# [dspace]/config/spring/api/identifier-service.xml and to configure the following
# properties.
@@ -261,13 +261,13 @@ handle.prefix = 123456789
# Directory for installing Handle server files
handle.dir = ${dspace.dir}/handle-server
-# List any additional prefixes that need to be managed by this handle server
-# (as for examle handle prefix coming from old dspace repository merged in
+# List any additional prefixes that need to be managed by this handle server
+# (as for examle handle prefix coming from old dspace repository merged in
# that repository)
-# handle.additional.prefixes = prefix1[, prefix2]
+# handle.additional.prefixes = prefix1[, prefix2]
-# By default we hide the list handles method in the JSON endpoint as it could
-# produce heavy load for large repository
+# By default we hide the list handles method in the JSON endpoint as it could
+# produce heavy load for large repository
# handle.hide.listhandles = false
##### Authorization system configuration - Delegate ADMIN #####
@@ -358,8 +358,8 @@ filter.plugins = PDF Text Extractor, HTML Text Extractor, \
# [To enable Branded Preview]: uncomment and insert the following into the plugin list
# Branded Preview JPEG, \
-# [To enable ImageMagick Thumbnail]:
-# remove "JPEG Thumbnail" from the plugin list
+# [To enable ImageMagick Thumbnail]:
+# remove "JPEG Thumbnail" from the plugin list
# uncomment and insert the following line into the plugin list
# ImageMagick Image Thumbnail, ImageMagick PDF Thumbnail, \
@@ -413,7 +413,7 @@ filter.org.dspace.app.mediafilter.ExcelFilter.inputFormats = Microsoft Excel, Mi
#
# bitstream descriptions that do not conform to the following regular expression will not be overwritten
# org.dspace.app.mediafilter.ImageMagickThumbnailFilter.replaceRegex = ^Generated Thumbnail$
-#
+#
# While PDFs may contain transparent spaces, JPEG cannot. As DSpace use JPEG
# for the generated thumbnails, PDF containing transparent spaces may lead
# to problems. To solve this the exported PDF page is flatten before it is
@@ -475,6 +475,9 @@ crosswalk.dissemination.DataCite.schemaLocation = \
http://datacite.org/schema/kernel-2.2 \
http://schema.datacite.org/meta/kernel-2.2/metadata.xsd
crosswalk.dissemination.DataCite.preferList = false
+crosswalk.dissemination.DataCite.publisher = My University
+#crosswalk.dissemination.DataCite.dataManager = # defaults to publisher
+#crosswalk.dissemination.DataCite.hostingInstitution = # defaults to publisher
# Crosswalk Plugin Configuration:
# The purpose of Crosswalks is to translate an external metadata format to/from
@@ -512,7 +515,7 @@ plugin.named.org.dspace.content.crosswalk.DisseminationCrosswalk = \
org.dspace.content.crosswalk.OREDisseminationCrosswalk = ore, \
org.dspace.content.crosswalk.DIMDisseminationCrosswalk = dim, \
org.dspace.content.crosswalk.RoleCrosswalk = DSPACE-ROLES
-
+
# regarding the XSLTDisseminationCrosswalk see the section were it is
# configured to avoid error logs! Disable it if you remove its configuration.
@@ -730,7 +733,7 @@ org.dspace.app.itemexport.max.size = 200
org.dspace.app.batchitemimport.work.dir = ${dspace.dir}/imports
# Enable performance optimization for select-collection-step collection query
-# Enable when having
+# Enable when having
# a large number of collections and no Shibboleth or LDAP authentication.
# default = false, (disabled)
#org.dspace.content.Collection.findAuthorizedPerformanceOptimize = true
@@ -779,7 +782,7 @@ webui.licence_bundle.show = false
# 4. OAI (every where as there is currently no possibility to authenticate)
# Attention: You need to rebuild the OAI SOLR index after every change of
# this property. Run [dspace-install]/bin/dspace oai import -c to do so.
-#
+#
# To designate a field as hidden, add a property here in the form:
# metadata.hide.SCHEMA.ELEMENT.QUALIFIER = true
#
@@ -818,7 +821,7 @@ cc.api.rooturl = http://api.creativecommons.org/rest/1.5
# Metadata field to hold CC license URI of selected license
# NB: XMLUI presentation code expects 'dc.rights.uri' to hold CC data. If you change
-# this to another field, please consult documentation on how to update UI configuration
+# this to another field, please consult documentation on how to update UI configuration
cc.license.uri = dc.rights.uri
# Metadata field to hold CC license name of selected license (if defined)
@@ -1150,7 +1153,7 @@ recent.submissions.sort-option = dateaccessioned
recent.submissions.count = 0
# name of the browse index to display collection's items.
-# You can set a "item" type of browse index only.
+# You can set a "item" type of browse index only.
# default = title
#webui.collectionhome.browse-name = title
@@ -1197,7 +1200,7 @@ plugin.single.org.dspace.app.xmlui.aspect.administrative.mapper.SearchRequestPro
# to show facets on the site home page, community, collection
# comment out the following lines if you disable Discovery or don't want
# to show facets on side bars
-# TagCloudProcessor is responsible for displaying a tag-cloud facet on the
+# TagCloudProcessor is responsible for displaying a tag-cloud facet on the
# site home page, community or collection home page
plugin.sequence.org.dspace.plugin.CommunityHomeProcessor = \
org.dspace.app.webui.components.RecentCommunitySubmissions,\
@@ -1312,7 +1315,7 @@ webui.feed.item.author = dc.contributor.author
# Add all the communities / collections, separated by commas (no spaces) that should
# have the iTunes podcast metadata added to their RSS feed.
# Default: Disabled, No collections or communities have iTunes Podcast enhanced metadata in their feed.
-# webui.feed.podcast.collections =123456789/2,123456789/3
+# webui.feed.podcast.collections =123456789/2,123456789/3
# webui.feed.podcast.communities =123456789/1
# Which MIMETypes of Bitstreams would you like to have podcastable in your item?
@@ -1320,8 +1323,8 @@ webui.feed.item.author = dc.contributor.author
#webui.feed.podcast.mimetypes=audio/x-mpeg
# For the iTunes Podcast Feed, if you would like to specify an external media file,
-# not on your DSpace server to be enclosed within the entry for each item,
-# specify which metadata field will hold the URI to the external media file.
+# not on your DSpace server to be enclosed within the entry for each item,
+# specify which metadata field will hold the URI to the external media file.
# This is useful if you store the metadata in DSpace, and a separate streaming server to host the media.
# Default: dc.source.uri
#webui.feed.podcast.sourceuri = dc.source.uri
@@ -1411,7 +1414,7 @@ sitemap.engineurls = http://www.google.com/webmasters/sitemaps/ping?sitemap=
sherpa.romeo.url = http://www.sherpa.ac.uk/romeo/api29.php
# to disable the sherpa/romeo integration
-# uncomment the follow line
+# uncomment the follow line
# webui.submission.sherparomeo-policy-enabled = false
# please register for a free api access key to get many benefits
@@ -1536,9 +1539,9 @@ google-metadata.enable = true
# These configs are only used by the JSP User Interface #
#---------------------------------------------------------------#
##### JSPUI Layout #####
-# set this value if you want to use a diffent main template.
+# set this value if you want to use a diffent main template.
# The value must match the name of a subfolder of dspace-jspui/src/main/webapp/layout
-# jspui.template.name =
+# jspui.template.name =
##### Show community or collection logo in list #####
# jspui.home-page.logos = true
@@ -1586,10 +1589,10 @@ report.dir = ${dspace.dir}/reports/
# (any or no qualifier)
# dc.identifier.uri(link) = DC identifier.uri, render as a link
# dc.date.issued(date) = DC date.issued, render as a date
-# dc.subject(nobreakline) = DC subject.keyword, rendered as separated values
+# dc.subject(nobreakline) = DC subject.keyword, rendered as separated values
# (see also webui.itemdisplay.nobreakline.separator option)
# dc.language(inputform) = If the dc.language is in a controlled vocabulary, then the displayed value will be shown based on the stored value from the value-pairs-name in input forms.
-# The input-forms will be loaded based on the session locale. If the displayed value is not found, then the value will be shown as is.
+# The input-forms will be loaded based on the session locale. If the displayed value is not found, then the value will be shown as is.
# "link/date" options can be combined with "nobreakline" option using a space among them i.e "dc.identifier.uri(link nobreakline)"
#
# If an item has no value for a particular field, it won't be displayed.
@@ -1638,7 +1641,7 @@ report.dir = ${dspace.dir}/reports/
webui.itemdisplay.label.restricted.bitstreams = true
# If nobreakline option is applied for a field in itemdisplay then the following option defines the separator string.
-# If a non-breaking space is needed before or after the separator, this can be included using
+# If a non-breaking space is needed before or after the separator, this can be included using
# (i.e. webui.itemdisplay.separator = ; )
# If ommitted, the default separator is '; '
webui.itemdisplay.nobreakline.separator = ;
@@ -1675,9 +1678,9 @@ plugin.single.org.dspace.app.webui.util.StyleSelection = \
# If you have enabled thumbnails (webui.browse.thumbnail.show), you must also
# include a 'thumbnail' entry in your columns - this is where the thumbnail will be displayed
#
-# If you want to mark each item include a 'mark_[value]' (without the brackets - replace the word 'value' with anything that
+# If you want to mark each item include a 'mark_[value]' (without the brackets - replace the word 'value' with anything that
# has a meaning for your mark) entry in your columns - this is where the icon will be displayed.
-# Do not forget to add a Spring bean with id = "org.dspace.app.itemmarking.ItemMarkingExtractor.[value]"
+# Do not forget to add a Spring bean with id = "org.dspace.app.itemmarking.ItemMarkingExtractor.[value]"
# in file 'config/spring/api/item-marking.xml'. This bean is responsible for drawing the appropriate mark for each item.
# You can add more than one 'mark_[value]' options (with different value) in case you need to mark items more than one time for
# different purposes. Remember to add the respective beans in file 'config/spring/api/item-marking.xml'.
@@ -1819,7 +1822,7 @@ webui.suggest.enable = false
# Check if the user has a consistent ip address from the start of the login process
# to the end of the login process. Disabling this check is not recommended unless
-# absolutely necessary as the ip check can be helpful for preventing session
+# absolutely necessary as the ip check can be helpful for preventing session
# hijacking. Possible reasons to set this to false: many-to-many wireless networks
# that prevent consistent ip addresses or complex proxying of requests.
# The default value is set to true.