How to create Virtual Sets in OAI?

218 views
Skip to first unread message

euler

unread,
Mar 16, 2021, 10:56:05 PM3/16/21
to DSpace Technical Support
Dear All,

I did not find any documentation on how to create virtual sets in the OAI: https://wiki.lyrasis.org/display/DSDOC6x/OAI. I would like to create virtual sets based on the metadata such as those implemented in Open Knowledge Repository: https://openknowledge.worldbank.org/harvesting-the-okr

Queries for virtual sets in the OKR may be as broad as “Health in Africa” or “Climate Change” or as narrow as “Agribusiness in Tanzania” and “Microfinance in Bangladesh”. The following six sample virtual sets have been created and are now available for other repositories to begin ingesting:

A long time ago, I asked about this in Stackoverflow: https://stackoverflow.com/q/52360308/1919069 but I don't want to create a new "Metadata Format", but instead I want to create Sets based on the metadata (e.g. create a set for items if dc.subject contains a certain word).

In [dspace]/config/crosswalks/oai/xoai.xml, there is a filter there for Thesis type:
        <!-- This condition determines if an Item has a "dc.type" field
             which contains "Thesis". -->
        <CustomCondition id="thesisDocumentTypeCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.type</string>
                <string name="operator">contains</string>
                <string name="value">Thesis</string>
            </Configuration>
        </CustomCondition>

But that filter will only apply to the metadata format uketd_dc. What I would want is to create a filter that will create Sets available to all Metadata Formats. Is this possible (I assume yes because it is already implemented in OKR, I just don't know how)? Can this be done just by modifying XSLT?

Thanks in advance!
euler

Michael Plate

unread,
Mar 17, 2021, 6:09:35 AM3/17/21
to dspac...@googlegroups.com
Hi,

I struggled with a similar problem some weeks ago and found this

http://dspace.2283337.n4.nabble.com/Create-OAI-Set-td4690783.html

helpful.
At least we now have sets with DDC and dc.type an some more.


Am 17.03.21 um 03:56 schrieb euler:
> Dear All,
>
> I did not find any documentation on how to create virtual sets in the
> OAI: https://wiki.lyrasis.org/display/DSDOC6x/OAI. I would like to
> create virtual sets based on the metadata such as those implemented in
> Open Knowledge
[…]

CU

Michael

Claudia Jürgen

unread,
Mar 17, 2021, 9:55:16 AM3/17/21
to dspac...@googlegroups.com

Hello Euler,

yes this is possible and can be done in

https://github.com/DSpace/DSpace/blob/dspace-6.3/dspace/config/crosswalks/oai/xoai.xml

1. Define a Set
<Sets>
        <Set id="YourNameForTheSet">
            <Spec>YourSpecNameForTheSet</Spec>
            <Name>YourDisplayNameForTheSet</Name>
            <Filter ref="YourFilter"/>
        </Set>
</Sets>

2. Define the filter and condition or use existing filters and conditions
Filter:

<Filters>
        <Filter id="YourFilter">
            <Definition>
                <Custom ref="YourCondition"/>
            </Definition>
        </Filter>
</Filters>

Filters can be more complex and contain Conditions with relations like
https://github.com/DSpace/DSpace/blob/dspace-6.3/dspace/config/crosswalks/oai/xoai.xml#L307

Condition:

        <CustomCondition id="YourCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.type.publicationtype</string>
                <string name="operator">equal</string>
                <string name="value">article</string>
            </Configuration>
        </CustomCondition>
       
       
3. Use the set in the context(s) you need it in
<Context ...>
    <Set ref="YourNameForTheSet" />
</Context>

Hope this helps

Claudia Jürgen

--
All messages to this mailing list should adhere to the Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
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 view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/27e1d299-3289-4062-90c9-939d418dc2adn%40googlegroups.com.
-- 
Claudia Juergen

Technische Universität Dortmund
Universitätsbibliothek
Bibliotheks-IT
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.

euler

unread,
Mar 17, 2021, 10:26:56 PM3/17/21
to DSpace Technical Support
Hi Claudia and Michael,

Thank you so much for the response! Now I can create virtual sets with specific conditions.

Best regards,
euler
Reply all
Reply to author
Forward
0 new messages