fixed conflicts

This commit is contained in:
Keiji Suzuki
2013-12-05 10:32:07 +09:00
75 changed files with 1110 additions and 734 deletions

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -385,6 +385,11 @@ public class DSpaceCSV implements Serializable
*/
public final void addItem(Item i) throws Exception
{
// If the item is not in the archive, the call to get its handle below will fail
if (i.isWithdrawn() || !i.isArchived() || i.getOwningCollection() == null) {
return;
}
// Create the CSV line
DSpaceCSVLine line = new DSpaceCSVLine(i.getID());

View File

@@ -1340,11 +1340,33 @@ public class ItemImport
+ sRegistrationLine);
continue;
}
registerBitstream(c, i, iAssetstore, sFilePath, sBundle);
// look for descriptions
boolean descriptionExists = false;
String descriptionMarker = "\tdescription:";
int dMarkerIndex = line.indexOf(descriptionMarker);
int dEndIndex = 0;
if (dMarkerIndex > 0)
{
dEndIndex = line.indexOf("\t", dMarkerIndex + 1);
if (dEndIndex == -1)
{
dEndIndex = line.length();
}
descriptionExists = true;
}
String sDescription = "";
if (descriptionExists)
{
sDescription = line.substring(dMarkerIndex, dEndIndex);
sDescription = sDescription.replaceFirst("description:", "");
}
registerBitstream(c, i, iAssetstore, sFilePath, sBundle, sDescription);
System.out.println("\tRegistering Bitstream: " + sFilePath
+ "\tAssetstore: " + iAssetstore
+ "\tBundle: " + sBundle
+ "\tDescription: " + sBundle);
+ "\tDescription: " + sDescription);
continue; // process next line in contents file
}
@@ -1571,7 +1593,7 @@ public class ItemImport
* @throws AuthorizeException
*/
private void registerBitstream(Context c, Item i, int assetstore,
String bitstreamPath, String bundleName )
String bitstreamPath, String bundleName, String description )
throws SQLException, IOException, AuthorizeException
{
// TODO validate assetstore number
@@ -1622,6 +1644,7 @@ public class ItemImport
// FIXME - guessing format guesses license.txt incorrectly as a text file format!
BitstreamFormat bf = FormatIdentifier.guessFormat(c, bs);
bs.setFormat(bf);
bs.setDescription(description);
bs.update();
}

View File

@@ -18,17 +18,9 @@ import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -1031,7 +1023,8 @@ public class LogAnalyser
public static String unParseDate(Date date)
{
// Use SimpleDateFormat
SimpleDateFormat sdf = new SimpleDateFormat("yyyy'-'MM'-'dd");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy'-'MM'-'dd'T'hh:mm:ss'Z'");
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
return sdf.format(date);
}
@@ -1205,28 +1198,33 @@ public class LogAnalyser
if (oracle)
{
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) > TO_DATE('" +
unParseDate(startDate) + "', 'yyyy-MM-dd') ");
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) >= TO_DATE('" +
unParseDate(startDate) + "', 'yyyy-MM-dd\"T\"hh24:mi:ss\"Z\"') ");
}
else
{
dateQuery.append(" AND text_value::timestamp > '" +
dateQuery.append(" AND text_value::timestamp >= '" +
unParseDate(startDate) + "'::timestamp ");
}
}
if (endDate != null)
{
// adjust end date to account for timestamp comparison
GregorianCalendar realEndDate = new GregorianCalendar();
realEndDate.setTime(endDate);
realEndDate.add(Calendar.DAY_OF_MONTH, 1);
Date queryEndDate = realEndDate.getTime();
if (oracle)
{
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) < TO_DATE('" +
unParseDate(endDate) + "', 'yyyy-MM-dd') ");
unParseDate(queryEndDate) + "', 'yyyy-MM-dd\"T\"hh24:mi:ss\"Z\"') ");
}
else
{
dateQuery.append(" AND text_value::timestamp < '" +
unParseDate(endDate) + "'::timestamp ");
unParseDate(queryEndDate) + "'::timestamp ");
}
}

View File

