mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-08 10:34:25 +00:00
restore original changes in trunk without windows linefeeds.
git-svn-id: http://scm.dspace.org/svn/repo/trunk@2741 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -52,6 +52,7 @@ import org.dspace.app.xmlui.cocoon.DSpaceFeedGenerator;
|
|||||||
import org.dspace.app.xmlui.utils.DSpaceValidity;
|
import org.dspace.app.xmlui.utils.DSpaceValidity;
|
||||||
import org.dspace.app.xmlui.utils.HandleUtil;
|
import org.dspace.app.xmlui.utils.HandleUtil;
|
||||||
import org.dspace.app.xmlui.utils.UIException;
|
import org.dspace.app.xmlui.utils.UIException;
|
||||||
|
import org.dspace.app.xmlui.utils.URIUtil;
|
||||||
import org.dspace.app.xmlui.wing.Message;
|
import org.dspace.app.xmlui.wing.Message;
|
||||||
import org.dspace.app.xmlui.wing.WingException;
|
import org.dspace.app.xmlui.wing.WingException;
|
||||||
import org.dspace.app.xmlui.wing.element.Body;
|
import org.dspace.app.xmlui.wing.element.Body;
|
||||||
@@ -128,12 +129,12 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
|
|
||||||
if (dso == null)
|
if (dso == null)
|
||||||
return "0";
|
return "0";
|
||||||
|
|
||||||
return HashUtil.hash(dso.getHandle());
|
return HashUtil.hash(IdentifierService.getCanonicalForm(dso));
|
||||||
}
|
}
|
||||||
catch (SQLException sqle)
|
catch (SQLException sqle)
|
||||||
{
|
{
|
||||||
@@ -156,7 +157,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
|
|
||||||
if (dso == null)
|
if (dso == null)
|
||||||
return null;
|
return null;
|
||||||
@@ -195,7 +196,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
AuthorizeException
|
AuthorizeException
|
||||||
{
|
{
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
if (!(dso instanceof Collection))
|
if (!(dso instanceof Collection))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -221,7 +222,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
|
|
||||||
String feedFormat = parts[0].trim()+"+xml";
|
String feedFormat = parts[0].trim()+"+xml";
|
||||||
|
|
||||||
String feedURL = contextPath+"/feed/"+format.trim()+"/"+collection.getHandle();
|
String feedURL = IdentifierService.getURL(collection).toString() + "/"+format.trim();
|
||||||
pageMeta.addMetadata("feed", feedFormat).addContent(feedURL);
|
pageMeta.addMetadata("feed", feedFormat).addContent(feedURL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,7 +234,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
public void addBody(Body body) throws SAXException, WingException,
|
public void addBody(Body body) throws SAXException, WingException,
|
||||||
UIException, SQLException, IOException, AuthorizeException
|
UIException, SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
if (!(dso instanceof Collection))
|
if (!(dso instanceof Collection))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -251,7 +252,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
|
|
||||||
// Search query
|
// Search query
|
||||||
Division query = search.addInteractiveDivision("collection-search",
|
Division query = search.addInteractiveDivision("collection-search",
|
||||||
contextPath + "/handle/" + collection.getHandle() + "/search",
|
IdentifierService.getURL(collection).toString() + "/search",
|
||||||
Division.METHOD_POST, "secondary search");
|
Division.METHOD_POST, "secondary search");
|
||||||
|
|
||||||
Para para = query.addPara("search-query", null);
|
Para para = query.addPara("search-query", null);
|
||||||
@@ -266,7 +267,7 @@ public class CollectionViewer extends AbstractDSpaceTransformer implements Cache
|
|||||||
List browse = browseDiv.addList("collection-browse", List.TYPE_SIMPLE,
|
List browse = browseDiv.addList("collection-browse", List.TYPE_SIMPLE,
|
||||||
"collection-browse");
|
"collection-browse");
|
||||||
browse.setHead(T_head_browse);
|
browse.setHead(T_head_browse);
|
||||||
String url = contextPath + "/handle/" + collection.getHandle();
|
String url = IdentifierService.getURL(collection).toString();
|
||||||
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
|
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
|
||||||
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
||||||
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
||||||
|
@@ -52,6 +52,7 @@ import org.dspace.app.xmlui.cocoon.DSpaceFeedGenerator;
|
|||||||
import org.dspace.app.xmlui.utils.DSpaceValidity;
|
import org.dspace.app.xmlui.utils.DSpaceValidity;
|
||||||
import org.dspace.app.xmlui.utils.HandleUtil;
|
import org.dspace.app.xmlui.utils.HandleUtil;
|
||||||
import org.dspace.app.xmlui.utils.UIException;
|
import org.dspace.app.xmlui.utils.UIException;
|
||||||
|
import org.dspace.app.xmlui.utils.URIUtil;
|
||||||
import org.dspace.app.xmlui.wing.Message;
|
import org.dspace.app.xmlui.wing.Message;
|
||||||
import org.dspace.app.xmlui.wing.WingException;
|
import org.dspace.app.xmlui.wing.WingException;
|
||||||
import org.dspace.app.xmlui.wing.element.Body;
|
import org.dspace.app.xmlui.wing.element.Body;
|
||||||
@@ -135,12 +136,12 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
*/
|
*/
|
||||||
public Serializable getKey() {
|
public Serializable getKey() {
|
||||||
try {
|
try {
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
|
|
||||||
if (dso == null)
|
if (dso == null)
|
||||||
return "0"; // no item, something is wrong
|
return "0"; // no item, something is wrong
|
||||||
|
|
||||||
return HashUtil.hash(dso.getHandle());
|
return HashUtil.hash(IdentifierService.getCanonicalForm(dso));
|
||||||
}
|
}
|
||||||
catch (SQLException sqle)
|
catch (SQLException sqle)
|
||||||
{
|
{
|
||||||
@@ -161,7 +162,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
if (this.validity == null)
|
if (this.validity == null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
|
|
||||||
if (dso == null)
|
if (dso == null)
|
||||||
return null;
|
return null;
|
||||||
@@ -211,7 +212,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
WingException, UIException, SQLException, IOException,
|
WingException, UIException, SQLException, IOException,
|
||||||
AuthorizeException
|
AuthorizeException
|
||||||
{
|
{
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
if (!(dso instanceof Community))
|
if (!(dso instanceof Community))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -237,7 +238,8 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
|
|
||||||
String feedFormat = parts[0].trim()+"+xml";
|
String feedFormat = parts[0].trim()+"+xml";
|
||||||
|
|
||||||
String feedURL = contextPath+"/feed/"+format.trim()+"/"+community.getHandle();
|
// theres a problem here, the url for the feed has the format further in.
|
||||||
|
String feedURL = IdentifierService.getURL(community).toString() +"/"+format.trim();
|
||||||
pageMeta.addMetadata("feed", feedFormat).addContent(feedURL);
|
pageMeta.addMetadata("feed", feedFormat).addContent(feedURL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -251,7 +253,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
UIException, SQLException, IOException, AuthorizeException
|
UIException, SQLException, IOException, AuthorizeException
|
||||||
{
|
{
|
||||||
|
|
||||||
DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
|
DSpaceObject dso = URIUtil.resolve(objectModel);
|
||||||
if (!(dso instanceof Community))
|
if (!(dso instanceof Community))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -271,7 +273,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
|
|
||||||
// Search query
|
// Search query
|
||||||
Division query = search.addInteractiveDivision("community-search",
|
Division query = search.addInteractiveDivision("community-search",
|
||||||
contextPath + "/handle/" + community.getHandle() + "/search",
|
IdentifierService.getURL(community).toString() + "/search",
|
||||||
Division.METHOD_POST, "secondary search");
|
Division.METHOD_POST, "secondary search");
|
||||||
|
|
||||||
Para para = query.addPara("search-query", null);
|
Para para = query.addPara("search-query", null);
|
||||||
@@ -286,7 +288,7 @@ public class CommunityViewer extends AbstractDSpaceTransformer implements Cachea
|
|||||||
List browse = browseDiv.addList("community-browse", List.TYPE_SIMPLE,
|
List browse = browseDiv.addList("community-browse", List.TYPE_SIMPLE,
|
||||||
"community-browse");
|
"community-browse");
|
||||||
browse.setHead(T_head_browse);
|
browse.setHead(T_head_browse);
|
||||||
String url = contextPath + "/handle/" + community.getHandle();
|
String url = IdentifierService.getURL(community).toString();
|
||||||
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
|
browse.addItemXref(url + "/browse?type=title",T_browse_titles);
|
||||||
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
browse.addItemXref(url + "/browse?type=author",T_browse_authors);
|
||||||
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
|
||||||
|
@@ -56,6 +56,7 @@ import org.dspace.content.Collection;
|
|||||||
import org.dspace.content.Community;
|
import org.dspace.content.Community;
|
||||||
import org.dspace.content.DSpaceObject;
|
import org.dspace.content.DSpaceObject;
|
||||||
import org.dspace.content.Item;
|
import org.dspace.content.Item;
|
||||||
|
import org.dspace.uri.IdentifierService;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -171,14 +172,15 @@ public class RestrictedItem extends AbstractDSpaceTransformer //implements Cache
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
String identifier = "unknown";
|
String identifier = "unknown";
|
||||||
String handle = dso.getHandle();
|
|
||||||
|
String handle = IdentifierService.getCanonicalForm(dso);
|
||||||
if (handle == null || "".equals(handle))
|
if (handle == null || "".equals(handle))
|
||||||
{
|
{
|
||||||
identifier = "internal ID: " + dso.getID();
|
identifier = "internal ID: " + dso.getID();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
identifier = "hdl:"+handle;
|
identifier = handle;
|
||||||
}
|
}
|
||||||
unauthorized.setHead(T_head_item);
|
unauthorized.setHead(T_head_item);
|
||||||
unauthorized.addPara(T_para_item.parameterize(identifier));
|
unauthorized.addPara(T_para_item.parameterize(identifier));
|
||||||
|
@@ -66,8 +66,8 @@ import org.dspace.content.Item;
|
|||||||
import org.dspace.content.WorkspaceItem;
|
import org.dspace.content.WorkspaceItem;
|
||||||
import org.dspace.core.Context;
|
import org.dspace.core.Context;
|
||||||
import org.dspace.core.LogManager;
|
import org.dspace.core.LogManager;
|
||||||
import org.dspace.handle.HandleManager;
|
|
||||||
import org.dspace.submit.AbstractProcessingStep;
|
import org.dspace.submit.AbstractProcessingStep;
|
||||||
|
import org.dspace.uri.IdentifierService;
|
||||||
import org.dspace.workflow.WorkflowItem;
|
import org.dspace.workflow.WorkflowItem;
|
||||||
import org.dspace.workflow.WorkflowManager;
|
import org.dspace.workflow.WorkflowManager;
|
||||||
|
|
||||||
@@ -365,11 +365,12 @@ public class FlowUtils {
|
|||||||
// See if that gave the item a Handle. If it did,
|
// See if that gave the item a Handle. If it did,
|
||||||
// the item made it into the archive, so we
|
// the item made it into the archive, so we
|
||||||
// should display a suitable page.
|
// should display a suitable page.
|
||||||
String handle = HandleManager.findHandle(context, item);
|
// String handle = HandleManager.findHandle(context, item);
|
||||||
|
|
||||||
context.commit();
|
context.commit();
|
||||||
|
|
||||||
if (handle != null)
|
// if (handle != null)
|
||||||
|
if (item.isArchived())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -451,7 +452,7 @@ public class FlowUtils {
|
|||||||
//Load the Submission Process for the collection this WSI is associated with
|
//Load the Submission Process for the collection this WSI is associated with
|
||||||
Collection c = wsi.getCollection();
|
Collection c = wsi.getCollection();
|
||||||
SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
|
SubmissionConfigReader subConfigReader = new SubmissionConfigReader();
|
||||||
SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(c.getHandle(), false);
|
SubmissionConfig subConfig = subConfigReader.getSubmissionConfig(IdentifierService.getCanonicalForm(c), false);
|
||||||
|
|
||||||
// Set the "stage_reached" column on the workspace item
|
// Set the "stage_reached" column on the workspace item
|
||||||
// to the LAST page of the LAST step in the submission process
|
// to the LAST page of the LAST step in the submission process
|
||||||
|
Reference in New Issue
Block a user