fixed conflicts
@@ -12,7 +12,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -385,6 +385,11 @@ public class DSpaceCSV implements Serializable
|
|||||||
*/
|
*/
|
||||||
public final void addItem(Item i) throws Exception
|
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
|
// Create the CSV line
|
||||||
DSpaceCSVLine line = new DSpaceCSVLine(i.getID());
|
DSpaceCSVLine line = new DSpaceCSVLine(i.getID());
|
||||||
|
|
||||||
|
@@ -1340,11 +1340,33 @@ public class ItemImport
|
|||||||
+ sRegistrationLine);
|
+ sRegistrationLine);
|
||||||
continue;
|
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
|
System.out.println("\tRegistering Bitstream: " + sFilePath
|
||||||
+ "\tAssetstore: " + iAssetstore
|
+ "\tAssetstore: " + iAssetstore
|
||||||
+ "\tBundle: " + sBundle
|
+ "\tBundle: " + sBundle
|
||||||
+ "\tDescription: " + sBundle);
|
+ "\tDescription: " + sDescription);
|
||||||
continue; // process next line in contents file
|
continue; // process next line in contents file
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1571,7 +1593,7 @@ public class ItemImport
|
|||||||
* @throws AuthorizeException
|
* @throws AuthorizeException
|
||||||
*/
|
*/
|
||||||
private void registerBitstream(Context c, Item i, int assetstore,
|
private void registerBitstream(Context c, Item i, int assetstore,
|
||||||
String bitstreamPath, String bundleName )
|
String bitstreamPath, String bundleName, String description )
|
||||||
throws SQLException, IOException, AuthorizeException
|
throws SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
// TODO validate assetstore number
|
// TODO validate assetstore number
|
||||||
@@ -1622,6 +1644,7 @@ public class ItemImport
|
|||||||
// FIXME - guessing format guesses license.txt incorrectly as a text file format!
|
// FIXME - guessing format guesses license.txt incorrectly as a text file format!
|
||||||
BitstreamFormat bf = FormatIdentifier.guessFormat(c, bs);
|
BitstreamFormat bf = FormatIdentifier.guessFormat(c, bs);
|
||||||
bs.setFormat(bf);
|
bs.setFormat(bf);
|
||||||
|
bs.setDescription(description);
|
||||||
|
|
||||||
bs.update();
|
bs.update();
|
||||||
}
|
}
|
||||||
|
@@ -18,17 +18,9 @@ import java.sql.SQLException;
|
|||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
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.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
@@ -1031,7 +1023,8 @@ public class LogAnalyser
|
|||||||
public static String unParseDate(Date date)
|
public static String unParseDate(Date date)
|
||||||
{
|
{
|
||||||
// Use SimpleDateFormat
|
// 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);
|
return sdf.format(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1205,28 +1198,33 @@ public class LogAnalyser
|
|||||||
if (oracle)
|
if (oracle)
|
||||||
{
|
{
|
||||||
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
|
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
|
||||||
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) > TO_DATE('" +
|
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) >= TO_DATE('" +
|
||||||
unParseDate(startDate) + "', 'yyyy-MM-dd') ");
|
unParseDate(startDate) + "', 'yyyy-MM-dd\"T\"hh24:mi:ss\"Z\"') ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dateQuery.append(" AND text_value::timestamp > '" +
|
dateQuery.append(" AND text_value::timestamp >= '" +
|
||||||
unParseDate(startDate) + "'::timestamp ");
|
unParseDate(startDate) + "'::timestamp ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endDate != null)
|
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)
|
if (oracle)
|
||||||
{
|
{
|
||||||
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
|
dateQuery.append(" AND TO_TIMESTAMP( TO_CHAR(text_value), "+
|
||||||
"'yyyy-mm-dd\"T\"hh24:mi:ss\"Z\"' ) < TO_DATE('" +
|
"'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
|
else
|
||||||
{
|
{
|
||||||
dateQuery.append(" AND text_value::timestamp < '" +
|
dateQuery.append(" AND text_value::timestamp < '" +
|
||||||
unParseDate(endDate) + "'::timestamp ");
|
unParseDate(queryEndDate) + "'::timestamp ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -252,13 +252,18 @@ public class LDAPAuthentication
|
|||||||
|
|
||||||
// If there is no email and the email domain is set, add it to the netid
|
// If there is no email and the email domain is set, add it to the netid
|
||||||
String email = ldap.ldapEmail;
|
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");
|
email = netid + ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
email = netid;
|
||||||
|
}
|
||||||
|
|
||||||
if ((email != null) && (!"".equals(email)))
|
if (StringUtils.isNotEmpty(email))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -288,19 +293,19 @@ public class LDAPAuthentication
|
|||||||
{
|
{
|
||||||
context.setIgnoreAuthorization(true);
|
context.setIgnoreAuthorization(true);
|
||||||
eperson = EPerson.create(context);
|
eperson = EPerson.create(context);
|
||||||
if ((email != null) && (!"".equals(email)))
|
if (StringUtils.isNotEmpty(email))
|
||||||
{
|
{
|
||||||
eperson.setEmail(email);
|
eperson.setEmail(email);
|
||||||
}
|
}
|
||||||
if ((ldap.ldapGivenName!=null) && (!ldap.ldapGivenName.equals("")))
|
if (StringUtils.isNotEmpty(ldap.ldapGivenName))
|
||||||
{
|
{
|
||||||
eperson.setFirstName(ldap.ldapGivenName);
|
eperson.setFirstName(ldap.ldapGivenName);
|
||||||
}
|
}
|
||||||
if ((ldap.ldapSurname!=null) && (!ldap.ldapSurname.equals("")))
|
if (StringUtils.isNotEmpty(ldap.ldapSurname))
|
||||||
{
|
{
|
||||||
eperson.setLastName(ldap.ldapSurname);
|
eperson.setLastName(ldap.ldapSurname);
|
||||||
}
|
}
|
||||||
if ((ldap.ldapPhone!=null)&&(!ldap.ldapPhone.equals("")))
|
if (StringUtils.isNotEmpty(ldap.ldapPhone))
|
||||||
{
|
{
|
||||||
eperson.setMetadata("phone", ldap.ldapPhone);
|
eperson.setMetadata("phone", ldap.ldapPhone);
|
||||||
}
|
}
|
||||||
|
@@ -90,6 +90,13 @@ public class Collection extends DSpaceObject
|
|||||||
/** The default group of administrators */
|
/** The default group of administrators */
|
||||||
private Group admins;
|
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
|
* Construct a collection with the given table row
|
||||||
*
|
*
|
||||||
|
@@ -276,22 +276,7 @@ public class DOIIdentifierProvider
|
|||||||
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
|
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if DOI is reserved at the registration agency
|
connector.reserveDOI(context, dso, doi);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
doiRow.setColumn("status", IS_RESERVED);
|
doiRow.setColumn("status", IS_RESERVED);
|
||||||
DatabaseManager.update(context, doiRow);
|
DatabaseManager.update(context, doiRow);
|
||||||
@@ -311,52 +296,21 @@ public class DOIIdentifierProvider
|
|||||||
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
|
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the DOI is already registered online
|
// register DOI Online
|
||||||
if (connector.isDOIRegistered(context, doi))
|
try {
|
||||||
{
|
connector.registerDOI(context, dso, 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
catch (DOIIdentifierException die)
|
||||||
{
|
{
|
||||||
// check if doi is reserved for this specific dso
|
// do we have to reserve DOI before we can register it?
|
||||||
if (!connector.isDOIReserved(context, dso, doi))
|
if (die.getCode() == DOIIdentifierException.RESERVE_FIRST)
|
||||||
{
|
{
|
||||||
// check if doi is already reserved for another dso
|
this.reserveOnline(context, dso, identifier);
|
||||||
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 {
|
|
||||||
connector.registerDOI(context, dso, doi);
|
connector.registerDOI(context, dso, doi);
|
||||||
}
|
}
|
||||||
catch (DOIIdentifierException die)
|
else
|
||||||
{
|
{
|
||||||
// do we have to reserve DOI before we can register it?
|
throw die;
|
||||||
if (die.getCode() == DOIIdentifierException.REGISTER_FIRST)
|
|
||||||
{
|
|
||||||
this.reserveOnline(context, dso, identifier);
|
|
||||||
connector.registerDOI(context, dso, doi);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw die;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +329,6 @@ public class DOIIdentifierProvider
|
|||||||
|
|
||||||
doiRow.setColumn("status", IS_REGISTERED);
|
doiRow.setColumn("status", IS_REGISTERED);
|
||||||
DatabaseManager.update(context, doiRow);
|
DatabaseManager.update(context, doiRow);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateMetadata(Context context, DSpaceObject dso, String identifier)
|
public void updateMetadata(Context context, DSpaceObject dso, String identifier)
|
||||||
@@ -451,23 +404,9 @@ public class DOIIdentifierProvider
|
|||||||
if (DELETED == doiRow.getIntColumn("status") ||
|
if (DELETED == doiRow.getIntColumn("status") ||
|
||||||
TO_BE_DELETED == doiRow.getIntColumn("status"))
|
TO_BE_DELETED == doiRow.getIntColumn("status"))
|
||||||
{
|
{
|
||||||
throw new DOIIdentifierException("You tried to register a DOI that "
|
throw new DOIIdentifierException("You tried to update the metadata"
|
||||||
+ "is marked as DELETED.", DOIIdentifierException.DOI_IS_DELETED);
|
+ "of 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connector.updateMetadata(context, dso, doi);
|
connector.updateMetadata(context, dso, doi);
|
||||||
|
@@ -14,7 +14,12 @@ import org.dspace.core.Context;
|
|||||||
/**
|
/**
|
||||||
* A DOIConnector handles all calls to the API of your DOI registry.
|
* 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
|
* @author Pascal-Nicolas Becker
|
||||||
*/
|
*/
|
||||||
@@ -39,14 +44,6 @@ public interface DOIConnector {
|
|||||||
* DELETE request to the DataCite Metadata API directly, it will set the DOI
|
* DELETE request to the DataCite Metadata API directly, it will set the DOI
|
||||||
* to inactive.</p>
|
* 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 context
|
||||||
* @param doi
|
* @param doi
|
||||||
* @return
|
* @return
|
||||||
@@ -58,11 +55,10 @@ public interface DOIConnector {
|
|||||||
/**
|
/**
|
||||||
* Sends a request to the DOI registry to reserve a DOI.
|
* Sends a request to the DOI registry to reserve a DOI.
|
||||||
*
|
*
|
||||||
* Please check on your own if the DOI is already reserved or even
|
* The DOIConnector should check weather this DOI is reserved for another
|
||||||
* registered before you try to reserve it. You can use
|
* object already. In this case it should throw an {@link
|
||||||
* {@link isDOIRegistered} and {@link isDOIReserved} for it. The
|
* DOIIdentifierException} and set the error code to {@code
|
||||||
* DOIConnector won't do any tests and throws an DOIIdentifierException in
|
* DOIIdentifierException.DOI_ALREADY_EXISTS}.
|
||||||
* case of any problems with the DOI you want to reserve.
|
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
* @param dso
|
* @param dso
|
||||||
@@ -75,12 +71,11 @@ public interface DOIConnector {
|
|||||||
/**
|
/**
|
||||||
* Sends a request to the DOI registry to register a DOI.
|
* Sends a request to the DOI registry to register a DOI.
|
||||||
*
|
*
|
||||||
* Please check on your own if the DOI is already reserved or even
|
* The DOIConnector ensures compliance with the workflow of the registration
|
||||||
* registered before you try to register it. You can use the methods
|
* agency. For example, if a DOI has to be reserved before it can be
|
||||||
* {@code DOIConnector.isDOIRegistered(...)} and
|
* registered the DOIConnector has to check if it is reserved. In this case
|
||||||
* {@code DOIConnector.isDOIReserved(...)} for it. The DOIConnector won't
|
* you can throw an DOIIdentifierExcpetion and set the error code to
|
||||||
* do any tests and throws an DOIIdentifierException in case of any problems
|
* {@link DOIIdentifierException.RESERVE_FIRST}.
|
||||||
* with the DOI you want to register.
|
|
||||||
*
|
*
|
||||||
* @param context
|
* @param context
|
||||||
* @param dso
|
* @param dso
|
||||||
@@ -92,9 +87,10 @@ public interface DOIConnector {
|
|||||||
throws DOIIdentifierException;
|
throws DOIIdentifierException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a request to the DOI registry to update Metadata for a DOI.
|
* 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.
|
* 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 context
|
||||||
* @param dso
|
* @param dso
|
||||||
|
@@ -49,7 +49,7 @@ public class DOIIdentifierException extends IdentifierException {
|
|||||||
* be registered. This error code signals that a unreserved DOI should be
|
* be registered. This error code signals that a unreserved DOI should be
|
||||||
* registered and that the registration agency denied it.
|
* 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.
|
* Error while authenticating against the registration agency.
|
||||||
*/
|
*/
|
||||||
@@ -97,7 +97,7 @@ public class DOIIdentifierException extends IdentifierException {
|
|||||||
return "FOREIGN_DOI";
|
return "FOREIGN_DOI";
|
||||||
case BAD_ANSWER:
|
case BAD_ANSWER:
|
||||||
return "BAD_ANSWER";
|
return "BAD_ANSWER";
|
||||||
case REGISTER_FIRST:
|
case RESERVE_FIRST:
|
||||||
return "REGISTER_FIRST";
|
return "REGISTER_FIRST";
|
||||||
case AUTHENTICATION_ERROR:
|
case AUTHENTICATION_ERROR:
|
||||||
return "AUTHENTICATION_ERROR";
|
return "AUTHENTICATION_ERROR";
|
||||||
|
@@ -65,12 +65,12 @@ implements DOIConnector
|
|||||||
* Stores the scheme used to connect to the DataCite server. It will be set
|
* Stores the scheme used to connect to the DataCite server. It will be set
|
||||||
* by spring dependency injection.
|
* by spring dependency injection.
|
||||||
*/
|
*/
|
||||||
private String SCHEME;
|
protected String SCHEME;
|
||||||
/**
|
/**
|
||||||
* Stores the hostname of the DataCite server. Set by spring dependency
|
* Stores the hostname of the DataCite server. Set by spring dependency
|
||||||
* injection.
|
* injection.
|
||||||
*/
|
*/
|
||||||
private String HOST;
|
protected String HOST;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Path on the DataCite server used to generate DOIs. Set by spring
|
* Path on the DataCite server used to generate DOIs. Set by spring
|
||||||
@@ -188,7 +188,7 @@ implements DOIConnector
|
|||||||
this.CROSSWALK_NAME = CROSSWALK_NAME;
|
this.CROSSWALK_NAME = CROSSWALK_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void prepareXwalk()
|
protected void prepareXwalk()
|
||||||
{
|
{
|
||||||
if (null != this.xwalk)
|
if (null != this.xwalk)
|
||||||
return;
|
return;
|
||||||
@@ -203,7 +203,7 @@ implements DOIConnector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getUsername()
|
protected String getUsername()
|
||||||
{
|
{
|
||||||
if (null == this.USERNAME)
|
if (null == this.USERNAME)
|
||||||
{
|
{
|
||||||
@@ -218,7 +218,7 @@ implements DOIConnector
|
|||||||
return this.USERNAME;
|
return this.USERNAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getPassword()
|
protected String getPassword()
|
||||||
{
|
{
|
||||||
if (null == this.PASSWORD)
|
if (null == this.PASSWORD)
|
||||||
{
|
{
|
||||||
@@ -451,6 +451,21 @@ implements DOIConnector
|
|||||||
public void reserveDOI(Context context, DSpaceObject dso, String doi)
|
public void reserveDOI(Context context, DSpaceObject dso, String doi)
|
||||||
throws DOIIdentifierException
|
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();
|
this.prepareXwalk();
|
||||||
|
|
||||||
if (!this.xwalk.canDisseminate(dso))
|
if (!this.xwalk.canDisseminate(dso))
|
||||||
@@ -557,7 +572,40 @@ implements DOIConnector
|
|||||||
public void registerDOI(Context context, DSpaceObject dso, String doi)
|
public void registerDOI(Context context, DSpaceObject dso, String doi)
|
||||||
throws DOIIdentifierException
|
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
|
// send doi=<doi>\nurl=<url> to mds/doi
|
||||||
DataCiteResponse resp = null;
|
DataCiteResponse resp = null;
|
||||||
@@ -600,7 +648,7 @@ implements DOIConnector
|
|||||||
+ "of DOIs. The DOI we wanted to register had not been "
|
+ "of DOIs. The DOI we wanted to register had not been "
|
||||||
+ "reserved in advance. Please contact the administrator "
|
+ "reserved in advance. Please contact the administrator "
|
||||||
+ "or take a look in DSpace log file.",
|
+ "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.
|
// Catch all other http status code in case we forgot one.
|
||||||
default :
|
default :
|
||||||
@@ -619,18 +667,27 @@ implements DOIConnector
|
|||||||
public void updateMetadata(Context context, DSpaceObject dso, String doi)
|
public void updateMetadata(Context context, DSpaceObject dso, String doi)
|
||||||
throws DOIIdentifierException
|
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
|
// We can use reserveDOI to update metadata. Datacite API uses the same
|
||||||
// request for reservartion as for updating metadata.
|
// request for reservartion as for updating metadata.
|
||||||
this.reserveDOI(context, dso, doi);
|
this.reserveDOI(context, dso, doi);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataCiteResponse sendDOIPostRequest(String doi, String url)
|
protected DataCiteResponse sendDOIPostRequest(String doi, String url)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
// post mds/doi/
|
// post mds/doi/
|
||||||
// body must contaion "doi=<doi>\nurl=<url>}n"
|
// body must contaion "doi=<doi>\nurl=<url>}n"
|
||||||
URIBuilder uribuilder = new URIBuilder();
|
URIBuilder uribuilder = new URIBuilder();
|
||||||
uribuilder.setScheme("https").setHost(HOST).setPath(DOI_PATH);
|
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(DOI_PATH);
|
||||||
|
|
||||||
HttpPost httppost = null;
|
HttpPost httppost = null;
|
||||||
try
|
try
|
||||||
@@ -641,7 +698,7 @@ implements DOIConnector
|
|||||||
{
|
{
|
||||||
log.error("The URL we constructed to check a DOI "
|
log.error("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!");
|
+ "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()));
|
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
|
||||||
throw new RuntimeException("The URL we constructed to check a DOI "
|
throw new RuntimeException("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
+ "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
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
// delete mds/metadata/<doi>
|
// delete mds/metadata/<doi>
|
||||||
URIBuilder uribuilder = new URIBuilder();
|
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()));
|
+ doi.substring(DOI.SCHEME.length()));
|
||||||
|
|
||||||
HttpDelete httpdelete = null;
|
HttpDelete httpdelete = null;
|
||||||
@@ -691,7 +748,7 @@ implements DOIConnector
|
|||||||
{
|
{
|
||||||
log.error("The URL we constructed to check a DOI "
|
log.error("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!");
|
+ "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()));
|
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
|
||||||
throw new RuntimeException("The URL we constructed to check a DOI "
|
throw new RuntimeException("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
||||||
@@ -699,23 +756,23 @@ implements DOIConnector
|
|||||||
return sendHttpRequest(httpdelete, doi);
|
return sendHttpRequest(httpdelete, doi);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataCiteResponse sendDOIGetRequest(String doi)
|
protected DataCiteResponse sendDOIGetRequest(String doi)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
return sendGetRequest(doi, DOI_PATH);
|
return sendGetRequest(doi, DOI_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataCiteResponse sendMetadataGetRequest(String doi)
|
protected DataCiteResponse sendMetadataGetRequest(String doi)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
return sendGetRequest(doi, METADATA_PATH);
|
return sendGetRequest(doi, METADATA_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataCiteResponse sendGetRequest(String doi, String path)
|
protected DataCiteResponse sendGetRequest(String doi, String path)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
URIBuilder uribuilder = new URIBuilder();
|
URIBuilder uribuilder = new URIBuilder();
|
||||||
uribuilder.setScheme("https").setHost(HOST).setPath(path
|
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(path
|
||||||
+ doi.substring(DOI.SCHEME.length()));
|
+ doi.substring(DOI.SCHEME.length()));
|
||||||
|
|
||||||
HttpGet httpget = null;
|
HttpGet httpget = null;
|
||||||
@@ -727,7 +784,7 @@ implements DOIConnector
|
|||||||
{
|
{
|
||||||
log.error("The URL we constructed to check a DOI "
|
log.error("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!");
|
+ "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()));
|
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
|
||||||
throw new RuntimeException("The URL we constructed to check a DOI "
|
throw new RuntimeException("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
||||||
@@ -735,7 +792,7 @@ implements DOIConnector
|
|||||||
return sendHttpRequest(httpget, doi);
|
return sendHttpRequest(httpget, doi);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataCiteResponse sendMetadataPostRequest(String doi, Element metadataRoot)
|
protected DataCiteResponse sendMetadataPostRequest(String doi, Element metadataRoot)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
Format format = Format.getCompactFormat();
|
Format format = Format.getCompactFormat();
|
||||||
@@ -744,13 +801,13 @@ implements DOIConnector
|
|||||||
return sendMetadataPostRequest(doi, xout.outputString(new Document(metadataRoot)));
|
return sendMetadataPostRequest(doi, xout.outputString(new Document(metadataRoot)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataCiteResponse sendMetadataPostRequest(String doi, String metadata)
|
protected DataCiteResponse sendMetadataPostRequest(String doi, String metadata)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
// post mds/metadata/
|
// post mds/metadata/
|
||||||
// body must contain metadata in DataCite-XML.
|
// body must contain metadata in DataCite-XML.
|
||||||
URIBuilder uribuilder = new URIBuilder();
|
URIBuilder uribuilder = new URIBuilder();
|
||||||
uribuilder.setScheme("https").setHost(HOST).setPath(METADATA_PATH);
|
uribuilder.setScheme(SCHEME).setHost(HOST).setPath(METADATA_PATH);
|
||||||
|
|
||||||
HttpPost httppost = null;
|
HttpPost httppost = null;
|
||||||
try
|
try
|
||||||
@@ -761,7 +818,7 @@ implements DOIConnector
|
|||||||
{
|
{
|
||||||
log.error("The URL we constructed to check a DOI "
|
log.error("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!");
|
+ "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()));
|
DOI_PATH + "/" + doi.substring(DOI.SCHEME.length()));
|
||||||
throw new RuntimeException("The URL we constructed to check a DOI "
|
throw new RuntimeException("The URL we constructed to check a DOI "
|
||||||
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
+ "produced a URISyntaxException. Please check the configuration parameters!", e);
|
||||||
@@ -799,7 +856,7 @@ implements DOIConnector
|
|||||||
* @return
|
* @return
|
||||||
* @throws DOIIdentifierException
|
* @throws DOIIdentifierException
|
||||||
*/
|
*/
|
||||||
private DataCiteResponse sendHttpRequest(HttpUriRequest req, String doi)
|
protected DataCiteResponse sendHttpRequest(HttpUriRequest req, String doi)
|
||||||
throws DOIIdentifierException
|
throws DOIIdentifierException
|
||||||
{
|
{
|
||||||
DefaultHttpClient httpclient = new DefaultHttpClient();
|
DefaultHttpClient httpclient = new DefaultHttpClient();
|
||||||
@@ -923,7 +980,7 @@ implements DOIConnector
|
|||||||
}
|
}
|
||||||
|
|
||||||
// returns null or handle
|
// returns null or handle
|
||||||
private String extractAlternateIdentifier(Context context, String content)
|
protected String extractAlternateIdentifier(Context context, String content)
|
||||||
throws SQLException, DOIIdentifierException
|
throws SQLException, DOIIdentifierException
|
||||||
{
|
{
|
||||||
if (content == null)
|
if (content == null)
|
||||||
@@ -969,12 +1026,12 @@ implements DOIConnector
|
|||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String extractDOI(Element root) {
|
protected String extractDOI(Element root) {
|
||||||
Element doi = root.getChild("identifier", root.getNamespace());
|
Element doi = root.getChild("identifier", root.getNamespace());
|
||||||
return (null == doi) ? null : doi.getTextTrim();
|
return (null == doi) ? null : doi.getTextTrim();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Element addDOI(String doi, Element root) {
|
protected Element addDOI(String doi, Element root) {
|
||||||
if (null != extractDOI(root))
|
if (null != extractDOI(root))
|
||||||
{
|
{
|
||||||
return root;
|
return root;
|
||||||
@@ -985,7 +1042,7 @@ implements DOIConnector
|
|||||||
return root.addContent(0, identifier);
|
return root.addContent(0, identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DataCiteResponse
|
protected class DataCiteResponse
|
||||||
{
|
{
|
||||||
private final int statusCode;
|
private final int statusCode;
|
||||||
private final String content;
|
private final String content;
|
||||||
|
@@ -76,124 +76,75 @@ public class ArXivService
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<Record> search(String query, String arxivid, int max_result)
|
private List<Record> search(String query, String arxivid, int max_result)
|
||||||
throws IOException, HttpException
|
throws IOException, HttpException
|
||||||
{
|
{
|
||||||
List<Record> results = new ArrayList<Record>();
|
List<Record> results = new ArrayList<Record>();
|
||||||
if (!ConfigurationManager.getBooleanProperty(SubmissionLookupService.CFG_MODULE, "remoteservice.demo"))
|
GetMethod method = null;
|
||||||
{
|
try
|
||||||
GetMethod method = null;
|
{
|
||||||
try
|
HttpClient client = new HttpClient();
|
||||||
{
|
client.setTimeout(timeout);
|
||||||
HttpClient client = new HttpClient();
|
method = new GetMethod("http://export.arxiv.org/api/query");
|
||||||
client.setTimeout(timeout);
|
NameValuePair id = new NameValuePair("id_list", arxivid);
|
||||||
method = new GetMethod("http://export.arxiv.org/api/query");
|
NameValuePair queryParam = new NameValuePair("search_query",
|
||||||
NameValuePair id = new NameValuePair("id_list", arxivid);
|
query);
|
||||||
NameValuePair queryParam = new NameValuePair("search_query",
|
NameValuePair count = new NameValuePair("max_results",
|
||||||
query);
|
String.valueOf(max_result));
|
||||||
NameValuePair count = new NameValuePair("max_results",
|
method.setQueryString(new NameValuePair[] { id, queryParam,
|
||||||
String.valueOf(max_result));
|
count });
|
||||||
method.setQueryString(new NameValuePair[] { id, queryParam,
|
// Execute the method.
|
||||||
count });
|
int statusCode = client.executeMethod(method);
|
||||||
// Execute the method.
|
|
||||||
int statusCode = client.executeMethod(method);
|
|
||||||
|
|
||||||
if (statusCode != HttpStatus.SC_OK)
|
if (statusCode != HttpStatus.SC_OK)
|
||||||
{
|
{
|
||||||
if (statusCode == HttpStatus.SC_BAD_REQUEST)
|
if (statusCode == HttpStatus.SC_BAD_REQUEST)
|
||||||
throw new RuntimeException("arXiv query is not valid");
|
throw new RuntimeException("arXiv query is not valid");
|
||||||
else
|
else
|
||||||
throw new RuntimeException("Http call failed: "
|
throw new RuntimeException("Http call failed: "
|
||||||
+ method.getStatusLine());
|
+ method.getStatusLine());
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DocumentBuilderFactory factory = DocumentBuilderFactory
|
DocumentBuilderFactory factory = DocumentBuilderFactory
|
||||||
.newInstance();
|
.newInstance();
|
||||||
factory.setValidating(false);
|
factory.setValidating(false);
|
||||||
factory.setIgnoringComments(true);
|
factory.setIgnoringComments(true);
|
||||||
factory.setIgnoringElementContentWhitespace(true);
|
factory.setIgnoringElementContentWhitespace(true);
|
||||||
|
|
||||||
DocumentBuilder db = factory.newDocumentBuilder();
|
DocumentBuilder db = factory.newDocumentBuilder();
|
||||||
Document inDoc = db.parse(method.getResponseBodyAsStream());
|
Document inDoc = db.parse(method.getResponseBodyAsStream());
|
||||||
|
|
||||||
Element xmlRoot = inDoc.getDocumentElement();
|
Element xmlRoot = inDoc.getDocumentElement();
|
||||||
List<Element> dataRoots = XMLUtils.getElementList(xmlRoot,
|
List<Element> dataRoots = XMLUtils.getElementList(xmlRoot,
|
||||||
"entry");
|
"entry");
|
||||||
|
|
||||||
for (Element dataRoot : dataRoots)
|
for (Element dataRoot : dataRoots)
|
||||||
{
|
{
|
||||||
Record crossitem = ArxivUtils
|
Record crossitem = ArxivUtils
|
||||||
.convertArxixDomToRecord(dataRoot);
|
.convertArxixDomToRecord(dataRoot);
|
||||||
if (crossitem != null)
|
if (crossitem != null)
|
||||||
{
|
{
|
||||||
results.add(crossitem);
|
results.add(crossitem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
"ArXiv identifier is not valid or not exist");
|
"ArXiv identifier is not valid or not exist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (method != null)
|
if (method != null)
|
||||||
{
|
{
|
||||||
method.releaseConnection();
|
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);
|
|
||||||
|
|
||||||
Element xmlRoot = inDoc.getDocumentElement();
|
return results;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Record getByArXivIDs(String raw) throws HttpException, IOException
|
public Record getByArXivIDs(String raw) throws HttpException, IOException
|
||||||
{
|
{
|
||||||
|
@@ -35,6 +35,9 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
|
|||||||
|
|
||||||
private boolean searchProvider = true;
|
private boolean searchProvider = true;
|
||||||
|
|
||||||
|
private String apiKey = null;
|
||||||
|
private int maxResults = 10;
|
||||||
|
|
||||||
public void setSearchProvider(boolean searchProvider)
|
public void setSearchProvider(boolean searchProvider)
|
||||||
{
|
{
|
||||||
this.searchProvider = searchProvider;
|
this.searchProvider = searchProvider;
|
||||||
@@ -60,9 +63,14 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
|
|||||||
Set<String> dois = keys.get(DOI);
|
Set<String> dois = keys.get(DOI);
|
||||||
List<Record> items = null;
|
List<Record> items = null;
|
||||||
List<Record> results = new ArrayList<Record>();
|
List<Record> results = new ArrayList<Record>();
|
||||||
|
|
||||||
|
if (getApiKey() == null){
|
||||||
|
throw new RuntimeException("No CrossRef API key is specified!");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
items = crossrefService.search(context, dois);
|
items = crossrefService.search(context, dois, getApiKey());
|
||||||
}
|
}
|
||||||
catch (JDOMException e)
|
catch (JDOMException e)
|
||||||
{
|
{
|
||||||
@@ -89,8 +97,12 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
|
|||||||
public List<Record> search(Context context, String title, String author,
|
public List<Record> search(Context context, String title, String author,
|
||||||
int year) throws HttpException, IOException
|
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,
|
List<Record> items = crossrefService.search(context, title, author,
|
||||||
year, 10);
|
year, getMaxResults(), getApiKey());
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,4 +111,20 @@ public class CrossRefOnlineDataLoader extends NetworkSubmissionLookupDataLoader
|
|||||||
{
|
{
|
||||||
return searchProvider;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,6 @@ import org.apache.commons.httpclient.methods.GetMethod;
|
|||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.dspace.app.util.XMLUtils;
|
import org.dspace.app.util.XMLUtils;
|
||||||
import org.dspace.core.ConfigurationManager;
|
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.jdom.JDOMException;
|
import org.jdom.JDOMException;
|
||||||
@@ -58,7 +57,7 @@ public class CrossRefService
|
|||||||
this.timeout = timeout;
|
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,
|
throws HttpException, IOException, JDOMException,
|
||||||
ParserConfigurationException, SAXException
|
ParserConfigurationException, SAXException
|
||||||
{
|
{
|
||||||
@@ -67,84 +66,77 @@ public class CrossRefService
|
|||||||
{
|
{
|
||||||
for (String record : dois)
|
for (String record : dois)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!ConfigurationManager
|
GetMethod method = null;
|
||||||
.getBooleanProperty(SubmissionLookupService.CFG_MODULE, "remoteservice.demo"))
|
try
|
||||||
{
|
{
|
||||||
GetMethod method = null;
|
HttpClient client = new HttpClient();
|
||||||
try
|
client.setConnectionTimeout(timeout);
|
||||||
{
|
method = new GetMethod(
|
||||||
String apiKey = ConfigurationManager
|
"http://www.crossref.org/openurl/");
|
||||||
.getProperty(SubmissionLookupService.CFG_MODULE, "crossref.api-key");
|
|
||||||
|
|
||||||
HttpClient client = new HttpClient();
|
NameValuePair pid = new NameValuePair("pid", apiKey);
|
||||||
client.setConnectionTimeout(timeout);
|
NameValuePair noredirect = new NameValuePair(
|
||||||
method = new GetMethod(
|
"noredirect", "true");
|
||||||
"http://www.crossref.org/openurl/");
|
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);
|
if (statusCode != HttpStatus.SC_OK)
|
||||||
NameValuePair noredirect = new NameValuePair(
|
{
|
||||||
"noredirect", "true");
|
throw new RuntimeException("Http call failed: "
|
||||||
NameValuePair id = new NameValuePair("id", record);
|
+ method.getStatusLine());
|
||||||
method.setQueryString(new NameValuePair[] { pid,
|
}
|
||||||
noredirect, id });
|
|
||||||
// Execute the method.
|
|
||||||
int statusCode = client.executeMethod(method);
|
|
||||||
|
|
||||||
if (statusCode != HttpStatus.SC_OK)
|
Record crossitem;
|
||||||
{
|
try
|
||||||
throw new RuntimeException("Http call failed: "
|
{
|
||||||
+ method.getStatusLine());
|
DocumentBuilderFactory factory = DocumentBuilderFactory
|
||||||
}
|
.newInstance();
|
||||||
|
factory.setValidating(false);
|
||||||
|
factory.setIgnoringComments(true);
|
||||||
|
factory.setIgnoringElementContentWhitespace(true);
|
||||||
|
|
||||||
Record crossitem;
|
DocumentBuilder db = factory
|
||||||
try
|
.newDocumentBuilder();
|
||||||
{
|
Document inDoc = db.parse(method
|
||||||
DocumentBuilderFactory factory = DocumentBuilderFactory
|
.getResponseBodyAsStream());
|
||||||
.newInstance();
|
|
||||||
factory.setValidating(false);
|
|
||||||
factory.setIgnoringComments(true);
|
|
||||||
factory.setIgnoringElementContentWhitespace(true);
|
|
||||||
|
|
||||||
DocumentBuilder db = factory
|
Element xmlRoot = inDoc.getDocumentElement();
|
||||||
.newDocumentBuilder();
|
Element queryResult = XMLUtils.getSingleElement(xmlRoot, "query_result");
|
||||||
Document inDoc = db.parse(method
|
Element body = XMLUtils.getSingleElement(queryResult, "body");
|
||||||
.getResponseBodyAsStream());
|
Element dataRoot = XMLUtils.getSingleElement(body, "query");
|
||||||
|
|
||||||
Element xmlRoot = inDoc.getDocumentElement();
|
crossitem = CrossRefUtils
|
||||||
Element queryResult = XMLUtils.getSingleElement(xmlRoot, "query_result");
|
.convertCrossRefDomToRecord(dataRoot);
|
||||||
Element body = XMLUtils.getSingleElement(queryResult, "body");
|
results.add(crossitem);
|
||||||
Element dataRoot = XMLUtils.getSingleElement(body, "query");
|
}
|
||||||
|
catch (Exception e)
|
||||||
crossitem = CrossRefUtils
|
{
|
||||||
.convertCrossRefDomToRecord(dataRoot);
|
log.warn(LogManager
|
||||||
results.add(crossitem);
|
.getHeader(
|
||||||
}
|
context,
|
||||||
catch (Exception e)
|
"retrieveRecordDOI",
|
||||||
{
|
record
|
||||||
log.warn(LogManager
|
+ " DOI is not valid or not exist: "
|
||||||
.getHeader(
|
+ e.getMessage()));
|
||||||
context,
|
}
|
||||||
"retrieveRecordDOI",
|
}
|
||||||
record
|
finally
|
||||||
+ " DOI is not valid or not exist: "
|
{
|
||||||
+ e.getMessage()));
|
if (method != null)
|
||||||
}
|
{
|
||||||
}
|
method.releaseConnection();
|
||||||
finally
|
}
|
||||||
{
|
}
|
||||||
if (method != null)
|
}
|
||||||
{
|
catch (RuntimeException rt)
|
||||||
method.releaseConnection();
|
{
|
||||||
}
|
log.error(rt.getMessage(), rt);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (RuntimeException rt)
|
|
||||||
{
|
|
||||||
log.error(rt.getMessage(), rt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
@@ -176,7 +168,7 @@ public class CrossRefService
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<Record> search(Context context, String title, String authors,
|
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;
|
GetMethod method = null;
|
||||||
try
|
try
|
||||||
@@ -210,7 +202,7 @@ public class CrossRefService
|
|||||||
}
|
}
|
||||||
method.releaseConnection();
|
method.releaseConnection();
|
||||||
|
|
||||||
return search(context, dois);
|
return search(context, dois, apiKey);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@@ -93,7 +93,7 @@ public class PubmedFileDataLoader extends FileDataLoader
|
|||||||
Record record = null;
|
Record record = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
record = PubmedUtils.convertCrossRefDomToRecord(xmlArticle);
|
record = PubmedUtils.convertPubmedDomToRecord(xmlArticle);
|
||||||
recordSet.addRecord(convertFields(record));
|
recordSet.addRecord(convertFields(record));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@@ -212,128 +212,71 @@ public class PubmedService
|
|||||||
throws HttpException, IOException, ParserConfigurationException,
|
throws HttpException, IOException, ParserConfigurationException,
|
||||||
SAXException
|
SAXException
|
||||||
{
|
{
|
||||||
List<Record> results = new ArrayList<Record>();
|
List<Record> results = new ArrayList<Record>();
|
||||||
if (!ConfigurationManager.getBooleanProperty(SubmissionLookupService.CFG_MODULE, "remoteservice.demo"))
|
GetMethod method = null;
|
||||||
{
|
try
|
||||||
GetMethod method = null;
|
{
|
||||||
try
|
HttpClient client = new HttpClient();
|
||||||
{
|
client.setTimeout(5 * timeout);
|
||||||
HttpClient client = new HttpClient();
|
method = new GetMethod(
|
||||||
client.setTimeout(5 * timeout);
|
"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi");
|
||||||
method = new GetMethod(
|
|
||||||
"http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi");
|
|
||||||
|
|
||||||
NameValuePair db = new NameValuePair("db", "pubmed");
|
NameValuePair db = new NameValuePair("db", "pubmed");
|
||||||
NameValuePair retmode = new NameValuePair("retmode", "xml");
|
NameValuePair retmode = new NameValuePair("retmode", "xml");
|
||||||
NameValuePair rettype = new NameValuePair("rettype", "full");
|
NameValuePair rettype = new NameValuePair("rettype", "full");
|
||||||
NameValuePair id = new NameValuePair("id", StringUtils.join(
|
NameValuePair id = new NameValuePair("id", StringUtils.join(
|
||||||
pubmedIDs.iterator(), ","));
|
pubmedIDs.iterator(), ","));
|
||||||
method.setQueryString(new NameValuePair[] { db, retmode,
|
method.setQueryString(new NameValuePair[] { db, retmode,
|
||||||
rettype, id });
|
rettype, id });
|
||||||
// Execute the method.
|
// Execute the method.
|
||||||
int statusCode = client.executeMethod(method);
|
int statusCode = client.executeMethod(method);
|
||||||
|
|
||||||
if (statusCode != HttpStatus.SC_OK)
|
if (statusCode != HttpStatus.SC_OK)
|
||||||
{
|
{
|
||||||
throw new RuntimeException("WS call failed: "
|
throw new RuntimeException("WS call failed: "
|
||||||
+ method.getStatusLine());
|
+ method.getStatusLine());
|
||||||
}
|
}
|
||||||
|
|
||||||
DocumentBuilderFactory factory = DocumentBuilderFactory
|
DocumentBuilderFactory factory = DocumentBuilderFactory
|
||||||
.newInstance();
|
.newInstance();
|
||||||
factory.setValidating(false);
|
factory.setValidating(false);
|
||||||
factory.setIgnoringComments(true);
|
factory.setIgnoringComments(true);
|
||||||
factory.setIgnoringElementContentWhitespace(true);
|
factory.setIgnoringElementContentWhitespace(true);
|
||||||
|
|
||||||
DocumentBuilder builder = factory.newDocumentBuilder();
|
DocumentBuilder builder = factory.newDocumentBuilder();
|
||||||
Document inDoc = builder
|
Document inDoc = builder
|
||||||
.parse(method.getResponseBodyAsStream());
|
.parse(method.getResponseBodyAsStream());
|
||||||
|
|
||||||
Element xmlRoot = inDoc.getDocumentElement();
|
Element xmlRoot = inDoc.getDocumentElement();
|
||||||
List<Element> pubArticles = XMLUtils.getElementList(xmlRoot,
|
List<Element> pubArticles = XMLUtils.getElementList(xmlRoot,
|
||||||
"PubmedArticle");
|
"PubmedArticle");
|
||||||
|
|
||||||
for (Element xmlArticle : pubArticles)
|
for (Element xmlArticle : pubArticles)
|
||||||
{
|
{
|
||||||
Record pubmedItem = null;
|
Record pubmedItem = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pubmedItem = PubmedUtils
|
pubmedItem = PubmedUtils
|
||||||
.convertCrossRefDomToRecord(xmlArticle);
|
.convertPubmedDomToRecord(xmlArticle);
|
||||||
results.add(pubmedItem);
|
results.add(pubmedItem);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
"PubmedID is not valid or not exist: "
|
"PubmedID is not valid or not exist: "
|
||||||
+ e.getMessage(), e);
|
+ e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
if (method != null)
|
if (method != null)
|
||||||
{
|
{
|
||||||
method.releaseConnection();
|
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Record> search(String doi, String pmid) throws HttpException,
|
public List<Record> search(String doi, String pmid) throws HttpException,
|
||||||
|
@@ -34,7 +34,7 @@ import org.w3c.dom.Element;
|
|||||||
public class PubmedUtils
|
public class PubmedUtils
|
||||||
{
|
{
|
||||||
|
|
||||||
public static Record convertCrossRefDomToRecord(Element pubArticle)
|
public static Record convertPubmedDomToRecord(Element pubArticle)
|
||||||
{
|
{
|
||||||
MutableRecord record = new SubmissionLookupPublication("");
|
MutableRecord record = new SubmissionLookupPublication("");
|
||||||
|
|
||||||
|
@@ -56,6 +56,8 @@ public class SubmissionLookupService
|
|||||||
|
|
||||||
private TransformationEngine phase2TransformationEngine;
|
private TransformationEngine phase2TransformationEngine;
|
||||||
|
|
||||||
|
private List<String> detailFields = null;
|
||||||
|
|
||||||
public void setPhase2TransformationEngine(
|
public void setPhase2TransformationEngine(
|
||||||
TransformationEngine phase2TransformationEngine)
|
TransformationEngine phase2TransformationEngine)
|
||||||
{
|
{
|
||||||
@@ -212,4 +214,12 @@ public class SubmissionLookupService
|
|||||||
{
|
{
|
||||||
return this.fileProviders;
|
return this.fileProviders;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getDetailFields() {
|
||||||
|
return detailFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetailFields(List<String> detailFields) {
|
||||||
|
this.detailFields = detailFields;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -78,6 +78,8 @@ itemlist.dc.type.degree = Degree
|
|||||||
itemlist.et-al = et al
|
itemlist.et-al = et al
|
||||||
itemlist.thumbnail = Preview
|
itemlist.thumbnail = Preview
|
||||||
|
|
||||||
|
itemlist.title.undefined = Undefined
|
||||||
|
|
||||||
jsp.adminhelp = <span class="glyphicon glyphicon-question-sign"></span>
|
jsp.adminhelp = <span class="glyphicon glyphicon-question-sign"></span>
|
||||||
jsp.administer = Administer
|
jsp.administer = Administer
|
||||||
jsp.admintools = Admin Tools
|
jsp.admintools = Admin Tools
|
||||||
|
@@ -125,7 +125,7 @@ implements org.dspace.identifier.doi.DOIConnector
|
|||||||
if (!reserved.containsKey(doi))
|
if (!reserved.containsKey(doi))
|
||||||
{
|
{
|
||||||
throw new DOIIdentifierException("Trying to register an unreserverd "
|
throw new DOIIdentifierException("Trying to register an unreserverd "
|
||||||
+ "DOI.", DOIIdentifierException.REGISTER_FIRST);
|
+ "DOI.", DOIIdentifierException.RESERVE_FIRST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reserved.get(doi).intValue() != dso.getID())
|
if (reserved.get(doi).intValue() != dso.getID())
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -329,7 +329,7 @@ public class SubmissionLookupJSONRequest extends JSONRequest
|
|||||||
private Map<String, Object> getDetails(ItemSubmissionLookupDTO item,
|
private Map<String, Object> getDetails(ItemSubmissionLookupDTO item,
|
||||||
Context context)
|
Context context)
|
||||||
{
|
{
|
||||||
List<String> fieldOrder = getFieldOrderFromConfiguration();
|
List<String> fieldOrder = getFieldOrder();
|
||||||
Record totalData = item.getTotalPublication(service.getProviders());
|
Record totalData = item.getTotalPublication(service.getProviders());
|
||||||
Set<String> availableFields = totalData.getFields();
|
Set<String> availableFields = totalData.getFields();
|
||||||
List<String[]> fieldsLabels = new ArrayList<String[]>();
|
List<String[]> fieldsLabels = new ArrayList<String[]>();
|
||||||
@@ -339,10 +339,8 @@ public class SubmissionLookupJSONRequest extends JSONRequest
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fieldsLabels.add(new String[] {
|
if (totalData.getValues(f)!=null && totalData.getValues(f).size()>0)
|
||||||
f,
|
fieldsLabels.add(new String[] {f, I18nUtil.getMessage("jsp.submission-lookup.detail."+ f, context) });
|
||||||
I18nUtil.getMessage("jsp.submission-lookup.detail."
|
|
||||||
+ f, context) });
|
|
||||||
}
|
}
|
||||||
catch (MissingResourceException e)
|
catch (MissingResourceException e)
|
||||||
{
|
{
|
||||||
@@ -368,24 +366,37 @@ public class SubmissionLookupJSONRequest extends JSONRequest
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getFieldOrderFromConfiguration()
|
private List<String> getFieldOrder()
|
||||||
{
|
{
|
||||||
String config = ConfigurationManager
|
if (service.getDetailFields()!=null){
|
||||||
.getProperty("submission-lookup.detail.fields");
|
return service.getDetailFields();
|
||||||
if (config == null)
|
}
|
||||||
{
|
|
||||||
config = "title,authors,editors,years,doi,pmid,eid,arxiv,journal,jissn,jeissn,volume,issue,serie,sissn,seissn,abstract,mesh,keywords,subtype";
|
//Default values, in case the property is not set
|
||||||
}
|
List<String> defaultValues = new ArrayList<String>();
|
||||||
List<String> result = new ArrayList<String>();
|
defaultValues.add("title");
|
||||||
String[] split = config.split(",");
|
defaultValues.add("authors");
|
||||||
for (String s : split)
|
defaultValues.add("editors");
|
||||||
{
|
defaultValues.add("translators");
|
||||||
if (StringUtils.isNotBlank(s))
|
defaultValues.add("chairs");
|
||||||
{
|
defaultValues.add("issued");
|
||||||
result.add(s.trim());
|
defaultValues.add("abstract");
|
||||||
}
|
defaultValues.add("doi");
|
||||||
}
|
defaultValues.add("journal");
|
||||||
return result;
|
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(
|
private List<Map<String, Object>> getLightResultList(
|
||||||
|
@@ -483,7 +483,7 @@ public class BrowseListTag extends TagSupport
|
|||||||
metadata = UIUtil.displayDate(dd, false, false, hrq);
|
metadata = UIUtil.displayDate(dd, false, false, hrq);
|
||||||
}
|
}
|
||||||
// format the title field correctly for withdrawn and private items (ie. don't link)
|
// 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);
|
metadata = Utils.addEntities(metadataArray[0].value);
|
||||||
}
|
}
|
||||||
@@ -570,6 +570,23 @@ public class BrowseListTag extends TagSupport
|
|||||||
metadata = "<em>" + sb.toString() + "</em>";
|
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
|
// prepare extra special layout requirements for dates
|
||||||
String extras = "";
|
String extras = "";
|
||||||
@@ -887,21 +904,4 @@ public class BrowseListTag extends TagSupport
|
|||||||
throw new JspException("Server does not support DSpace's default encoding. ", e);
|
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -535,6 +535,23 @@ public class ItemListTag extends TagSupport
|
|||||||
metadata = "<em>" + sb.toString() + "</em>";
|
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
|
// prepare extra special layout requirements for dates
|
||||||
String extras = "";
|
String extras = "";
|
||||||
|
@@ -226,7 +226,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<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">
|
<div class="col-md-6">
|
||||||
@@ -241,7 +242,7 @@
|
|||||||
<div class="list-group-item row">
|
<div class="list-group-item row">
|
||||||
<%
|
<%
|
||||||
Bitstream logoCom = subcommunities[j].getLogo();
|
Bitstream logoCom = subcommunities[j].getLogo();
|
||||||
if (logoCom != null) { %>
|
if (showLogos && logoCom != null) { %>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logoCom.getID() %>" />
|
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logoCom.getID() %>" />
|
||||||
</div>
|
</div>
|
||||||
@@ -297,7 +298,7 @@
|
|||||||
<div class="list-group-item row">
|
<div class="list-group-item row">
|
||||||
<%
|
<%
|
||||||
Bitstream logoCol = collections[i].getLogo();
|
Bitstream logoCol = collections[i].getLogo();
|
||||||
if (logoCol != null) { %>
|
if (showLogos && logoCol != null) { %>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logoCol.getID() %>" />
|
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logoCol.getID() %>" />
|
||||||
</div>
|
</div>
|
||||||
|
@@ -53,9 +53,10 @@
|
|||||||
void showCommunity(Community c, JspWriter out, HttpServletRequest request, ItemCounter ic,
|
void showCommunity(Community c, JspWriter out, HttpServletRequest request, ItemCounter ic,
|
||||||
Map collectionMap, Map subcommunityMap) throws ItemCountException, IOException, SQLException
|
Map collectionMap, Map subcommunityMap) throws ItemCountException, IOException, SQLException
|
||||||
{
|
{
|
||||||
|
boolean showLogos = ConfigurationManager.getBooleanProperty("jspui.community-list.logos", true);
|
||||||
out.println( "<li class=\"media well\">" );
|
out.println( "<li class=\"media well\">" );
|
||||||
Bitstream logo = c.getLogo();
|
Bitstream logo = c.getLogo();
|
||||||
if (logo != null)
|
if (showLogos && logo != null)
|
||||||
{
|
{
|
||||||
out.println("<a class=\"pull-left col-md-2\" href=\"" + request.getContextPath() + "/handle/"
|
out.println("<a class=\"pull-left col-md-2\" href=\"" + request.getContextPath() + "/handle/"
|
||||||
+ c.getHandle() + "\"><img class=\"media-object img-responsive\" src=\"" +
|
+ c.getHandle() + "\"><img class=\"media-object img-responsive\" src=\"" +
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
out.println("<li class=\"media well\">");
|
out.println("<li class=\"media well\">");
|
||||||
|
|
||||||
Bitstream logoCol = cols[j].getLogo();
|
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/"
|
out.println("<a class=\"pull-left col-md-2\" href=\"" + request.getContextPath() + "/handle/"
|
||||||
+ cols[j].getHandle() + "\"><img class=\"media-object img-responsive\" src=\"" +
|
+ cols[j].getHandle() + "\"><img class=\"media-object img-responsive\" src=\"" +
|
||||||
|
@@ -188,13 +188,13 @@ if (communities != null && communities.length != 0)
|
|||||||
<p><fmt:message key="jsp.home.com2"/></p>
|
<p><fmt:message key="jsp.home.com2"/></p>
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<%
|
<%
|
||||||
|
boolean showLogos = ConfigurationManager.getBooleanProperty("jspui.home-page.logos", true);
|
||||||
for (int i = 0; i < communities.length; i++)
|
for (int i = 0; i < communities.length; i++)
|
||||||
{
|
{
|
||||||
%><div class="list-group-item row">
|
%><div class="list-group-item row">
|
||||||
<%
|
<%
|
||||||
Bitstream logo = communities[i].getLogo();
|
Bitstream logo = communities[i].getLogo();
|
||||||
if (logo != null) { %>
|
if (showLogos && logo != null) { %>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logo.getID() %>" />
|
<img alt="Logo" class="img-responsive" src="<%= request.getContextPath() %>/retrieve/<%= logo.getID() %>" />
|
||||||
</div>
|
</div>
|
||||||
|
@@ -131,6 +131,14 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<dspace:include page="<%= navbar %>" />
|
<dspace:include page="<%= navbar %>" />
|
||||||
</div>
|
</div>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<div class="container">
|
||||||
|
<dspace:include page="/layout/navbar-minimal.jsp" />
|
||||||
|
</div>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
@@ -131,6 +131,14 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<dspace:include page="<%= navbar %>" />
|
<dspace:include page="<%= navbar %>" />
|
||||||
</div>
|
</div>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%>
|
||||||
|
<div class="container">
|
||||||
|
<dspace:include page="/layout/navbar-minimal.jsp" />
|
||||||
|
</div>
|
||||||
<%
|
<%
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
99
dspace-jspui/src/main/webapp/layout/navbar-minimal.jsp
Normal 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>
|
@@ -11,7 +11,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>../..</relativePath>
|
<relativePath>../..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -3,14 +3,14 @@
|
|||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-rest</artifactId>
|
<artifactId>dspace-rest</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<name>DSpace RESTful web services API</name>
|
<name>DSpace RESTful web services API</name>
|
||||||
<url>http://demo.dspace.org</url>
|
<url>http://demo.dspace.org</url>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -40,11 +40,7 @@ public class Collection extends DSpaceObject {
|
|||||||
|
|
||||||
//Collection-Metadata
|
//Collection-Metadata
|
||||||
private String license;
|
private String license;
|
||||||
//String provenance_description;
|
private String copyrightText, introductoryText, shortDescription, sidebarText;
|
||||||
//String short_description;
|
|
||||||
//String introductory_text;
|
|
||||||
//String copyright_text;
|
|
||||||
//String side_bar_text;
|
|
||||||
|
|
||||||
//Calculated
|
//Calculated
|
||||||
private Integer numberItems;
|
private Integer numberItems;
|
||||||
@@ -62,6 +58,11 @@ public class Collection extends DSpaceObject {
|
|||||||
expandFields = Arrays.asList(expand.split(","));
|
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")) {
|
if(expandFields.contains("parentCommunityList") || expandFields.contains("all")) {
|
||||||
org.dspace.content.Community[] parentCommunities = collection.getCommunities();
|
org.dspace.content.Community[] parentCommunities = collection.getCommunities();
|
||||||
for(org.dspace.content.Community parentCommunity : parentCommunities) {
|
for(org.dspace.content.Community parentCommunity : parentCommunities) {
|
||||||
@@ -109,6 +110,9 @@ public class Collection extends DSpaceObject {
|
|||||||
this.logo = new Bitstream(collection.getLogo(), null);
|
this.logo = new Bitstream(collection.getLogo(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this.addExpand("logo");
|
||||||
|
}
|
||||||
|
|
||||||
if(!expandFields.contains("all")) {
|
if(!expandFields.contains("all")) {
|
||||||
this.addExpand("all");
|
this.addExpand("all");
|
||||||
@@ -164,4 +168,36 @@ public class Collection extends DSpaceObject {
|
|||||||
public void setLicense(String license) {
|
public void setLicense(String license) {
|
||||||
this.license = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,6 +58,7 @@ public class Community extends DSpaceObject{
|
|||||||
|
|
||||||
this.setCopyrightText(community.getMetadata(org.dspace.content.Community.COPYRIGHT_TEXT));
|
this.setCopyrightText(community.getMetadata(org.dspace.content.Community.COPYRIGHT_TEXT));
|
||||||
this.setIntroductoryText(community.getMetadata(org.dspace.content.Community.INTRODUCTORY_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.setSidebarText(community.getMetadata(org.dspace.content.Community.SIDEBAR_TEXT));
|
||||||
this.setCountItems(community.countItems());
|
this.setCountItems(community.countItems());
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -401,7 +401,7 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
|
|||||||
//}// Empty query
|
//}// Empty query
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String addFilterQueriesToUrl(String pageURLMask) {
|
protected String addFilterQueriesToUrl(String pageURLMask) throws UIException {
|
||||||
Map<String, String[]> filterQueryParams = getParameterFilterQueries();
|
Map<String, String[]> filterQueryParams = getParameterFilterQueries();
|
||||||
if(filterQueryParams != null)
|
if(filterQueryParams != null)
|
||||||
{
|
{
|
||||||
@@ -413,7 +413,7 @@ public abstract class AbstractSearch extends AbstractDSpaceTransformer implement
|
|||||||
{
|
{
|
||||||
for (String filterQueryValue : filterQueryValues)
|
for (String filterQueryValue : filterQueryValues)
|
||||||
{
|
{
|
||||||
maskBuilder.append("&").append(filterQueryParam).append("=").append(filterQueryValue);
|
maskBuilder.append("&").append(filterQueryParam).append("=").append(encodeForURL(filterQueryValue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@ package org.dspace.app.xmlui.cocoon;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.SocketException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
|
||||||
@@ -273,11 +274,18 @@ public class DSpaceCocoonServletFilter implements Filter
|
|||||||
{ // invoke the next filter
|
{ // invoke the next filter
|
||||||
arg2.doFilter(realRequest, realResponse);
|
arg2.doFilter(realRequest, realResponse);
|
||||||
}
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
} catch (RuntimeException e) {
|
ContextUtil.abortContext(realRequest);
|
||||||
ContextUtil.abortContext(realRequest);
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.error("Serious Runtime Error Occurred Processing Request!", e);
|
LOG.debug("The connection was reset", e);
|
||||||
throw 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) {
|
} catch (Exception e) {
|
||||||
ContextUtil.abortContext(realRequest);
|
ContextUtil.abortContext(realRequest);
|
||||||
LOG.error("Serious Error Occurred Processing Request!", e);
|
LOG.error("Serious Error Occurred Processing Request!", e);
|
||||||
|
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
@@ -243,7 +243,7 @@
|
|||||||
|
|
||||||
<xsl:template match="mets:fileSec" mode="artifact-preview">
|
<xsl:template match="mets:fileSec" mode="artifact-preview">
|
||||||
<xsl:param name="href"/>
|
<xsl:param name="href"/>
|
||||||
<div class="thumbnail-wrapper">
|
<div class="thumbnail-wrapper" style="width: {$thumbnail.maxwidth}px;">
|
||||||
<div class="artifact-preview">
|
<div class="artifact-preview">
|
||||||
<a class="image-link" href="{$href}">
|
<a class="image-link" href="{$href}">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@@ -388,7 +388,7 @@
|
|||||||
<xsl:template match="mets:file">
|
<xsl:template match="mets:file">
|
||||||
<xsl:param name="context" select="."/>
|
<xsl:param name="context" select="."/>
|
||||||
<div class="file-wrapper clearfix">
|
<div class="file-wrapper clearfix">
|
||||||
<div class="thumbnail-wrapper">
|
<div class="thumbnail-wrapper" style="width: {$thumbnail.maxwidth}px;">
|
||||||
<a class="image-link">
|
<a class="image-link">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="mets:FLocat[@LOCTYPE='URL']/@xlink: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_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="rights_context" select="$rights_declaration/rights:Context"/>
|
||||||
<xsl:variable name="users">
|
<xsl:variable name="users">
|
||||||
<xsl:for-each select="$rights_declaration/*">
|
<xsl:choose>
|
||||||
<xsl:value-of select="rights:UserName"/>
|
<xsl:when test="not ($rights_context)">
|
||||||
<xsl:choose>
|
<xsl:text>administrators only</xsl:text>
|
||||||
<xsl:when test="rights:UserName/@USERTYPE = 'GROUP'">
|
</xsl:when>
|
||||||
<xsl:text> (group)</xsl:text>
|
<xsl:otherwise>
|
||||||
</xsl:when>
|
<xsl:for-each select="$rights_declaration/*">
|
||||||
<xsl:when test="rights:UserName/@USERTYPE = 'INDIVIDUAL'">
|
<xsl:value-of select="rights:UserName"/>
|
||||||
<xsl:text> (individual)</xsl:text>
|
<xsl:choose>
|
||||||
</xsl:when>
|
<xsl:when test="rights:UserName/@USERTYPE = 'GROUP'">
|
||||||
</xsl:choose>
|
<xsl:text> (group)</xsl:text>
|
||||||
<xsl:if test="position() != last()">, </xsl:if>
|
</xsl:when>
|
||||||
</xsl:for-each>
|
<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:variable>
|
||||||
|
|
||||||
<xsl:choose>
|
<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}">
|
<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}"/>
|
<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 -->
|
<!-- icon source: http://commons.wikimedia.org/wiki/File:Crystal_Clear_action_lock3.png -->
|
||||||
|
@@ -485,17 +485,10 @@
|
|||||||
alt="{$ccLicenseName}"
|
alt="{$ccLicenseName}"
|
||||||
title="{$ccLicenseName}"
|
title="{$ccLicenseName}"
|
||||||
>
|
>
|
||||||
<img>
|
<xsl:call-template name="cc-logo">
|
||||||
<xsl:attribute name="src">
|
<xsl:with-param name="ccLicenseName" select="$ccLicenseName"/>
|
||||||
<xsl:value-of select="concat($theme-path,'/images/cc-ship.gif')"/>
|
<xsl:with-param name="ccLicenseUri" select="$ccLicenseUri"/>
|
||||||
</xsl:attribute>
|
</xsl:call-template>
|
||||||
<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>
|
|
||||||
</a>
|
</a>
|
||||||
<span>
|
<span>
|
||||||
<xsl:attribute name="style">
|
<xsl:attribute name="style">
|
||||||
@@ -508,6 +501,66 @@
|
|||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</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 -->
|
<!-- Like the header, the footer contains various miscellaneous text, links, and image placeholders -->
|
||||||
<xsl:template name="buildFooter">
|
<xsl:template name="buildFooter">
|
||||||
<div id="ds-footer-wrapper">
|
<div id="ds-footer-wrapper">
|
||||||
|
@@ -193,9 +193,6 @@
|
|||||||
</xsl:if>
|
</xsl:if>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Add version. -->
|
|
||||||
<xsl:apply-templates select="//dspace:field[@mdschema='dc' and @element='description' and @qualifier='provenance']" />
|
|
||||||
|
|
||||||
<!-- Add rights. -->
|
<!-- Add rights. -->
|
||||||
<xsl:apply-templates select="//dspace:field[@mdschema='dc' and @element='rights']" />
|
<xsl:apply-templates select="//dspace:field[@mdschema='dc' and @element='rights']" />
|
||||||
|
|
||||||
@@ -413,18 +410,6 @@
|
|||||||
</xsl:element>
|
</xsl:element>
|
||||||
</xsl:template>
|
</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)
|
DataCite (16)
|
||||||
Adds Rights information
|
Adds Rights information
|
||||||
|
@@ -7,99 +7,243 @@
|
|||||||
tree and available online at
|
tree and available online at
|
||||||
|
|
||||||
http://www.dspace.org/license/
|
http://www.dspace.org/license/
|
||||||
Developed by DSpace @ Lyncode <dspace@lyncode.com>
|
Developed by DSpace @ Lyncode <dspace@lyncode.com>
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<xsl:stylesheet
|
<xsl:stylesheet
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:doc="http://www.lyncode.com/xoai"
|
xmlns:doc="http://www.lyncode.com/xoai"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
|
<xsl:output omit-xml-declaration="yes" method="xml" indent="yes" />
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<uketd_dc:uketddc
|
<uketd_dc:uketddc
|
||||||
xmlns:uketd_dc="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/"
|
xmlns:uketd_dc="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:dcterms="http://purl.org/dc/terms/"
|
xmlns:dcterms="http://purl.org/dc/terms/"
|
||||||
xmlns:uketdterms="http://naca.central.cranfield.ac.uk/ethos-oai/terms/"
|
xmlns:uketdterms="http://naca.central.cranfield.ac.uk/ethos-oai/terms/"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
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">
|
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>
|
<!-- ******* Title: <dc:title> ******* -->
|
||||||
</xsl:for-each>
|
<!-- dc.title -->
|
||||||
<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:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='title']/doc:element/doc:field[@name='value']">
|
<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>
|
<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>
|
</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>
|
<!-- ******* 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>
|
</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.embargo.terms -->
|
||||||
<dc:contributor><xsl:value-of select="." /></dc:contributor>
|
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='embargo']/doc:element[@name='terms']/doc:element/doc:field[@name='value']">
|
||||||
</xsl:for-each>
|
<uketdterms:embargodate><xsl:value-of select="." /></uketdterms:embargodate>
|
||||||
<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>
|
|
||||||
</xsl:for-each>
|
</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']">
|
<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>
|
||||||
<xsl:for-each select="doc:metadata/doc:element[@name='bitstreams']/doc:element[@name='bitstream']/doc:field[@name='format']">
|
<!-- dc.subject.other -->
|
||||||
<dc:format><xsl:value-of select="." /></dc:format>
|
<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>
|
||||||
<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>
|
<!-- ******* DDC Keywords: <dc:subject xsi:type="dcterms:DDC"> ******* -->
|
||||||
</xsl:for-each>
|
<!-- dc.subject.ddc -->
|
||||||
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='covarage']/doc:element/doc:element/doc:field[@name='value']">
|
<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:covarage><xsl:value-of select="." /></dc:covarage>
|
<dc:subject xsi:type="dcterms:DDC"><xsl:value-of select="." /></dc:subject>
|
||||||
</xsl:for-each>
|
</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>
|
<!-- ******* LCC Keywords: <dc:subject xsi:type="dcterms:LCC"> ******* -->
|
||||||
</xsl:for-each>
|
<!-- dc.subject.lcc -->
|
||||||
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='publisher']/doc:element/doc:element/doc:field[@name='value']">
|
<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:publisher><xsl:value-of select="." /></dc:publisher>
|
<dc:subject xsi:type="dcterms:LCC"><xsl:value-of select="." /></dc:subject>
|
||||||
</xsl:for-each>
|
</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>
|
<!-- ******* LCSH Keywords: <dc:subject xsi:type="dcterms:LCSH"> ******* -->
|
||||||
</xsl:for-each>
|
<!-- dc.subject.lcsh -->
|
||||||
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='source']/doc:element/doc:element/doc:field[@name='value']">
|
<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:source><xsl:value-of select="." /></dc:source>
|
<dc:subject xsi:type="dcterms:LCSH"><xsl:value-of select="." /></dc:subject>
|
||||||
</xsl:for-each>
|
</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>
|
<!-- ******* MESH Keywords: <dc:subject xsi:type="dcterms:MESH"> ******* -->
|
||||||
<uketdterms:checksum xsi:type="uketdterms:MD5"><xsl:value-of select="doc:field[@name='checksum']/text()" /></uketdterms:checksum>
|
<!-- dc.subject.mesh -->
|
||||||
</xsl:for-each>
|
<xsl:for-each select="doc:metadata/doc:element[@name='dc']/doc:element[@name='subject']/doc:element[@name='mesh']/doc:element/doc:field[@name='value']">
|
||||||
</uketd_dc:uketddc>
|
<dc:subject xsi:type="dcterms:MESH"><xsl:value-of select="." /></dc:subject>
|
||||||
</xsl:template>
|
</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>
|
</xsl:stylesheet>
|
||||||
|
@@ -159,6 +159,7 @@
|
|||||||
<XSLT>metadataFormats/uketd_dc.xsl</XSLT>
|
<XSLT>metadataFormats/uketd_dc.xsl</XSLT>
|
||||||
<Namespace>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/</Namespace>
|
<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>
|
<SchemaLocation>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd</SchemaLocation>
|
||||||
|
<Filter refid="thesisFilter" />
|
||||||
</Format>
|
</Format>
|
||||||
</Formats>
|
</Formats>
|
||||||
|
|
||||||
@@ -242,6 +243,18 @@
|
|||||||
<Value>info:eu-repo/grantAgreement/EC/FP</Value>
|
<Value>info:eu-repo/grantAgreement/EC/FP</Value>
|
||||||
</Parameter>
|
</Parameter>
|
||||||
</Filter>
|
</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>
|
</Filters>
|
||||||
|
|
||||||
<Sets>
|
<Sets>
|
||||||
|
@@ -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
|
# 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.
|
# 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
|
||||||
|
|
||||||
|
|
||||||
# event.dispatcher.default.consumers = versioning, discovery, eperson, harvester, doi
|
|
||||||
|
|
||||||
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
|
# 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.class = org.dspace.event.BasicDispatcher
|
||||||
event.dispatcher.noindex.consumers = eperson
|
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
|
# The value must match the name of a subfolder of dspace-jspui/src/main/webapp/layout
|
||||||
# jspui.template.name =
|
# jspui.template.name =
|
||||||
|
|
||||||
|
##### Show community or collection logo in list #####
|
||||||
|
# jspui.home-page.logos = true
|
||||||
|
# jspui.community-home.logos = true
|
||||||
|
# jspui.community-list.logos = true
|
||||||
|
|
||||||
##### Item Home Processor #####
|
##### Item Home Processor #####
|
||||||
|
|
||||||
plugin.sequence.org.dspace.plugin.ItemHomeProcessor = \
|
plugin.sequence.org.dspace.plugin.ItemHomeProcessor = \
|
||||||
|
@@ -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
|
|
@@ -61,6 +61,36 @@
|
|||||||
name="org.dspace.submit.lookup.SubmissionLookupService">
|
name="org.dspace.submit.lookup.SubmissionLookupService">
|
||||||
<property name="phase1TransformationEngine" ref="phase1TransformationEngine" />
|
<property name="phase1TransformationEngine" ref="phase1TransformationEngine" />
|
||||||
<property name="phase2TransformationEngine" ref="phase2TransformationEngine" />
|
<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>
|
</bean>
|
||||||
|
|
||||||
<!-- **************************************************************************************************** -->
|
<!-- **************************************************************************************************** -->
|
||||||
@@ -403,6 +433,14 @@
|
|||||||
<!-- CrossRef Data Loaders -->
|
<!-- CrossRef Data Loaders -->
|
||||||
<bean id="crossRefOnlineDataLoader" class="org.dspace.submit.lookup.CrossRefOnlineDataLoader">
|
<bean id="crossRefOnlineDataLoader" class="org.dspace.submit.lookup.CrossRefOnlineDataLoader">
|
||||||
<property name="searchProvider" value="false" />
|
<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" />
|
<property name="fieldMap" ref="crossrefInputMap" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
@@ -5,28 +5,28 @@ INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection
|
|||||||
SELECT
|
SELECT
|
||||||
cwf_collectionrole_seq.nextval as collectionrole_id,
|
cwf_collectionrole_seq.nextval as collectionrole_id,
|
||||||
'reviewer' AS role_id,
|
'reviewer' AS role_id,
|
||||||
eperson_group_id AS group_id,
|
collection.workflow_step_1 AS group_id,
|
||||||
to_number(replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_1', '')) AS collection_id
|
collection.collection_id AS collection_id
|
||||||
FROM epersongroup
|
FROM collection
|
||||||
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_1';
|
WHERE collection.workflow_step_1 IS NOT NULL;
|
||||||
|
|
||||||
INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection_id)
|
INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection_id)
|
||||||
SELECT
|
SELECT
|
||||||
cwf_collectionrole_seq.nextval as collectionrole_id,
|
cwf_collectionrole_seq.nextval as collectionrole_id,
|
||||||
'editor' AS role_id,
|
'editor' AS role_id,
|
||||||
eperson_group_id AS group_id,
|
collection.workflow_step_2 AS group_id,
|
||||||
to_number(replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_2', '')) AS collection_id
|
collection.collection_id AS collection_id
|
||||||
FROM epersongroup
|
FROM collection
|
||||||
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_2';
|
WHERE collection.workflow_step_2 IS NOT NULL;
|
||||||
|
|
||||||
INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection_id)
|
INSERT INTO cwf_collectionrole (collectionrole_id, role_id, group_id, collection_id)
|
||||||
SELECT
|
SELECT
|
||||||
cwf_collectionrole_seq.nextval as collectionrole_id,
|
cwf_collectionrole_seq.nextval as collectionrole_id,
|
||||||
'finaleditor' AS role_id,
|
'finaleditor' AS role_id,
|
||||||
eperson_group_id AS group_id,
|
collection.workflow_step_3 AS group_id,
|
||||||
to_number(replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_3', '')) AS collection_id
|
collection.collection_id AS collection_id
|
||||||
FROM epersongroup
|
FROM collection
|
||||||
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_3';
|
WHERE collection.workflow_step_3 IS NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
-- Migrate workflow items
|
-- Migrate workflow items
|
||||||
|
@@ -2,26 +2,26 @@
|
|||||||
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
|
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
|
||||||
SELECT
|
SELECT
|
||||||
'reviewer' AS role_id,
|
'reviewer' AS role_id,
|
||||||
eperson_group_id AS group_id,
|
collection.workflow_step_1 AS group_id,
|
||||||
replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_1', '')::INTEGER AS collection_id
|
collection.collection_id AS collection_id
|
||||||
FROM epersongroup
|
FROM collection
|
||||||
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_1';
|
WHERE collection.workflow_step_1 IS NOT NULL;
|
||||||
|
|
||||||
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
|
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
|
||||||
SELECT
|
SELECT
|
||||||
'editor' AS role_id,
|
'editor' AS role_id,
|
||||||
eperson_group_id AS group_id,
|
collection.workflow_step_2 AS group_id,
|
||||||
replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_2', '')::INTEGER AS collection_id
|
collection.collection_id AS collection_id
|
||||||
FROM epersongroup
|
FROM collection
|
||||||
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_2';
|
WHERE collection.workflow_step_2 IS NOT NULL;
|
||||||
|
|
||||||
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
|
INSERT INTO cwf_collectionrole (role_id, group_id, collection_id)
|
||||||
SELECT
|
SELECT
|
||||||
'finaleditor' AS role_id,
|
'finaleditor' AS role_id,
|
||||||
eperson_group_id AS group_id,
|
collection.workflow_step_3 AS group_id,
|
||||||
replace(replace(name, 'COLLECTION_', ''), '_WORKFLOW_STEP_3', '')::INTEGER AS collection_id
|
collection.collection_id AS collection_id
|
||||||
FROM epersongroup
|
FROM collection
|
||||||
WHERE name LIKE 'COLLECTION_%_WORKFLOW_STEP_3';
|
WHERE collection.workflow_step_3 IS NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
-- Migrate workflow items
|
-- Migrate workflow items
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-rest</artifactId>
|
<artifactId>dspace-rest</artifactId>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.dspace.modules</groupId>
|
<groupId>org.dspace.modules</groupId>
|
||||||
<artifactId>solr</artifactId>
|
<artifactId>solr</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>DSpace SOLR :: Local Customizations</name>
|
<name>DSpace SOLR :: Local Customizations</name>
|
||||||
<description>
|
<description>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-solr</artifactId>
|
<artifactId>dspace-solr</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<classifier>skinny</classifier>
|
<classifier>skinny</classifier>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-solr</artifactId>
|
<artifactId>dspace-solr</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>modules</artifactId>
|
<artifactId>modules</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<relativePath>..</relativePath>
|
<relativePath>..</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
34
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-parent</artifactId>
|
<artifactId>dspace-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<name>DSpace Parent Project</name>
|
<name>DSpace Parent Project</name>
|
||||||
<description>
|
<description>
|
||||||
DSpace open source software is a turnkey institutional repository application.
|
DSpace open source software is a turnkey institutional repository application.
|
||||||
@@ -542,102 +542,102 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-api</artifactId>
|
<artifactId>dspace-api</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace.modules</groupId>
|
<groupId>org.dspace.modules</groupId>
|
||||||
<artifactId>additions</artifactId>
|
<artifactId>additions</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-sword</artifactId>
|
<artifactId>dspace-sword</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-sword</artifactId>
|
<artifactId>dspace-sword</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-swordv2</artifactId>
|
<artifactId>dspace-swordv2</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-swordv2</artifactId>
|
<artifactId>dspace-swordv2</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-jspui</artifactId>
|
<artifactId>dspace-jspui</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-jspui</artifactId>
|
<artifactId>dspace-jspui</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-oai</artifactId>
|
<artifactId>dspace-oai</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-oai</artifactId>
|
<artifactId>dspace-oai</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-lni</artifactId>
|
<artifactId>dspace-lni</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-lni-client</artifactId>
|
<artifactId>dspace-lni-client</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-lni</artifactId>
|
<artifactId>dspace-lni</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-xmlui</artifactId>
|
<artifactId>dspace-xmlui</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<classifier>classes</classifier>
|
<classifier>classes</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-xmlui</artifactId>
|
<artifactId>dspace-xmlui</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dspace</groupId>
|
<groupId>org.dspace</groupId>
|
||||||
<artifactId>dspace-services</artifactId>
|
<artifactId>dspace-services</artifactId>
|
||||||
<version>4.0-rc2-SNAPSHOT</version>
|
<version>4.0-rc3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- DSpace Localization Packages -->
|
<!-- DSpace Localization Packages -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|