Here is the solution I am considering in org.dspace.app.sitemap.
GenerateSitemaps.
Replace
ItemIterator allItems = Item.findAllAnon(c);
With
String myQuery = "SELECT * FROM item WHERE in_archive='1' " +
"and exists (select 1 from resourcepolicy " +
"where item.item_id=resource_id and resource_type_id=2 and
epersongroup_id=0)";
TableRowIterator rows = DatabaseManager.queryTable(c, "item",
myQuery);
ItemIterator allItems = new ItemIterator(c, rows);
Please let me know if you have any thoughts.
Terry
On Fri, Apr 25, 2014 at 4:47 PM, Terry Brady <tw...@georgetown.edu> wrote:
> We have a large collections of items that is visible only to our
> university community.
>
> These items appear in our sitemap (We are running DSpace 3.1). When our
> site is crawled, this triggers a large number of errors.
>
> Ideally, we would like to suppress items, collections, and communities
> without anonymous access from our sitemap. Has anyone addressed this
> issue?
>
> Based on a quick scan of code, I presume that I might need to change the
> queries invoked in org.dspace.app.sitemap.GenerateSitemaps to check for
> anonymous access.
>
> I would appreciate any advice that you can offer.
>
> Thanks, Terry
>
> --
> Terry Brady
> Applications Programmer Analyst
> Georgetown University Library Information Technology
> https://www.library.georgetown.edu/lit/code
> 202-687-7053
>
--
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
202-687-7053
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette