mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
Remove references to UI type from OpenSearch / RSS feeds
(cherry picked from commit 47b79bb2cb
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
b3a4571d4c
commit
3b1cf3e35e
@@ -155,7 +155,7 @@ public class OpenSearchServiceImpl implements OpenSearchService {
|
|||||||
format = "atom_1.0";
|
format = "atom_1.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
SyndicationFeed feed = new SyndicationFeed(labels.get(SyndicationFeed.MSG_UITYPE));
|
SyndicationFeed feed = new SyndicationFeed();
|
||||||
feed.populate(null, context, scope, results, labels);
|
feed.populate(null, context, scope, results, labels);
|
||||||
feed.setType(format);
|
feed.setType(format);
|
||||||
feed.addModule(openSearchMarkup(query, totalResults, start, pageSize));
|
feed.addModule(openSearchMarkup(query, totalResults, start, pageSize));
|
||||||
|
@@ -84,11 +84,6 @@ public class SyndicationFeed {
|
|||||||
public static final String MSG_FEED_TITLE = "feed.title";
|
public static final String MSG_FEED_TITLE = "feed.title";
|
||||||
public static final String MSG_FEED_DESCRIPTION = "general-feed.description";
|
public static final String MSG_FEED_DESCRIPTION = "general-feed.description";
|
||||||
public static final String MSG_METADATA = "metadata.";
|
public static final String MSG_METADATA = "metadata.";
|
||||||
public static final String MSG_UITYPE = "ui.type";
|
|
||||||
|
|
||||||
// UI keywords
|
|
||||||
public static final String UITYPE_XMLUI = "xmlui";
|
|
||||||
public static final String UITYPE_JSPUI = "jspui";
|
|
||||||
|
|
||||||
// default DC fields for entry
|
// default DC fields for entry
|
||||||
protected String defaultTitleField = "dc.title";
|
protected String defaultTitleField = "dc.title";
|
||||||
@@ -145,10 +140,6 @@ public class SyndicationFeed {
|
|||||||
// the feed object we are building
|
// the feed object we are building
|
||||||
protected SyndFeed feed = null;
|
protected SyndFeed feed = null;
|
||||||
|
|
||||||
// memory of UI that called us, "xmlui" or "jspui"
|
|
||||||
// affects Bitstream retrieval URL and I18N keys
|
|
||||||
protected String uiType = null;
|
|
||||||
|
|
||||||
protected HttpServletRequest request = null;
|
protected HttpServletRequest request = null;
|
||||||
|
|
||||||
protected CollectionService collectionService;
|
protected CollectionService collectionService;
|
||||||
@@ -157,12 +148,9 @@ public class SyndicationFeed {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
|
||||||
* @param ui either "xmlui" or "jspui"
|
|
||||||
*/
|
*/
|
||||||
public SyndicationFeed(String ui) {
|
public SyndicationFeed() {
|
||||||
feed = new SyndFeedImpl();
|
feed = new SyndFeedImpl();
|
||||||
uiType = ui;
|
|
||||||
ContentServiceFactory contentServiceFactory = ContentServiceFactory.getInstance();
|
ContentServiceFactory contentServiceFactory = ContentServiceFactory.getInstance();
|
||||||
itemService = contentServiceFactory.getItemService();
|
itemService = contentServiceFactory.getItemService();
|
||||||
collectionService = contentServiceFactory.getCollectionService();
|
collectionService = contentServiceFactory.getCollectionService();
|
||||||
@@ -518,8 +506,7 @@ public class SyndicationFeed {
|
|||||||
protected String urlOfBitstream(HttpServletRequest request, Bitstream logo) {
|
protected String urlOfBitstream(HttpServletRequest request, Bitstream logo) {
|
||||||
String name = logo.getName();
|
String name = logo.getName();
|
||||||
return resolveURL(request, null) +
|
return resolveURL(request, null) +
|
||||||
(uiType.equalsIgnoreCase(UITYPE_XMLUI) ? "/bitstream/id/" : "/retrieve/") +
|
"/bitstreams/" + logo.getID() + "/download";
|
||||||
logo.getID() + "/" + (name == null ? "" : name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String baseURL = null; // cache the result for null
|
protected String baseURL = null; // cache the result for null
|
||||||
|
@@ -285,7 +285,6 @@ public class OpenSearchController {
|
|||||||
labelMap.put(SyndicationFeed.MSG_UNTITLED, "notitle");
|
labelMap.put(SyndicationFeed.MSG_UNTITLED, "notitle");
|
||||||
labelMap.put(SyndicationFeed.MSG_LOGO_TITLE, "logo.title");
|
labelMap.put(SyndicationFeed.MSG_LOGO_TITLE, "logo.title");
|
||||||
labelMap.put(SyndicationFeed.MSG_FEED_DESCRIPTION, "general-feed.description");
|
labelMap.put(SyndicationFeed.MSG_FEED_DESCRIPTION, "general-feed.description");
|
||||||
labelMap.put(SyndicationFeed.MSG_UITYPE, SyndicationFeed.UITYPE_JSPUI);
|
|
||||||
for (String selector : SyndicationFeed.getDescriptionSelectors()) {
|
for (String selector : SyndicationFeed.getDescriptionSelectors()) {
|
||||||
labelMap.put("metadata." + selector, selector);
|
labelMap.put("metadata." + selector, selector);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user