Hi Claudia and Michael,

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

Best regards,
euler
On Wednesday, March 17, 2021 at 9:55:16 PM UTC+8 Claudia Jürgen wrote:

> 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
>
>
> Am 17.03.2021 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 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:
>
>    - Health in Africa 
>    
> <https://openknowledge.worldbank.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=africa_health>
>  
>    - Research relating to China 
>    
> <https://openknowledge.worldbank.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=china_research>
>  
>    - Energy in India 
>    
> <https://openknowledge.worldbank.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=india_energy>
>  
>    - Microfinance in Bangladesh 
>    
> <https://openknowledge.worldbank.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=bangladesh_microfinance>
>  
>    - Agribusiness in Tanzania 
>    
> <https://openknowledge.worldbank.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=tanzania_agribusiness>
>  
>    - Climate Change 
>    
> <https://openknowledge.worldbank.org/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=climate_change>
>  
>
> 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
>
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dspace-tech/27e1d299-3289-4062-90c9-939d418dc2adn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/dspace-tech/27e1d299-3289-4062-90c9-939d418dc2adn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> Claudia Juergen
>
> Technische Universität Dortmund
> Universitätsbibliothek
> Bibliotheks-IT
> Vogelpothsweg 76
> 44227 Dortmund
>
> Tel.: +49 231-755 40 43 <+49%20231%207554043>
> Fax: +49 231-755 40 32 
> <+49%20231%207554032>[email protected]
>
>
>
>
>
> *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. * 
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/cba4ae35-31a0-4264-b744-becb31a2c9a2n%40googlegroups.com.

Reply via email to