oai and access restricted items

181 views
Skip to first unread message

Jose Blanco

unread,
Dec 15, 2015, 11:10:17 AM12/15/15
to DSpace Technical Support
Does this config actually work in versions 5 or 4

harvest.includerestricted.oai = false

I can't find where in the code it's used.

Is there any documentation on how to have oai not provide restricted items?

Thank you!
Jose

Jose Blanco

unread,
Dec 17, 2015, 9:57:59 AM12/17/15
to DSpace Technical Support
I wonder if someone could give me some information about this.

helix84

unread,
Dec 17, 2015, 10:08:48 AM12/17/15
to Jose Blanco, DSpace Technical Support
On Tue, Dec 15, 2015 at 5:10 PM, Jose Blanco <bla...@umich.edu> wrote:
harvest.includerestricted.oai = false

I can't find where in the code it's used.

I couldn't find any uses, either.
We'll probably have to do a review of configuration properties for DSpace 6, so I expect we'll deal with it there.
 
Is there any documentation on how to have oai not provide restricted items?

Since DSpace 5.0, that should be the case by default (DS-1856). If it isn't so, please, reopen that bug or file a new one.


Slightly related:



Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Jose Blanco

unread,
Jan 6, 2016, 4:11:33 PM1/6/16
to Ivan Masár, DSpace Technical Support
I tried it on 5.1.  I had an item that was completely restricted to a group that was not Anonymous and I did:

./dspace oai -c import

And the restricted item showed up.

Do I need to make any changes to this file:


Or should it just work by default.

Thank you!

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Jose Blanco

unread,
Jan 18, 2016, 12:40:17 PM1/18/16
to Ivan Masár, DSpace Technical Support
Going to re-post this question.

-Jose

Claudia Jürgen

unread,
Jan 19, 2016, 4:04:06 AM1/19/16
to dspac...@googlegroups.com
Hello Jose,

I think the harvest.includedrestricted.oai dspace.cfg parameter is no
longer valid since the xoai is in use.
You can achieve it with xoai.xml setting. The default filter applied to
the default context:

<!-- Default filter for records returned by OAI-PMH.
By default, return an Item record:
* If it is publicly accessible
* OR it has been withdrawn (in order to display a
tombstone record).
This filter is used by the default context ([oai]/request).
-->
<Filter id="defaultFilter">
<Definition>
<Or>
<LeftCondition>
<Custom ref="itemAccessCondition"/>
</LeftCondition>
<RightCondition>
<Custom ref="itemWithdrawnCondition"/>
</RightCondition>
</Or>
</Definition>
</Filter>

already contains an itemAccessCondition, which is based afair on the
DEFAULT_ITEM_READ and not on the acutal rights.

If you are using 5.1 and running
[dspace]/bin/dspace oai import -c
you might just be stuck with this error
https://jira.duraspace.org/browse/DS-2543
which was resolved in 5.3.

Hope this helps

Claudia Jürgen
--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
claudia...@tu-dortmund.de
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is solely intended for the recipient. If you are not the intended recipient of this e-mail please contact the sender and delete this message. Thank you. Without prejudice of e-mail correspondence, our statements are only legally binding when they are made in the conventional written form (with personal signature) or when such documents are sent by fax.

Jose Blanco

unread,
Jan 19, 2016, 3:18:02 PM1/19/16
to DSpace Technical Support
I just tried putting this:

        <Filter id="defaultFilter">
            <Definition>
                <Or>
                    <LeftCondition>
                        <Custom ref="itemAccessCondition"/>
                    </LeftCondition>
                    <RightCondition>
                        <Custom ref="itemWithdrawnCondition"/>
                    </RightCondition>
                </Or>
            </Definition>
        </Filter>

in xoai.xml 

but when I do oai/request?verb=Identify

I get:

