Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[DS-1272] Setting discovery to be the default search/browse engine #91

Merged
merged 1 commit into from

5 participants

Kevin Van de Velde Andrea Bollini helix84 Tim Donohue Mark Diggory
Kevin Van de Velde
Owner

No description provided.

Andrea Bollini
Owner

It looks as the pull request set discovery as default search/browse provider only for the XMLUI and not JSPUI, is this the intent? with the current configuration there is some overhead as the browse and search (lucene) consumer are also enabled by default. IMHO it will be better to enable discovery for both UIs or keep it optional

helix84
Owner

I disagree. XMLUI Discovery was introduced in 1.7 and only becomes default now. I'd leave some time for JSPUI Discovery to grow out of any eventual childhood diseases (which will be discovered only when other people start using it) and make the switch with next release. Please, don't take it personally, I'm not implying that there are any known problems with Discovery and you surely did a great job with it. I just have the best interest of JSPUI users in mind.

Tim Donohue
Owner

Just wanting to note that if we do not enable Discovery by default for both XMLUI & JSPUI, we will need some clear documentation around this.

As it is, our 3.x Discovery documentation already is missing any information about JSPUI + Discovery:
https://wiki.duraspace.org/display/DSDOC3x/Discovery

We obviously need to make it clear that Discovery now is also available for JSPUI, and provide instructions for how to enable or disable it for the JSPUI.

We also may want to look into whether there are ways to split up that Discovery documentation into a few sub-pages -- e.g. a generic "Discovery" page (for general shared info), and then perhaps separate "Discovery for XMLUI" and "Discovery for JSPUI" subpages which can describe how to enable/disable & customize Discovery for each interface.

Mark Diggory
Owner

We can build out the documentation if the intent is strong to have it enabled in JSPUI by default. I might recommend that if we enable int he RC candidate, this would give sufficiently more time to evaluate and document it. If immense issues arise, then revert it back so that Search and Browse are default in JSPUI.

Note, I think that Withdrawn Items view is still Browse driven. So I'm ok with the idea of having all three consumers enabled by default for the time being, even if Discovery is only used in the User interfaces.

Andrea Bollini
Owner

I will prefer to have discovery enabled by default in 3.0 but if we do it we should really do it for both UI. Enable this only for XMLUI will make the configuration for jspui harder to do well for people that will use it with or without discovery. IMHO we should not enable by default all consumers providing an inefficient configuration for most of our users.
If we switch also to discovery for browsing, the browse consumer can be disabled for both xmlui and jspui (but the solrDAOs need to be configured). Withdrawn items are managed by solr browse.
In any case we should test jspui discovery and solr browse in testhaton.
Wait for 4.0 to enable discovery and solr browse as default for both UIs is still an option for me.
I will update the discovery documentation with a jspui section during the weekend

Mark Diggory
Owner

Guys,

What we need to be clear about is that this is not about forcing everyone who is upgrading to DSpace 3.0 to have to use Discovery. If you are upgrading, your going to be doing some serious configuration and testing of the platform and you will enable what you want. This is for new DSpace setups and what the community wants to encourage for new users of the platform. Which in my opinion, is that they start to use the new technology and features, not the old stuff, that IMO, we should be trying to delete in 4.0. I know, this should probably be discussed in the larger community.

Andrea, given we have until wednesday, can you provide a patch that would enable Discovery in JSPUI and SolrBrowse by default?

Then we can then make it the case that testathon instances are really testing Discovery+ JSPUI throughly and any bugs can be cleared during the release candidate stage. This would be more proactive then saying that because its new, we shouldn't enable it by default.

Mark

Andrea Bollini
Owner

Hi Mark,
I have made a pull request on your branch to enable Discovery also for JSPUI and Browse. If you merge my pull request it will be automatically included in this one.
Again I'm +1 with enable discovery and solr browse as default if it is applied to both UIs
-1 to apply these only to one UI (this will make the configuration/documentation work to hard for people that want to use JSPUI)
0 to delay this change to the 4.0

Mark Diggory
Owner

Andrea, your pull request located here has a bunch of older commits that are already in the master / branch. I'm not sure why.

atmire#2

Mark Diggory
Owner

I think that because it looks like the final release will not happen until tomorrow. I will merge this pull request and try to include Andreas work as well. I will run a local test and dryRun to verify everything will still work.

Mark

Mark Diggory mdiggory merged commit 235e1a1 into from
Andrea Bollini
Owner
Mark Diggory
Owner

Ok, theres a larger problem. All the tests were run with a solr instance running. They fail in the default case because not only is there no solr server running, but the testEnvoronment is not properly replacing the URL in the configuration.

I'm rolling back these commits and we will need to address this after RC1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 421 additions and 490 deletions.
  1. +2 −51 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/CollectionViewer.java
  2. +3 −53 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/CommunityViewer.java
  3. +93 −0 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/CollectionBrowse.java
  4. +93 −0 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/CommunityBrowse.java
  5. +48 −15 .../main/java/org/dspace/app/xmlui/aspect/discovery/{CollectionSearch.java → CollectionSearchBrowse.java}
  6. +51 −23 ...rc/main/java/org/dspace/app/xmlui/aspect/discovery/{CommunitySearch.java → CommunitySearchBrowse.java}
  7. +107 −3 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/Navigation.java
  8. +0 −28 dspace-xmlui/src/main/resources/aspects/ArtifactBrowser/dspace-home.xml
  9. +0 −295 dspace-xmlui/src/main/resources/aspects/ArtifactBrowser/sitemap.xmap
  10. +4 −0 dspace-xmlui/src/main/resources/aspects/BrowseArtifacts/sitemap.xmap
  11. +8 −4 dspace-xmlui/src/main/resources/aspects/Discovery/sitemap.xmap
  12. +1 −3 dspace/config/dspace.cfg
  13. +7 −0 dspace/config/launcher.xml
  14. +1 −1  dspace/config/modules/discovery.cfg
  15. +3 −14 dspace/config/xmlui.xconf
