mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 03:23:13 +00:00
[DS-707] Remove useless methods
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5664 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -156,7 +156,8 @@ public class Brand
|
|||||||
bWidth = fm.stringWidth(brandText.getText()) + xOffset * 2 + 1;
|
bWidth = fm.stringWidth(brandText.getText()) + xOffset * 2 + 1;
|
||||||
bHeight = fm.getHeight();
|
bHeight = fm.getHeight();
|
||||||
|
|
||||||
bx = by = 0;
|
bx = 0;
|
||||||
|
by = 0;
|
||||||
|
|
||||||
if (brandText.getLocation().equals(BrandText.TL))
|
if (brandText.getLocation().equals(BrandText.TL))
|
||||||
{
|
{
|
||||||
|
@@ -200,9 +200,9 @@ public class LDAPAuthentication
|
|||||||
|
|
||||||
if (ldap.ldapAuthenticate(netid, password, context))
|
if (ldap.ldapAuthenticate(netid, password, context))
|
||||||
{
|
{
|
||||||
context.setCurrentUser(eperson = EPerson.findByNetid(context, netid.toLowerCase()));
|
eperson = EPerson.findByNetid(context, netid.toLowerCase());
|
||||||
log.info(LogManager
|
context.setCurrentUser(eperson);
|
||||||
.getHeader(context, "authenticate", "type=ldap"));
|
log.info(LogManager.getHeader(context, "authenticate", "type=ldap"));
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -81,18 +81,14 @@ public class ShibAuthentication implements AuthenticationMethod
|
|||||||
String name;
|
String name;
|
||||||
while (names.hasMoreElements())
|
while (names.hasMoreElements())
|
||||||
{
|
{
|
||||||
log.debug("header:" + (name = names.nextElement().toString()) + "="
|
name = names.nextElement().toString();
|
||||||
+ request.getHeader(name));
|
log.debug("header:" + name + "=" + request.getHeader(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isUsingTomcatUser = ConfigurationManager
|
boolean isUsingTomcatUser = ConfigurationManager.getBooleanProperty("authentication.shib.email-use-tomcat-remote-user");
|
||||||
.getBooleanProperty("authentication.shib.email-use-tomcat-remote-user");
|
String emailHeader = ConfigurationManager.getProperty("authentication.shib.email-header");
|
||||||
String emailHeader = ConfigurationManager
|
String fnameHeader = ConfigurationManager.getProperty("authentication.shib.firstname-header");
|
||||||
.getProperty("authentication.shib.email-header");
|
String lnameHeader = ConfigurationManager.getProperty("authentication.shib.lastname-header");
|
||||||
String fnameHeader = ConfigurationManager
|
|
||||||
.getProperty("authentication.shib.firstname-header");
|
|
||||||
String lnameHeader = ConfigurationManager
|
|
||||||
.getProperty("authentication.shib.lastname-header");
|
|
||||||
|
|
||||||
String email = null;
|
String email = null;
|
||||||
String fname = null;
|
String fname = null;
|
||||||
|
@@ -120,7 +120,8 @@ public class Bitstream extends DSpaceObject
|
|||||||
// Cache ourselves
|
// Cache ourselves
|
||||||
context.cache(this, row.getIntColumn("bitstream_id"));
|
context.cache(this, row.getIntColumn("bitstream_id"));
|
||||||
|
|
||||||
modified = modifiedMetadata = false;
|
modified = false;
|
||||||
|
modifiedMetadata = false;
|
||||||
clearDetails();
|
clearDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -153,7 +153,8 @@ public class Bundle extends DSpaceObject
|
|||||||
// Cache ourselves
|
// Cache ourselves
|
||||||
context.cache(this, row.getIntColumn("bundle_id"));
|
context.cache(this, row.getIntColumn("bundle_id"));
|
||||||
|
|
||||||
modified = modifiedMetadata = false;
|
modified = false;
|
||||||
|
modifiedMetadata = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -174,7 +174,8 @@ public class Collection extends DSpaceObject
|
|||||||
// Cache ourselves
|
// Cache ourselves
|
||||||
context.cache(this, row.getIntColumn("collection_id"));
|
context.cache(this, row.getIntColumn("collection_id"));
|
||||||
|
|
||||||
modified = modifiedMetadata = false;
|
modified = false;
|
||||||
|
modifiedMetadata = false;
|
||||||
clearDetails();
|
clearDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -130,7 +130,8 @@ public class Community extends DSpaceObject
|
|||||||
// Cache ourselves
|
// Cache ourselves
|
||||||
context.cache(this, row.getIntColumn("community_id"));
|
context.cache(this, row.getIntColumn("community_id"));
|
||||||
|
|
||||||
modified = modifiedMetadata = false;
|
modified = false;
|
||||||
|
modifiedMetadata = false;
|
||||||
|
|
||||||
admins = groupFromColumn("admin");
|
admins = groupFromColumn("admin");
|
||||||
|
|
||||||
|
@@ -262,7 +262,8 @@ public abstract class SHERPARoMEOProtocol implements ChoiceAuthority
|
|||||||
else if (localName.equals(labelElement) && textValue != null)
|
else if (localName.equals(labelElement) && textValue != null)
|
||||||
{
|
{
|
||||||
// plug in label value
|
// plug in label value
|
||||||
result[rindex].value = result[rindex].label = textValue.trim();
|
result[rindex].value = textValue.trim();
|
||||||
|
result[rindex].label = result[rindex].value;
|
||||||
}
|
}
|
||||||
else if (authorityElement != null && localName.equals(authorityElement) && textValue != null)
|
else if (authorityElement != null && localName.equals(authorityElement) && textValue != null)
|
||||||
{
|
{
|
||||||
|
@@ -574,7 +574,8 @@ public abstract class AbstractMETSDisseminator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xwalkName = metsName = typeSpec;
|
metsName = typeSpec;
|
||||||
|
xwalkName = typeSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
// First, check to see if the crosswalk we are using is a normal DisseminationCrosswalk
|
// First, check to see if the crosswalk we are using is a normal DisseminationCrosswalk
|
||||||
|
@@ -687,26 +687,31 @@ public class METSManifest
|
|||||||
return xmlData.getChildren();
|
return xmlData.getChildren();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((mdRef = mdSec.getChild("mdRef", metsNS)) != null)
|
else
|
||||||
{
|
{
|
||||||
String mimeType = mdRef.getAttributeValue("MIMETYPE");
|
mdRef = mdSec.getChild("mdRef", metsNS);
|
||||||
if (mimeType != null && mimeType.equalsIgnoreCase("text/xml"))
|
if (mdRef != null)
|
||||||
{
|
{
|
||||||
Document mdd = parser.build(callback.getInputStream(mdRef));
|
String mimeType = mdRef.getAttributeValue("MIMETYPE");
|
||||||
List<Element> result = new ArrayList<Element>(1);
|
if (mimeType != null && mimeType.equalsIgnoreCase("text/xml"))
|
||||||
result.add(mdd.getRootElement());
|
{
|
||||||
return result;
|
Document mdd = parser.build(callback.getInputStream(mdRef));
|
||||||
|
List<Element> result = new ArrayList<Element>(1);
|
||||||
|
result.add(mdd.getRootElement());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.warn("Ignoring mdRef section because MIMETYPE is not XML, but: "+mimeType);
|
||||||
|
return new ArrayList<Element>(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.warn("Ignoring mdRef section because MIMETYPE is not XML, but: "+mimeType);
|
throw new MetadataValidationException("Invalid METS Manifest: ?mdSec element with neither mdRef nor mdWrap child.");
|
||||||
return new ArrayList<Element>(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new MetadataValidationException("Invalid METS Manifest: ?mdSec element with neither mdRef nor mdWrap child.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (JDOMException je)
|
catch (JDOMException je)
|
||||||
{
|
{
|
||||||
@@ -752,13 +757,17 @@ public class METSManifest
|
|||||||
outputPretty.outputString(xmlData.getChildren()).getBytes());
|
outputPretty.outputString(xmlData.getChildren()).getBytes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((mdRef = mdSec.getChild("mdRef", metsNS)) != null)
|
|
||||||
{
|
|
||||||
return callback.getInputStream(mdRef);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new MetadataValidationException("Invalid METS Manifest: ?mdSec element with neither mdRef nor mdWrap child.");
|
mdRef = mdSec.getChild("mdRef", metsNS);
|
||||||
|
if (mdRef != null)
|
||||||
|
{
|
||||||
|
return callback.getInputStream(mdRef);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new MetadataValidationException("Invalid METS Manifest: ?mdSec element with neither mdRef nor mdWrap child.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -366,8 +366,8 @@ public class PDFPackager
|
|||||||
log.debug("PDF Info dict title=\"" + title + "\"");
|
log.debug("PDF Info dict title=\"" + title + "\"");
|
||||||
}
|
}
|
||||||
item.addDC("title", null, "en", title);
|
item.addDC("title", null, "en", title);
|
||||||
String value;
|
String value = docinfo.getAuthor();
|
||||||
if ((value = docinfo.getAuthor()) != null)
|
if (value != null)
|
||||||
{
|
{
|
||||||
item.addDC("contributor", "author", null, value);
|
item.addDC("contributor", "author", null, value);
|
||||||
if (log.isDebugEnabled())
|
if (log.isDebugEnabled())
|
||||||
@@ -375,32 +375,41 @@ public class PDFPackager
|
|||||||
log.debug("PDF Info dict author=\"" + value + "\"");
|
log.debug("PDF Info dict author=\"" + value + "\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((value = docinfo.getCreator()) != null)
|
|
||||||
|
value = docinfo.getCreator();
|
||||||
|
if (value != null)
|
||||||
{
|
{
|
||||||
item.addDC("description", "provenance", "en",
|
item.addDC("description", "provenance", "en",
|
||||||
"Application that created the original document: " + value);
|
"Application that created the original document: " + value);
|
||||||
}
|
}
|
||||||
if ((value = docinfo.getProducer()) != null)
|
|
||||||
|
value = docinfo.getProducer();
|
||||||
|
if (value != null)
|
||||||
{
|
{
|
||||||
item.addDC("description", "provenance", "en",
|
item.addDC("description", "provenance", "en",
|
||||||
"Original document converted to PDF by: " + value);
|
"Original document converted to PDF by: " + value);
|
||||||
}
|
}
|
||||||
if ((value = docinfo.getSubject()) != null)
|
|
||||||
|
value = docinfo.getSubject();
|
||||||
|
if (value != null)
|
||||||
{
|
{
|
||||||
item.addDC("description", "abstract", null, value);
|
item.addDC("description", "abstract", null, value);
|
||||||
}
|
}
|
||||||
if ((value = docinfo.getKeywords()) != null)
|
|
||||||
|
value = docinfo.getKeywords();
|
||||||
|
if (value != null)
|
||||||
{
|
{
|
||||||
item.addDC("subject", "other", null, value);
|
item.addDC("subject", "other", null, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take either CreationDate or ModDate as "date.created",
|
// Take either CreationDate or ModDate as "date.created",
|
||||||
// Too bad there's no place to put "last modified" in the DC.
|
// Too bad there's no place to put "last modified" in the DC.
|
||||||
Calendar calValue;
|
Calendar calValue = docinfo.getCreationDate();
|
||||||
if ((calValue = docinfo.getCreationDate()) == null)
|
if (calValue == null)
|
||||||
{
|
{
|
||||||
calValue = docinfo.getModificationDate();
|
calValue = docinfo.getModificationDate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (calValue != null)
|
if (calValue != null)
|
||||||
{
|
{
|
||||||
item.addDC("date", "created", null,
|
item.addDC("date", "created", null,
|
||||||
|
@@ -108,7 +108,8 @@ public class EPerson extends DSpaceObject
|
|||||||
|
|
||||||
// Cache ourselves
|
// Cache ourselves
|
||||||
context.cache(this, row.getIntColumn("eperson_id"));
|
context.cache(this, row.getIntColumn("eperson_id"));
|
||||||
modified = modifiedMetadata = false;
|
modified = false;
|
||||||
|
modifiedMetadata = false;
|
||||||
clearDetails();
|
clearDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -134,7 +134,8 @@ public class ConsumerProfile
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int filter[] = new int[2];
|
int filter[] = new int[2];
|
||||||
filter[0] = filter[1] = 0;
|
filter[0] = 0;
|
||||||
|
filter[1] = 0;
|
||||||
String objectNames[] = fpart[0].split("\\|");
|
String objectNames[] = fpart[0].split("\\|");
|
||||||
for (int k = 0; k < objectNames.length; ++k)
|
for (int k = 0; k < objectNames.length; ++k)
|
||||||
{
|
{
|
||||||
|
@@ -101,7 +101,8 @@ public class OrderFormat
|
|||||||
if (type != null && type.length() > 0)
|
if (type != null && type.length() > 0)
|
||||||
{
|
{
|
||||||
// Use a delegate if one is configured
|
// Use a delegate if one is configured
|
||||||
if ((delegate = OrderFormat.getDelegate(type)) != null)
|
delegate = OrderFormat.getDelegate(type);
|
||||||
|
if (delegate != null)
|
||||||
{
|
{
|
||||||
return delegate.makeSortString(value, language);
|
return delegate.makeSortString(value, language);
|
||||||
}
|
}
|
||||||
|
@@ -98,7 +98,8 @@ public class ShibbolethFilter implements Filter
|
|||||||
String name;
|
String name;
|
||||||
while(names.hasMoreElements())
|
while(names.hasMoreElements())
|
||||||
{
|
{
|
||||||
log.debug("header:" + (name = names.nextElement().toString()) + "=" + ((HttpServletRequest) request).getHeader(name));
|
name = names.nextElement().toString();
|
||||||
|
log.debug("header:" + name + "=" + ((HttpServletRequest) request).getHeader(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
// No current user, prompt authentication
|
// No current user, prompt authentication
|
||||||
|
@@ -233,50 +233,67 @@ public class ItemTag extends TagSupport
|
|||||||
private StyleSelection styleSelection = (StyleSelection) PluginManager.getSinglePlugin(StyleSelection.class);
|
private StyleSelection styleSelection = (StyleSelection) PluginManager.getSinglePlugin(StyleSelection.class);
|
||||||
|
|
||||||
/** Hashmap of linked metadata to browse, from dspace.cfg */
|
/** Hashmap of linked metadata to browse, from dspace.cfg */
|
||||||
private Map<String,String> linkedMetadata;
|
private static Map<String,String> linkedMetadata;
|
||||||
|
|
||||||
/** Hashmap of urn base url resolver, from dspace.cfg */
|
/** Hashmap of urn base url resolver, from dspace.cfg */
|
||||||
private Map<String,String> urn2baseurl;
|
private static Map<String,String> urn2baseurl;
|
||||||
|
|
||||||
/** regex pattern to capture the style of a field, ie <code>schema.element.qualifier(style)</code> */
|
/** regex pattern to capture the style of a field, ie <code>schema.element.qualifier(style)</code> */
|
||||||
private Pattern fieldStylePatter = Pattern.compile(".*\\((.*)\\)");
|
private Pattern fieldStylePatter = Pattern.compile(".*\\((.*)\\)");
|
||||||
|
|
||||||
private static final long serialVersionUID = -3841266490729417240L;
|
private static final long serialVersionUID = -3841266490729417240L;
|
||||||
|
|
||||||
|
static {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
linkedMetadata = new HashMap<String, String>();
|
||||||
|
String linkMetadata;
|
||||||
|
|
||||||
|
i = 1;
|
||||||
|
do {
|
||||||
|
linkMetadata = ConfigurationManager.getProperty("webui.browse.link."+i);
|
||||||
|
if (linkMetadata != null) {
|
||||||
|
String[] linkedMetadataSplit = linkMetadata.split(":");
|
||||||
|
String indexName = linkedMetadataSplit[0].trim();
|
||||||
|
String metadataName = linkedMetadataSplit[1].trim();
|
||||||
|
linkedMetadata.put(indexName, metadataName);
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
} while (linkMetadata != null);
|
||||||
|
|
||||||
|
urn2baseurl = new HashMap<String, String>();
|
||||||
|
|
||||||
|
String urn;
|
||||||
|
i = 1;
|
||||||
|
do {
|
||||||
|
urn = ConfigurationManager.getProperty("webui.resolver."+i+".urn");
|
||||||
|
if (urn != null) {
|
||||||
|
String baseurl = ConfigurationManager.getProperty("webui.resolver."+i+".baseurl");
|
||||||
|
if (baseurl != null){
|
||||||
|
urn2baseurl.put(urn, baseurl);
|
||||||
|
} else {
|
||||||
|
log.warn("Wrong webui.resolver configuration, you need to specify both webui.resolver.<n>.urn and webui.resolver.<n>.baseurl: missing baseurl for n = "+i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
} while (urn != null);
|
||||||
|
|
||||||
|
// Set sensible default if no config is found for doi & handle
|
||||||
|
if (!urn2baseurl.containsKey("doi")){
|
||||||
|
urn2baseurl.put("doi",DOI_DEFAULT_BASEURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!urn2baseurl.containsKey("hdl")){
|
||||||
|
urn2baseurl.put("hdl",HANDLE_DEFAULT_BASEURL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ItemTag()
|
public ItemTag()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
getThumbSettings();
|
getThumbSettings();
|
||||||
linkedMetadata = new HashMap<String, String>();
|
|
||||||
String linkMetadata;
|
|
||||||
for (int i = 1; null != (linkMetadata = ConfigurationManager.getProperty("webui.browse.link."+i)); i++)
|
|
||||||
{
|
|
||||||
String[] linkedMetadataSplit = linkMetadata.split(":");
|
|
||||||
String indexName = linkedMetadataSplit[0].trim();
|
|
||||||
String metadataName = linkedMetadataSplit[1].trim();
|
|
||||||
linkedMetadata.put(indexName, metadataName);
|
|
||||||
}
|
|
||||||
|
|
||||||
urn2baseurl = new HashMap<String, String>();
|
|
||||||
|
|
||||||
String urn;
|
|
||||||
for (int i = 1; null != (urn = ConfigurationManager.getProperty("webui.resolver."+i+".urn")); i++){
|
|
||||||
String baseurl = ConfigurationManager.getProperty("webui.resolver."+i+".baseurl");
|
|
||||||
if (baseurl != null){
|
|
||||||
urn2baseurl.put(urn, baseurl);
|
|
||||||
} else {
|
|
||||||
log.warn("Wrong webui.resolver configuration, you need to specify both webui.resolver.<n>.urn and webui.resolver.<n>.baseurl: missing baseurl for n = "+i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set sensible default if no config is found for doi & handle
|
|
||||||
if (!urn2baseurl.containsKey("doi")){
|
|
||||||
urn2baseurl.put("doi",DOI_DEFAULT_BASEURL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!urn2baseurl.containsKey("hdl")){
|
|
||||||
urn2baseurl.put("hdl",HANDLE_DEFAULT_BASEURL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int doStartTag() throws JspException
|
public int doStartTag() throws JspException
|
||||||
|
@@ -424,7 +424,8 @@ public class FeedServlet extends DSpaceServlet
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
minKey = key;
|
minKey = key;
|
||||||
minFeed = maxFeed = feed;
|
minFeed = feed;
|
||||||
|
maxFeed = feed;
|
||||||
}
|
}
|
||||||
total += feed.hits;
|
total += feed.hits;
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,8 @@ public class ShibbolethServlet extends DSpaceServlet {
|
|||||||
String name;
|
String name;
|
||||||
while(names.hasMoreElements())
|
while(names.hasMoreElements())
|
||||||
{
|
{
|
||||||
log.info("header:" + (name = names.nextElement().toString()) + "=" + request.getHeader(name));
|
name = names.nextElement().toString();
|
||||||
|
log.info("header:" + name + "=" + request.getHeader(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
String jsp = null;
|
String jsp = null;
|
||||||
|
@@ -226,7 +226,8 @@ public class Authenticate
|
|||||||
{
|
{
|
||||||
String s;
|
String s;
|
||||||
am = (AuthenticationMethod)ai.next();
|
am = (AuthenticationMethod)ai.next();
|
||||||
if ((s = am.loginPageURL(context, request, response)) != null)
|
s = am.loginPageURL(context, request, response);
|
||||||
|
if (s != null)
|
||||||
{
|
{
|
||||||
url = s;
|
url = s;
|
||||||
++count;
|
++count;
|
||||||
|
@@ -225,13 +225,15 @@ class DAVCollection extends DAVDSpaceObject
|
|||||||
else if (elementsEqualIsh(property, logoProperty))
|
else if (elementsEqualIsh(property, logoProperty))
|
||||||
{
|
{
|
||||||
Bitstream lbs = this.collection.getLogo();
|
Bitstream lbs = this.collection.getLogo();
|
||||||
Element le;
|
if (lbs != null)
|
||||||
if (lbs != null
|
|
||||||
&& (le = DAVBitstream.makeXmlBitstream(lbs, this)) != null)
|
|
||||||
{
|
{
|
||||||
Element p = new Element("logo", DAV.NS_DSPACE);
|
Element le = DAVBitstream.makeXmlBitstream(lbs, this);
|
||||||
p.addContent(le);
|
if (le != null)
|
||||||
return p;
|
{
|
||||||
|
Element p = new Element("logo", DAV.NS_DSPACE);
|
||||||
|
p.addContent(le);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -171,13 +171,15 @@ class DAVCommunity extends DAVDSpaceObject
|
|||||||
else if (elementsEqualIsh(property, logoProperty))
|
else if (elementsEqualIsh(property, logoProperty))
|
||||||
{
|
{
|
||||||
Bitstream lbs = this.community.getLogo();
|
Bitstream lbs = this.community.getLogo();
|
||||||
Element le;
|
if (lbs != null)
|
||||||
if (lbs != null
|
|
||||||
&& (le = DAVBitstream.makeXmlBitstream(lbs, this)) != null)
|
|
||||||
{
|
{
|
||||||
Element p = new Element("logo", DAV.NS_DSPACE);
|
Element le = DAVBitstream.makeXmlBitstream(lbs, this);
|
||||||
p.addContent(le);
|
if (le != null)
|
||||||
return p;
|
{
|
||||||
|
Element p = new Element("logo", DAV.NS_DSPACE);
|
||||||
|
p.addContent(le);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -119,11 +119,9 @@ abstract class DAVDSpaceObject extends DAVResource
|
|||||||
protected static String getPathElt(String handle)
|
protected static String getPathElt(String handle)
|
||||||
{
|
{
|
||||||
int hs;
|
int hs;
|
||||||
if (handleSeparator != '/' && (hs = handle.indexOf('/')) >= 0)
|
if (handleSeparator != '/')
|
||||||
{
|
{
|
||||||
char hc[] = handle.toCharArray();
|
handle = handle.replaceFirst("/", String.valueOf(handleSeparator));
|
||||||
hc[hs] = handleSeparator;
|
|
||||||
handle = String.copyValueOf(hc);
|
|
||||||
}
|
}
|
||||||
return "dso_" + encodeHandle(handle);
|
return "dso_" + encodeHandle(handle);
|
||||||
}
|
}
|
||||||
|
@@ -397,29 +397,47 @@ abstract class DAVResource
|
|||||||
String pathElt[]) throws IOException, SQLException,
|
String pathElt[]) throws IOException, SQLException,
|
||||||
DAVStatusException, AuthorizeException
|
DAVStatusException, AuthorizeException
|
||||||
{
|
{
|
||||||
DAVResource result = null;
|
DAVResource result = DAVSite.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
if ((result = DAVSite.matchResourceURI(context, request, response,
|
return result;
|
||||||
pathElt)) == null
|
|
||||||
&& (result = DAVLookup.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null
|
|
||||||
&& (result = DAVWorkspace.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null
|
|
||||||
&& (result = DAVWorkflow.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null
|
|
||||||
&& (result = DAVEPerson.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null
|
|
||||||
&& (result = DAVItem.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null
|
|
||||||
&& (result = DAVBitstream.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null
|
|
||||||
&& (result = DAVDSpaceObject.matchResourceURI(context, request,
|
|
||||||
response, pathElt)) == null)
|
|
||||||
{
|
|
||||||
throw new DAVStatusException(HttpServletResponse.SC_BAD_REQUEST,
|
|
||||||
"Unrecognized DSpace resource URI");
|
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
|
result = DAVLookup.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DAVWorkspace.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DAVWorkflow.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DAVEPerson.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DAVItem.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DAVBitstream.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DAVDSpaceObject.matchResourceURI(context, request, response, pathElt);
|
||||||
|
if (result != null) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new DAVStatusException(HttpServletResponse.SC_BAD_REQUEST, "Unrecognized DSpace resource URI");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------- Generating Resource URIs -----------------------*/
|
/*----------------- Generating Resource URIs -----------------------*/
|
||||||
|
@@ -315,14 +315,18 @@ class DAVWorkflowItem extends DAVInProgressSubmission
|
|||||||
WorkflowManager.unclaim(this.context, (WorkflowItem) this.inProgressItem,
|
WorkflowManager.unclaim(this.context, (WorkflowItem) this.inProgressItem,
|
||||||
this.context.getCurrentUser());
|
this.context.getCurrentUser());
|
||||||
}
|
}
|
||||||
else if ((newState = WorkflowManager.getWorkflowID(key)) >= 0)
|
|
||||||
{
|
|
||||||
((WorkflowItem) this.inProgressItem).setState(newState);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new DAVStatusException(DAV.SC_CONFLICT,
|
newState = WorkflowManager.getWorkflowID(key);
|
||||||
"Unrecognized verb or state-name in value for state property.");
|
if (newState >= 0)
|
||||||
|
{
|
||||||
|
((WorkflowItem) this.inProgressItem).setState(newState);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new DAVStatusException(DAV.SC_CONFLICT,
|
||||||
|
"Unrecognized verb or state-name in value for state property.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.inProgressItem.update();
|
this.inProgressItem.update();
|
||||||
|
@@ -397,9 +397,9 @@ public class DSpaceOAICatalog extends AbstractCatalog
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String schemaURL;
|
String schemaURL = getCrosswalks().getSchemaURL(metadataPrefix);
|
||||||
|
|
||||||
if ((schemaURL = getCrosswalks().getSchemaURL(metadataPrefix)) == null)
|
if (schemaURL == null)
|
||||||
{
|
{
|
||||||
log.info(LogManager.getHeader(null, "oai_error",
|
log.info(LogManager.getHeader(null, "oai_error",
|
||||||
"cannot_disseminate_format"));
|
"cannot_disseminate_format"));
|
||||||
|
@@ -32,7 +32,8 @@ public class StepAndPage implements Comparable<StepAndPage>
|
|||||||
/** Default constructor returns an unset instance */
|
/** Default constructor returns an unset instance */
|
||||||
public StepAndPage()
|
public StepAndPage()
|
||||||
{
|
{
|
||||||
step = page = UNSET;
|
step = UNSET;
|
||||||
|
page = UNSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user