@@ -252,13 +252,18 @@ public class LDAPAuthentication
// If there is no email and the email domain is set, add it to the netid
String email = ldap.ldapEmail;
if (((email == null) || ("".equals(email))) &&
(!"".equals(ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain"))))
if ((StringUtils.isEmpty(email)) &&
(StringUtils.isNotEmpty(ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain"))))
{
email = netid + ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain");
}
else
{
email = netid;
}
if ((email != null) && (!"".equals(email)))
if (StringUtils.isNotEmpty(email))
{
try
{
@@ -288,19 +293,19 @@ public class LDAPAuthentication
{
context.setIgnoreAuthorization(true);
eperson = EPerson.create(context);
if ((email != null) && (!"".equals(email)))
if (StringUtils.isNotEmpty(email))
{
eperson.setEmail(email);
}
if ((ldap.ldapGivenName!=null) && (!ldap.ldapGivenName.equals("")))
if (StringUtils.isNotEmpty(ldap.ldapGivenName))
{
eperson.setFirstName(ldap.ldapGivenName);
}
if ((ldap.ldapSurname!=null) && (!ldap.ldapSurname.equals("")))
if (StringUtils.isNotEmpty(ldap.ldapSurname))
{
eperson.setLastName(ldap.ldapSurname);
}
if ((ldap.ldapPhone!=null)&&(!ldap.ldapPhone.equals("")))
if (StringUtils.isNotEmpty(ldap.ldapPhone))
{
eperson.setMetadata("phone", ldap.ldapPhone);
}

View File

@@ -90,6 +90,13 @@ public class Collection extends DSpaceObject
/** The default group of administrators */
private Group admins;
// Keys for accessing Collection metadata
public static final String COPYRIGHT_TEXT = "copyright_text";
public static final String INTRODUCTORY_TEXT = "introductory_text";
public static final String SHORT_DESCRIPTION = "short_description";
public static final String SIDEBAR_TEXT = "side_bar_text";
public static final String PROVENANCE_TEXT = "provenance_description";
/**
* Construct a collection with the given table row
*

View File

@@ -276,22 +276,7 @@ public class DOIIdentifierProvider
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
}
// check if DOI is reserved at the registration agency
if (connector.isDOIReserved(context, doi))
{
// if doi is registered for this object we still should check its
// status in our database (see below).
// if it is registered for another object we should notify an admin
if (!connector.isDOIReserved(context, dso, doi))
{
log.warn("DOI {} is reserved for another object already.", doi);
throw new DOIIdentifierException(DOIIdentifierException.DOI_ALREADY_EXISTS);
}
}
else
{
connector.reserveDOI(context, dso, doi);
}
connector.reserveDOI(context, dso, doi);
doiRow.setColumn("status", IS_RESERVED);
DatabaseManager.update(context, doiRow);
@@ -311,52 +296,21 @@ public class DOIIdentifierProvider
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
}
// check if the DOI is already registered online
if (connector.isDOIRegistered(context, doi))
{
// if doi is registered for this object we still should check its
// status in our database (see below).
// if it is registered for another object we should notify an admin
if (!connector.isDOIRegistered(context, dso, doi))
{
// DOI is reserved for another object
log.warn("DOI {} is registered for another object already.", doi);
throw new DOIIdentifierException(DOIIdentifierException.DOI_ALREADY_EXISTS);
}
// register DOI Online
try {
connector.registerDOI(context, dso, doi);
}
else
catch (DOIIdentifierException die)
{
// check if doi is reserved for this specific dso
if (!connector.isDOIReserved(context, dso, doi))
// do we have to reserve DOI before we can register it?
if (die.getCode() == DOIIdentifierException.RESERVE_FIRST)
{
// check if doi is already reserved for another dso
if (connector.isDOIReserved(context, doi))
{
log.warn("Trying to register DOI {}, that is reserved for "
+ "another dso.", doi);
throw new DOIIdentifierException("Trying to register a DOI "
+ "that is reserved for another object.",
DOIIdentifierException.DOI_ALREADY_EXISTS);
}
connector.reserveDOI(context, dso, doi);
}
// register DOI Online
try {
this.reserveOnline(context, dso, identifier);
connector.registerDOI(context, dso, doi);
}
catch (DOIIdentifierException die)
else
{
// do we have to reserve DOI before we can register it?
if (die.getCode() == DOIIdentifierException.REGISTER_FIRST)
{
this.reserveOnline(context, dso, identifier);
connector.registerDOI(context, dso, doi);
}
else
{
throw die;
}
throw die;
}
}
@@ -375,7 +329,6 @@ public class DOIIdentifierProvider
doiRow.setColumn("status", IS_REGISTERED);
DatabaseManager.update(context, doiRow);
}
public void updateMetadata(Context context, DSpaceObject dso, String identifier)
@@ -451,23 +404,9 @@ public class DOIIdentifierProvider
if (DELETED == doiRow.getIntColumn("status") ||
TO_BE_DELETED == doiRow.getIntColumn("status"))
{
throw new DOIIdentifierException("You tried to register a DOI that "
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
}
// check if doi is reserved for this specific dso
if (connector.isDOIReserved(context, identifier))
{
// check if doi is reserved for this specific dso
if (!connector.isDOIReserved(context, dso, doi))
{
log.warn("Trying to update metadata for DOI {}, that is reserved"
+ " for another dso.", doi);
throw new DOIIdentifierException("Trying to update metadta for "
+ "a DOI that is reserved for another object.",
DOIIdentifierException.DOI_ALREADY_EXISTS);
}
throw new DOIIdentifierException("You tried to update the metadata"
+ "of a DOI that is marked as DELETED.",
DOIIdentifierException.DOI_IS_DELETED);
}
connector.updateMetadata(context, dso, doi);

View File

@@ -14,7 +14,12 @@ import org.dspace.core.Context;
/**
* A DOIConnector handles all calls to the API of your DOI registry.
*
* Please pay attention to the method {@link #purgeCachedInformation()}!
* A DOIConnector should care about rules of the registration agency. For
* example, if the registration agency wants us to reserve a DOI before we can
* register it, the DOIConnector should check if a DOI is reserved. Use a
* {@link DOIIdenfierException} and set its error code in case of any errors.
* For the given example you should use
* {@code DOIIdentifierException.RESERVER_FIRST} as error code.
*
* @author Pascal-Nicolas Becker
*/
@@ -38,14 +43,6 @@ public interface DOIConnector {
* identifiers they should never be deleted. For example, if you send a HTTP
* DELETE request to the DataCite Metadata API directly, it will set the DOI
* to inactive.</p>
*
* <p>A DOIConnector does not have to check whether the DOI is reserved,
* registered or not. It will only send the request and return the answer in
* form of a boolean weather the deletion was successful or not. It may even
* throw an DOIIdentifierException in case you are not allowed to delete a
* DOI, the DOI does not exist, ... So please be sure that the deletion of a
* DOI is conform with the rules of the registry and that the DOI is in the
* appropriate state (f.e. reserved but not registered).</p>
*
* @param context
* @param doi
@@ -57,12 +54,11 @@ public interface DOIConnector {
/**
* Sends a request to the DOI registry to reserve a DOI.
*
* Please check on your own if the DOI is already reserved or even
* registered before you try to reserve it. You can use
* {@link isDOIRegistered} and {@link isDOIReserved} for it. The
* DOIConnector won't do any tests and throws an DOIIdentifierException in
* case of any problems with the DOI you want to reserve.
*
* The DOIConnector should check weather this DOI is reserved for another
* object already. In this case it should throw an {@link
* DOIIdentifierException} and set the error code to {@code
* DOIIdentifierException.DOI_ALREADY_EXISTS}.
*
* @param context
* @param dso
@@ -75,12 +71,11 @@ public interface DOIConnector {
/**
* Sends a request to the DOI registry to register a DOI.
*
* Please check on your own if the DOI is already reserved or even
* registered before you try to register it. You can use the methods
* {@code DOIConnector.isDOIRegistered(...)} and
* {@code DOIConnector.isDOIReserved(...)} for it. The DOIConnector won't
* do any tests and throws an DOIIdentifierException in case of any problems
* with the DOI you want to register.
* The DOIConnector ensures compliance with the workflow of the registration
* agency. For example, if a DOI has to be reserved before it can be
* registered the DOIConnector has to check if it is reserved. In this case
* you can throw an DOIIdentifierExcpetion and set the error code to
* {@link DOIIdentifierException.RESERVE_FIRST}.
*
* @param context
* @param dso
@@ -92,9 +87,10 @@ public interface DOIConnector {
throws DOIIdentifierException;
/**
* Sends a request to the DOI registry to update Metadata for a DOI.
* The DOIConnector won't do any tests and throws an IdentifierException
* in case of any problems with the DOI you want to update the metadata.
* Sends a request to the DOI registry to update metadata for a DOI.
*
* The DOIConnector should check weather the DOI is reserved or registered
* for the specified DSpace Object before it sends the metadata update.
*
* @param context
* @param dso

View File

@@ -49,7 +49,7 @@ public class DOIIdentifierException extends IdentifierException {
* be registered. This error code signals that a unreserved DOI should be
* registered and that the registration agency denied it.
*/
public static final int REGISTER_FIRST = 6;
public static final int RESERVE_FIRST = 6;
/**
* Error while authenticating against the registration agency.
*/
@@ -97,7 +97,7 @@ public class DOIIdentifierException extends IdentifierException {
return "FOREIGN_DOI";
case BAD_ANSWER:
return "BAD_ANSWER";
case REGISTER_FIRST:
case RESERVE_FIRST:
return "REGISTER_FIRST";
case AUTHENTICATION_ERROR:
return "AUTHENTICATION_ERROR";

View File

@@ -65,12 +65,12 @@ implements DOIConnector
* Stores the scheme used to connect to the DataCite server. It will be set
* by spring dependency injection.
*/
private String SCHEME;
protected String SCHEME;
/**
* Stores the hostname of the DataCite server. Set by spring dependency
* injection.
*/
private String HOST;
protected String HOST;
/**
* Path on the DataCite server used to generate DOIs. Set by spring
@@ -188,7 +188,7 @@ implements DOIConnector
this.CROSSWALK_NAME = CROSSWALK_NAME;
}
private void prepareXwalk()
protected void prepareXwalk()
{
if (null != this.xwalk)
return;
@@ -203,7 +203,7 @@ implements DOIConnector
}
}
private String getUsername()
protected String getUsername()
{
if (null == this.USERNAME)
{
@@ -218,7 +218,7 @@ implements DOIConnector
return this.USERNAME;
}
private String getPassword()
protected String getPassword()
{
if (null == this.PASSWORD)
{
@@ -450,7 +450,22 @@ implements DOIConnector
@Override
public void reserveDOI(Context context, DSpaceObject dso, String doi)
throws DOIIdentifierException
{
{
// check if DOI is reserved at the registration agency
if (this.isDOIReserved(context, doi))
{
// if doi is registered for this object we still should check its
// status in our database (see below).
// if it is registered for another object we should notify an admin
if (!this.isDOIReserved(context, dso, doi))
{
log.warn("DOI {} is reserved for another object already.", doi);
throw new DOIIdentifierException(DOIIdentifierException.DOI_ALREADY_EXISTS);
}
// the DOI is reserved for this Object. We use {@code reserveDOI} to
// send metadata updates, so don't return here!
}
this.prepareXwalk();
if (!this.xwalk.canDisseminate(dso))
@@ -557,7 +572,40 @@ implements DOIConnector
public void registerDOI(Context context, DSpaceObject dso, String doi)
throws DOIIdentifierException
{
log.debug("Want to register DOI {}!", doi);
// check if the DOI is already registered online
if (this.isDOIRegistered(context, doi))
{
// if it is registered for another object we should notify an admin
if (!this.isDOIRegistered(context, dso, doi))
{
// DOI is reserved for another object
log.warn("DOI {} is registered for another object already.", doi);
throw new DOIIdentifierException(DOIIdentifierException.DOI_ALREADY_EXISTS);
}
// doi is registered for this object, we're done
return;
}
else
{
// DataCite wants us to reserve a DOI before we can register it
if (!this.isDOIReserved(context, dso, doi))
{
// check if doi is already reserved for another dso
if (this.isDOIReserved(context, doi))
{
log.warn("Trying to register DOI {}, that is reserved for "
+ "another dso.", doi);
throw new DOIIdentifierException("Trying to register a DOI "
+ "that is reserved for another object.",
DOIIdentifierException.DOI_ALREADY_EXISTS);
}
// the DOIIdentifierProvider should catch and handle this
throw new DOIIdentifierException("You need to reserve a DOI "
+ "before you can register it.",
DOIIdentifierException.RESERVE_FIRST);
}
}
// send doi=<doi>\nurl=<url> to mds/doi
DataCiteResponse resp = null;
@@ -600,7 +648,7 @@ implements DOIConnector
+ "of DOIs. The DOI we wanted to register had not been "
+ "reserved in advance. Please contact the administrator "
+ "or take a look in DSpace log file.",
DOIIdentifierException.REGISTER_FIRST);
DOIIdentifierException.RESERVE_FIRST);
}
// Catch all other http status code in case we forgot one.
default :
@@ -619,18 +667,27 @@ implements DOIConnector
public void updateMetadata(Context context, DSpaceObject dso, String doi)
throws DOIIdentifierException
{
// check if doi is reserved for another object
if (!this.isDOIReserved(context, dso, doi) && this.isDOIReserved(context, doi))
{
log.warn("Trying to update metadata for DOI {}, that is reserved"
+ " for another dso.", doi);
throw new DOIIdentifierException("Trying to update metadta for "
+ "a DOI that is reserved for another object.",
DOIIdentifierException.DOI_ALREADY_EXISTS);
}
// We can use reserveDOI to update metadata. Datacite API uses the same
// request for reservartion as for updating metadata.
this.reserveDOI(context, dso, doi);
}
private DataCiteResponse sendDOIPostRequest(String doi, String url)
protected DataCiteResponse sendDOIPostRequest(String doi, String url)
throws DOIIdentifierException
{
// post mds/doi/
// body must contaion "doi=<doi>\nurl=<url>}n"
URIBuilder uribuilder = new URIBuilder();
uribuilder.setScheme("https").setHost(HOST).setPath(DOI_PATH);
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(DOI_PATH);
HttpPost httppost = null;
try
@@ -641,7 +698,7 @@ implements DOIConnector
{
log.error("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!");
log.error("The URL was {}.", "https://" + HOST +
log.error("The URL was {}.", SCHEME + "://" + HOST +
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
throw new RuntimeException("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
@@ -674,12 +731,12 @@ implements DOIConnector
}
private DataCiteResponse sendMetadataDeleteRequest(String doi)
protected DataCiteResponse sendMetadataDeleteRequest(String doi)
throws DOIIdentifierException
{
// delete mds/metadata/<doi>
URIBuilder uribuilder = new URIBuilder();
uribuilder.setScheme("https").setHost(HOST).setPath(METADATA_PATH
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(METADATA_PATH
+ doi.substring(DOI.SCHEME.length()));
HttpDelete httpdelete = null;
@@ -691,7 +748,7 @@ implements DOIConnector
{
log.error("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!");
log.error("The URL was {}.", "https://" + HOST +
log.error("The URL was {}.", SCHEME + "://" + HOST +
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
throw new RuntimeException("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
@@ -699,23 +756,23 @@ implements DOIConnector
return sendHttpRequest(httpdelete, doi);
}
private DataCiteResponse sendDOIGetRequest(String doi)
protected DataCiteResponse sendDOIGetRequest(String doi)
throws DOIIdentifierException
{
return sendGetRequest(doi, DOI_PATH);
}
private DataCiteResponse sendMetadataGetRequest(String doi)
protected DataCiteResponse sendMetadataGetRequest(String doi)
throws DOIIdentifierException
{
return sendGetRequest(doi, METADATA_PATH);
}
private DataCiteResponse sendGetRequest(String doi, String path)
protected DataCiteResponse sendGetRequest(String doi, String path)
throws DOIIdentifierException
{
URIBuilder uribuilder = new URIBuilder();
uribuilder.setScheme("https").setHost(HOST).setPath(path
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(path
+ doi.substring(DOI.SCHEME.length()));
HttpGet httpget = null;
@@ -727,7 +784,7 @@ implements DOIConnector
{
log.error("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!");
log.error("The URL was {}.", "https://" + HOST +
log.error("The URL was {}.", SCHEME + "://" + HOST +
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
throw new RuntimeException("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
@@ -735,7 +792,7 @@ implements DOIConnector
return sendHttpRequest(httpget, doi);
}
private DataCiteResponse sendMetadataPostRequest(String doi, Element metadataRoot)
protected DataCiteResponse sendMetadataPostRequest(String doi, Element metadataRoot)
throws DOIIdentifierException
{
Format format = Format.getCompactFormat();
@@ -744,13 +801,13 @@ implements DOIConnector
return sendMetadataPostRequest(doi, xout.outputString(new Document(metadataRoot)));
}
private DataCiteResponse sendMetadataPostRequest(String doi, String metadata)
protected DataCiteResponse sendMetadataPostRequest(String doi, String metadata)
throws DOIIdentifierException
{
// post mds/metadata/
// body must contain metadata in DataCite-XML.
URIBuilder uribuilder = new URIBuilder();
uribuilder.setScheme("https").setHost(HOST).setPath(METADATA_PATH);
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(METADATA_PATH);
HttpPost httppost = null;
try
@@ -761,7 +818,7 @@ implements DOIConnector
{
log.error("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!");
log.error("The URL was {}.", "https://" + HOST +
log.error("The URL was {}.", SCHEME + "://" + HOST +
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
throw new RuntimeException("The URL we constructed to check a DOI "
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
@@ -799,7 +856,7 @@ implements DOIConnector
* @return
* @throws DOIIdentifierException
*/
private DataCiteResponse sendHttpRequest(HttpUriRequest req, String doi)
protected DataCiteResponse sendHttpRequest(HttpUriRequest req, String doi)
throws DOIIdentifierException
{
DefaultHttpClient httpclient = new DefaultHttpClient();
@@ -923,7 +980,7 @@ implements DOIConnector
}
// returns null or handle
private String extractAlternateIdentifier(Context context, String content)
protected String extractAlternateIdentifier(Context context, String content)
throws SQLException, DOIIdentifierException
{
if (content == null)
@@ -969,12 +1026,12 @@ implements DOIConnector
return handle;
}
private String extractDOI(Element root) {
protected String extractDOI(Element root) {
Element doi = root.getChild("identifier", root.getNamespace());
return (null == doi) ? null : doi.getTextTrim();
}
private Element addDOI(String doi, Element root) {
protected Element addDOI(String doi, Element root) {
if (null != extractDOI(root))
{
return root;
@@ -985,7 +1042,7 @@ implements DOIConnector
return root.addContent(0, identifier);
}
private class DataCiteResponse
protected class DataCiteResponse
{
private final int statusCode;
private final String content;

View File

@@ -76,124 +76,75 @@ public class ArXivService
}
private List<Record> search(String query, String arxivid, int max_result)
throws IOException, HttpException
{
List<Record> results = new ArrayList<Record>();
if (!ConfigurationManager.getBooleanProperty(SubmissionLookupService.CFG_MODULE, "remoteservice.demo"))
{
GetMethod method = null;
try
{
HttpClient client = new HttpClient();
client.setTimeout(timeout);
method = new GetMethod("http://export.arxiv.org/api/query");
NameValuePair id = new NameValuePair("id_list", arxivid);
NameValuePair queryParam = new NameValuePair("search_query",
query);
NameValuePair count = new NameValuePair("max_results",
String.valueOf(max_result));
method.setQueryString(new NameValuePair[] { id, queryParam,
count });
// Execute the method.
int statusCode = client.executeMethod(method);
throws IOException, HttpException
{
List<Record> results = new ArrayList<Record>();
GetMethod method = null;
try
{
HttpClient client = new HttpClient();
client.setTimeout(timeout);
method = new GetMethod("http://export.arxiv.org/api/query");
NameValuePair id = new NameValuePair("id_list", arxivid);
NameValuePair queryParam = new NameValuePair("search_query",
query);
NameValuePair count = new NameValuePair("max_results",
String.valueOf(max_result));
method.setQueryString(new NameValuePair[] { id, queryParam,
count });
// Execute the method.
int statusCode = client.executeMethod(method);
if (statusCode != HttpStatus.SC_OK)
{
if (statusCode == HttpStatus.SC_BAD_REQUEST)
throw new RuntimeException("arXiv query is not valid");
else
throw new RuntimeException("Http call failed: "
+ method.getStatusLine());
}
if (statusCode != HttpStatus.SC_OK)
{
if (statusCode == HttpStatus.SC_BAD_REQUEST)
throw new RuntimeException("arXiv query is not valid");
else
throw new RuntimeException("Http call failed: "
+ method.getStatusLine());
}
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory.newDocumentBuilder();
Document inDoc = db.parse(method.getResponseBodyAsStream());
DocumentBuilder db = factory.newDocumentBuilder();
Document inDoc = db.parse(method.getResponseBodyAsStream());
Element xmlRoot = inDoc.getDocumentElement();
List<Element> dataRoots = XMLUtils.getElementList(xmlRoot,
"entry");
Element xmlRoot = inDoc.getDocumentElement();
List<Element> dataRoots = XMLUtils.getElementList(xmlRoot,
"entry");
for (Element dataRoot : dataRoots)
{
Record crossitem = ArxivUtils
.convertArxixDomToRecord(dataRoot);
if (crossitem != null)
{
results.add(crossitem);
}
}
}
catch (Exception e)
{
throw new RuntimeException(
"ArXiv identifier is not valid or not exist");
}
}
finally
{
if (method != null)
{
method.releaseConnection();
}
}
}
else
{
InputStream stream = null;
try
{
File file = new File(
ConfigurationManager.getProperty("dspace.dir")
+ "/config/crosswalks/demo/arxiv.xml");
stream = new FileInputStream(file);
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory.newDocumentBuilder();
Document inDoc = db.parse(stream);
for (Element dataRoot : dataRoots)
{
Record crossitem = ArxivUtils
.convertArxixDomToRecord(dataRoot);
if (crossitem != null)
{
results.add(crossitem);
}
}
}
catch (Exception e)
{
throw new RuntimeException(
"ArXiv identifier is not valid or not exist");
}
}
finally
{
if (method != null)
{
method.releaseConnection();
}
}
Element xmlRoot = inDoc.getDocumentElement();
List<Element> dataRoots = XMLUtils.getElementList(xmlRoot,
"entry");
for (Element dataRoot : dataRoots)
{
Record crossitem = ArxivUtils
.convertArxixDomToRecord(dataRoot);
if (crossitem != null)
{
results.add(crossitem);
}
}
}
catch (Exception e)
{
throw new RuntimeException(
"ArXiv identifier is not valid or not exist");
}
}
finally
{
if (stream != null)
{
stream.close();
}
}
}
return results;
}
return results;
}
public Record getByArXivIDs(String raw) throws HttpException, IOException
{

View File

@@ -35,6 +35,9 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
private boolean searchProvider = true;
private String apiKey = null;
private int maxResults = 10;
public void setSearchProvider(boolean searchProvider)
{
this.searchProvider = searchProvider;
@@ -60,9 +63,14 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
Set<String> dois = keys.get(DOI);
List<Record> items = null;
List<Record> results = new ArrayList<Record>();
if (getApiKey() == null){
throw new RuntimeException("No CrossRef API key is specified!");
}
try
{
items = crossrefService.search(context, dois);
items = crossrefService.search(context, dois, getApiKey());
}
catch (JDOMException e)
{
@@ -89,8 +97,12 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
public List<Record> search(Context context, String title, String author,
int year) throws HttpException, IOException
{
if (getApiKey() == null){
throw new RuntimeException("No CrossRef API key is specified!");
}
List<Record> items = crossrefService.search(context, title, author,
year, 10);
year, getMaxResults(), getApiKey());
return items;
}
@@ -99,4 +111,20 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
{
return searchProvider;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public int getMaxResults() {
return maxResults;
}
public void setMaxResults(int maxResults) {
this.maxResults = maxResults;
}
}

View File

@@ -29,7 +29,6 @@ import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.dspace.app.util.XMLUtils;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.jdom.JDOMException;
@@ -58,7 +57,7 @@ public class CrossRefService
this.timeout = timeout;
}
public List<Record> search(Context context, Set<String> dois)
public List<Record> search(Context context, Set<String> dois, String apiKey)
throws HttpException, IOException, JDOMException,
ParserConfigurationException, SAXException
{
@@ -67,84 +66,77 @@ public class CrossRefService
{
for (String record : dois)
{
try
{
if (!ConfigurationManager
.getBooleanProperty(SubmissionLookupService.CFG_MODULE, "remoteservice.demo"))
{
GetMethod method = null;
try
{
String apiKey = ConfigurationManager
.getProperty(SubmissionLookupService.CFG_MODULE, "crossref.api-key");
try
{
GetMethod method = null;
try
{
HttpClient client = new HttpClient();
client.setConnectionTimeout(timeout);
method = new GetMethod(
"http://www.crossref.org/openurl/");
HttpClient client = new HttpClient();
client.setConnectionTimeout(timeout);
method = new GetMethod(
"http://www.crossref.org/openurl/");
NameValuePair pid = new NameValuePair("pid", apiKey);
NameValuePair noredirect = new NameValuePair(
"noredirect", "true");
NameValuePair id = new NameValuePair("id", record);
method.setQueryString(new NameValuePair[] { pid,
noredirect, id });
// Execute the method.
int statusCode = client.executeMethod(method);
NameValuePair pid = new NameValuePair("pid", apiKey);
NameValuePair noredirect = new NameValuePair(
"noredirect", "true");
NameValuePair id = new NameValuePair("id", record);
method.setQueryString(new NameValuePair[] { pid,
noredirect, id });
// Execute the method.
int statusCode = client.executeMethod(method);
if (statusCode != HttpStatus.SC_OK)
{
throw new RuntimeException("Http call failed: "
+ method.getStatusLine());
}
if (statusCode != HttpStatus.SC_OK)
{
throw new RuntimeException("Http call failed: "
+ method.getStatusLine());
}
Record crossitem;
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
Record crossitem;
try
{
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder db = factory
.newDocumentBuilder();
Document inDoc = db.parse(method
.getResponseBodyAsStream());
DocumentBuilder db = factory
.newDocumentBuilder();
Document inDoc = db.parse(method
.getResponseBodyAsStream());
Element xmlRoot = inDoc.getDocumentElement();
Element queryResult = XMLUtils.getSingleElement(xmlRoot, "query_result");
Element body = XMLUtils.getSingleElement(queryResult, "body");
Element dataRoot = XMLUtils.getSingleElement(body, "query");
Element xmlRoot = inDoc.getDocumentElement();
Element queryResult = XMLUtils.getSingleElement(xmlRoot, "query_result");
Element body = XMLUtils.getSingleElement(queryResult, "body");
Element dataRoot = XMLUtils.getSingleElement(body, "query");
crossitem = CrossRefUtils
.convertCrossRefDomToRecord(dataRoot);
results.add(crossitem);
}
catch (Exception e)
{
log.warn(LogManager
.getHeader(
context,
"retrieveRecordDOI",
record
+ " DOI is not valid or not exist: "
+ e.getMessage()));
}
}
finally
{
if (method != null)
{
method.releaseConnection();
}
}
}
}
catch (RuntimeException rt)
{
log.error(rt.getMessage(), rt);
}
crossitem = CrossRefUtils
.convertCrossRefDomToRecord(dataRoot);
results.add(crossitem);
}
catch (Exception e)
{
log.warn(LogManager
.getHeader(
context,
"retrieveRecordDOI",
record
+ " DOI is not valid or not exist: "
+ e.getMessage()));
}
}
finally
{
if (method != null)
{
method.releaseConnection();
}
}
}
catch (RuntimeException rt)
{
log.error(rt.getMessage(), rt);
}
}
}
return results;
@@ -176,7 +168,7 @@ public class CrossRefService
}
public List<Record> search(Context context, String title, String authors,
int year, int count) throws IOException, HttpException
int year, int count, String apiKey) throws IOException, HttpException
{
GetMethod method = null;
try
@@ -210,7 +202,7 @@ public class CrossRefService
}
method.releaseConnection();
return search(context, dois);
return search(context, dois, apiKey);
}
catch (Exception e)
{

View File

@@ -93,7 +93,7 @@ public class PubmedFileDataLoader extends FileDataLoader
Record record = null;
try
{
record = PubmedUtils.convertCrossRefDomToRecord(xmlArticle);
record = PubmedUtils.convertPubmedDomToRecord(xmlArticle);
recordSet.addRecord(convertFields(record));
}
catch (Exception e)

View File

@@ -212,128 +212,71 @@ public class PubmedService
throws HttpException, IOException, ParserConfigurationException,
SAXException
{
List<Record> results = new ArrayList<Record>();
if (!ConfigurationManager.getBooleanProperty(SubmissionLookupService.CFG_MODULE, "remoteservice.demo"))
{
GetMethod method = null;
try
{
HttpClient client = new HttpClient();
client.setTimeout(5 * timeout);
method = new GetMethod(
"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi");
List<Record> results = new ArrayList<Record>();
GetMethod method = null;
try
{
HttpClient client = new HttpClient();
client.setTimeout(5 * timeout);
method = new GetMethod(
"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi");
NameValuePair db = new NameValuePair("db", "pubmed");
NameValuePair retmode = new NameValuePair("retmode", "xml");
NameValuePair rettype = new NameValuePair("rettype", "full");
NameValuePair id = new NameValuePair("id", StringUtils.join(
pubmedIDs.iterator(), ","));
method.setQueryString(new NameValuePair[] { db, retmode,
rettype, id });
// Execute the method.
int statusCode = client.executeMethod(method);
NameValuePair db = new NameValuePair("db", "pubmed");
NameValuePair retmode = new NameValuePair("retmode", "xml");
NameValuePair rettype = new NameValuePair("rettype", "full");
NameValuePair id = new NameValuePair("id", StringUtils.join(
pubmedIDs.iterator(), ","));
method.setQueryString(new NameValuePair[] { db, retmode,
rettype, id });
// Execute the method.
int statusCode = client.executeMethod(method);
if (statusCode != HttpStatus.SC_OK)
{
throw new RuntimeException("WS call failed: "
+ method.getStatusLine());
}
if (statusCode != HttpStatus.SC_OK)
{
throw new RuntimeException("WS call failed: "
+ method.getStatusLine());
}
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document inDoc = builder
.parse(method.getResponseBodyAsStream());
DocumentBuilder builder = factory.newDocumentBuilder();
Document inDoc = builder
.parse(method.getResponseBodyAsStream());
Element xmlRoot = inDoc.getDocumentElement();
List<Element> pubArticles = XMLUtils.getElementList(xmlRoot,
"PubmedArticle");
Element xmlRoot = inDoc.getDocumentElement();
List<Element> pubArticles = XMLUtils.getElementList(xmlRoot,
"PubmedArticle");
for (Element xmlArticle : pubArticles)
{
Record pubmedItem = null;
try
{
pubmedItem = PubmedUtils
.convertCrossRefDomToRecord(xmlArticle);
results.add(pubmedItem);
}
catch (Exception e)
{
throw new RuntimeException(
"PubmedID is not valid or not exist: "
+ e.getMessage(), e);
}
}
for (Element xmlArticle : pubArticles)
{
Record pubmedItem = null;
try
{
pubmedItem = PubmedUtils
.convertPubmedDomToRecord(xmlArticle);
results.add(pubmedItem);
}
catch (Exception e)
{
throw new RuntimeException(
"PubmedID is not valid or not exist: "
+ e.getMessage(), e);
}
}
return results;
}
finally
{
if (method != null)
{
method.releaseConnection();
}
}
}
else
{
InputStream stream = null;
try
{
File file = new File(
ConfigurationManager.getProperty("dspace.dir")
+ "/config/crosswalks/demo/pubmed.xml");
stream = new FileInputStream(file);
DocumentBuilderFactory factory = DocumentBuilderFactory
.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
factory.setIgnoringElementContentWhitespace(true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document inDoc = builder.parse(stream);
Element xmlRoot = inDoc.getDocumentElement();
List<Element> pubArticles = XMLUtils.getElementList(xmlRoot,
"PubmedArticle");
for (Element xmlArticle : pubArticles)
{
Record pubmedItem = null;
try
{
pubmedItem = PubmedUtils
.convertCrossRefDomToRecord(xmlArticle);
results.add(pubmedItem);
}
catch (Exception e)
{
throw new RuntimeException(
"PubmedID is not valid or not exist: "
+ e.getMessage(), e);
}
}
return results;
}
catch (Exception e)
{
throw new RuntimeException(e.getMessage(), e);
}
finally
{
if (stream != null)
{
stream.close();
}
}
}
return results;
}
finally
{
if (method != null)
{
method.releaseConnection();
}
}
}
public List<Record> search(String doi, String pmid) throws HttpException,

View File

@@ -34,7 +34,7 @@ import org.w3c.dom.Element;
public class PubmedUtils
{
public static Record convertCrossRefDomToRecord(Element pubArticle)
public static Record convertPubmedDomToRecord(Element pubArticle)
{
MutableRecord record = new SubmissionLookupPublication("");

View File

@@ -55,6 +55,8 @@ public class SubmissionLookupService
private TransformationEngine phase1TransformationEngine;
private TransformationEngine phase2TransformationEngine;
private List<String> detailFields = null;
public void setPhase2TransformationEngine(
TransformationEngine phase2TransformationEngine)
@@ -212,4 +214,12 @@ public class SubmissionLookupService
{
return this.fileProviders;
}
public List<String> getDetailFields() {
return detailFields;
}
public void setDetailFields(List<String> detailFields) {
this.detailFields = detailFields;
}
}

View File

@@ -78,6 +78,8 @@ itemlist.dc.type.degree = Degree
itemlist.et-al = et al
itemlist.thumbnail = Preview
itemlist.title.undefined = Undefined
jsp.adminhelp = <span class="glyphicon glyphicon-question-sign"></span>
jsp.administer = Administer
jsp.admintools = Admin Tools

View File

@@ -125,7 +125,7 @@ implements org.dspace.identifier.doi.DOIConnector
if (!reserved.containsKey(doi))
{
throw new DOIIdentifierException("Trying to register an unreserverd "
+ "DOI.", DOIIdentifierException.REGISTER_FIRST);
+ "DOI.", DOIIdentifierException.RESERVE_FIRST);
}
if (reserved.get(doi).intValue() != dso.getID())

View File

@@ -13,7 +13,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -329,7 +329,7 @@ public class SubmissionLookupJSONRequest extends JSONRequest
private Map<String, Object> getDetails(ItemSubmissionLookupDTO item,
Context context)
{
List<String> fieldOrder = getFieldOrderFromConfiguration();
List<String> fieldOrder = getFieldOrder();
Record totalData = item.getTotalPublication(service.getProviders());
Set<String> availableFields = totalData.getFields();
List<String[]> fieldsLabels = new ArrayList<String[]>();
@@ -339,10 +339,8 @@ public class SubmissionLookupJSONRequest extends JSONRequest
{
try
{
fieldsLabels.add(new String[] {
f,
I18nUtil.getMessage("jsp.submission-lookup.detail."
+ f, context) });
if (totalData.getValues(f)!=null && totalData.getValues(f).size()>0)
fieldsLabels.add(new String[] {f, I18nUtil.getMessage("jsp.submission-lookup.detail."+ f, context) });
}
catch (MissingResourceException e)
{
@@ -368,24 +366,37 @@ public class SubmissionLookupJSONRequest extends JSONRequest
return data;
}
private List<String> getFieldOrderFromConfiguration()
private List<String> getFieldOrder()
{
String config = ConfigurationManager
.getProperty("submission-lookup.detail.fields");
if (config == null)
{
config = "title,authors,editors,years,doi,pmid,eid,arxiv,journal,jissn,jeissn,volume,issue,serie,sissn,seissn,abstract,mesh,keywords,subtype";
}
List<String> result = new ArrayList<String>();
String[] split = config.split(",");
for (String s : split)
{
if (StringUtils.isNotBlank(s))
{
result.add(s.trim());
}
}
return result;
if (service.getDetailFields()!=null){
return service.getDetailFields();
}
//Default values, in case the property is not set
List<String> defaultValues = new ArrayList<String>();
defaultValues.add("title");
defaultValues.add("authors");
defaultValues.add("editors");
defaultValues.add("translators");
defaultValues.add("chairs");
defaultValues.add("issued");
defaultValues.add("abstract");
defaultValues.add("doi");
defaultValues.add("journal");
defaultValues.add("volume");
defaultValues.add("issue");
defaultValues.add("publisher");
defaultValues.add("jissn");
defaultValues.add("pisbn");
defaultValues.add("eisbn");
defaultValues.add("arxivCategory");
defaultValues.add("keywords");
defaultValues.add("mesh");
defaultValues.add("language");
defaultValues.add("subtype");
defaultValues.add("translators");
return defaultValues;
}
private List<Map<String, Object>> getLightResultList(

View File

@@ -483,7 +483,7 @@ public class BrowseListTag extends TagSupport
metadata = UIUtil.displayDate(dd, false, false, hrq);
}
// format the title field correctly for withdrawn and private items (ie. don't link)
else if (field.equals(titleField) && (items[i].isWithdrawn() || !isDiscoverable(hrq, items[i])))
else if (field.equals(titleField) && items[i].isWithdrawn())
{
metadata = Utils.addEntities(metadataArray[0].value);
}
@@ -570,7 +570,24 @@ public class BrowseListTag extends TagSupport
metadata = "<em>" + sb.toString() + "</em>";
}
}
//In case title has no value, replace it with "undefined" so as the user has something to
//click in order to access the item page
else if (field.equals(titleField)){
String undefined = LocaleSupport.getLocalizedMessage(pageContext, "itemlist.title.undefined");
if (items[i].isWithdrawn())
{
metadata = "<span style=\"font-style:italic\">("+undefined+")</span>";
}
// format the title field correctly (as long as the item isn't withdrawn, link to it)
else
{
metadata = "<a href=\"" + hrq.getContextPath() + "/handle/"
+ items[i].getHandle() + "\">"
+ "<span style=\"font-style:italic\">("+undefined+")</span>"
+ "</a>";
}
}
// prepare extra special layout requirements for dates
String extras = "";
if (isDate[colIdx])
@@ -887,21 +904,4 @@ public class BrowseListTag extends TagSupport
throw new JspException("Server does not support DSpace's default encoding. ", e);
}
}
/* whether the embedded item of the bitem is discoverable or not? */
private boolean isDiscoverable(HttpServletRequest hrq, BrowseItem bitem)
throws JspException
{
try
{
Context c = UIUtil.obtainContext(hrq);
Item item = Item.find(c, bitem.getID());
return item.isDiscoverable();
}
catch (SQLException sqle)
{
throw new JspException(sqle.getMessage(), sqle);
}
}
}

View File

@@ -535,6 +535,23 @@ public class ItemListTag extends TagSupport
metadata = "<em>" + sb.toString() + "</em>";
}
}
//In case title has no value, replace it with "undefined" so as the user has something to
//click in order to access the item page
else if (field.equals(titleField)){
String undefined = LocaleSupport.getLocalizedMessage(pageContext, "itemlist.title.undefined");
if (items[i].isWithdrawn())
{
metadata = "<span style=\"font-style:italic\">("+undefined+")</span>";
}
// format the title field correctly (as long as the item isn't withdrawn, link to it)
else
{
metadata = "<a href=\"" + hrq.getContextPath() + "/handle/"
+ items[i].getHandle() + "\">"
+ "<span style=\"font-style:italic\">("+undefined+")</span>"
+ "</a>";
}
}
// prepare extra special layout requirements for dates
String extras = "";

View File

@@ -226,7 +226,8 @@
</div>
<div class="row">
<%
if (subcommunities.length != 0)
boolean showLogos = ConfigurationManager.getBooleanProperty("jspui.community-home.logos", true);
if (subcommunities.length != 0)
{
%>
<div class="col-md-6">
@@ -241,7 +242,7 @@
<div class="list-group-item row">
<%
Bitstream logoCom = subcommunities[j].getLogo();
if (logoCom != null) { %>
if (showLogos && logoCom != null) { %>
<div class="col-md-3">
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logoCom.getID() %>" />
</div>
@@ -297,7 +298,7 @@
<div class="list-group-item row">
<%
Bitstream logoCol = collections[i].getLogo();
if (logoCol != null) { %>
if (showLogos && logoCol != null) { %>
<div class="col-md-3">
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logoCol.getID() %>" />
</div>

View File

@@ -53,9 +53,10 @@
void showCommunity(Community c, JspWriter out, HttpServletRequest request, ItemCounter ic,
Map collectionMap, Map subcommunityMap) throws ItemCountException, IOException, SQLException
{
boolean showLogos = ConfigurationManager.getBooleanProperty("jspui.community-list.logos", true);
out.println( "<li class=\"media well\">" );
Bitstream logo = c.getLogo();
if (logo != null)
if (showLogos && logo != null)
{
out.println("<a class=\"pull-left col-md-2\" href=\"" + request.getContextPath() + "/handle/"
+ c.getHandle() + "\"><img class=\"media-object img-responsive\" src=\"" +
@@ -83,7 +84,7 @@
out.println("<li class=\"media well\">");
Bitstream logoCol = cols[j].getLogo();
if (logoCol != null)
if (showLogos && logoCol != null)
{
out.println("<a class=\"pull-left col-md-2\" href=\"" + request.getContextPath() + "/handle/"
+ cols[j].getHandle() + "\"><img class=\"media-object img-responsive\" src=\"" +

View File

@@ -188,13 +188,13 @@ if (communities != null && communities.length != 0)
<p><fmt:message key="jsp.home.com2"/></p>
<div class="list-group">
<%
boolean showLogos = ConfigurationManager.getBooleanProperty("jspui.home-page.logos", true);
for (int i = 0; i < communities.length; i++)
{
%><div class="list-group-item row">
<%
Bitstream logo = communities[i].getLogo();
if (logo != null) { %>
if (showLogos && logo != null) { %>
<div class="col-md-3">
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logo.getID() %>" />
</div>

View File

@@ -133,6 +133,14 @@
</div>
<%
}
else
{
%>
<div class="container">
<dspace:include page="/layout/navbar-minimal.jsp" />
</div>
<%
}
%>
</header>

View File

@@ -133,6 +133,14 @@
</div>
<%
}
else
{
%>
<div class="container">
<dspace:include page="/layout/navbar-minimal.jsp" />
</div>
<%
}
%>
</header>

View File

@@ -0,0 +1,99 @@
<%--
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/
--%>
<%--
- Default navigation bar
--%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/dspace-tags.tld" prefix="dspace" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="javax.servlet.jsp.jstl.fmt.LocaleSupport" %>
<%@ page import="org.dspace.app.webui.util.UIUtil" %>
<%@ page import="org.dspace.content.Collection" %>
<%@ page import="org.dspace.content.Community" %>
<%@ page import="org.dspace.eperson.EPerson" %>
<%@ page import="org.dspace.core.ConfigurationManager" %>
<%@ page import="org.dspace.browse.BrowseIndex" %>
<%@ page import="org.dspace.browse.BrowseInfo" %>
<%@ page import="java.util.Map" %>
<%
// Is anyone logged in?
EPerson user = (EPerson) request.getAttribute("dspace.current.user");
// Is the logged in user an admin
Boolean admin = (Boolean)request.getAttribute("is.admin");
boolean isAdmin = (admin == null ? false : admin.booleanValue());
// Get the current page, minus query string
String currentPage = UIUtil.getOriginalURL(request);
int c = currentPage.indexOf( '?' );
if( c > -1 )
{
currentPage = currentPage.substring( 0, c );
}
// E-mail may have to be truncated
String navbarEmail = null;
if (user != null)
{
navbarEmail = user.getEmail();
}
%>
<div class="navbar-header">
<a class="navbar-brand" href="<%= request.getContextPath() %>/"><img height="25px" src="<%= request.getContextPath() %>/image/dspace-logo-only.png" /></a>
</div>
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<div class="nav navbar-nav navbar-right">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<%
if (user != null)
{
%>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> <fmt:message key="jsp.layout.navbar-default.loggedin">
<fmt:param><%= StringUtils.abbreviate(navbarEmail, 20) %></fmt:param>
</fmt:message> <b class="caret"></b></a>
<%
} else {
%>
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> <fmt:message key="jsp.layout.navbar-default.sign"/> <b class="caret"></b></a>
<% } %>
<ul class="dropdown-menu">
<li><a href="<%= request.getContextPath() %>/mydspace"><fmt:message key="jsp.layout.navbar-default.users"/></a></li>
<li><a href="<%= request.getContextPath() %>/subscribe"><fmt:message key="jsp.layout.navbar-default.receive"/></a></li>
<li><a href="<%= request.getContextPath() %>/profile"><fmt:message key="jsp.layout.navbar-default.edit"/></a></li>
<%
if (isAdmin)
{
%>
<li class="divider"></li>
<li><a href="<%= request.getContextPath() %>/dspace-admin"><fmt:message key="jsp.administer"/></a></li>
<%
}
if (user != null) {
%>
<li><a href="<%= request.getContextPath() %>/logout"><span class="glyphicon glyphicon-log-out"></span> <fmt:message key="jsp.layout.navbar-default.logout"/></a></li>
<% } %>
</ul>
</li>
</ul>
</div>
</nav>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -8,7 +8,7 @@
<parent>
<artifactId>dspace-parent</artifactId>
<groupId>org.dspace</groupId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -3,14 +3,14 @@
<groupId>org.dspace</groupId>
<artifactId>dspace-rest</artifactId>
<packaging>war</packaging>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<name>DSpace RESTful web services API</name>
<url>http://demo.dspace.org</url>
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -40,11 +40,7 @@ public class Collection extends DSpaceObject {
//Collection-Metadata
private String license;
//String provenance_description;
//String short_description;
//String introductory_text;
//String copyright_text;
//String side_bar_text;
private String copyrightText, introductoryText, shortDescription, sidebarText;
//Calculated
private Integer numberItems;
@@ -62,6 +58,11 @@ public class Collection extends DSpaceObject {
expandFields = Arrays.asList(expand.split(","));
}
this.setCopyrightText(collection.getMetadata(org.dspace.content.Collection.COPYRIGHT_TEXT));
this.setIntroductoryText(collection.getMetadata(org.dspace.content.Collection.INTRODUCTORY_TEXT));
this.setShortDescription(collection.getMetadata(org.dspace.content.Collection.SHORT_DESCRIPTION));
this.setSidebarText(collection.getMetadata(org.dspace.content.Collection.SIDEBAR_TEXT));
if(expandFields.contains("parentCommunityList") || expandFields.contains("all")) {
org.dspace.content.Community[] parentCommunities = collection.getCommunities();
for(org.dspace.content.Community parentCommunity : parentCommunities) {
@@ -109,6 +110,9 @@ public class Collection extends DSpaceObject {
this.logo = new Bitstream(collection.getLogo(), null);
}
}
else {
this.addExpand("logo");
}
if(!expandFields.contains("all")) {
this.addExpand("all");
@@ -164,4 +168,36 @@ public class Collection extends DSpaceObject {
public void setLicense(String license) {
this.license = license;
}
public String getCopyrightText() {
return copyrightText;
}
public void setCopyrightText(String copyrightText) {
this.copyrightText = copyrightText;
}
public String getIntroductoryText() {
return introductoryText;
}
public void setIntroductoryText(String introductoryText) {
this.introductoryText = introductoryText;
}
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
public String getSidebarText() {
return sidebarText;
}
public void setSidebarText(String sidebarText) {
this.sidebarText = sidebarText;
}
}

View File

@@ -58,6 +58,7 @@ public class Community extends DSpaceObject{
this.setCopyrightText(community.getMetadata(org.dspace.content.Community.COPYRIGHT_TEXT));
this.setIntroductoryText(community.getMetadata(org.dspace.content.Community.INTRODUCTORY_TEXT));
this.setShortDescription(community.getMetadata(org.dspace.content.Community.SHORT_DESCRIPTION));
this.setSidebarText(community.getMetadata(org.dspace.content.Community.SIDEBAR_TEXT));
this.setCountItems(community.countItems());

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -20,7 +20,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -15,7 +15,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -13,7 +13,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -401,7 +401,7 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
//}// Empty query
}
protected String addFilterQueriesToUrl(String pageURLMask) {
protected String addFilterQueriesToUrl(String pageURLMask) throws UIException {
Map<String, String[]> filterQueryParams = getParameterFilterQueries();
if(filterQueryParams != null)
{
@@ -413,7 +413,7 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
{
for (String filterQueryValue : filterQueryValues)
{
maskBuilder.append("&").append(filterQueryParam).append("=").append(filterQueryValue);
maskBuilder.append("&").append(filterQueryParam).append("=").append(encodeForURL(filterQueryValue));
}
}
}

View File

@@ -9,6 +9,7 @@ package org.dspace.app.xmlui.cocoon;
import java.io.File;
import java.io.IOException;
import java.net.SocketException;
import java.net.URL;
import java.net.URLConnection;
@@ -273,11 +274,18 @@ public class DSpaceCocoonServletFilter implements Filter
{ // invoke the next filter
arg2.doFilter(realRequest, realResponse);
}
} catch (RuntimeException e) {
ContextUtil.abortContext(realRequest);
LOG.error("Serious Runtime Error Occurred Processing Request!", e);
throw e;
} catch (IOException e) {
ContextUtil.abortContext(realRequest);
if (LOG.isDebugEnabled()) {
LOG.debug("The connection was reset", e);
}
else {
LOG.error("Client closed the connection before file download was complete");
}
} catch (RuntimeException e) {
ContextUtil.abortContext(realRequest);
LOG.error("Serious Runtime Error Occurred Processing Request!", e);
throw e;
} catch (Exception e) {
ContextUtil.abortContext(realRequest);
LOG.error("Serious Error Occurred Processing Request!", e);

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -243,7 +243,7 @@
<xsl:template match="mets:fileSec" mode="artifact-preview">
<xsl:param name="href"/>
<div class="thumbnail-wrapper">
<div class="thumbnail-wrapper" style="width: {$thumbnail.maxwidth}px;">
<div class="artifact-preview">
<a class="image-link" href="{$href}">
<xsl:choose>

View File

@@ -388,7 +388,7 @@
<xsl:template match="mets:file">
<xsl:param name="context" select="."/>
<div class="file-wrapper clearfix">
<div class="thumbnail-wrapper">
<div class="thumbnail-wrapper" style="width: {$thumbnail.maxwidth}px;">
<a class="image-link">
<xsl:attribute name="href">
<xsl:value-of select="mets:FLocat[@LOCTYPE='URL']/@xlink:href"/>
@@ -519,22 +519,29 @@
<xsl:variable name="rights_declaration" select="../../../mets:amdSec/mets:rightsMD[@ID = concat('rightsMD_', $file_id, '_METSRIGHTS')]/mets:mdWrap/mets:xmlData/rights:RightsDeclarationMD"/>
<xsl:variable name="rights_context" select="$rights_declaration/rights:Context"/>
<xsl:variable name="users">
<xsl:for-each select="$rights_declaration/*">
<xsl:value-of select="rights:UserName"/>
<xsl:choose>
<xsl:when test="rights:UserName/@USERTYPE = 'GROUP'">
<xsl:text> (group)</xsl:text>
</xsl:when>
<xsl:when test="rights:UserName/@USERTYPE = 'INDIVIDUAL'">
<xsl:text> (individual)</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
<xsl:choose>
<xsl:when test="not ($rights_context)">
<xsl:text>administrators only</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="$rights_declaration/*">
<xsl:value-of select="rights:UserName"/>
<xsl:choose>
<xsl:when test="rights:UserName/@USERTYPE = 'GROUP'">
<xsl:text> (group)</xsl:text>
</xsl:when>
<xsl:when test="rights:UserName/@USERTYPE = 'INDIVIDUAL'">
<xsl:text> (individual)</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:if test="position() != last()">, </xsl:if> <!-- TODO fix ending comma -->
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="not ($rights_context/@CONTEXTCLASS = 'GENERAL PUBLIC') and ($rights_context/rights:Permissions/@DISPLAY = 'true')">
<xsl:when test="(not ($rights_context/@CONTEXTCLASS = 'GENERAL PUBLIC') and ($rights_context/rights:Permissions/@DISPLAY = 'true')) or not ($rights_context)">
<a href="{mets:FLocat[@LOCTYPE='URL']/@xlink:href}">
<img width="64" height="64" src="{concat($theme-path,'/images/Crystal_Clear_action_lock3_64px.png')}" title="Read access available for {$users}"/>
<!-- icon source: http://commons.wikimedia.org/wiki/File:Crystal_Clear_action_lock3.png -->

View File

@@ -485,17 +485,10 @@
alt="{$ccLicenseName}"
title="{$ccLicenseName}"
>
<img>
<xsl:attribute name="src">
<xsl:value-of select="concat($theme-path,'/images/cc-ship.gif')"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="$ccLicenseName"/>
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>float:left; margin:0em 1em 0em 0em; border:none;</xsl:text>
</xsl:attribute>
</img>
<xsl:call-template name="cc-logo">
<xsl:with-param name="ccLicenseName" select="$ccLicenseName"/>
<xsl:with-param name="ccLicenseUri" select="$ccLicenseUri"/>
</xsl:call-template>
</a>
<span>
<xsl:attribute name="style">
@@ -508,6 +501,66 @@
</xsl:if>
</xsl:template>
<xsl:template name="cc-logo">
<xsl:param name="ccLicenseName"/>
<xsl:param name="ccLicenseUri"/>
<xsl:variable name="ccLogo">
<xsl:choose>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/licenses/by/')">
<xsl:value-of select="'cc-by.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/licenses/by-sa/')">
<xsl:value-of select="'cc-by-sa.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/licenses/by-nd/')">
<xsl:value-of select="'cc-by-nd.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/licenses/by-nc/')">
<xsl:value-of select="'cc-by-nc.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/licenses/by-nc-sa/')">
<xsl:value-of select="'cc-by-nc-sa.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/licenses/by-nc-nd/')">
<xsl:value-of select="'cc-by-nc-nd.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/publicdomain/zero/')">
<xsl:value-of select="'cc-zero.png'" />
</xsl:when>
<xsl:when test="starts-with($ccLicenseUri,
'http://creativecommons.org/publicdomain/mark/')">
<xsl:value-of select="'cc-mark.png'" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'cc-generic.png'" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="ccLogoImgSrc">
<xsl:value-of select="$theme-path"/>
<xsl:text>/images/creativecommons/</xsl:text>
<xsl:value-of select="$ccLogo"/>
</xsl:variable>
<img>
<xsl:attribute name="src">
<xsl:value-of select="$ccLogoImgSrc"/>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="$ccLicenseName"/>
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>float:left; margin:0em 1em 0em 0em; border:none;</xsl:text>
</xsl:attribute>
</img>
</xsl:template>
<!-- Like the header, the footer contains various miscellaneous text, links, and image placeholders -->
<xsl:template name="buildFooter">
<div id="ds-footer-wrapper">

View File

@@ -193,9 +193,6 @@
</xsl:if>
-->
<!-- Add version. -->
<xsl:apply-templates select="//dspace:field[@mdschema='dc' and @element='description' and @qualifier='provenance']" />
<!-- Add rights. -->
<xsl:apply-templates select="//dspace:field[@mdschema='dc' and @element='rights']" />
@@ -413,18 +410,6 @@
</xsl:element>
</xsl:template>
<!--
DataCite (15)
Adds Version information
-->
<xsl:template match="//dspace:field[@mdschema='dc' and @element='description' and @qualifier='provenance']">
<xsl:if test="contains(text(),'Made available')">
<xsl:element name="version">
<xsl:value-of select="." />
</xsl:element>
</xsl:if>
</xsl:template>
<!--
DataCite (16)
Adds Rights information

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
<!--
The contents of this file are subject to the license and copyright
@@ -7,99 +7,243 @@
tree and available online at
http://www.dspace.org/license/
Developed by DSpace @ Lyncode <dspace@lyncode.com>
Developed by DSpace @ Lyncode <dspace@lyncode.com>
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<uketd_dc:uketddc
xmlns:uketd_dc="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:uketdterms="http://naca.central.cranfield.ac.uk/ethos-oai/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/ http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd">
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element/doc:element/doc:field[@name='value']">
<dc:date><xsl:value-of select="." /></dc:date>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']">
<dcterms:issued><xsl:value-of select="." /></dcterms:issued>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']">
<dcterms:isReferencedBy xsi:type="dcterms:URI"><xsl:value-of select="." /></dcterms:isReferencedBy>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dcterms:abstract><xsl:value-of select="." /></dcterms:abstract>
</xsl:for-each>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.lyncode.com/xoai"
version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
<xsl:template match="/">
<uketd_dc:uketddc
xmlns:uketd_dc="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:uketdterms="http://naca.central.cranfield.ac.uk/ethos-oai/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/ http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd">
<!-- ******* Title: <dc:title> ******* -->
<!-- dc.title -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
<dc:title><xsl:value-of select="." /></dc:title>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator><xsl:value-of select="." /></dc:creator>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name!='author']/doc:element/doc:field[@name='value']">
<dc:contributor><xsl:value-of select="." /></dc:contributor>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dc:description><xsl:value-of select="." /></dc:description>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element/doc:element/doc:field[@name='value']">
<dc:language><xsl:value-of select="." /></dc:language>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='relation']/doc:element/doc:field[@name='value']">
<dc:relation><xsl:value-of select="." /></dc:relation>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
<dc:title><xsl:value-of select="." /></dc:title>
</xsl:for-each>
<!-- ******* Alternative Title: <dcterms:alternative> ******* -->
<!-- dc.title.alternative -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element[@name='alternative']/doc:element/doc:field[@name='value']">
<dcterms:alternative><xsl:value-of select="." /></dcterms:alternative>
</xsl:for-each>
<!-- ******* Author: <dc.creator> ******* -->
<!-- dc.contributor.author -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='author']/doc:element/doc:field[@name='value']">
<dc:creator><xsl:value-of select="." /></dc:creator>
</xsl:for-each>
<!-- ******* Supervisor(s)/Advisor(s): <uketdterms:advisor> ******* -->
<!-- dc.contributor.advisor -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='advisor']/doc:element/doc:field[@name='value']">
<uketdterms:advisor><xsl:value-of select="." /></uketdterms:advisor>
</xsl:for-each>
<!-- ******* Abstract: <dcterms:abstract> ******* -->
<!-- dc.description.abstract -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='abstract']/doc:element/doc:field[@name='value']">
<dcterms:abstract><xsl:value-of select="." /></dcterms:abstract>
</xsl:for-each>
<!-- ******* Awarding Insitution: <uketdterms:institution> ******* -->
<!-- dc.publisher -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<uketdterms:institution><xsl:value-of select="." /></uketdterms:institution>
</xsl:for-each>
<!-- dc.publisher.institution -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element[@name='institution']/doc:element/doc:field[@name='value']">
<uketdterms:institution><xsl:value-of select="." /></uketdterms:institution>
</xsl:for-each>
<!-- ******* Year of award: <dcterms:issued> ******* -->
<!-- dc.date.issued -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='issued']/doc:element/doc:field[@name='value']">
<dcterms:issued><xsl:value-of select="." /></dcterms:issued>
</xsl:for-each>
<!-- dc.date.awarded -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='date']/doc:element[@name='awarded']/doc:element/doc:field[@name='value']">
<dcterms:issued><xsl:value-of select="." /></dcterms:issued>
</xsl:for-each>
<!-- ******* Type: <dc:type> ******* -->
<!-- dc.type -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element/doc:field[@name='value']">
<dc:type><xsl:value-of select="." /></dc:type>
</xsl:for-each>
<!-- ******* Qualification Level: <uketdterms:qualificationlevel> ******* -->
<!-- dc.type.qualificationlevel -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element[@name='qualificationlevel']/doc:element/doc:field[@name='value']">
<uketdterms:qualificationlevel><xsl:value-of select="." /></uketdterms:qualificationlevel>
</xsl:for-each>
<!-- ******* Qualification Name: <uketdterms:qualificationname> ******* -->
<!-- dc.type.qualificationname -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='type']/doc:element[@name='qualificationname']/doc:element/doc:field[@name='value']">
<uketdterms:qualificationname><xsl:value-of select="." /></uketdterms:qualificationname>
</xsl:for-each>
<!-- ******* Language: <dc:language xsi:type="dcterms:ISO639-2"> ******* -->
<!-- dc.language.iso -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='language']/doc:element[@name='iso']/doc:element/doc:field[@name='value']">
<dc:language xsi:type="dcterms:ISO639-2"><xsl:value-of select="." /></dc:language>
</xsl:for-each>
<!-- ******* Sponsors/Funders: <uketdterms:sponsor> ******* -->
<!-- dc.contributor.sponsor -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='sponsor']/doc:element/doc:field[@name='value']">
<uketdterms:sponsor><xsl:value-of select="." /></uketdterms:sponsor>
</xsl:for-each>
<!-- dc.contributor.funder -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='funder']/doc:element/doc:field[@name='value']">
<uketdterms:sponsor><xsl:value-of select="." /></uketdterms:sponsor>
</xsl:for-each>
<!-- dc.description.sponsorship -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='description']/doc:element[@name='sponsorship']/doc:element/doc:field[@name='value']">
<uketdterms:sponsor><xsl:value-of select="." /></uketdterms:sponsor>
</xsl:for-each>
<!-- ******* Grant Number: <uketdterms:grantnumber> ******* -->
<!-- dc.identifier.grantnumber -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='grantnumber']/doc:element/doc:field[@name='value']">
<uketdterms:grantnumber><xsl:value-of select="." /></uketdterms:grantnumber>
</xsl:for-each>
<!-- ******* Institutional Repository URL: <dcterms:isReferencedBy> ******* -->
<!-- dc.identifier.uri -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='uri']/doc:element/doc:field[@name='value']">
<dcterms:isReferencedBy><xsl:value-of select="." /></dcterms:isReferencedBy>
<!-- <dc:identifier xsi:type="dcterms:URI"><xsl:value-of select="." /></dc:identifier> -->
</xsl:for-each>
<!-- ******* URLs for digital object(s) (obtained from file 'bundles') ******* -->
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']">
<!-- ******* URLs for content bitstreams (from ORIGINAL bundle): <dc:identifier xsi:type="dcterms:URI"> ******* -->
<xsl:if test="doc:field[@name='name']/text() = 'ORIGINAL'">
<xsl:for-each select="doc:element[@name='bitstreams']/doc:element">
<dc:identifier xsi:type="dcterms:URI"><xsl:value-of select="doc:field[@name='url']/text()" /></dc:identifier>
<uketdterms:checksum xsi:type="uketdterms:MD5"><xsl:value-of select="doc:field[@name='checksum']/text()" /></uketdterms:checksum>
</xsl:for-each>
</xsl:if>
<!-- ******* URL for License bitstream (from LICENSE bundle): <dcterms:license> ******* -->
<xsl:if test="doc:field[@name='name']/text() = 'LICENSE'">
<xsl:for-each select="doc:element[@name='bitstreams']/doc:element">
<dcterms:license><xsl:value-of select="doc:field[@name='url']/text()" /></dcterms:license>
<uketdterms:checksum xsi:type="uketdterms:MD5"><xsl:value-of select="doc:field[@name='checksum']/text()" /></uketdterms:checksum>
</xsl:for-each>
</xsl:if>
<!-- ******* URL for extracted text bitstream (from TEXT bundle): <dcterms:hasFormat> ******* -->
<xsl:if test="doc:field[@name='name']/text() = 'TEXT'">
<xsl:for-each select="doc:element[@name='bitstreams']/doc:element">
<dcterms:hasFormat><xsl:value-of select="doc:field[@name='url']/text()" /></dcterms:hasFormat>
<uketdterms:checksum xsi:type="uketdterms:MD5"><xsl:value-of select="doc:field[@name='checksum']/text()" /></uketdterms:checksum>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
<!-- ******* Embargo Date: <uketdterms:embargodate> ******* -->
<!-- dc.rights.embargodate -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element[@name='embargodate']/doc:element/doc:field[@name='value']">
<uketdterms:embargodate><xsl:value-of select="." /></uketdterms:embargodate>
</xsl:for-each>
<!-- dc.embargo.endate -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='embargo']/doc:element[@name='enddate']/doc:element/doc:field[@name='value']">
<uketdterms:embargodate><xsl:value-of select="." /></uketdterms:embargodate>
</xsl:for-each>
<!-- dc.embargo.terms -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='embargo']/doc:element[@name='terms']/doc:element/doc:field[@name='value']">
<uketdterms:embargodate><xsl:value-of select="." /></uketdterms:embargodate>
</xsl:for-each>
<!-- ******* Embargo Type: <uketdterms:embargotype> ******* -->
<!-- ******* Rights: <dc:rights> ******* -->
<!-- dc.rights -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
<!-- dc.rights.embargoreason -->
<!--
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='rights']/doc:element[@name='embargoreason']/doc:element/doc:field[@name='value']">
<dc:rights><xsl:value-of select="." /></dc:rights>
</xsl:for-each>
-->
<!-- ******* Subject Keywords: <dc:subject> ******* -->
<!-- dc.subject -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
<dc:format><xsl:value-of select="." /></dc:format>
<!-- dc.subject.other -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element[@name='other']/doc:element/doc:field[@name='value']">
<dc:subject><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
<dc:covarage><xsl:value-of select="." /></dc:covarage>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
<dc:publisher><xsl:value-of select="." /></dc:publisher>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
<dc:source><xsl:value-of select="." /></dc:source>
</xsl:for-each>
<xsl:for-each select="doc:metadata/doc:element[@name='bundles']/doc:element[@name='bundle']/doc:element[@name='bitstreams']/doc:element[@name='bitstream']">
<dc:identifier xsi:type="dcterms:URI"><xsl:value-of select="doc:field[@name='url']/text()" /></dc:identifier>
<uketdterms:checksum xsi:type="uketdterms:MD5"><xsl:value-of select="doc:field[@name='checksum']/text()" /></uketdterms:checksum>
</xsl:for-each>
</uketd_dc:uketddc>
</xsl:template>
<!-- ******* DDC Keywords: <dc:subject xsi:type="dcterms:DDC"> ******* -->
<!-- dc.subject.ddc -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element[@name='ddc']/doc:element/doc:field[@name='value']">
<dc:subject xsi:type="dcterms:DDC"><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<!-- ******* LCC Keywords: <dc:subject xsi:type="dcterms:LCC"> ******* -->
<!-- dc.subject.lcc -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element[@name='lcc']/doc:element/doc:field[@name='value']">
<dc:subject xsi:type="dcterms:LCC"><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<!-- ******* LCSH Keywords: <dc:subject xsi:type="dcterms:LCSH"> ******* -->
<!-- dc.subject.lcsh -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element[@name='lcsh']/doc:element/doc:field[@name='value']">
<dc:subject xsi:type="dcterms:LCSH"><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<!-- ******* MESH Keywords: <dc:subject xsi:type="dcterms:MESH"> ******* -->
<!-- dc.subject.mesh -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element[@name='mesh']/doc:element/doc:field[@name='value']">
<dc:subject xsi:type="dcterms:MESH"><xsl:value-of select="." /></dc:subject>
</xsl:for-each>
<!-- ******* Author Affiliation: <uketdterms:department> ******* -->
<!-- dc.contributor.affiliation -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='contributor']/doc:element[@name='affiliation']/doc:element/doc:field[@name='value']">
<uketdterms:department><xsl:value-of select="." /></uketdterms:department>
</xsl:for-each>
<!-- dc.publisher.department -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element[@name='department']/doc:element/doc:field[@name='value']">
<uketdterms:department><xsl:value-of select="." /></uketdterms:department>
</xsl:for-each>
<!-- ******* Work Identifier(s): <dc:identifier> ******* -->
<!-- dc.identifier.doi -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='doi']/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<!-- dc.identifier.isbn -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='isbn']/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<!-- dc.identifier.istc -->
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='identifier']/doc:element[@name='istc']/doc:element/doc:field[@name='value']">
<dc:identifier><xsl:value-of select="." /></dc:identifier>
</xsl:for-each>
<!-- ******* Author Identifier(s): <uketdterms:authoridentifier> ******* -->
</uketd_dc:uketddc>
</xsl:template>
</xsl:stylesheet>

View File

@@ -159,6 +159,7 @@
<XSLT>metadataFormats/uketd_dc.xsl</XSLT>
<Namespace>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/</Namespace>
<SchemaLocation>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd</SchemaLocation>
<Filter refid="thesisFilter" />
</Format>
</Formats>
@@ -242,6 +243,18 @@
<Value>info:eu-repo/grantAgreement/EC/FP</Value>
</Parameter>
</Filter>
<Filter id="thesisFilter">
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
<Parameter key="field">
<Value>dc.type</Value>
</Parameter>
<Parameter key="operator">
<Value>contains</Value>
</Parameter>
<Parameter key="value">
<Value>Thesis</Value>
</Parameter>
</Filter>
</Filters>
<Sets>

View File

@@ -688,12 +688,8 @@ event.dispatcher.default.class = org.dspace.event.BasicDispatcher
#
# uncomment event.consumer.doi.class and event.consumer.doi.filters below and add doi here
# if you want to send metadata updates to your doi registration agency.
event.dispatcher.default.consumers = versioning, discovery, eperson, harvester
# event.dispatcher.default.consumers = versioning, discovery, eperson, harvester, doi
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
event.dispatcher.noindex.consumers = eperson
@@ -1606,6 +1602,11 @@ google-metadata.enable = true
# The value must match the name of a subfolder of dspace-jspui/src/main/webapp/layout
# jspui.template.name =
##### Show community or collection logo in list #####
# jspui.home-page.logos = true
# jspui.community-home.logos = true
# jspui.community-list.logos = true
##### Item Home Processor #####
plugin.sequence.org.dspace.plugin.ItemHomeProcessor = \

View File

@@ -1,11 +0,0 @@
#---------------------------------------------------------------#
#------------SUBMISSION LOOKUP CONFIGURATIONS-------------------#
#---------------------------------------------------------------#
# This file contains configuration for retrieve external data #
#---------------------------------------------------------------#
# The API key "is" the email address you use to register on CrossRef
crossref.api-key = noapi-key
# Set to true to used a demo service
remoteservice.demo = false

View File

@@ -61,6 +61,36 @@
name="org.dspace.submit.lookup.SubmissionLookupService">
<property name="phase1TransformationEngine" ref="phase1TransformationEngine" />
<property name="phase2TransformationEngine" ref="phase2TransformationEngine" />
<!-- Uncomment the following property if you want specific fields to appear in the detail presentation
of a publication. Default values are the ones shown below -->
<!--
<property name="detailFields">
<list>
<value>title</value>
<value>authors</value>
<value>editors</value>
<value>translators</value>
<value>chairs</value>
<value>issued</value>
<value>abstract</value>
<value>doi</value>
<value>journal</value>
<value>volume</value>
<value>issue</value>
<value>publisher</value>
<value>jissn</value>
<value>jeissn</value>
<value>pisbn</value>
<value>eisbn</value>
<value>arxivCategory</value>
<value>keywords</value>
<value>mesh</value>
<value>language</value>
<value>subtype</value>
<value>translators</value>
</list>
</property>
-->
</bean>
<!-- **************************************************************************************************** -->
@@ -403,6 +433,14 @@
<!-- CrossRef Data Loaders -->
<bean id="crossRefOnlineDataLoader" class="org.dspace.submit.lookup.CrossRefOnlineDataLoader">
<property name="searchProvider" value="false" />
<!-- For CrossRef service you need to obtain an API Key from CrossRef. Once you get it, add it
to the following configuration value
-->
<property name="apiKey" value="" />
<!-- Uncomment the following line if you want to define the max results returned by the
CrossRef free text (by author, title, date) search. Default value is 10
-->
<!-- <property name="maxResults" value="10" /> -->
<property name="fieldMap" ref="crossrefInputMap" />
</bean>

Binary file not shown.

View File

@@ -5,28 +5,28 @@ INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection
SELECT
cwf_collectionrole_seq.nextval as collectionrole_id,
'reviewer' AS role_id,
eperson_group_id AS group_id,
to_number(replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_1', '')) AS collection_id
FROM epersongroup
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_1';
collection.workflow_step_1 AS group_id,
collection.collection_id AS collection_id
FROM collection
WHERE collection.workflow_step_1 IS NOT NULL;
INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection_id)
SELECT
cwf_collectionrole_seq.nextval as collectionrole_id,
'editor' AS role_id,
eperson_group_id AS group_id,
to_number(replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_2', '')) AS collection_id
FROM epersongroup
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_2';
collection.workflow_step_2 AS group_id,
collection.collection_id AS collection_id
FROM collection
WHERE collection.workflow_step_2 IS NOT NULL;
INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection_id)
SELECT
cwf_collectionrole_seq.nextval as collectionrole_id,
'finaleditor' AS role_id,
eperson_group_id AS group_id,
to_number(replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_3', '')) AS collection_id
FROM epersongroup
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_3';
collection.workflow_step_3 AS group_id,
collection.collection_id AS collection_id
FROM collection
WHERE collection.workflow_step_3 IS NOT NULL;
-- Migrate workflow items

View File

@@ -2,26 +2,26 @@
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
SELECT
'reviewer' AS role_id,
eperson_group_id AS group_id,
replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_1', '')::INTEGER AS collection_id
FROM epersongroup
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_1';
collection.workflow_step_1 AS group_id,
collection.collection_id AS collection_id
FROM collection
WHERE collection.workflow_step_1 IS NOT NULL;
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
SELECT
'editor' AS role_id,
eperson_group_id AS group_id,
replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_2', '')::INTEGER AS collection_id
FROM epersongroup
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_2';
collection.workflow_step_2 AS group_id,
collection.collection_id AS collection_id
FROM collection
WHERE collection.workflow_step_2 IS NOT NULL;
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
SELECT
'finaleditor' AS role_id,
eperson_group_id AS group_id,
replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_3', '')::INTEGER AS collection_id
FROM epersongroup
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_3';
collection.workflow_step_3 AS group_id,
collection.collection_id AS collection_id
FROM collection
WHERE collection.workflow_step_3 IS NOT NULL;
-- Migrate workflow items

View File

@@ -17,7 +17,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -13,7 +13,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<parent>
<artifactId>modules</artifactId>
<groupId>org.dspace</groupId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
@@ -94,7 +94,7 @@
<groupId>org.dspace</groupId>
<artifactId>dspace-rest</artifactId>
<type>war</type>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
</dependency>
<dependency>

View File

@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace.modules</groupId>
<artifactId>solr</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<packaging>war</packaging>
<name>DSpace SOLR :: Local Customizations</name>
<description>
@@ -13,7 +13,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-solr</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<classifier>skinny</classifier>
<type>war</type>
</dependency>
@@ -66,7 +66,7 @@
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-solr</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<classifier>classes</classifier>
<type>jar</type>
</dependency>

View File

@@ -16,7 +16,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -16,7 +16,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -15,7 +15,7 @@
<parent>
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

34
pom.xml
View File

@@ -4,7 +4,7 @@
<groupId>org.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<packaging>pom</packaging>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<name>DSpace Parent Project</name>
<description>
DSpace open source software is a turnkey institutional repository application.
@@ -542,102 +542,102 @@
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-api</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dspace.modules</groupId>
<artifactId>additions</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-sword</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-sword</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-swordv2</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-swordv2</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-jspui</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-jspui</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-oai</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-lni</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-lni-client</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-lni</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-xmlui</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-xmlui</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.dspace</groupId>
<artifactId>dspace-services</artifactId>
<version>4.0-rc2-SNAPSHOT</version>
<version>4.0-rc3-SNAPSHOT</version>
</dependency>
<!-- DSpace Localization Packages -->
<dependency>