mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-23 18:03:11 +00:00
[DS-941] Marker ticket for splitting up the dspace.cfg: SWORDv2 now updated to use config/modules/swordv2-server.cfg
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@6616 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -77,7 +77,7 @@ public abstract class AbstractSwordContentIngester implements SwordContentIngest
|
|||||||
protected void setUpdatedDate(Item item, VerboseDescription verboseDescription)
|
protected void setUpdatedDate(Item item, VerboseDescription verboseDescription)
|
||||||
throws DSpaceSwordException
|
throws DSpaceSwordException
|
||||||
{
|
{
|
||||||
String field = ConfigurationManager.getProperty("sword2.updated.field");
|
String field = ConfigurationManager.getProperty("swordv2-manager", "updated.field");
|
||||||
if (field == null || "".equals(field))
|
if (field == null || "".equals(field))
|
||||||
{
|
{
|
||||||
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.updated.field");
|
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.updated.field");
|
||||||
@@ -110,7 +110,7 @@ public abstract class AbstractSwordContentIngester implements SwordContentIngest
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String field = ConfigurationManager.getProperty("sword2.slug.field");
|
String field = ConfigurationManager.getProperty("swordv2-server", "slug.field");
|
||||||
if (field == null || "".equals(field))
|
if (field == null || "".equals(field))
|
||||||
{
|
{
|
||||||
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.slug.field");
|
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.slug.field");
|
||||||
|
@@ -23,9 +23,9 @@ public class AtomStatementDisseminator extends GenericStatementDisseminator impl
|
|||||||
SwordUrlManager urlManager = new SwordUrlManager(new SwordConfigurationDSpace(), context);
|
SwordUrlManager urlManager = new SwordUrlManager(new SwordConfigurationDSpace(), context);
|
||||||
String feedUri = urlManager.getAtomStatementUri(item);
|
String feedUri = urlManager.getAtomStatementUri(item);
|
||||||
|
|
||||||
String authorField = ConfigurationManager.getProperty("sword2.author.field");
|
String authorField = ConfigurationManager.getProperty("swordv2-server", "author.field");
|
||||||
String titleField = ConfigurationManager.getProperty("sword2.title.field");
|
String titleField = ConfigurationManager.getProperty("swordv2-server", "title.field");
|
||||||
String updatedField = ConfigurationManager.getProperty("sword2.updated.field");
|
String updatedField = ConfigurationManager.getProperty("swordv2-server", "updated.field");
|
||||||
|
|
||||||
String author = this.stringMetadata(item, authorField);
|
String author = this.stringMetadata(item, authorField);
|
||||||
String title = this.stringMetadata(item, titleField);
|
String title = this.stringMetadata(item, titleField);
|
||||||
|
@@ -78,7 +78,7 @@ public class CollectionListManagerDSpace extends DSpaceSwordAPI implements Colle
|
|||||||
{
|
{
|
||||||
Entry entry = feed.addEntry();
|
Entry entry = feed.addEntry();
|
||||||
entry.setId(urlManager.getEditIRI(item).toString());
|
entry.setId(urlManager.getEditIRI(item).toString());
|
||||||
String title = this.stringMetadata(item, ConfigurationManager.getProperty("sword2.title.field"));
|
String title = this.stringMetadata(item, ConfigurationManager.getProperty("swordv2-server", "title.field"));
|
||||||
title = title == null? "Untitled" : title;
|
title = title == null? "Untitled" : title;
|
||||||
entry.setTitle(title);
|
entry.setTitle(title);
|
||||||
entry.addLink(urlManager.getContentUrl(item).toString(), "edit-media");
|
entry.addLink(urlManager.getContentUrl(item).toString(), "edit-media");
|
||||||
|
@@ -256,7 +256,7 @@ public class DSpaceSwordAPI
|
|||||||
boolean ignoreAuth = context.ignoreAuthorization();
|
boolean ignoreAuth = context.ignoreAuthorization();
|
||||||
context.setIgnoreAuthorization(true);
|
context.setIgnoreAuthorization(true);
|
||||||
|
|
||||||
String bundleName = ConfigurationManager.getProperty("sword2.bundle.name");
|
String bundleName = ConfigurationManager.getProperty("swordv2-server", "bundle.name");
|
||||||
if (bundleName == null || "".equals(bundleName))
|
if (bundleName == null || "".equals(bundleName))
|
||||||
{
|
{
|
||||||
bundleName = "SWORD";
|
bundleName = "SWORD";
|
||||||
|
@@ -49,7 +49,7 @@ public abstract class GenericStatementDisseminator implements SwordStatementDiss
|
|||||||
{
|
{
|
||||||
// an original deposit is everything in the SWORD bundle
|
// an original deposit is everything in the SWORD bundle
|
||||||
List<OriginalDeposit> originalDeposits = new ArrayList<OriginalDeposit>();
|
List<OriginalDeposit> originalDeposits = new ArrayList<OriginalDeposit>();
|
||||||
String swordBundle = ConfigurationManager.getProperty("sword2.bundle.name");
|
String swordBundle = ConfigurationManager.getProperty("swordv2-server", "bundle.name");
|
||||||
if (swordBundle == null)
|
if (swordBundle == null)
|
||||||
{
|
{
|
||||||
swordBundle = "SWORD";
|
swordBundle = "SWORD";
|
||||||
|
@@ -15,7 +15,6 @@ import org.dspace.content.Item;
|
|||||||
import org.dspace.core.ConfigurationManager;
|
import org.dspace.core.ConfigurationManager;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.core.PluginManager;
|
|
||||||
import org.swordapp.server.DepositReceipt;
|
import org.swordapp.server.DepositReceipt;
|
||||||
import org.swordapp.server.SwordError;
|
import org.swordapp.server.SwordError;
|
||||||
import org.swordapp.server.SwordServerException;
|
import org.swordapp.server.SwordServerException;
|
||||||
@@ -289,7 +288,7 @@ public class ReceiptGenerator
|
|||||||
*/
|
*/
|
||||||
protected void addLastUpdatedDate(DepositResult result, DepositReceipt receipt)
|
protected void addLastUpdatedDate(DepositResult result, DepositReceipt receipt)
|
||||||
{
|
{
|
||||||
String config = ConfigurationManager.getProperty("sword2.updated.field");
|
String config = ConfigurationManager.getProperty("swordv2-server", "updated.field");
|
||||||
DCValue[] dcv = result.getItem().getMetadata(config);
|
DCValue[] dcv = result.getItem().getMetadata(config);
|
||||||
if (dcv != null && dcv.length == 1)
|
if (dcv != null && dcv.length == 1)
|
||||||
{
|
{
|
||||||
@@ -309,7 +308,7 @@ public class ReceiptGenerator
|
|||||||
|
|
||||||
protected void addLastUpdatedDate(Item item, DepositReceipt receipt)
|
protected void addLastUpdatedDate(Item item, DepositReceipt receipt)
|
||||||
{
|
{
|
||||||
String config = ConfigurationManager.getProperty("sword2.updated.field");
|
String config = ConfigurationManager.getProperty("swordv2-server", "updated.field");
|
||||||
DCValue[] dcv = item.getMetadata(config);
|
DCValue[] dcv = item.getMetadata(config);
|
||||||
if (dcv != null && dcv.length == 1)
|
if (dcv != null && dcv.length == 1)
|
||||||
{
|
{
|
||||||
|
@@ -46,7 +46,7 @@ public class ServiceDocumentManagerDSpace implements ServiceDocumentManager
|
|||||||
|
|
||||||
// ensure that this method is allowed
|
// ensure that this method is allowed
|
||||||
WorkflowManagerFactory.getInstance().retrieveServiceDoc(context);
|
WorkflowManagerFactory.getInstance().retrieveServiceDoc(context);
|
||||||
|
|
||||||
if (log.isDebugEnabled())
|
if (log.isDebugEnabled())
|
||||||
{
|
{
|
||||||
log.debug(LogManager.getHeader(context, "sword_do_service_document", ""));
|
log.debug(LogManager.getHeader(context, "sword_do_service_document", ""));
|
||||||
@@ -113,7 +113,7 @@ public class ServiceDocumentManagerDSpace implements ServiceDocumentManager
|
|||||||
workspace.setTitle(ws);
|
workspace.setTitle(ws);
|
||||||
|
|
||||||
// next thing to do is determine whether the default is communities or collections
|
// next thing to do is determine whether the default is communities or collections
|
||||||
boolean swordCommunities = ConfigurationManager.getBooleanProperty("sword2.expose-communities");
|
boolean swordCommunities = ConfigurationManager.getBooleanProperty("swordv2-server", "expose-communities");
|
||||||
|
|
||||||
if (swordCommunities)
|
if (swordCommunities)
|
||||||
{
|
{
|
||||||
@@ -129,12 +129,12 @@ public class ServiceDocumentManagerDSpace implements ServiceDocumentManager
|
|||||||
List<Collection> cols = swordAuth.getAllowedCollections(context);
|
List<Collection> cols = swordAuth.getAllowedCollections(context);
|
||||||
for (Collection col : cols)
|
for (Collection col : cols)
|
||||||
{
|
{
|
||||||
SwordCollection scol = colGen.buildCollection(context.getContext(), col, swordConfig);
|
SwordCollection scol = colGen.buildCollection(context.getContext(), col, swordConfig);
|
||||||
workspace.addCollection(scol);
|
workspace.addCollection(scol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service.addWorkspace(workspace);
|
service.addWorkspace(workspace);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -38,13 +38,13 @@ public class SimpleDCEntryIngester implements SwordEntryIngester
|
|||||||
{
|
{
|
||||||
// we should load our DC map from configuration
|
// we should load our DC map from configuration
|
||||||
this.dcMap = new HashMap<String, String>();
|
this.dcMap = new HashMap<String, String>();
|
||||||
Properties props = ConfigurationManager.getProperties();
|
Properties props = ConfigurationManager.getProperties("swordv2-server");
|
||||||
for (Object key : props.keySet())
|
for (Object key : props.keySet())
|
||||||
{
|
{
|
||||||
String keyString = (String) key;
|
String keyString = (String) key;
|
||||||
if (keyString.startsWith("sword2.simpledc."))
|
if (keyString.startsWith("simpledc."))
|
||||||
{
|
{
|
||||||
String k = keyString.substring("sword2.simpledc.".length());
|
String k = keyString.substring("simpledc.".length());
|
||||||
String v = (String) props.get(key);
|
String v = (String) props.get(key);
|
||||||
this.dcMap.put(k, v);
|
this.dcMap.put(k, v);
|
||||||
}
|
}
|
||||||
@@ -274,7 +274,7 @@ public class SimpleDCEntryIngester implements SwordEntryIngester
|
|||||||
protected void setUpdatedDate(Item item, VerboseDescription verboseDescription)
|
protected void setUpdatedDate(Item item, VerboseDescription verboseDescription)
|
||||||
throws DSpaceSwordException
|
throws DSpaceSwordException
|
||||||
{
|
{
|
||||||
String field = ConfigurationManager.getProperty("sword2.updated.field");
|
String field = ConfigurationManager.getProperty("swordv2-server", "updated.field");
|
||||||
if (field == null || "".equals(field))
|
if (field == null || "".equals(field))
|
||||||
{
|
{
|
||||||
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.updated.field");
|
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.updated.field");
|
||||||
@@ -307,7 +307,7 @@ public class SimpleDCEntryIngester implements SwordEntryIngester
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String field = ConfigurationManager.getProperty("sword2.slug.field");
|
String field = ConfigurationManager.getProperty("swordv2-server", "slug.field");
|
||||||
if (field == null || "".equals(field))
|
if (field == null || "".equals(field))
|
||||||
{
|
{
|
||||||
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.slug.field");
|
throw new DSpaceSwordException("No configuration, or configuration is invalid for: sword.slug.field");
|
||||||
|
@@ -277,7 +277,7 @@ public class SwordAuthenticator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// first find out if we support on-behalf-of deposit
|
// first find out if we support on-behalf-of deposit
|
||||||
boolean mediated = ConfigurationManager.getBooleanProperty("sword.on-behalf-of.enable");
|
boolean mediated = ConfigurationManager.getBooleanProperty("swordv2-server", "on-behalf-of.enable");
|
||||||
if (!mediated && obo != null)
|
if (!mediated && obo != null)
|
||||||
{
|
{
|
||||||
// user is trying to do a mediated deposit on a repository which does not support it
|
// user is trying to do a mediated deposit on a repository which does not support it
|
||||||
|
@@ -64,33 +64,33 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
public SwordConfigurationDSpace()
|
public SwordConfigurationDSpace()
|
||||||
{
|
{
|
||||||
// set the max upload size
|
// set the max upload size
|
||||||
int mus = ConfigurationManager.getIntProperty("sword2.max-upload-size");
|
int mus = ConfigurationManager.getIntProperty("swordv2-server", "max-upload-size");
|
||||||
if (mus > 0)
|
if (mus > 0)
|
||||||
{
|
{
|
||||||
this.maxUploadSize = mus;
|
this.maxUploadSize = mus;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the mediation value
|
// set the mediation value
|
||||||
this.mediated = ConfigurationManager.getBooleanProperty("sword2.on-behalf-of.enable");
|
this.mediated = ConfigurationManager.getBooleanProperty("swordv2-server", "on-behalf-of.enable");
|
||||||
|
|
||||||
// find out if we keep the original as bitstream
|
// find out if we keep the original as bitstream
|
||||||
this.keepOriginal = ConfigurationManager.getBooleanProperty("sword2.keep-original-package");
|
this.keepOriginal = ConfigurationManager.getBooleanProperty("swordv2-server", "keep-original-package");
|
||||||
|
|
||||||
// get the sword bundle
|
// get the sword bundle
|
||||||
String bundle = ConfigurationManager.getProperty("sword2.bundle.name");
|
String bundle = ConfigurationManager.getProperty("swordv2-server", "bundle.name");
|
||||||
if (bundle != null && "".equals(bundle))
|
if (bundle != null && "".equals(bundle))
|
||||||
{
|
{
|
||||||
this.swordBundle = bundle;
|
this.swordBundle = bundle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// find out if we keep the package as a file in specified directory
|
// find out if we keep the package as a file in specified directory
|
||||||
this.keepPackageOnFailedIngest = ConfigurationManager.getBooleanProperty("sword2.keep-package-on-fail", false);
|
this.keepPackageOnFailedIngest = ConfigurationManager.getBooleanProperty("swordv2-server", "keep-package-on-fail", false);
|
||||||
|
|
||||||
// get directory path and name
|
// get directory path and name
|
||||||
this.failedPackageDir = ConfigurationManager.getProperty("sword2.failed-package.dir");
|
this.failedPackageDir = ConfigurationManager.getProperty("swordv2-server", "failed-package.dir");
|
||||||
|
|
||||||
// Get the accepted formats
|
// Get the accepted formats
|
||||||
String acceptsProperty = ConfigurationManager.getProperty("sword2.accepts");
|
String acceptsProperty = ConfigurationManager.getProperty("swordv2-server", "accepts");
|
||||||
swordaccepts = new ArrayList<String>();
|
swordaccepts = new ArrayList<String>();
|
||||||
if (acceptsProperty == null)
|
if (acceptsProperty == null)
|
||||||
{
|
{
|
||||||
@@ -102,10 +102,10 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find out if community deposit is allowed
|
// find out if community deposit is allowed
|
||||||
this.allowCommunityDeposit = ConfigurationManager.getBooleanProperty("sword2.allow-community-deposit");
|
this.allowCommunityDeposit = ConfigurationManager.getBooleanProperty("swordv2-server", "allow-community-deposit");
|
||||||
|
|
||||||
// find out if we keep the package as a file in specified directory
|
// find out if we keep the package as a file in specified directory
|
||||||
this.entryFirst = ConfigurationManager.getBooleanProperty("sword2.multipart.entry-first", false);
|
this.entryFirst = ConfigurationManager.getBooleanProperty("swordv2-server", "multipart.entry-first", false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,9 +113,17 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
// Utilities
|
// Utilities
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public String getStringProperty(String propName, String defaultValue, String[] allowedValues)
|
public String getStringProperty(String module, String propName, String defaultValue, String[] allowedValues)
|
||||||
{
|
{
|
||||||
String cfg = ConfigurationManager.getProperty(propName);
|
String cfg;
|
||||||
|
if (module == null)
|
||||||
|
{
|
||||||
|
cfg = ConfigurationManager.getProperty(propName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cfg = ConfigurationManager.getProperty(module, propName);
|
||||||
|
}
|
||||||
if (cfg == null || "".equals(cfg))
|
if (cfg == null || "".equals(cfg))
|
||||||
{
|
{
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
@@ -142,9 +150,9 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStringProperty(String propName, String defaultValue)
|
public String getStringProperty(String module, String propName, String defaultValue)
|
||||||
{
|
{
|
||||||
return this.getStringProperty(propName, defaultValue, null);
|
return this.getStringProperty(module, propName, defaultValue, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -170,22 +178,22 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
|
|
||||||
public String generator()
|
public String generator()
|
||||||
{
|
{
|
||||||
return this.getStringProperty("sword2.generator.url", DSpaceUriRegistry.DSPACE_SWORD_NS);
|
return this.getStringProperty("swordv2-server", "generator.url", DSpaceUriRegistry.DSPACE_SWORD_NS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String generatorVersion()
|
public String generatorVersion()
|
||||||
{
|
{
|
||||||
return this.getStringProperty("sword2.generator.version", "2.0");
|
return this.getStringProperty("swordv2-server", "generator.version", "2.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String administratorEmail()
|
public String administratorEmail()
|
||||||
{
|
{
|
||||||
return this.getStringProperty("mail.admin", null);
|
return this.getStringProperty(null, "mail.admin", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAuthType()
|
public String getAuthType()
|
||||||
{
|
{
|
||||||
return this.getStringProperty("sword2.auth-type", "Basic", new String[] { "Basic", "None" } );
|
return this.getStringProperty("swordv2-server", "auth-type", "Basic", new String[] { "Basic", "None" } );
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean storeAndCheckBinary()
|
public boolean storeAndCheckBinary()
|
||||||
@@ -195,7 +203,7 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
|
|
||||||
public String getTempDirectory()
|
public String getTempDirectory()
|
||||||
{
|
{
|
||||||
return this.getStringProperty("sword2.upload.tempdir", null);
|
return this.getStringProperty("swordv2-server", "upload.tempdir", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -210,12 +218,12 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
public List<String> getDisseminatePackaging()
|
public List<String> getDisseminatePackaging()
|
||||||
{
|
{
|
||||||
List<String> dps = new ArrayList<String>();
|
List<String> dps = new ArrayList<String>();
|
||||||
Properties props = ConfigurationManager.getProperties();
|
Properties props = ConfigurationManager.getProperties("swordv2-server");
|
||||||
Set keyset = props.keySet();
|
Set keyset = props.keySet();
|
||||||
for (Object keyObj : keyset)
|
for (Object keyObj : keyset)
|
||||||
{
|
{
|
||||||
// start by getting anything that starts with sword.disseminate-packging.
|
// start by getting anything that starts with sword.disseminate-packging.
|
||||||
String sw = "sword2.disseminate-packaging.";
|
String sw = "disseminate-packaging.";
|
||||||
|
|
||||||
if (!(keyObj instanceof String))
|
if (!(keyObj instanceof String))
|
||||||
{
|
{
|
||||||
@@ -454,18 +462,18 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
*/
|
*/
|
||||||
public List<String> getAcceptPackaging(Collection col)
|
public List<String> getAcceptPackaging(Collection col)
|
||||||
{
|
{
|
||||||
// sword2.accept-packaging.METSDSpaceSIP = http://purl.org/net/sword-types/METSDSpaceSIP
|
// accept-packaging.METSDSpaceSIP = http://purl.org/net/sword-types/METSDSpaceSIP
|
||||||
// sword2.accept-packaging.[handle].METSDSpaceSIP = http://purl.org/net/sword-types/METSDSpaceSIP
|
// accept-packaging.[handle].METSDSpaceSIP = http://purl.org/net/sword-types/METSDSpaceSIP
|
||||||
String handle = col.getHandle();
|
String handle = col.getHandle();
|
||||||
List<String> aps = new ArrayList<String>();
|
List<String> aps = new ArrayList<String>();
|
||||||
|
|
||||||
// build the holding maps of identifiers
|
// build the holding maps of identifiers
|
||||||
Properties props = ConfigurationManager.getProperties();
|
Properties props = ConfigurationManager.getProperties("swordv2-server");
|
||||||
Set keyset = props.keySet();
|
Set keyset = props.keySet();
|
||||||
for (Object keyObj : keyset)
|
for (Object keyObj : keyset)
|
||||||
{
|
{
|
||||||
// start by getting anything that starts with sword.accept-packging.collection.
|
// start by getting anything that starts with sword.accept-packaging.collection.
|
||||||
String sw = "sword2.accept-packaging.collection.";
|
String sw = "accept-packaging.collection.";
|
||||||
|
|
||||||
if (!(keyObj instanceof String))
|
if (!(keyObj instanceof String))
|
||||||
{
|
{
|
||||||
@@ -513,12 +521,12 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
List<String> aps = new ArrayList<String>();
|
List<String> aps = new ArrayList<String>();
|
||||||
|
|
||||||
// build the holding maps of identifiers
|
// build the holding maps of identifiers
|
||||||
Properties props = ConfigurationManager.getProperties();
|
Properties props = ConfigurationManager.getProperties("swordv2-server");
|
||||||
Set keyset = props.keySet();
|
Set keyset = props.keySet();
|
||||||
for (Object keyObj : keyset)
|
for (Object keyObj : keyset)
|
||||||
{
|
{
|
||||||
// start by getting anything that starts with sword.accept-packging.collection.
|
// start by getting anything that starts with sword.accept-packging.collection.
|
||||||
String sw = "sword2.accept-packaging.item.";
|
String sw = "accept-packaging.item.";
|
||||||
|
|
||||||
if (!(keyObj instanceof String))
|
if (!(keyObj instanceof String))
|
||||||
{
|
{
|
||||||
@@ -599,11 +607,11 @@ public class SwordConfigurationDSpace implements SwordConfiguration
|
|||||||
|
|
||||||
public String getStateUri(String state)
|
public String getStateUri(String state)
|
||||||
{
|
{
|
||||||
return ConfigurationManager.getProperty("sword2.state." + state + ".uri");
|
return ConfigurationManager.getProperty("swordv2-server", "state." + state + ".uri");
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStateDescription(String state)
|
public String getStateDescription(String state)
|
||||||
{
|
{
|
||||||
return ConfigurationManager.getProperty("sword2.state." + state + ".description");
|
return ConfigurationManager.getProperty("swordv2-server", "state." + state + ".description");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ public class SwordDisseminatorFactory
|
|||||||
{
|
{
|
||||||
format = format.replace(";", "_"); // clean up the string for the plugin manager
|
format = format.replace(";", "_"); // clean up the string for the plugin manager
|
||||||
format = format.replace("=", "_"); // clean up the string for the plugin manager
|
format = format.replace("=", "_"); // clean up the string for the plugin manager
|
||||||
disseminator = (SwordContentDisseminator) PluginManager.getNamedPlugin(SwordContentDisseminator.class, format);
|
disseminator = (SwordContentDisseminator) PluginManager.getNamedPlugin("swordv2-server", SwordContentDisseminator.class, format);
|
||||||
if (disseminator == null)
|
if (disseminator == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@@ -63,7 +63,7 @@ public class SwordDisseminatorFactory
|
|||||||
{
|
{
|
||||||
acceptPackaging = acceptPackaging.replace(";", "_"); // clean up the string for the plugin manager
|
acceptPackaging = acceptPackaging.replace(";", "_"); // clean up the string for the plugin manager
|
||||||
acceptPackaging = acceptPackaging.replace("=", "_"); // clean up the string for the plugin manager
|
acceptPackaging = acceptPackaging.replace("=", "_"); // clean up the string for the plugin manager
|
||||||
disseminator = (SwordContentDisseminator) PluginManager.getNamedPlugin(SwordContentDisseminator.class, acceptPackaging);
|
disseminator = (SwordContentDisseminator) PluginManager.getNamedPlugin("swordv2-server", SwordContentDisseminator.class, acceptPackaging);
|
||||||
if (disseminator != null)
|
if (disseminator != null)
|
||||||
{
|
{
|
||||||
if (accept != null)
|
if (accept != null)
|
||||||
@@ -115,7 +115,7 @@ public class SwordDisseminatorFactory
|
|||||||
{
|
{
|
||||||
format = format.replace(";", "_"); // clean up the string for the plugin manager
|
format = format.replace(";", "_"); // clean up the string for the plugin manager
|
||||||
format = format.replace("=", "_"); // clean up the string for the plugin manager
|
format = format.replace("=", "_"); // clean up the string for the plugin manager
|
||||||
disseminator = (SwordStatementDisseminator) PluginManager.getNamedPlugin(SwordStatementDisseminator.class, format);
|
disseminator = (SwordStatementDisseminator) PluginManager.getNamedPlugin("swordv2-server", SwordStatementDisseminator.class, format);
|
||||||
if (disseminator != null)
|
if (disseminator != null)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@@ -135,7 +135,7 @@ public class SwordDisseminatorFactory
|
|||||||
public static SwordEntryDisseminator getEntryInstance()
|
public static SwordEntryDisseminator getEntryInstance()
|
||||||
throws DSpaceSwordException, SwordError
|
throws DSpaceSwordException, SwordError
|
||||||
{
|
{
|
||||||
SwordEntryDisseminator disseminator = (SwordEntryDisseminator) PluginManager.getSinglePlugin(SwordEntryDisseminator.class);
|
SwordEntryDisseminator disseminator = (SwordEntryDisseminator) PluginManager.getSinglePlugin("swordv2-server", SwordEntryDisseminator.class);
|
||||||
if (disseminator == null)
|
if (disseminator == null)
|
||||||
{
|
{
|
||||||
throw new SwordError(DSpaceUriRegistry.REPOSITORY_ERROR, "No disseminator configured for handling sword entry documents");
|
throw new SwordError(DSpaceUriRegistry.REPOSITORY_ERROR, "No disseminator configured for handling sword entry documents");
|
||||||
|
@@ -46,7 +46,7 @@ public class SwordIngesterFactory
|
|||||||
SwordContentIngester ingester = null;
|
SwordContentIngester ingester = null;
|
||||||
|
|
||||||
// first look to see if there's an intester for the content type
|
// first look to see if there's an intester for the content type
|
||||||
ingester = (SwordContentIngester) PluginManager.getNamedPlugin(SwordContentIngester.class, deposit.getMimeType());
|
ingester = (SwordContentIngester) PluginManager.getNamedPlugin("swordv2-server", SwordContentIngester.class, deposit.getMimeType());
|
||||||
if (ingester != null)
|
if (ingester != null)
|
||||||
{
|
{
|
||||||
return ingester;
|
return ingester;
|
||||||
@@ -54,7 +54,7 @@ public class SwordIngesterFactory
|
|||||||
|
|
||||||
// if no ingester, then
|
// if no ingester, then
|
||||||
// look to see if there's an ingester for the package format
|
// look to see if there's an ingester for the package format
|
||||||
ingester = (SwordContentIngester) PluginManager.getNamedPlugin(SwordContentIngester.class, deposit.getPackaging());
|
ingester = (SwordContentIngester) PluginManager.getNamedPlugin("swordv2-server", SwordContentIngester.class, deposit.getPackaging());
|
||||||
if (ingester == null)
|
if (ingester == null)
|
||||||
{
|
{
|
||||||
throw new SwordError(UriRegistry.ERROR_CONTENT, "No ingester configured for this package type");
|
throw new SwordError(UriRegistry.ERROR_CONTENT, "No ingester configured for this package type");
|
||||||
@@ -65,7 +65,7 @@ public class SwordIngesterFactory
|
|||||||
public static SwordEntryIngester getEntryInstance(Context context, Deposit deposit, DSpaceObject dso)
|
public static SwordEntryIngester getEntryInstance(Context context, Deposit deposit, DSpaceObject dso)
|
||||||
throws DSpaceSwordException, SwordError
|
throws DSpaceSwordException, SwordError
|
||||||
{
|
{
|
||||||
SwordEntryIngester ingester = (SwordEntryIngester) PluginManager.getSinglePlugin(SwordEntryIngester.class);
|
SwordEntryIngester ingester = (SwordEntryIngester) PluginManager.getSinglePlugin("swordv2-server", SwordEntryIngester.class);
|
||||||
if (ingester == null)
|
if (ingester == null)
|
||||||
{
|
{
|
||||||
throw new SwordError(UriRegistry.ERROR_CONTENT, "No ingester configured for handling sword entry documents");
|
throw new SwordError(UriRegistry.ERROR_CONTENT, "No ingester configured for handling sword entry documents");
|
||||||
|
@@ -59,14 +59,14 @@ public class SwordMETSContentIngester extends AbstractSwordContentIngester
|
|||||||
File depositFile = deposit.getFile();
|
File depositFile = deposit.getFile();
|
||||||
|
|
||||||
// load the plugin manager for the required configuration
|
// load the plugin manager for the required configuration
|
||||||
String cfg = ConfigurationManager.getProperty("sword2.mets-ingester.package-ingester");
|
String cfg = ConfigurationManager.getProperty("swordv2-server", "mets-ingester.package-ingester");
|
||||||
if (cfg == null || "".equals(cfg))
|
if (cfg == null || "".equals(cfg))
|
||||||
{
|
{
|
||||||
cfg = "METS"; // default to METS
|
cfg = "METS"; // default to METS
|
||||||
}
|
}
|
||||||
verboseDescription.append("Using package manifest format: " + cfg);
|
verboseDescription.append("Using package manifest format: " + cfg);
|
||||||
|
|
||||||
PackageIngester pi = (PackageIngester) PluginManager.getNamedPlugin(PackageIngester.class, cfg);
|
PackageIngester pi = (PackageIngester)PluginManager.getNamedPlugin("swordv2-server", PackageIngester.class, cfg);
|
||||||
verboseDescription.append("Loaded package ingester: " + pi.getClass().getName());
|
verboseDescription.append("Loaded package ingester: " + pi.getClass().getName());
|
||||||
|
|
||||||
// the licence is either in the zip or the mets manifest. Either way
|
// the licence is either in the zip or the mets manifest. Either way
|
||||||
@@ -79,7 +79,7 @@ public class SwordMETSContentIngester extends AbstractSwordContentIngester
|
|||||||
params.setWorkflowEnabled(true);
|
params.setWorkflowEnabled(true);
|
||||||
|
|
||||||
// Should restore mode be enabled, i.e. keep existing handle?
|
// Should restore mode be enabled, i.e. keep existing handle?
|
||||||
if (ConfigurationManager.getBooleanProperty("sword2.restore-mode.enable",false))
|
if (ConfigurationManager.getBooleanProperty("swordv2-server", "restore-mode.enable",false))
|
||||||
params.setRestoreModeEnabled(true);
|
params.setRestoreModeEnabled(true);
|
||||||
|
|
||||||
// ingest the item from the temp file
|
// ingest the item from the temp file
|
||||||
|
@@ -80,7 +80,7 @@ public class SwordUrlManager
|
|||||||
public String getSwordBaseUrl()
|
public String getSwordBaseUrl()
|
||||||
throws DSpaceSwordException
|
throws DSpaceSwordException
|
||||||
{
|
{
|
||||||
String sUrl = ConfigurationManager.getProperty("sword2.url");
|
String sUrl = ConfigurationManager.getProperty("swordv2-server", "url");
|
||||||
if (sUrl == null || "".equals(sUrl))
|
if (sUrl == null || "".equals(sUrl))
|
||||||
{
|
{
|
||||||
String dspaceUrl = ConfigurationManager.getProperty("dspace.baseUrl");
|
String dspaceUrl = ConfigurationManager.getProperty("dspace.baseUrl");
|
||||||
@@ -313,20 +313,20 @@ public class SwordUrlManager
|
|||||||
public String getBaseServiceDocumentUrl()
|
public String getBaseServiceDocumentUrl()
|
||||||
throws DSpaceSwordException
|
throws DSpaceSwordException
|
||||||
{
|
{
|
||||||
String sdUrl = ConfigurationManager.getProperty("sword2.servicedocument.url");
|
String sdUrl = ConfigurationManager.getProperty("swordv2-server", "servicedocument.url");
|
||||||
if (sdUrl == null || "".equals(sdUrl))
|
if (sdUrl == null || "".equals(sdUrl))
|
||||||
{
|
{
|
||||||
String dspaceUrl = ConfigurationManager.getProperty("dspace.baseUrl");
|
String dspaceUrl = ConfigurationManager.getProperty("dspace.baseUrl");
|
||||||
if (dspaceUrl == null || "".equals(dspaceUrl))
|
if (dspaceUrl == null || "".equals(dspaceUrl))
|
||||||
{
|
{
|
||||||
throw new DSpaceSwordException("Unable to construct service document urls, due to missing/invalid " +
|
throw new DSpaceSwordException("Unable to construct service document urls, due to missing/invalid " +
|
||||||
"config in sword2.servicedocument.url and/or dspace.baseUrl");
|
"config in swordv2-server.cfg servicedocument.url and/or dspace.baseUrl");
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
URL url = new URL(dspaceUrl);
|
URL url = new URL(dspaceUrl);
|
||||||
sdUrl = new URL(url.getProtocol(), url.getHost(), url.getPort(), "/sword2/servicedocument").toString();
|
sdUrl = new URL(url.getProtocol(), url.getHost(), url.getPort(), "/swordv2/servicedocument").toString();
|
||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
@@ -356,20 +356,20 @@ public class SwordUrlManager
|
|||||||
public String getBaseCollectionUrl()
|
public String getBaseCollectionUrl()
|
||||||
throws DSpaceSwordException
|
throws DSpaceSwordException
|
||||||
{
|
{
|
||||||
String depositUrl = ConfigurationManager.getProperty("sword2.collection.url");
|
String depositUrl = ConfigurationManager.getProperty("swordv2-server", "collection.url");
|
||||||
if (depositUrl == null || "".equals(depositUrl))
|
if (depositUrl == null || "".equals(depositUrl))
|
||||||
{
|
{
|
||||||
String dspaceUrl = ConfigurationManager.getProperty("dspace.baseUrl");
|
String dspaceUrl = ConfigurationManager.getProperty("dspace.baseUrl");
|
||||||
if (dspaceUrl == null || "".equals(dspaceUrl))
|
if (dspaceUrl == null || "".equals(dspaceUrl))
|
||||||
{
|
{
|
||||||
throw new DSpaceSwordException("Unable to construct deposit urls, due to missing/invalid config in " +
|
throw new DSpaceSwordException("Unable to construct deposit urls, due to missing/invalid config in " +
|
||||||
"sword2.deposit.url and/or dspace.baseUrl");
|
"swordv2-server.cfg deposit.url and/or dspace.baseUrl");
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
URL url = new URL(dspaceUrl);
|
URL url = new URL(dspaceUrl);
|
||||||
depositUrl = new URL(url.getProtocol(), url.getHost(), url.getPort(), "/sword2/collection").toString();
|
depositUrl = new URL(url.getProtocol(), url.getHost(), url.getPort(), "/swordv2/collection").toString();
|
||||||
}
|
}
|
||||||
catch (MalformedURLException e)
|
catch (MalformedURLException e)
|
||||||
{
|
{
|
||||||
|
@@ -23,7 +23,7 @@ public class VersionManager
|
|||||||
public void emptyBundle(Item item, String name)
|
public void emptyBundle(Item item, String name)
|
||||||
throws SQLException, AuthorizeException, IOException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
boolean keep = ConfigurationManager.getBooleanProperty("sword2.versions.keep");
|
boolean keep = ConfigurationManager.getBooleanProperty("swordv2-server", "versions.keep");
|
||||||
Bundle[] bundles = item.getBundles(name);
|
Bundle[] bundles = item.getBundles(name);
|
||||||
for (Bundle b : bundles)
|
for (Bundle b : bundles)
|
||||||
{
|
{
|
||||||
@@ -34,7 +34,7 @@ public class VersionManager
|
|||||||
public void emptyBundle(Item item, Bundle source)
|
public void emptyBundle(Item item, Bundle source)
|
||||||
throws SQLException, AuthorizeException, IOException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
boolean keep = ConfigurationManager.getBooleanProperty("sword2.versions.keep");
|
boolean keep = ConfigurationManager.getBooleanProperty("swordv2-server", "versions.keep");
|
||||||
this.emptyBundle(item, source, keep);
|
this.emptyBundle(item, source, keep);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ public class VersionManager
|
|||||||
public void removeBitstream(Item item, Bitstream bitstream)
|
public void removeBitstream(Item item, Bitstream bitstream)
|
||||||
throws SQLException, AuthorizeException, IOException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
boolean keep = ConfigurationManager.getBooleanProperty("sword2.versions.keep");
|
boolean keep = ConfigurationManager.getBooleanProperty("swordv2-server", "versions.keep");
|
||||||
this.removeBitstream(item, bitstream, keep);
|
this.removeBitstream(item, bitstream, keep);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ public class VersionManager
|
|||||||
public Bundle archiveBitstream(Item item, Bitstream bitstream)
|
public Bundle archiveBitstream(Item item, Bitstream bitstream)
|
||||||
throws SQLException, AuthorizeException, IOException
|
throws SQLException, AuthorizeException, IOException
|
||||||
{
|
{
|
||||||
String swordBundle = ConfigurationManager.getProperty("sword2.bundle.name");
|
String swordBundle = ConfigurationManager.getProperty("swordv2-server", "bundle.name");
|
||||||
if (swordBundle == null)
|
if (swordBundle == null)
|
||||||
{
|
{
|
||||||
swordBundle = "SWORD";
|
swordBundle = "SWORD";
|
||||||
|
@@ -7,15 +7,19 @@
|
|||||||
*/
|
*/
|
||||||
package org.dspace.sword2;
|
package org.dspace.sword2;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.core.PluginManager;
|
import org.dspace.core.PluginManager;
|
||||||
import org.swordapp.server.SwordError;
|
import org.swordapp.server.SwordError;
|
||||||
|
|
||||||
public class WorkflowManagerFactory
|
public class WorkflowManagerFactory
|
||||||
{
|
{
|
||||||
public static WorkflowManager getInstance()
|
/** logger */
|
||||||
|
private static Logger log = Logger.getLogger(WorkflowManagerFactory.class);
|
||||||
|
|
||||||
|
public static WorkflowManager getInstance()
|
||||||
throws DSpaceSwordException, SwordError
|
throws DSpaceSwordException, SwordError
|
||||||
{
|
{
|
||||||
WorkflowManager manager = (WorkflowManager) PluginManager.getSinglePlugin(WorkflowManager.class);
|
WorkflowManager manager = (WorkflowManager) PluginManager.getSinglePlugin("swordv2-server", WorkflowManager.class);
|
||||||
if (manager == null)
|
if (manager == null)
|
||||||
{
|
{
|
||||||
throw new SwordError(DSpaceUriRegistry.REPOSITORY_ERROR, "No workflow manager configured");
|
throw new SwordError(DSpaceUriRegistry.REPOSITORY_ERROR, "No workflow manager configured");
|
||||||
|
@@ -172,7 +172,7 @@ public class WorkflowTools
|
|||||||
WorkspaceItem wsi = this.getWorkspaceItem(context, item);
|
WorkspaceItem wsi = this.getWorkspaceItem(context, item);
|
||||||
|
|
||||||
// kick off the workflow
|
// kick off the workflow
|
||||||
boolean notify = ConfigurationManager.getBooleanProperty("sword2.workflow.notify");
|
boolean notify = ConfigurationManager.getBooleanProperty("swordv2-server", "workflow.notify");
|
||||||
if (notify)
|
if (notify)
|
||||||
{
|
{
|
||||||
WorkflowManager.start(context, wsi);
|
WorkflowManager.start(context, wsi);
|
||||||
|
@@ -1,65 +1,65 @@
|
|||||||
#---------------------------------------------------------------#
|
#---------------------------------------------------------------#
|
||||||
#--------------SWORD 2.0 SPECIFIC CONFIGURATIONS----------------#
|
#-------------------SWORD 2.0 CONFIGURATIONS-------------------#
|
||||||
#---------------------------------------------------------------#
|
#---------------------------------------------------------------#
|
||||||
# These configs are only used by the SWORD 2.0 interface #
|
# These configs are only used by the SWORD 2.0 interface #
|
||||||
#---------------------------------------------------------------#
|
#---------------------------------------------------------------#
|
||||||
|
|
||||||
# the base url of the sword 2.0 system
|
# the base url of the sword 2.0 system
|
||||||
#
|
#
|
||||||
# the default if {dspace.url}/sword2
|
# the default if {dspace.url}/swordv2
|
||||||
#
|
#
|
||||||
#sword2.url = http://www.myu.ac.uk/sword2
|
#url = http://www.myu.ac.uk/swordv2
|
||||||
|
|
||||||
# The base URL of the SWORD collection. This is the URL from
|
# The base URL of the SWORD collection. This is the URL from
|
||||||
# which DSpace will construct the deposit location urls for
|
# which DSpace will construct the deposit location urls for
|
||||||
# collections.
|
# collections.
|
||||||
#
|
#
|
||||||
# The default is {dspace.url}/sword2/collection
|
# The default is {dspace.url}/swordv2/collection
|
||||||
#
|
#
|
||||||
# In the event that you are not deploying DSpace as the ROOT
|
# In the event that you are not deploying DSpace as the ROOT
|
||||||
# application in the servlet container, this will generate
|
# application in the servlet container, this will generate
|
||||||
# incorrect URLs, and you should override the functionality
|
# incorrect URLs, and you should override the functionality
|
||||||
# by specifying in full as below:
|
# by specifying in full as below:
|
||||||
#
|
#
|
||||||
# sword2.collection.url = http://www.myu.ac.uk/sword2/collection
|
# collection.url = http://www.myu.ac.uk/swordv2/collection
|
||||||
|
|
||||||
# The base URL of the SWORD service document. This is the
|
# The base URL of the SWORD service document. This is the
|
||||||
# URL from which DSpace will construct the service document
|
# URL from which DSpace will construct the service document
|
||||||
# location urls for the site, and for individual collections
|
# location urls for the site, and for individual collections
|
||||||
#
|
#
|
||||||
# The default is {dspace.url}/sword2/servicedocument
|
# The default is {dspace.url}/swordv2/servicedocument
|
||||||
#
|
#
|
||||||
# In the event that you are not deploying DSpace as the ROOT
|
# In the event that you are not deploying DSpace as the ROOT
|
||||||
# application in the servlet container, this will generate
|
# application in the servlet container, this will generate
|
||||||
# incorrect URLs, and you should override the functionality
|
# incorrect URLs, and you should override the functionality
|
||||||
# by specifying in full as below:
|
# by specifying in full as below:
|
||||||
#
|
#
|
||||||
# sword2.servicedocument.url = http://www.myu.ac.uk/sword2/servicedocument
|
# servicedocument.url = http://www.myu.ac.uk/swordv2/servicedocument
|
||||||
|
|
||||||
# The accept packaging properties, along with their associated
|
# The accept packaging properties, along with their associated
|
||||||
# quality values where appropriate.
|
# quality values where appropriate.
|
||||||
#
|
#
|
||||||
# Global settings; these will be used on all DSpace collections
|
# Global settings; these will be used on all DSpace collections
|
||||||
#
|
#
|
||||||
sword2.accept-packaging.collection.METSDSpaceSIP = http://purl.org/net/sword/package/METSDSpaceSIP
|
accept-packaging.collection.METSDSpaceSIP = http://purl.org/net/sword/package/METSDSpaceSIP
|
||||||
sword2.accept-packaging.collection.SimpleZip = http://purl.org/net/sword/package/SimpleZip
|
accept-packaging.collection.SimpleZip = http://purl.org/net/sword/package/SimpleZip
|
||||||
sword2.accept-packaging.collection.Binary = http://purl.org/net/sword/package/Binary
|
accept-packaging.collection.Binary = http://purl.org/net/sword/package/Binary
|
||||||
|
|
||||||
# The accept packaging properties for items. This is used to determine
|
# The accept packaging properties for items. This is used to determine
|
||||||
# which package types are acceptable to deposit into an existing item,
|
# which package types are acceptable to deposit into an existing item,
|
||||||
# either adding to or replacing the media resource
|
# either adding to or replacing the media resource
|
||||||
#
|
#
|
||||||
sword2.accept-packaging.item.METSDSpaceSIP = http://purl.org/net/sword/package/METSDSpaceSIP
|
accept-packaging.item.METSDSpaceSIP = http://purl.org/net/sword/package/METSDSpaceSIP
|
||||||
sword2.accept-packaging.item.SimpleZip = http://purl.org/net/sword/package/SimpleZip
|
accept-packaging.item.SimpleZip = http://purl.org/net/sword/package/SimpleZip
|
||||||
sword2.accept-packaging.item.Binary = http://purl.org/net/sword/package/Binary
|
accept-packaging.item.Binary = http://purl.org/net/sword/package/Binary
|
||||||
|
|
||||||
# A comma separated list of MIME types that SWORD will accept
|
# A comma separated list of MIME types that SWORD will accept
|
||||||
sword2.accepts = application/zip, image/jpeg
|
accepts = application/zip, image/jpeg
|
||||||
|
|
||||||
# Collection Specific settings: these will be used on the collections
|
# Collection Specific settings: these will be used on the collections
|
||||||
# with the given handles
|
# with the given handles
|
||||||
#
|
#
|
||||||
#sword2.accept-packaging.collection.[handle].METSDSpaceSIP = http://purl.org/net/sword-types/METSDSpaceSIP
|
#accept-packaging.collection.[handle].METSDSpaceSIP = http://purl.org/net/sword-types/METSDSpaceSIP
|
||||||
|
|
||||||
# Should the server offer as the default the list of all Communities
|
# Should the server offer as the default the list of all Communities
|
||||||
# to a Service Document request. If false, the server will offer
|
# to a Service Document request. If false, the server will offer
|
||||||
@@ -70,7 +70,7 @@ sword2.accepts = application/zip, image/jpeg
|
|||||||
# deposit targets, and the client will need to request the list of
|
# deposit targets, and the client will need to request the list of
|
||||||
# Collections in the target before deposit can continue
|
# Collections in the target before deposit can continue
|
||||||
#
|
#
|
||||||
sword2.expose-communities = false
|
expose-communities = false
|
||||||
|
|
||||||
# The maximum upload size of a package through the sword interface,
|
# The maximum upload size of a package through the sword interface,
|
||||||
# in bytes
|
# in bytes
|
||||||
@@ -80,7 +80,7 @@ sword2.expose-communities = false
|
|||||||
# for an individual file upload through the user interface. If not
|
# for an individual file upload through the user interface. If not
|
||||||
# set, or set to 0, the sword service will default to no limit.
|
# set, or set to 0, the sword service will default to no limit.
|
||||||
#
|
#
|
||||||
sword2.max-upload-size = 0
|
max-upload-size = 0
|
||||||
|
|
||||||
# Should DSpace store a copy of the original sword deposit package?
|
# Should DSpace store a copy of the original sword deposit package?
|
||||||
#
|
#
|
||||||
@@ -90,18 +90,18 @@ sword2.max-upload-size = 0
|
|||||||
# recoverable in their original form. It is strongly recommended,
|
# recoverable in their original form. It is strongly recommended,
|
||||||
# therefore, to leave this option turned on
|
# therefore, to leave this option turned on
|
||||||
#
|
#
|
||||||
sword2.keep-original-package = true
|
keep-original-package = true
|
||||||
|
|
||||||
# The bundle name that SWORD should store incoming packages under if
|
# The bundle name that SWORD should store incoming packages under if
|
||||||
# sword.keep-original-package is set to true. The default is "SWORD"
|
# sword.keep-original-package is set to true. The default is "SWORD"
|
||||||
# if not value is set
|
# if not value is set
|
||||||
#
|
#
|
||||||
# sword2.bundle.name = SWORD
|
# bundle.name = SWORD
|
||||||
|
|
||||||
# In the event of package ingest failure, provide an option to store
|
# In the event of package ingest failure, provide an option to store
|
||||||
# the package on the file system. The default is false.
|
# the package on the file system. The default is false.
|
||||||
#sword2.keep-package-on-fail=false
|
#keep-package-on-fail=false
|
||||||
#sword2.failed-package.dir=${dspace.baseUrl}/upload
|
#failed-package.dir=http://localhost:8080/upload
|
||||||
|
|
||||||
# Should we support mediated deposit via sword? Enabled, this will
|
# Should we support mediated deposit via sword? Enabled, this will
|
||||||
# allow users to deposit content packages on behalf of other users.
|
# allow users to deposit content packages on behalf of other users.
|
||||||
@@ -109,7 +109,7 @@ sword2.keep-original-package = true
|
|||||||
# See the SWORD specification for a detailed explanation of deposit
|
# See the SWORD specification for a detailed explanation of deposit
|
||||||
# On-Behalf-Of another user
|
# On-Behalf-Of another user
|
||||||
#
|
#
|
||||||
sword2.on-behalf-of.enable = true
|
on-behalf-of.enable = true
|
||||||
|
|
||||||
# The URL which identifies the sword software which provides
|
# The URL which identifies the sword software which provides
|
||||||
# the sword interface. This is the URL which DSpace will use
|
# the sword interface. This is the URL which DSpace will use
|
||||||
@@ -117,38 +117,38 @@ sword2.on-behalf-of.enable = true
|
|||||||
#
|
#
|
||||||
# The default is:
|
# The default is:
|
||||||
#
|
#
|
||||||
# http://www.dspace.org/ns/sword/1.3.1
|
# http://www.dspace.org/ns/sword/2.0/
|
||||||
#
|
#
|
||||||
# If you have modified your sword software, you should change
|
# If you have modified your sword software, you should change
|
||||||
# this URI to identify your own version. If you are using the
|
# this URI to identify your own version. If you are using the
|
||||||
# standard dspace-sword module you will not, in general, need
|
# standard dspace-sword module you will not, in general, need
|
||||||
# to change this setting
|
# to change this setting
|
||||||
#
|
#
|
||||||
# sword2.generator.url = http://www.dspace.org/ns/sword/2.0/
|
# generator.url = http://www.dspace.org/ns/sword/2.0/
|
||||||
|
|
||||||
sword2.auth-type = Basic
|
auth-type = Basic
|
||||||
|
|
||||||
sword2.generator.version = 2.0
|
generator.version = 2.0
|
||||||
|
|
||||||
sword2.allow-community-deposit = false
|
allow-community-deposit = false
|
||||||
|
|
||||||
sword2.upload.tempdir = ${dspace.dir}/upload
|
upload.tempdir = /dspace/upload
|
||||||
|
|
||||||
# The metadata field in which to store the updated date for
|
# The metadata field in which to store the updated date for
|
||||||
# items deposited via SWORD.
|
# items deposited via SWORD.
|
||||||
#
|
#
|
||||||
sword2.updated.field = dc.date.updated
|
updated.field = dc.date.updated
|
||||||
|
|
||||||
# The metadata field in which to store the value of the slug
|
# The metadata field in which to store the value of the slug
|
||||||
# header if it is supplied
|
# header if it is supplied
|
||||||
#
|
#
|
||||||
sword2.slug.field = dc.identifier.slug
|
slug.field = dc.identifier.slug
|
||||||
|
|
||||||
sword2.author.field = dc.contributor.author
|
author.field = dc.contributor.author
|
||||||
sword2.title.field = dc.title
|
title.field = dc.title
|
||||||
|
|
||||||
sword2.disseminate-packaging.METSDSpaceSIP = http://purl.org/net/sword/package/METSDSpaceSIP
|
disseminate-packaging.METSDSpaceSIP = http://purl.org/net/sword/package/METSDSpaceSIP
|
||||||
sword2.disseminate-packaging.SimpleZip = http://purl.org/net/sword/package/SimpleZip
|
disseminate-packaging.SimpleZip = http://purl.org/net/sword/package/SimpleZip
|
||||||
|
|
||||||
# Configure the plugins to process incoming packages. The form of this
|
# Configure the plugins to process incoming packages. The form of this
|
||||||
# configuration is as per the Plugin Manager's Named Plugin documentation:
|
# configuration is as per the Plugin Manager's Named Plugin documentation:
|
||||||
@@ -208,72 +208,72 @@ plugin.single.org.dspace.sword2.WorkflowManager = \
|
|||||||
#
|
#
|
||||||
# The default is METS
|
# The default is METS
|
||||||
#
|
#
|
||||||
# sword2.mets-ingester.package-ingester = METS
|
# mets-ingester.package-ingester = METS
|
||||||
|
|
||||||
# Should the sword server enable restore-mode when ingesting new
|
# Should the sword server enable restore-mode when ingesting new
|
||||||
# packages. If this is enabled the item will be treated as a
|
# packages. If this is enabled the item will be treated as a
|
||||||
# previously deleted item from the repository. If the item had
|
# previously deleted item from the repository. If the item had
|
||||||
# previously been assigned a handle then that same handle will be
|
# previously been assigned a handle then that same handle will be
|
||||||
# restored to activity.
|
# restored to activity.
|
||||||
sword2.restore-mode.enable = false
|
restore-mode.enable = false
|
||||||
|
|
||||||
# metadata field mapping for SimpleDCEntryIngester
|
# metadata field mapping for SimpleDCEntryIngester
|
||||||
#
|
#
|
||||||
sword2.simpledc.abstract = dc.description.abstract
|
simpledc.abstract = dc.description.abstract
|
||||||
sword2.simpledc.accessRights = dc.rights
|
simpledc.accessRights = dc.rights
|
||||||
#sword2.simpledc.accrualMethod = dc.????
|
#simpledc.accrualMethod = dc.????
|
||||||
#sword2.simpledc.accrualPeriodicity = dc.????
|
#simpledc.accrualPeriodicity = dc.????
|
||||||
#sword2.simpledc.accrualPolicy = dc.????
|
#simpledc.accrualPolicy = dc.????
|
||||||
sword2.simpledc.alternative = dc.title.alternative
|
simpledc.alternative = dc.title.alternative
|
||||||
#sword2.simpledc.audience = dc.???
|
#simpledc.audience = dc.???
|
||||||
sword2.simpledc.available = dc.date.available
|
simpledc.available = dc.date.available
|
||||||
sword2.simpledc.bibliographicCitation = dc.identifier.citation
|
simpledc.bibliographicCitation = dc.identifier.citation
|
||||||
#sword2.simpledc.conformsTo = dc.????
|
#simpledc.conformsTo = dc.????
|
||||||
sword2.simpledc.contributor = dc.contributor
|
simpledc.contributor = dc.contributor
|
||||||
sword2.simpledc.coverage = dc.coverage
|
simpledc.coverage = dc.coverage
|
||||||
sword2.simpledc.created = dc.date.created
|
simpledc.created = dc.date.created
|
||||||
sword2.simpledc.creator = dc.contributor.author
|
simpledc.creator = dc.contributor.author
|
||||||
sword2.simpledc.date = dc.date
|
simpledc.date = dc.date
|
||||||
sword2.simpledc.dateAccepted = dc.date.accepted
|
simpledc.dateAccepted = dc.date.accepted
|
||||||
sword2.simpledc.dateCopyrighted = dc.date.???
|
simpledc.dateCopyrighted = dc.date.???
|
||||||
sword2.simpledc.dateSubmitted = dc.date.submitted
|
simpledc.dateSubmitted = dc.date.submitted
|
||||||
sword2.simpledc.description = dc.description
|
simpledc.description = dc.description
|
||||||
#sword2.simpledc.educationLevel = dc.???
|
#simpledc.educationLevel = dc.???
|
||||||
sword2.simpledc.extent = dc.format.extent
|
simpledc.extent = dc.format.extent
|
||||||
sword2.simpledc.format = dc.format
|
simpledc.format = dc.format
|
||||||
#sword2.simpledc.hasFormat = dc.????
|
#simpledc.hasFormat = dc.????
|
||||||
#sword2.simpledc.hasPart = dc.???
|
#simpledc.hasPart = dc.???
|
||||||
#sword2.simpledc.hasVersion = dc.???
|
#simpledc.hasVersion = dc.???
|
||||||
sword2.simpledc.identifier = dc.identifier
|
simpledc.identifier = dc.identifier
|
||||||
#sword2.simpledc.instructionalMethod = dc.???
|
#simpledc.instructionalMethod = dc.???
|
||||||
#sword2.simpledc.isFormatOf = dc.???
|
#simpledc.isFormatOf = dc.???
|
||||||
sword2.simpledc.isPartOf = dc.relation.ispartof
|
simpledc.isPartOf = dc.relation.ispartof
|
||||||
sword2.simpledc.isReferencedBy = dc.relation.isreferencedby
|
simpledc.isReferencedBy = dc.relation.isreferencedby
|
||||||
sword2.simpledc.isReplacedBy = dc.relation.isreplacedby
|
simpledc.isReplacedBy = dc.relation.isreplacedby
|
||||||
sword2.simpledc.isRequiredBy = dc.relation.isrequiredby
|
simpledc.isRequiredBy = dc.relation.isrequiredby
|
||||||
sword2.simpledc.issued = dc.date.issued
|
simpledc.issued = dc.date.issued
|
||||||
#sword2.simpledc.isVersionOf = dc.????
|
#simpledc.isVersionOf = dc.????
|
||||||
sword2.simpledc.language = dc.language
|
simpledc.language = dc.language
|
||||||
#sword2.simpledc.license = dc.????
|
#simpledc.license = dc.????
|
||||||
#sword2.simpledc.mediator = dc.????
|
#simpledc.mediator = dc.????
|
||||||
sword2.simpledc.medium = dc.format.medium
|
simpledc.medium = dc.format.medium
|
||||||
sword2.simpledc.modified = dc.date.modified
|
simpledc.modified = dc.date.modified
|
||||||
sword2.simpledc.provenance = dc.description.provenance
|
simpledc.provenance = dc.description.provenance
|
||||||
sword2.simpledc.publisher = dc.publisher
|
simpledc.publisher = dc.publisher
|
||||||
sword2.simpledc.references = dc.relation.references
|
simpledc.references = dc.relation.references
|
||||||
sword2.simpledc.relation = dc.relation
|
simpledc.relation = dc.relation
|
||||||
sword2.simpledc.replaces = dc.relation.replaces
|
simpledc.replaces = dc.relation.replaces
|
||||||
sword2.simpledc.requires = dc.relation.requires
|
simpledc.requires = dc.relation.requires
|
||||||
sword2.simpledc.rights = dc.rights
|
simpledc.rights = dc.rights
|
||||||
sword2.simpledc.rightsHolder = dc.rights
|
simpledc.rightsHolder = dc.rights
|
||||||
sword2.simpledc.source = dc.source
|
simpledc.source = dc.source
|
||||||
sword2.simpledc.spatial = dc.coverage.spatial
|
simpledc.spatial = dc.coverage.spatial
|
||||||
sword2.simpledc.subject = dc.subject
|
simpledc.subject = dc.subject
|
||||||
#sword2.simpledc.tableOfContents = dc.????
|
#simpledc.tableOfContents = dc.????
|
||||||
sword2.simpledc.temporal = dc.coverage.temporal
|
simpledc.temporal = dc.coverage.temporal
|
||||||
sword2.simpledc.title = dc.title
|
simpledc.title = dc.title
|
||||||
sword2.simpledc.type = dc.type
|
simpledc.type = dc.type
|
||||||
#sword2.simpledc.valid = dc.????
|
#simpledc.valid = dc.????
|
||||||
|
|
||||||
|
|
||||||
# order of precedence for importing multipart content. if entry-first then
|
# order of precedence for importing multipart content. if entry-first then
|
||||||
@@ -283,79 +283,24 @@ sword2.simpledc.type = dc.type
|
|||||||
# the specific behaviour of the package ingester selected
|
# the specific behaviour of the package ingester selected
|
||||||
#
|
#
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
sword2.multipart.entry-first = false
|
multipart.entry-first = false
|
||||||
|
|
||||||
# if the workflow gets started, should there be a notification
|
# if the workflow gets started, should there be a notification
|
||||||
# email sent
|
# email sent
|
||||||
#
|
#
|
||||||
sword2.workflow.notify = true
|
workflow.notify = true
|
||||||
|
|
||||||
# when content is replaced, should the old version of the content be kept? This
|
# when content is replaced, should the old version of the content be kept? This
|
||||||
# creates a copy of the ORIGINAL bundle with the name V_YYYY-MM-DD.X where YYYY-MM-DD
|
# creates a copy of the ORIGINAL bundle with the name V_YYYY-MM-DD.X where YYYY-MM-DD
|
||||||
# is the date the copy was created, and X is an integer from 0 upwards.
|
# is the date the copy was created, and X is an integer from 0 upwards.
|
||||||
#
|
#
|
||||||
sword2.versions.keep = true
|
versions.keep = true
|
||||||
|
|
||||||
sword2.state.workspace.uri = ${dspace.url}/state/inprogress
|
|
||||||
sword2.state.workspace.description = The item is in the user workspace
|
|
||||||
sword2.state.workflow.uri = ${dspace.url}/state/inreview
|
|
||||||
sword2.state.workflow.description = The item is undergoing review prior to acceptance to the archive
|
|
||||||
sword2.state.archive.uri = ${dspace.url}/state/archived
|
|
||||||
sword2.state.archive.description = The item has been archived
|
|
||||||
sword2.state.withdrawn.uri = ${dspace.url}/state/withdrawn
|
|
||||||
sword2.state.withdrawn.description = The item has been withdrawn from the item and is no longer available
|
|
||||||
|
|
||||||
########################################################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
# 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.default.ingest.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 media links. This is the URL
|
|
||||||
# which DSpace will use to construct the media link urls
|
|
||||||
# for items which are deposited via sword
|
|
||||||
#
|
|
||||||
# The default is {dspace.url}/sword/media-link
|
|
||||||
#
|
|
||||||
# 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.media-link.url = http://www.myu.ac.uk/sword/media-link
|
|
||||||
|
|
||||||
|
|
||||||
# Should the sword server enable restore-mode when ingesting new
|
|
||||||
# packages. If this is enabled the item will be treated as a
|
|
||||||
# previously deleted item from the repository. If the item had
|
|
||||||
# previously been assigned a handle then that same handle will be
|
|
||||||
# restored to activity.
|
|
||||||
sword.restore-mode.enable = false
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
state.workspace.uri = http://localhost:8080/xmlui/state/inprogress
|
||||||
|
state.workspace.description = The item is in the user workspace
|
||||||
|
state.workflow.uri = http://localhost:8080/xmlui/state/inreview
|
||||||
|
state.workflow.description = The item is undergoing review prior to acceptance to the archive
|
||||||
|
state.archive.uri = http://localhost:8080/xmlui/state/archived
|
||||||
|
state.archive.description = The item has been archived
|
||||||
|
state.withdrawn.uri = http://localhost:8080/xmlui/state/withdrawn
|
||||||
|
state.withdrawn.description = The item has been withdrawn from the item and is no longer available
|
Reference in New Issue
Block a user