53 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/CollectionViewer.java
View
@@ -10,8 +10,6 @@
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
-import java.util.Map;
-import java.util.HashMap;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.util.HashUtil;
@@ -25,11 +23,8 @@
import org.dspace.app.xmlui.wing.element.Body;
import org.dspace.app.xmlui.wing.element.Division;
import org.dspace.app.xmlui.wing.element.ReferenceSet;
-import org.dspace.app.xmlui.wing.element.List;
import org.dspace.app.xmlui.wing.element.PageMeta;
import org.dspace.authorize.AuthorizeException;
-import org.dspace.browse.BrowseException;
-import org.dspace.browse.BrowseIndex;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.core.ConfigurationManager;
@@ -54,19 +49,6 @@
public static final Message T_untitled =
message("xmlui.general.untitled");
-
- private static final Message T_head_browse =
- message("xmlui.ArtifactBrowser.CollectionViewer.head_browse");
-
- private static final Message T_browse_titles =
- message("xmlui.ArtifactBrowser.CollectionViewer.browse_titles");
-
- private static final Message T_browse_authors =
- message("xmlui.ArtifactBrowser.CollectionViewer.browse_authors");
-
- private static final Message T_browse_dates =
- message("xmlui.ArtifactBrowser.CollectionViewer.browse_dates");
-
/** Cached validity object */
private SourceValidity validity;
@@ -218,41 +200,10 @@ public void addBody(Body body) throws SAXException, WingException,
home.setHead(name);
}
- // The search / browse box.
+ // The search / browse box placeholder, this division will be populated either in the browse or discovery aspect
{
-// TODO: move browse stuff out of here
- Division search = home.addDivision("collection-search-browse",
+ home.addDivision("collection-search-browse",
"secondary search-browse");
-
- // Browse by list
- Division browseDiv = search.addDivision("collection-browse","secondary browse");
- List browse = browseDiv.addList("collection-browse", List.TYPE_SIMPLE,
- "collection-browse");
- browse.setHead(T_head_browse);
- String url = contextPath + "/handle/" + collection.getHandle();
-
- try
- {
- // Get a Map of all the browse tables
- BrowseIndex[] bis = BrowseIndex.getBrowseIndices();
- for (BrowseIndex bix : bis)
- {
- // Create a Map of the query parameters for this link
- Map<String, String> queryParams = new HashMap<String, String>();
-
- queryParams.put("type", bix.getName());
-
- // Add a link to this browse
- browse.addItemXref(super.generateURL(url + "/browse", queryParams),
- message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName()));
- }
- }
- catch (BrowseException bex)
- {
- browse.addItemXref(url + "/browse?type=title",T_browse_titles);
- browse.addItemXref(url + "/browse?type=author",T_browse_authors);
- browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
- }
}
// Add the reference
56 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/CommunityViewer.java
View
@@ -10,8 +10,6 @@
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
-import java.util.Map;
-import java.util.HashMap;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.util.HashUtil;
@@ -25,12 +23,9 @@
import org.dspace.app.xmlui.wing.element.Body;
import org.dspace.app.xmlui.wing.element.Division;
import org.dspace.app.xmlui.wing.element.ReferenceSet;
-import org.dspace.app.xmlui.wing.element.List;
import org.dspace.app.xmlui.wing.element.Reference;
import org.dspace.app.xmlui.wing.element.PageMeta;
import org.dspace.authorize.AuthorizeException;
-import org.dspace.browse.BrowseException;
-import org.dspace.browse.BrowseIndex;
import org.dspace.browse.ItemCountException;
import org.dspace.browse.ItemCounter;
import org.dspace.content.Collection;
@@ -59,20 +54,7 @@
public static final Message T_untitled =
message("xmlui.general.untitled");
- private static final Message T_head_browse =
- message("xmlui.ArtifactBrowser.CommunityViewer.head_browse");
-
- private static final Message T_browse_titles =
- message("xmlui.ArtifactBrowser.CommunityViewer.browse_titles");
-
- private static final Message T_browse_authors =
- message("xmlui.ArtifactBrowser.CommunityViewer.browse_authors");
-
- private static final Message T_browse_dates =
- message("xmlui.ArtifactBrowser.CommunityViewer.browse_dates");
-
-
- private static final Message T_head_sub_communities =
+ private static final Message T_head_sub_communities =
message("xmlui.ArtifactBrowser.CommunityViewer.head_sub_communities");
private static final Message T_head_sub_collections =
@@ -261,42 +243,10 @@ public void addBody(Body body) throws SAXException, WingException,
home.setHead(name);
}
- // The search / browse box.
+ // The search / browse box placeholder, this division will be populated either in the browse or discovery aspect
{
- Division search = home.addDivision("community-search-browse",
+ home.addDivision("community-search-browse",
"secondary search-browse");
-
-
-// TODO: move browse stuff out of here
- // Browse by list
- Division browseDiv = search.addDivision("community-browse","secondary browse");
- List browse = browseDiv.addList("community-browse", List.TYPE_SIMPLE,
- "community-browse");
- browse.setHead(T_head_browse);
- String url = contextPath + "/handle/" + community.getHandle();
-
- try
- {
- // Get a Map of all the browse tables
- BrowseIndex[] bis = BrowseIndex.getBrowseIndices();
- for (BrowseIndex bix : bis)
- {
- // Create a Map of the query parameters for this link
- Map<String, String> queryParams = new HashMap<String, String>();
-
- queryParams.put("type", bix.getName());
-
- // Add a link to this browse
- browse.addItemXref(super.generateURL(url + "/browse", queryParams),
- message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName()));
- }
- }
- catch (BrowseException bex)
- {
- browse.addItemXref(url + "/browse?type=title",T_browse_titles);
- browse.addItemXref(url + "/browse?type=author",T_browse_authors);
- browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
- }
}
// Add main reference:
93 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/CollectionBrowse.java
View
@@ -0,0 +1,93 @@
+/**
+ * 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/
+ */
+package org.dspace.app.xmlui.aspect.browseArtifacts;
+
+import org.apache.cocoon.ProcessingException;
+import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
+import org.dspace.app.xmlui.utils.HandleUtil;
+import org.dspace.app.xmlui.wing.Message;
+import org.dspace.app.xmlui.wing.WingException;
+import org.dspace.app.xmlui.wing.element.Body;
+import org.dspace.app.xmlui.wing.element.Division;
+import org.dspace.app.xmlui.wing.element.List;
+import org.dspace.authorize.AuthorizeException;
+import org.dspace.browse.BrowseException;
+import org.dspace.browse.BrowseIndex;
+import org.dspace.content.Collection;
+import org.dspace.content.DSpaceObject;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Renders the browse links for a collection
+ *
+ * @author Kevin Van de Velde (kevin at atmire dot com)
+ * @author Mark Diggory (markd at atmire dot com)
+ * @author Ben Bosman (ben at atmire dot com)
+ */
+public class CollectionBrowse extends AbstractDSpaceTransformer {
+
+ private static final Message T_head_browse =
+ message("xmlui.ArtifactBrowser.CollectionViewer.head_browse");
+
+ private static final Message T_browse_titles =
+ message("xmlui.ArtifactBrowser.CollectionViewer.browse_titles");
+
+ private static final Message T_browse_authors =
+ message("xmlui.ArtifactBrowser.CollectionViewer.browse_authors");
+
+ private static final Message T_browse_dates =
+ message("xmlui.ArtifactBrowser.CollectionViewer.browse_dates");
+
+ @Override
+ public void addBody(Body body) throws SAXException, WingException, SQLException, IOException, AuthorizeException, ProcessingException {
+ DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
+ if (!(dso instanceof Collection))
+ {
+ return;
+ }
+
+ // Set up the major variables
+ Collection collection = (Collection) dso;
+
+ Division home = body.addDivision("collection-home", "primary repository collection");
+
+ Division search = home.addDivision("collection-search-browse",
+ "secondary search-browse");
+
+ // Browse by list
+ Division browseDiv = search.addDivision("collection-browse", "secondary browse");
+ List browse = browseDiv.addList("collection-browse", List.TYPE_SIMPLE,
+ "collection-browse");
+ browse.setHead(T_head_browse);
+ String url = contextPath + "/handle/" + collection.getHandle();
+
+ try {
+ // Get a Map of all the browse tables
+ BrowseIndex[] bis = BrowseIndex.getBrowseIndices();
+ for (BrowseIndex bix : bis) {
+ // Create a Map of the query parameters for this link
+ Map<String, String> queryParams = new HashMap<String, String>();
+
+ queryParams.put("type", bix.getName());
+
+ // Add a link to this browse
+ browse.addItemXref(generateURL(url + "/browse", queryParams),
+ message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName()));
+ }
+ } catch (BrowseException bex) {
+ browse.addItemXref(url + "/browse?type=title", T_browse_titles);
+ browse.addItemXref(url + "/browse?type=author", T_browse_authors);
+ browse.addItemXref(url + "/browse?type=dateissued", T_browse_dates);
+ }
+ }
+}
93 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/CommunityBrowse.java
View
@@ -0,0 +1,93 @@
+/**
+ * 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/
+ */
+package org.dspace.app.xmlui.aspect.browseArtifacts;
+
+import org.apache.cocoon.ProcessingException;
+import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
+import org.dspace.app.xmlui.utils.HandleUtil;
+import org.dspace.app.xmlui.wing.Message;
+import org.dspace.app.xmlui.wing.WingException;
+import org.dspace.app.xmlui.wing.element.Body;
+import org.dspace.app.xmlui.wing.element.Division;
+import org.dspace.app.xmlui.wing.element.List;
+import org.dspace.authorize.AuthorizeException;
+import org.dspace.browse.BrowseException;
+import org.dspace.browse.BrowseIndex;
+import org.dspace.content.Community;
+import org.dspace.content.DSpaceObject;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Renders the browse links for a community
+ *
+ * @author Kevin Van de Velde (kevin at atmire dot com)
+ * @author Mark Diggory (markd at atmire dot com)
+ * @author Ben Bosman (ben at atmire dot com)
+ */
+public class CommunityBrowse extends AbstractDSpaceTransformer {
+
+ private static final Message T_head_browse =
+ message("xmlui.ArtifactBrowser.CommunityViewer.head_browse");
+
+ private static final Message T_browse_titles =
+ message("xmlui.ArtifactBrowser.CommunityViewer.browse_titles");
+
+ private static final Message T_browse_authors =
+ message("xmlui.ArtifactBrowser.CommunityViewer.browse_authors");
+
+ private static final Message T_browse_dates =
+ message("xmlui.ArtifactBrowser.CommunityViewer.browse_dates");
+
+ @Override
+ public void addBody(Body body) throws SAXException, WingException, SQLException, IOException, AuthorizeException, ProcessingException {
+ DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
+ if (!(dso instanceof Community))
+ {
+ return;
+ }
+
+ // Set up the major variables
+ Community community = (Community) dso;
+
+ Division home = body.addDivision("community-home", "primary repository community");
+
+ Division search = home.addDivision("community-search-browse",
+ "secondary search-browse");
+
+ // Browse by list
+ Division browseDiv = search.addDivision("community-browse", "secondary browse");
+ List browse = browseDiv.addList("community-browse", List.TYPE_SIMPLE,
+ "community-browse");
+ browse.setHead(T_head_browse);
+ String url = contextPath + "/handle/" + community.getHandle();
+
+ try {
+ // Get a Map of all the browse tables
+ BrowseIndex[] bis = BrowseIndex.getBrowseIndices();
+ for (BrowseIndex bix : bis) {
+ // Create a Map of the query parameters for this link
+ Map<String, String> queryParams = new HashMap<String, String>();
+
+ queryParams.put("type", bix.getName());
+
+ // Add a link to this browse
+ browse.addItemXref(generateURL(url + "/browse", queryParams),
+ message("xmlui.ArtifactBrowser.Navigation.browse_" + bix.getName()));
+ }
+ } catch (BrowseException bex) {
+ browse.addItemXref(url + "/browse?type=title", T_browse_titles);
+ browse.addItemXref(url + "/browse?type=author", T_browse_authors);
+ browse.addItemXref(url + "/browse?type=dateissued", T_browse_dates);
+ }
+ }
+}
63 .../app/xmlui/aspect/discovery/CollectionSearch.java → ...mlui/aspect/discovery/CollectionSearchBrowse.java
View
@@ -10,6 +10,8 @@
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.util.HashUtil;
@@ -25,16 +27,20 @@
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
import org.dspace.core.ConfigurationManager;
+import org.dspace.discovery.SearchUtils;
+import org.dspace.discovery.configuration.DiscoveryConfiguration;
+import org.dspace.discovery.configuration.DiscoveryConfigurationParameters;
+import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
import org.xml.sax.SAXException;
/**
- * Renders the search box for a collection
+ * Renders the search box & browse urls for a collection
*
* @author Kevin Van de Velde (kevin at atmire dot com)
* @author Mark Diggory (markd at atmire dot com)
* @author Ben Bosman (ben at atmire dot com)
*/
-public class CollectionSearch extends AbstractDSpaceTransformer implements CacheableProcessingComponent
+public class CollectionSearchBrowse extends AbstractDSpaceTransformer implements CacheableProcessingComponent
{
/** Language Strings */
private static final Message T_dspace_home =
@@ -43,6 +49,9 @@
private static final Message T_full_text_search =
message("xmlui.ArtifactBrowser.CollectionViewer.full_text_search");
+ private static final Message T_head_browse =
+ message("xmlui.ArtifactBrowser.CommunityViewer.head_browse");
+
private static final Message T_go =
message("xmlui.general.go");
@@ -219,11 +228,38 @@ public void addBody(Body body) throws SAXException, WingException,
// The search / browse box.
{
- Division search = home.addDivision("collection-search-browse",
+ Division searchBrowseDivision = home.addDivision("collection-search-browse",
"secondary search-browse");
+ List browse = searchBrowseDivision.addList("community-browse", List.TYPE_SIMPLE,
+ "community-browse");
+ browse.setHead(T_head_browse);
+ String url = contextPath + "/handle/" + collection.getHandle();
+
+ addBrowseTitle(browse, url);
+ // Get a Map of all the browse tables
+ DiscoveryConfiguration discoveryConfiguration = SearchUtils.getDiscoveryConfiguration(collection);
+ java.util.List<DiscoverySearchFilterFacet> facets = discoveryConfiguration.getSidebarFacets();
+ for (DiscoverySearchFilterFacet facet : facets)
+ {
+ if(facet.getType().equals(DiscoveryConfigurationParameters.TYPE_DATE))
+ {
+ //Browse by date isn't support for our facets.
+ continue;
+ }
+
+ // Create a Map of the query parameters for this link
+ Map<String, String> queryParams = new HashMap<String, String>();
+
+ queryParams.put("field", facet.getIndexFieldName());
+
+ // Add a link to this browse
+ browse.addItemXref(generateURL(url + "/search-filter", queryParams),
+ message("xmlui.ArtifactBrowser.Navigation.browse_" + facet.getIndexFieldName()));
+ }
+
// Search query
- Division query = search.addInteractiveDivision("collection-search",
+ Division query = searchBrowseDivision.addInteractiveDivision("collection-search",
contextPath + "/handle/" + collection.getHandle() + "/discover",
Division.METHOD_POST, "secondary search");
@@ -233,21 +269,18 @@ public void addBody(Body body) throws SAXException, WingException,
para.addText("query");
para.addContent(" ");
para.addButton("submit").setValue(T_go);
- //query.addPara().addXref(contextPath + "/handle/" + collection.getHandle()+ "/advanced-search", T_advanced_search_link);
-
- // Browse by list
- //Division browseDiv = search.addDivision("collection-browse","secondary browse");
- //List browse = browseDiv.addList("collection-browse", List.TYPE_SIMPLE,
- // "collection-browse");
- //browse.setHead(T_head_browse);
- //String url = contextPath + "/handle/" + collection.getHandle();
- //browse.addItemXref(url + "/browse?type=title",T_browse_titles);
- //browse.addItemXref(url + "/browse?type=author",T_browse_authors);
- //browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
}
}
+ private void addBrowseTitle(List browse, String url) throws WingException {
+ Map<String, String> browseTitleParams = new HashMap<String, String>();
+ browseTitleParams.put("sort_by", "dc.title_sort");
+ browseTitleParams.put("order", "asc");
+ browse.addItemXref(generateURL(url + "/discover", browseTitleParams),
+ message("xmlui.ArtifactBrowser.AdvancedSearch.type_title"));
+ }
+
/**
* Recycle
74 ...e/app/xmlui/aspect/discovery/CommunitySearch.java → ...xmlui/aspect/discovery/CommunitySearchBrowse.java
View
@@ -10,6 +10,8 @@
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.util.HashUtil;
@@ -21,32 +23,36 @@
import org.dspace.app.xmlui.utils.UIException;
import org.dspace.app.xmlui.wing.Message;
import org.dspace.app.xmlui.wing.WingException;
-import org.dspace.app.xmlui.wing.element.Body;
-import org.dspace.app.xmlui.wing.element.Division;
-import org.dspace.app.xmlui.wing.element.PageMeta;
-import org.dspace.app.xmlui.wing.element.Para;
+import org.dspace.app.xmlui.wing.element.*;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
import org.dspace.core.LogManager;
+import org.dspace.discovery.SearchUtils;
+import org.dspace.discovery.configuration.DiscoveryConfiguration;
+import org.dspace.discovery.configuration.DiscoveryConfigurationParameters;
+import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
import org.xml.sax.SAXException;
/**
- * Renders the search box for a community
+ * Renders the search box & browse urls for a community
*
* @author Kevin Van de Velde (kevin at atmire dot com)
* @author Mark Diggory (markd at atmire dot com)
* @author Ben Bosman (ben at atmire dot com)
*/
-public class CommunitySearch extends AbstractDSpaceTransformer implements CacheableProcessingComponent
+public class CommunitySearchBrowse extends AbstractDSpaceTransformer implements CacheableProcessingComponent
{
- private static final Logger log = Logger.getLogger(CommunitySearch.class);
+ private static final Logger log = Logger.getLogger(CommunitySearchBrowse.class);
/** Language Strings */
private static final Message T_full_text_search =
message("xmlui.ArtifactBrowser.CommunityViewer.full_text_search");
+ private static final Message T_head_browse =
+ message("xmlui.ArtifactBrowser.CommunityViewer.head_browse");
+
private static final Message T_go =
message("xmlui.general.go");
@@ -181,11 +187,38 @@ public void addBody(Body body) throws SAXException, WingException,
// The search / browse box.
{
- Division search = home.addDivision("community-search-browse",
+ Division searchBrowseDivision = home.addDivision("community-search-browse",
"secondary search-browse");
+ List browse = searchBrowseDivision.addList("community-browse", List.TYPE_SIMPLE,
+ "community-browse");
+ browse.setHead(T_head_browse);
+ String url = contextPath + "/handle/" + community.getHandle();
+
+ addBrowseTitle(browse, url);
+ // Get a Map of all the browse tables
+ DiscoveryConfiguration discoveryConfiguration = SearchUtils.getDiscoveryConfiguration(community);
+ java.util.List<DiscoverySearchFilterFacet> facets = discoveryConfiguration.getSidebarFacets();
+ for (DiscoverySearchFilterFacet facet : facets)
+ {
+ if(facet.getType().equals(DiscoveryConfigurationParameters.TYPE_DATE))
+ {
+ //Browse by date isn't support for our facets.
+ continue;
+ }
+
+ // Create a Map of the query parameters for this link
+ Map<String, String> queryParams = new HashMap<String, String>();
+
+ queryParams.put("field", facet.getIndexFieldName());
+
+ // Add a link to this browse
+ browse.addItemXref(generateURL(url + "/search-filter", queryParams),
+ message("xmlui.ArtifactBrowser.Navigation.browse_" + facet.getIndexFieldName()));
+ }
+
// Search query
- Division query = search.addInteractiveDivision("community-search",
+ Division query = searchBrowseDivision.addInteractiveDivision("community-search",
contextPath + "/handle/" + community.getHandle() + "/discover",
Division.METHOD_POST, "secondary search");
@@ -196,20 +229,18 @@ public void addBody(Body body) throws SAXException, WingException,
para.addContent(" ");
para.addButton("submit").setValue(T_go);
//query.addPara().addXref(contextPath + "/handle/" + community.getHandle() + "/advanced-search", T_advanced_search_link);
-
- // Browse by list
- // Division browseDiv = search.addDivision("community-browse","secondary browse");
- // List browse = browseDiv.addList("community-browse", List.TYPE_SIMPLE,
- // "community-browse");
- // browse.setHead(T_head_browse);
- // String url = contextPath + "/handle/" + community.getHandle();
- // browse.addItemXref(url + "/browse?type=title",T_browse_titles);
- // browse.addItemXref(url + "/browse?type=author",T_browse_authors);
-// browse.addItemXref(url + "/browse?type=dateissued",T_browse_dates);
}
}
+ private void addBrowseTitle(List browse, String url) throws WingException {
+ Map<String, String> browseTitleParams = new HashMap<String, String>();
+ browseTitleParams.put("sort_by", "dc.title_sort");
+ browseTitleParams.put("order", "asc");
+ browse.addItemXref(generateURL(url + "/discover", browseTitleParams),
+ message("xmlui.ArtifactBrowser.AdvancedSearch.type_title"));
+ }
+
/**
* Recycle
*/
@@ -219,7 +250,4 @@ public void recycle()
this.validity = null;
super.recycle();
}
-
-
-
-}
+}
110 dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/Navigation.java
View
@@ -10,6 +10,8 @@
import java.io.IOException;
import java.io.Serializable;
import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.cocoon.caching.CacheableProcessingComponent;
import org.apache.cocoon.environment.ObjectModelHelper;
@@ -20,11 +22,20 @@
import org.dspace.app.xmlui.cocoon.AbstractDSpaceTransformer;
import org.dspace.app.xmlui.utils.HandleUtil;
import org.dspace.app.xmlui.utils.UIException;
+import org.dspace.app.xmlui.wing.Message;
import org.dspace.app.xmlui.wing.WingException;
+import org.dspace.app.xmlui.wing.element.List;
import org.dspace.app.xmlui.wing.element.Options;
import org.dspace.app.xmlui.wing.element.PageMeta;
import org.dspace.authorize.AuthorizeException;
+import org.dspace.content.Collection;
+import org.dspace.content.Community;
import org.dspace.content.DSpaceObject;
+import org.dspace.content.Item;
+import org.dspace.discovery.SearchUtils;
+import org.dspace.discovery.configuration.DiscoveryConfiguration;
+import org.dspace.discovery.configuration.DiscoveryConfigurationParameters;
+import org.dspace.discovery.configuration.DiscoverySearchFilterFacet;
import org.xml.sax.SAXException;
/**
@@ -36,6 +47,22 @@
*/
public class Navigation extends AbstractDSpaceTransformer implements CacheableProcessingComponent
{
+ /** Language Strings */
+ private static final Message T_head_all_of_dspace =
+ message("xmlui.ArtifactBrowser.Navigation.head_all_of_dspace");
+
+ private static final Message T_head_browse =
+ message("xmlui.ArtifactBrowser.Navigation.head_browse");
+
+ private static final Message T_communities_and_collections =
+ message("xmlui.ArtifactBrowser.Navigation.communities_and_collections");
+
+ private static final Message T_head_this_collection =
+ message("xmlui.ArtifactBrowser.Navigation.head_this_collection");
+
+ private static final Message T_head_this_community =
+ message("xmlui.ArtifactBrowser.Navigation.head_this_community");
+
/**
* Generate the unique caching key.
* This key must be unique inside the space of this component.
@@ -121,19 +148,96 @@ public void addOptions(Options options) throws SAXException, WingException,
*/
/* regulate the ordering */
+ List browse = options.addList("browse");
options.addList("discovery");
- options.addList("browse");
options.addList("account");
options.addList("context");
options.addList("administrative");
+ browse.setHead(T_head_browse);
+
+ List browseGlobal = browse.addList("global");
+ List browseContext = browse.addList("context");
+
+ browseGlobal.setHead(T_head_all_of_dspace);
+
+ browseGlobal.addItemXref(contextPath + "/community-list",T_communities_and_collections);
+
+ Map<String, String> browseTitleParams = new HashMap<String, String>();
+ browseTitleParams.put("sort_by", "dc.title_sort");
+ browseTitleParams.put("order", "asc");
+
+ browseGlobal.addItemXref(generateURL(contextPath + "/discover", browseTitleParams),
+ message("xmlui.ArtifactBrowser.AdvancedSearch.type_title"));
+
+ // Add the configured browse lists for 'top level' browsing
+ addBrowseOptions(browseGlobal, contextPath + "/search-filter", null);
+
+ DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
+ if (dso != null)
+ {
+ if (dso instanceof Item)
+ {
+ // If we are an item change the browse scope to the parent
+ // collection.
+ dso = ((Item) dso).getOwningCollection();
+ }
+
+ if (dso instanceof Collection)
+ {
+ browseContext.setHead(T_head_this_collection);
+ }
+ if (dso instanceof Community)
+ {
+ browseContext.setHead(T_head_this_community);
+ }
+
+ // Add the configured browse lists for scoped browsing
+ String handle = dso.getHandle();
+ browseContext.addItemXref(generateURL(contextPath + "/handle/" + handle + "/discover", browseTitleParams),
+ message("xmlui.ArtifactBrowser.AdvancedSearch.type_title"));
+ addBrowseOptions(browseContext, contextPath + "/handle/" + handle + "/search-filter", dso);
+ }
+ }
+
+ /**
+ * Add navigation for the configured browse tables to the supplied list.
+ *
+ * @param browseList
+ * @param browseURL
+ * @throws WingException
+ */
+ private void addBrowseOptions(List browseList, String browseURL, DSpaceObject scope) throws WingException
+ {
+ // Get a Map of all the browse tables
+ DiscoveryConfiguration discoveryConfiguration = SearchUtils.getDiscoveryConfiguration(scope);
+ java.util.List<DiscoverySearchFilterFacet> facets = discoveryConfiguration.getSidebarFacets();
+
+ for (DiscoverySearchFilterFacet facet : facets)
+ {
+ if(facet.getType().equals(DiscoveryConfigurationParameters.TYPE_DATE))
+ {
+ //Browse by date isn't support for our facets.
+ continue;
+ }
+
+ // Create a Map of the query parameters for this link
+ Map<String, String> queryParams = new HashMap<String, String>();
+
+ queryParams.put("field", facet.getIndexFieldName());
+
+ // Add a link to this browse
+ browseList.addItemXref(generateURL(browseURL, queryParams),
+ message("xmlui.ArtifactBrowser.AdvancedSearch.type_" + facet.getIndexFieldName()));
+ }
}
+
/**
* Ensure that the context path is added to the page meta.
*/
public void addPageMeta(PageMeta pageMeta) throws SAXException,
- WingException, UIException, SQLException, IOException,
+ WingException, SQLException, IOException,
AuthorizeException
{
@@ -146,4 +250,4 @@ public void addPageMeta(PageMeta pageMeta) throws SAXException,
}
-}
+}
28 dspace-xmlui/src/main/resources/aspects/ArtifactBrowser/dspace-home.xml
View
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-
- 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/
-
--->
-
-<!--
- The DSpace home page is just a shell into which various bits such as news
- and the Community Browser are inserted, so it is a bit special. This file
- provides title and trail data so that they won't be acquired from those
- other bits.
--->
-<document xmlns="http://di.tamu.edu/DRI/1.0/" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" version="1.1">
-<options/>
-<meta>
-<userMeta/>
-<pageMeta>
- <metadata element="title"><i18n:text>xmlui.general.dspace_home</i18n:text></metadata>
- <trail><i18n:text>xmlui.general.dspace_home</i18n:text></trail>
-</pageMeta>
-<repositoryMeta/>
-</meta>
-</document>
295 dspace-xmlui/src/main/resources/aspects/ArtifactBrowser/sitemap.xmap
View
@@ -1,295 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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/
-
--->
-
-<!--
-@deprecated: the Artifact Browser has been devided into ViewArtifacts,
- BrowseArtifacts, SearchArtifacts
-
-The ArtifactBrowser Aspect is responsible for browsing communities /
-collections / items / and bitstreams, viewing an individual item,
-and searching the repository.
-
--->
-<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
- <map:components>
-
-
- <map:transformers>
- <map:transformer name="Navigation" src="org.dspace.app.xmlui.aspect.artifactbrowser.Navigation"/>
- <map:transformer name="CommunityBrowser" src="org.dspace.app.xmlui.aspect.artifactbrowser.CommunityBrowser"/>
- <map:transformer name="CommunityViewer" src="org.dspace.app.xmlui.aspect.artifactbrowser.CommunityViewer"/>
- <map:transformer name="CollectionViewer" src="org.dspace.app.xmlui.aspect.artifactbrowser.CollectionViewer"/>
- <map:transformer name="ItemViewer" src="org.dspace.app.xmlui.aspect.artifactbrowser.ItemViewer"/>
- <map:transformer name="ConfigurableBrowse" src="org.dspace.app.xmlui.aspect.artifactbrowser.ConfigurableBrowse"/>
- <map:transformer name="SimpleSearch" src="org.dspace.app.xmlui.aspect.artifactbrowser.SimpleSearch"/>
- <map:transformer name="AdvancedSearch" src="org.dspace.app.xmlui.aspect.artifactbrowser.AdvancedSearch"/>
- <map:transformer name="FeedbackForm" src="org.dspace.app.xmlui.aspect.artifactbrowser.FeedbackForm"/>
- <map:transformer name="FeedbackSent" src="org.dspace.app.xmlui.aspect.artifactbrowser.FeedbackSent"/>
- <map:transformer name="Contact" src="org.dspace.app.xmlui.aspect.artifactbrowser.Contact"/>
- <map:transformer name="RestrictedItem" src="org.dspace.app.xmlui.aspect.artifactbrowser.RestrictedItem"/>
- <map:transformer name="FrontPageSearch" src="org.dspace.app.xmlui.aspect.artifactbrowser.FrontPageSearch"/>
-
- <map:transformer name="Statistics" src="org.dspace.app.xmlui.aspect.artifactbrowser.StatisticsViewer"/>
- </map:transformers>
-
-
- <map:matchers default="wildcard">
- <map:matcher name="HandleTypeMatcher" src="org.dspace.app.xmlui.aspect.general.HandleTypeMatcher"/>
- <map:matcher name="HandleAuthorizedMatcher" src="org.dspace.app.xmlui.aspect.general.HandleAuthorizedMatcher"/>
- </map:matchers>
-
-
- <map:actions>
- <map:action name="SendFeedbackAction" src="org.dspace.app.xmlui.aspect.artifactbrowser.SendFeedbackAction"/>
- <map:action name="UsageLoggerAction" src="org.dspace.app.xmlui.cocoon.UsageLoggerAction"/>
- <map:action name="NotModifiedAction" src="org.dspace.app.xmlui.aspect.general.NotModifiedAction"/>
- </map:actions>
-
-
- <map:selectors>
- <map:selector name="AuthenticatedSelector" src="org.dspace.app.xmlui.aspect.general.AuthenticatedSelector"/>
- <map:selector name="IfModifiedSinceSelector" src="org.dspace.app.xmlui.aspect.general.IfModifiedSinceSelector"/>
- </map:selectors>
-
- </map:components>
- <map:pipelines>
- <map:pipeline>
-
-
- <map:generate/>
-
- <!--
- Add the basic navigation content to everypage. This includes:
-
- 1) Metadata about the current page (really just what the current
- context path is)
- 2) Navigation links to browse the repository.
- - This includes links that are relative to the currently
- selected community or collection.
- 3) Metadata about the search urls.
- -->
- <map:transform type="Navigation"/>
-
-
- <!--
- Display the DSpace homepage. This includes the news.xml file
- along with a list of top level communities in DSpace.
- -->
- <map:match pattern="">
- <map:transform type="Include" src="resource://aspects/ArtifactBrowser/dspace-home.xml" />
- <!--
- DSpacePropertyFileReader will read the DSpace property file and
- place the selected properties' value in this scope
- -->
- <map:act type="DSpacePropertyFileReader">
- <map:parameter name="dspace.dir" value="dspace.dir" />
- <map:transform type="Include" src="file://{dspace.dir}/config/news-xmlui.xml" />
- </map:act>
-
- <map:transform type="FrontPageSearch"/>
- <map:transform type="CommunityBrowser">
- <map:parameter name="depth" value="1"/>
- </map:transform>
- <map:serialize type="xml"/>
- </map:match>
-
-
- <!-- List all communities & collections in DSpace -->
- <map:match pattern="community-list">
- <map:transform type="CommunityBrowser">
- <map:parameter name="depth" value="999"/>
- </map:transform>
- <map:serialize type="xml"/>
- </map:match>
-
-
- <!-- Search -->
- <map:match pattern="search">
- <map:transform type="SimpleSearch"/>
- <map:serialize type="xml"/>
- </map:match>
- <map:match pattern="simple-search">
- <map:transform type="SimpleSearch"/>
- <map:serialize type="xml"/>
- </map:match>
- <map:match pattern="advanced-search">
- <map:transform type="AdvancedSearch"/>
- <map:serialize type="xml"/>
- </map:match>
-
-
- <!-- Browse (by anything) -->
- <map:match pattern="browse">
- <map:transform type="ConfigurableBrowse"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!-- Display statistics -->
- <map:match pattern="statistics">
- <map:transform type="Statistics"/>
- <map:serialize type="xml"/>
- </map:match>
-
-
- <!-- restricted resource -->
- <map:match pattern="restricted-resource">
- <map:transform type="RestrictedItem"/>
- <map:serialize type="xml"/>
- </map:match>
-
-
- <!-- Handle specific features -->
- <map:match pattern="handle/*/**">
-
- <!-- Inform the user that the item they are viewing is a restricted resource -->
- <map:match pattern="handle/*/*/restricted-resource">
- <map:transform type="RestrictedItem"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!-- Scoped browse by features -->
- <map:match type="HandleAuthorizedMatcher" pattern="READ">
- <map:match type="HandleTypeMatcher" pattern="community,collection">
-
- <!-- Browse (by anything) -->
- <map:match pattern="handle/*/*/browse">
- <map:transform type="ConfigurableBrowse"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!-- Simple search -->
- <map:match pattern="handle/*/*/search">
- <map:transform type="SimpleSearch"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!-- Simple search again, but this time they said it -->
- <map:match pattern="handle/*/*/simple-search">
- <map:transform type="SimpleSearch"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!-- Advanced search -->
- <map:match pattern="handle/*/*/advanced-search">
- <map:transform type="AdvancedSearch"/>
- <map:serialize type="xml"/>
- </map:match>
-
- </map:match> <!-- End match community or collection -->
- </map:match> <!-- End match can read -->
-
-
- <!-- Community, Collection, and Item Viewers -->
- <map:match pattern="handle/*/*">
- <map:match type="HandleAuthorizedMatcher" pattern="READ">
- <map:match type="HandleTypeMatcher" pattern="community">
- <map:act type="UsageLoggerAction">
- <map:parameter name="type" value="community"/>
- <map:parameter name="eventType" value="view"/>
- </map:act>
- <map:transform type="CommunityViewer"/>
- <map:serialize type="xml"/>
- </map:match>
- <map:match type="HandleTypeMatcher" pattern="collection">
- <map:act type="UsageLoggerAction">
- <map:parameter name="type" value="collection"/>
- <map:parameter name="eventType" value="view"/>
- </map:act>
- <map:transform type="CollectionViewer"/>
- <map:serialize type="xml"/>
- </map:match>
- <map:match type="HandleTypeMatcher" pattern="item">
- <map:act type="UsageLoggerAction">
- <map:parameter name="type" value="item"/>
- <map:parameter name="eventType" value="view"/>
- </map:act>
- <!-- Implement HTTP If-Modified-Since protocol (commonly used by search
- - engine crawlers): return 304 NOT MODIFIED status if Item's
- - last-modified date is before If-Modified-Since header.
- -
- - NOTE: Do NOT do this for interactive users since it might encourage
- - browser to cache a view that is only shown to authenticated users.
- - ONLY do this when user-agent is a spider (search-engine crawler robot)
- - since they should only ever have "anonymous" access.
- -
- - NOTE: Cocoon always automatically sets Last-Modified: header on its
- - transformed pages with the current timestamp, which we cannot override.
- - It won't prevent a spider's If-Modified-Since from working, though.
- -->
- <map:select type="browser">
- <map:when test="spider">
- <map:select type="IfModifiedSinceSelector">
- <map:when test="true">
- <map:act type="NotModifiedAction"/>
- <map:serialize/>
- </map:when>
- <map:otherwise>
- <map:transform type="ItemViewer"/>
- <map:serialize type="xml"/>
- </map:otherwise>
- </map:select>
- </map:when>
- <map:otherwise>
- <map:transform type="ItemViewer"/>
- <map:serialize type="xml"/>
- </map:otherwise>
- </map:select>
- </map:match>
- </map:match>
-
- <map:match type="HandleAuthorizedMatcher" pattern="!READ">
- <map:transform type="RestrictedItem">
- <map:parameter name="header" value="xmlui.ArtifactBrowser.RestrictedItem.auth_header"/>
- <map:parameter name="message" value="xmlui.ArtifactBrowser.RestrictedItem.auth_message"/>
- </map:transform>
- <map:serialize type="xml"/>
- </map:match>
- </map:match>
-
-
- </map:match> <!-- End match handle/*/** -->
-
-
- <!--
- A simple feedback utility that presents the user with a form to fill out,
- the results of which are emailed to the site administrator.
- -->
- <map:match pattern="feedback">
- <map:act type="SendFeedbackAction">
- <map:transform type="FeedbackForm">
- <map:parameter name="comments" value="{comments}"/>
- <map:parameter name="email" value="{email}"/>
- <map:parameter name="page" value="{page}"/>
- </map:transform>
-
- <map:serialize type="xml"/>
- </map:act>
- <map:transform type="FeedbackSent"/>
- <map:serialize type="xml"/>
- </map:match>
-
- <!--
- The most basic & generic contact us page. It is expected that most
- themes will override this page and replace it with a more detailed
- version.
- -->
- <map:match pattern="contact">
- <map:transform type="Contact"/>
- <map:serialize type="xml"/>
- </map:match>
-
-
- <!-- Not a URL we care about, so just pass it on. -->
- <map:serialize type="xml"/>
-
- </map:pipeline>
- </map:pipelines>
-</map:sitemap>
4 dspace-xmlui/src/main/resources/aspects/BrowseArtifacts/sitemap.xmap
View
@@ -23,6 +23,8 @@ collections / items / and bitstreams.
<map:transformer name="CommunityBrowser" src="org.dspace.app.xmlui.aspect.artifactbrowser.CommunityBrowser"/>
<map:transformer name="CommunityRecentSubmissions" src="org.dspace.app.xmlui.aspect.artifactbrowser.CommunityRecentSubmissions"/>
<map:transformer name="CollectionRecentSubmissions" src="org.dspace.app.xmlui.aspect.artifactbrowser.CollectionRecentSubmissions"/>
+ <map:transformer name="CommunityBrowse" src="org.dspace.app.xmlui.aspect.browseArtifacts.CommunityBrowse"/>
+ <map:transformer name="CollectionBrowse" src="org.dspace.app.xmlui.aspect.browseArtifacts.CollectionBrowse"/>
<map:transformer name="ConfigurableBrowse" src="org.dspace.app.xmlui.aspect.artifactbrowser.ConfigurableBrowse"/>
<map:transformer name="StaticPage" src="org.dspace.app.xmlui.aspect.browseArtifacts.StaticPage"/>
</map:transformers>
@@ -81,12 +83,14 @@ collections / items / and bitstreams.
<map:match type="HandleTypeMatcher" pattern="community">
<map:match pattern="handle/*/*">
+ <map:transform type="CommunityBrowse"/>
<map:transform type="CommunityRecentSubmissions"/>
</map:match>
</map:match>
<map:match type="HandleTypeMatcher" pattern="collection">
<map:match pattern="handle/*/*">
+ <map:transform type="CollectionBrowse"/>
<map:transform type="CollectionRecentSubmissions"/>
</map:match>
</map:match>
12 dspace-xmlui/src/main/resources/aspects/Discovery/sitemap.xmap
View
@@ -23,6 +23,7 @@ and searching the repository.
<map:transformers>
<map:transformer name="Navigation" src="org.dspace.app.xmlui.aspect.discovery.Navigation"/>
+ <map:transformer name="CommunityBrowser" src="org.dspace.app.xmlui.aspect.artifactbrowser.CommunityBrowser"/>
<map:transformer name="SimpleSearch" src="org.dspace.app.xmlui.aspect.discovery.SimpleSearch"/>
<map:transformer name="BrowseFacet" src="org.dspace.app.xmlui.aspect.discovery.BrowseFacet"/>
<map:transformer name="SearchFacetFilter" src="org.dspace.app.xmlui.aspect.discovery.SearchFacetFilter"/>
@@ -31,11 +32,11 @@ and searching the repository.
<map:transformer name="SidebarFacetsTransformer" src="org.dspace.app.xmlui.aspect.discovery.SidebarFacetsTransformer"/>
- <map:transformer name="CommunitySearch" src="org.dspace.app.xmlui.aspect.discovery.CommunitySearch"/>
+ <map:transformer name="CommunitySearch" src="org.dspace.app.xmlui.aspect.discovery.CommunitySearchBrowse"/>
<map:transformer name="CommunityRecentSubmissions" src="org.dspace.app.xmlui.aspect.discovery.CommunityRecentSubmissions"/>
- <map:transformer name="CollectionSearch" src="org.dspace.app.xmlui.aspect.discovery.CollectionSearch"/>
+ <map:transformer name="CollectionSearch" src="org.dspace.app.xmlui.aspect.discovery.CollectionSearchBrowse"/>
<map:transformer name="CollectionRecentSubmissions" src="org.dspace.app.xmlui.aspect.discovery.CollectionRecentSubmissions"/>
@@ -81,6 +82,9 @@ and searching the repository.
-->
<map:match pattern="">
<map:transform type="SidebarFacetsTransformer"/>
+ <map:transform type="CommunityBrowser">
+ <map:parameter name="depth" value="1"/>
+ </map:transform>
<map:transform type="FrontPageSearch"/>
<map:transform type="SiteRecentSubmissions"/>
@@ -89,13 +93,13 @@ and searching the repository.
</map:match>
- <!-- List all communities & collections in DSpace
+ <!-- List all communities & collections in DSpace -->
<map:match pattern="community-list">
<map:transform type="CommunityBrowser">
<map:parameter name="depth" value="999"/>
</map:transform>
<map:serialize type="xml"/>
- </map:match> -->
+ </map:match>
<!-- Search -->
4 dspace/config/dspace.cfg
View
@@ -631,9 +631,7 @@ event.dispatcher.default.class = org.dspace.event.BasicDispatcher
#
# uncomment below and comment out original property to enable discovery indexing
-# event.dispatcher.default.consumers = versioning, search, browse, discovery, eperson, harvester
-#
-event.dispatcher.default.consumers = versioning, search, browse, eperson, harvester
+event.dispatcher.default.consumers = versioning, search, browse, discovery, eperson, harvester
# The noindex dispatcher will not create search or browse indexes (useful for batch item imports)
event.dispatcher.noindex.class = org.dspace.event.BasicDispatcher
7 dspace/config/launcher.xml
View
@@ -142,6 +142,10 @@
<class>org.dspace.search.DSIndexer</class>
<argument>-b</argument>
</step>
+ <step passuserargs="false">
+ <class>org.dspace.discovery.IndexClient</class>
+ <argument>-f</argument>
+ </step>
</command>
<command>
@@ -157,6 +161,9 @@
<step passuserargs="false">
<class>org.dspace.search.DSIndexer</class>
</step>
+ <step passuserargs="false">
+ <class>org.dspace.discovery.IndexClient</class>
+ </step>
</command>
<command>
2  dspace/config/modules/discovery.cfg
View
@@ -5,7 +5,7 @@
# faceted-search system. #
#---------------------------------------------------------------#
##### Search Indexing #####
-search.server = http://localhost:8080/solr/search
+search.server = ${solr.server}/search
#Char used to ensure that the sidebar facets are case insensitive
#solr.facets.split.char=\n|||\n
17 dspace/config/xmlui.xconf
View
@@ -59,15 +59,11 @@
/xmlui/cocoon/aspects/ directory followed by a slash.
-->
<aspects>
- <!--
- @deprecated: the Artifact Browser has been devided into ViewArtifacts,
- BrowseArtifacts, SearchArtifacts
- <aspect name="Artifact Browser" path="resource://aspects/ArtifactBrowser/" />
- -->
<aspect name="Versioning Aspect" path="resource://aspects/Versioning/" />
<aspect name="Displaying Artifacts" path="resource://aspects/ViewArtifacts/" />
- <aspect name="Browsing Artifacts" path="resource://aspects/BrowseArtifacts/" />
- <aspect name="Searching Artifacts" path="resource://aspects/SearchArtifacts/" />
+ <!--<aspect name="Browsing Artifacts" path="resource://aspects/BrowseArtifacts/" />-->
+ <!--<aspect name="Searching Artifacts" path="resource://aspects/SearchArtifacts/" />-->
+ <aspect name="Discovery" path="resource://aspects/Discovery/" />
<aspect name="Administration" path="resource://aspects/Administrative/" />
<aspect name="E-Person" path="resource://aspects/EPerson/" />
<aspect name="Submission and Workflow" path="resource://aspects/Submission/" />
@@ -75,13 +71,6 @@
<aspect name="Statistics - Elastic Search" path="resource://aspects/StatisticsElasticSearch/" />
<aspect name="Original Workflow" path="resource://aspects/Workflow/" />
<!--<aspect name="XMLWorkflow" path="resource://aspects/XMLWorkflow/" />-->
- <!--
- To enable Discovery, uncomment this Aspect that will enable it
- within your existing XMLUI
- Also make sure to comment the SearchArtifacts aspect
- as leaving it on together with discovery will cause UI overlap issues
- <aspect name="Discovery" path="resource://aspects/Discovery/" />
- -->
<!--<aspect name="SwordClient" path="resource://aspects/SwordClient/" />-->
<!--
Something went wrong with that request. Please try again.