Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added info for version 1.6

...

If you go to our Communities & Collections page, you cannot see all our communities, because the harvest community is hidden:

https://openaccess.leidenuniv.nl/Image Removed

or

https://openaccess.leidenuniv.nl/community-listImage Removed

But if you go directly to it, you can see it:

https://openaccess.leidenuniv.nl/handle/1887/628Image Removed

Which DSpace version

The modifications I made were originally made to Dspace DSpace 1.3.2. This is also the version of DSpace were this functionality was tested extensively.

This does not mean that this will not work on DSpace 1.4 or higher, it just is not tested yet.

The installation steps below are for DSpace 1.3.2, but will give some pointers for DSpace 1.4, so it should be possible to implement this on DSpace 1.4.

If you do this and have any suggestions, please share them!It is ported to DSpace version 1.6 and tested on the XMLUI version, but due to the nature of the changes it should also work fine on the JPSUI version.

How to install

Only one file needs to be changed, so make a backup copy of that file! In version 1.6 use a locally changed version of the original file.

Step 1: Change file src/org/dspace/content/Community.java

  • near line 276 (v1.3.2) / line 303 (v1.6) change the code in function findAllTop from (in v1.6 this looks a bit different):
Code Block
            // First check the cache
            Community fromCache = (Community) context.fromCache(
                    Community.class, row.getIntColumn("community_id"));
            if (fromCache != null)
            \{
                topCommunities.add(fromCache);
            \}
            else
            \{
                topCommunities.add(new Community(context, row));
            \}

...

Code Block
            // First check the cache
            Community aCommunity = (Community) context.fromCache(
                    Community.class, row.getIntColumn("community_id"));
            if (aCommunity == null) \{
                aCommunity = new Community(context, row);
            \}
            if (AuthorizeManager.authorizeActionBoolean(context,aCommunity,Constants.READ)) \{
              topCommunities.add(aCommunity);
            \}
  • near line 455 (467 in 1v1.3.2) / 467 (v1.4.2) / 628 (v1.6) change the code in function getCollections from (in v1.6 this looks a bit different):
Code Block
            // First check the cache
            Collection fromCache = (Collection) ourContext.fromCache(
                    Collection.class, row.getIntColumn("collection_id"));
            if (fromCache != null)
            \{
                collections.add(fromCache);
            \}
            else
            \{
                collections.add(new Collection(ourContext, row));
            \}

...

Code Block
            // First check the cache
            Collection aCollection = (Collection) ourContext.fromCache(
                    Collection.class, row.getIntColumn("collection_id"));
            if (aCollection == null) \{
               aCollection = new Collection(ourContext, row);
            \}
            if (AuthorizeManager.authorizeActionBoolean(ourContext,aCollection,Constants.READ)) \{
              collections.add(aCollection);
            \}
  • near line 504 (515 in 1v1.3.2) / 515 (v1.4.2) / 687 (v1.6) change the code in function getSubcommunities from:

...