How to create virtual sets within a collection in DSpace?

327 Views Asked by At

I have a collection in server A which is a mix of different item types. Now, I would like to harvest this collection from server B in different collections that I have set up for each item types available.

The scenario would be like this:

Server A -> CommunityA -> CollectionA
Server B -> CommunityB -> CollectionB1 (Article)
Server B -> CommunityB -> CollectionB2 (Book chapter)
Server B -> CommunityB -> CollectionB3 (Conference paper)

So in the scenario above, Collections B1, B2 and B3 will all have the same OAI provider with records from the same collection in Server A which is CollectionA except that CollectionB1 will only harvest items with item type Article, CollectionB2 with item type Book chapter and CollectionB3 with item type Conference paper.

I've seen in some examples on how to create virtual sets based on metadata or item types but as far as I know, these virtual sets are applied to all the contents in the repository.

My question is how to create virtual sets in Server A by item types from collection A only?

1

There are 1 best solutions below

3
On

If you control Server A, you could define a custom OAI crosswalk that filters by item type.

The DSpace code base contains an OAI crosswalk that filters items for the type "Thesis".

    <!-- 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>

https://github.com/DSpace/DSpace/blob/master/dspace/config/crosswalks/oai/xoai.xml#L310-L319