2016-01-19 15:14:05,433 ERROR org.dspace.xoai.app.BasicConfiguration @ Not able to start XOAI normal cache service.
org.dspace.xoai.services.api.config.XOAIManagerResolverException: com.lyncode.xoai.dataprovider.exceptions.ConfigurationException: Unexpected element LeftCondition

Claudia Jürgen

unread,
Jan 20, 2016, 8:55:06 AM1/20/16
to dspac...@googlegroups.com
Hello Jose,

you need not add this (unless you customized your xoai.xml and removed
it or using another context). This is the default filter for the default
context.
Have you checked your oai solr data? The restricted item should have the
field
item.public set to false


Claudia

Jose Blanco

unread,
Jan 20, 2016, 4:14:46 PM1/20/16
to DSpace Technical Support
Claudia, I cant get to solr on the browser, put I put some debug statements in the code and I can see that public is false for the item I'm looking for as expected.

2016-01-20 16:01:35,475 INFO  org.dspace.xoai.app.XOAI @ Is Item Public Jose = TEMP-BOGUS/236284 is false
2016-01-20 16:01:35,477 INFO  org.dspace.xoai.app.XOAI @ OAI-Jose in XOAI.java) processing handle = TEMP-BOGUS/236284
2016-01-20 16:01:35,478 WARN  org.dspace.xoai.util.ItemUtils @ Authorization denied for action READ on BITSTREAM:563783 by user 0
org.dspace.authorize.AuthorizeException: Authorization denied for action READ on BITSTREAM:563783 by user 0
at org.dspace.authorize.AuthorizeManager.authorizeAction(AuthorizeManager.java:207)
at org.dspace.authorize.AuthorizeManager.authorizeAction(AuthorizeManager.java:111)
at org.dspace.content.Bitstream.retrieve(Bitstream.java:604)
at org.dspace.xoai.util.ItemUtils.retrieveMetadata(ItemUtils.java:274)

Where in the code does it check for public again? I'm using xoai.xml that came with the 5.1 release. I have a feeling it's getting into solr with public set to false, but that the code that retries it is ignoring the setting.

Thank you!
Jose

Jose Blanco

unread,
Jan 20, 2016, 5:15:49 PM1/20/16
to DSpace Technical Support
I have to go now but I think my problem is in the xoia.xml file.  I will change it tomorrow and see what happens.

I'll let you know.

-Jose

Jose Blanco

unread,
Jan 21, 2016, 9:41:18 AM1/21/16
to DSpace Technical Support
Claudia.  I noticed that I was missing: 
 DSpaceWithdrawnFilter.java
in dspace-oai/src/main/java/org/dspace/xoai/filter
so I copied the one from:

But now I see that all the other files in this directory are different from the ones in this gihub repository.  I started off with 5.1 from a gz file.  I wonder what happened.  Should I just use all the files and directories from the filter dir in github?

Thank you!
Jose

Claudia Jürgen

unread,
Jan 21, 2016, 12:14:54 PM1/21/16
to dspac...@googlegroups.com
Hello Jose,

per default you can access solr only from the machine it's runnning on.

You can forward the graphical output in order to use a browser or access
it with command line tools like curl.
Here are som examples:
gives you the number of all items which are not public
curl -g http://localhost:8080/solr/oai/select -d
'q=item.public:false&rows=0&wt=xml'

gives you the complete information of single item
curl -g http://localhost:8080/solr/oai/select -d
'q=item.id:YOURITEMID&rows=1&wt=xml'

So check the data in the solr oai core. If it is not correct run a full
import.

[dspace]/bin/dspace oai import -c

[dspace]/bin/dspace oai import without -c is an incremental import and
will only add new items to the index, but does not reflect changes to
existing items.

and then clean your cache by running
[dspace]/bin/dspace oai clean-cache
or manually remove the data under
[dspace]/var/oai/requests

there was an issue https://jira.duraspace.org/browse/DS-2543 which was
resolved in 5.3 where running
[dspace]/bin/dspace oai import -c did not clear the cache

Hope this helps

Claudia
Reply all
Reply to author
Forward
0 new messages