Thanks, Michael, for the tip!  I ran a complete rebuild, and ran out of 
memory part way through.  I increased the amount allotted to Java in the 
dspace script (-Xmx) and it ran fine the second time.  It seemed to finish 
with the 103000 documents in our repository, then it started over, and at 
about 10000 hit a null pointer exception.  I don't know why it started 
over, and would like to understand - but it seems not to have broken 
anything.  I have a working oai system again.  This refresh did find the 
file in my test open access collection and display the metadata in the oai 
interface.

Anyway, more importantly, to answer your question, I would prefer to make 
the virtual set work (with all the open access documents in it) and avoid 
the maintenance of a separate oa collection holding duplicates of other 
collections.  However, having tried Claudia Jürgen's seemingly clear 
instructions, I still do not have the virtual set appearing in my oai 
list.  I have enclosed my xoai.xml - could someone take a look and tell me 
what I have done wrong?

Thanks!!

Best regards,
Paul

On Tuesday, August 17, 2021 at 5:39:09 PM UTC+2 Michael Plate wrote:

> Hi Paul,
>
> Am 17.08.21 um 17:31 schrieb [email protected]:
> > Hello,
> > 
> > We are applying for dini certification, and we need an OAI-set for the 
> > open access documents.  I have attempted two things:
> > 
> > 1.
> > I have created a collection named Open Access and put one of our open 
> > access documents in it as a test.  This document belongs to another 
> > collection.  After running discovery to update the solr index, the 
> > document now appears in both places.
>
> do you really want that ? Or do you want just to have any oa doc in a set ?
>
> > 
> > But in the oai inteface, the collection appears, but the document does 
> not.
> […]
>
> sounds like you missed updating the OAI cache:
>
> [bin]/dspace oai -h
>
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
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/4a034c6d-1070-42cd-b1e8-5d7fd1eb90dfn%40googlegroups.com.
<?xml version="1.0" encoding="UTF-8"?>
<!-- 

    The contents of this file are subject to the license and copyright
    detailed in the LICENSE and NOTICE files at the root of the source
    tree and available online at

    http://www.dspace.org/license/

	Developed by DSpace @ Lyncode <[email protected]>
 -->
<Configuration indented="false" maxListIdentifiersSize="100" maxListRecordsSize="100"
               maxListSetsSize="100" stylesheet="static/style.xsl"
               xmlns="http://www.lyncode.com/XOAIConfiguration";>

    <Contexts>
        <Context baseurl="request" name="Default Context">
            <!-- Restrict access to hidden items by default -->
            <Filter ref="defaultFilter"/>

            <Format ref="oaidc"/>
            <Format ref="mets"/>
            <Format ref="xoai"/>
            <Format ref="didl"/>
            <Format ref="dim"/>
            <Format ref="ore"/>
            <Format ref="rdf"/>
            <Format ref="etdms"/>
            <Format ref="mods"/>
            <Format ref="qdc"/>
            <Format ref="marc"/>
            <Format ref="uketd_dc"/>
            <!--<Format ref="junii2" />-->
            <Description>
                This is the default context of the DSpace OAI-PMH data provider.
            </Description>
	    <Set ref="openaccessSet"/>
        </Context>

        <!--
            Driver Guidelines:

            - http://www.driver-support.eu/documents/DRIVER_Guidelines_v2_Final_2008-11-13.pdf

            Page 57 - 58
         -->
        <Context baseurl="driver" name="Driver Context">
            <!-- Date format, field prefixes, etc are ensured by the transformer -->
            <Transformer ref="driverTransformer"/>
            <!-- The driver filter -->
            <Filter ref="driverFilter"/>
            <!-- Just an alias, in fact it returns all items within the driver context -->
            <Set ref="driverSet"/>
            <!-- Metadata Formats -->
            <Format ref="oaidc"/>
            <Format ref="mets"/>
            <Format ref="didl"/>
            <Description>
                This context complies with Driver rules.
            </Description>
        </Context>

        <!--
            OpenAIRE Guidelines 3.0:

            - https://guidelines.openaire.eu/

            There is a limitation over the embargoedEndDate parameter:

            - Predefined DSpace fields don't allow to set this up with a default.
         -->
        <Context baseurl="openaire" name="OpenAIRE Context">
            <!-- Date format, field prefixes, etc are ensured by the transformer -->
            <Transformer ref="openaireTransformer"/>
            <!-- OpenAIRE filter -->
            <Filter ref="openAireFilter"/>
            <!-- Just an alias, in fact it returns all items within the driver context -->
            <Set ref="openaireSet"/>
            <!-- Metadata Formats -->
            <Format ref="oaidc"/>
            <Format ref="mets"/>
            <Description>
                This contexts complies with OpenAIRE Guidelines for Literature Repositories v3.0.
            </Description>
        </Context>
    </Contexts>


    <Formats>
        <Format id="oaidc">
            <Prefix>oai_dc</Prefix>
            <XSLT>metadataFormats/oai_dc.xsl</XSLT>
            <Namespace>http://www.openarchives.org/OAI/2.0/oai_dc/</Namespace>
            <SchemaLocation>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</SchemaLocation>
        </Format>
        <Format id="mets">
            <Prefix>mets</Prefix>
            <XSLT>metadataFormats/mets.xsl</XSLT>
            <Namespace>http://www.loc.gov/METS/</Namespace>
            <SchemaLocation>http://www.loc.gov/standards/mets/mets.xsd</SchemaLocation>
        </Format>
        <!-- Shows the XOAI internal generated XML -->
        <Format id="xoai">
            <Prefix>xoai</Prefix>
            <XSLT>metadataFormats/xoai.xsl</XSLT>
            <Namespace>http://www.lyncode.com/xoai</Namespace>
            <SchemaLocation>http://www.lyncode.com/schemas/xoai.xsd</SchemaLocation>
        </Format>
        <Format id="didl">
            <Prefix>didl</Prefix>
            <XSLT>metadataFormats/didl.xsl</XSLT>
            <Namespace>urn:mpeg:mpeg21:2002:02-DIDL-NS</Namespace>
            <SchemaLocation>http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-21_schema_files/did/didl.xsd
            </SchemaLocation>
        </Format>
        <Format id="dim">
            <Prefix>dim</Prefix>
            <XSLT>metadataFormats/dim.xsl</XSLT>
            <Namespace>http://www.dspace.org/xmlns/dspace/dim</Namespace>
            <SchemaLocation>http://www.dspace.org/schema/dim.xsd</SchemaLocation>
        </Format>
        <Format id="ore">
            <Prefix>ore</Prefix>
            <XSLT>metadataFormats/ore.xsl</XSLT>
            <Namespace>http://www.w3.org/2005/Atom</Namespace>
            <SchemaLocation>http://tweety.lanl.gov/public/schemas/2008-06/atom-tron.sch</SchemaLocation>
        </Format>
        <Format id="rdf">
            <Prefix>rdf</Prefix>
            <XSLT>metadataFormats/rdf.xsl</XSLT>
            <Namespace>http://www.openarchives.org/OAI/2.0/rdf/</Namespace>
            <SchemaLocation>http://www.openarchives.org/OAI/2.0/rdf.xsd</SchemaLocation>
        </Format>
        <Format id="etdms">
            <Prefix>etdms</Prefix>
            <XSLT>metadataFormats/etdms.xsl</XSLT>
            <Namespace>http://www.ndltd.org/standards/metadata/etdms/1.0/</Namespace>
            <SchemaLocation>http://www.ndltd.org/standards/metadata/etdms/1.0/etdms.xsd</SchemaLocation>
        </Format>
        <Format id="mods">
            <Prefix>mods</Prefix>
            <XSLT>metadataFormats/mods.xsl</XSLT>
            <Namespace>http://www.loc.gov/mods/v3</Namespace>
            <SchemaLocation>http://www.loc.gov/standards/mods/v3/mods-3-1.xsd</SchemaLocation>
        </Format>
        <Format id="qdc">
            <Prefix>qdc</Prefix>
            <XSLT>metadataFormats/qdc.xsl</XSLT>
            <Namespace>http://purl.org/dc/terms/</Namespace>
            <SchemaLocation>http://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd</SchemaLocation>
        </Format>
        <Format id="marc">
            <Prefix>marc</Prefix>
            <XSLT>metadataFormats/marc.xsl</XSLT>
            <Namespace>http://www.loc.gov/MARC21/slim</Namespace>
            <SchemaLocation>http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd</SchemaLocation>
        </Format>
        <Format id="uketd_dc">
            <Prefix>uketd_dc</Prefix>
            <XSLT>metadataFormats/uketd_dc.xsl</XSLT>
            <Namespace>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/</Namespace>
            <SchemaLocation>http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd</SchemaLocation>
            <Filter ref="uketdDcFilter"/>
        </Format>
        <Format id="junii2">
            <Prefix>junii2</Prefix>
            <XSLT>metadataFormats/junii2.xsl</XSLT>
            <Namespace>http://irdb.nii.ac.jp/oai</Namespace>
            <SchemaLocation>http://irdb.nii.ac.jp/oai/junii2-3-1.xsd</SchemaLocation>
        </Format>
    </Formats>

    <Transformers>
        <Transformer id="driverTransformer">
            <XSLT>transformers/driver.xsl</XSLT>
        </Transformer>
        <Transformer id="openaireTransformer">
            <XSLT>transformers/openaire.xsl</XSLT>
        </Transformer>
    </Transformers>


    <Filters>
        <!-- DRIVER filter for records returned by OAI-PMH.
             By default, return an Item record:
               * If a Title & Author field both exist
               * AND a valid DRIVER Document Type exists
               * AND Item is either publicly accessible OR Withdrawn (for tombstones)
               * AND Driver "open access" condition is specified
             This filter is only used in the DRIVER context ([oai]/driver)
        -->
        <Filter id="driverFilter">
            <Definition>
                <And>
                    <LeftCondition>
                        <And>
                            <LeftCondition>
                                <Custom ref="titleExistsCondition"/>
                            </LeftCondition>
                            <RightCondition>
                                <Custom ref="authorExistsCondition"/>
                            </RightCondition>
                        </And>
                    </LeftCondition>
                    <RightCondition>
                        <And>
                            <LeftCondition>
                                <Custom ref="driverDocumentTypeCondition"/>
                            </LeftCondition>
                            <RightCondition>
                                <And>
                                    <LeftCondition>
                                        <Or>
                                            <LeftCondition>
                                                <Custom ref="itemAccessCondition"/>
                                            </LeftCondition>
                                            <RightCondition>
                                                <Custom ref="itemWithdrawnCondition"/>
                                            </RightCondition>
                                        </Or>
                                    </LeftCondition>
                                    <RightCondition>
                                        <Custom ref="driverAccessCondition"/>
                                    </RightCondition>
                                </And>
                            </RightCondition>
                        </And>
                    </RightCondition>
                </And>
            </Definition>
        </Filter>

        <!-- OpenAIRE filter for records returned by OAI-PMH.
             By default, return an Item record:
               * If a Title & Author field both exist
               * AND a valid DRIVER Document Type exists
               * AND Item is either publicly accessible OR Withdrawn (for tombstones)
               * AND the OpenAIRE "dc.relation" is specified
             This filter is only used in the OpenAIRE context ([oai]/openaire).
        -->
        <Filter id="openAireFilter">
            <Definition>
                <And>
                    <LeftCondition>
                        <And>
                            <LeftCondition>
                                <And>
                                    <LeftCondition>
                                        <Custom ref="titleExistsCondition"/>
                                    </LeftCondition>
                                    <RightCondition>
                                        <Custom ref="authorExistsCondition"/>
                                    </RightCondition>
                                </And>
                            </LeftCondition>
                            <RightCondition>
                                <Custom ref="driverDocumentTypeCondition"/>
                            </RightCondition>
                        </And>
                    </LeftCondition>
                    <RightCondition>
                        <Or>
                            <LeftCondition>
                                <And>
                                    <LeftCondition>
                                        <Or>
                                            <LeftCondition>
                                                <Custom ref="itemAccessCondition"/>
                                            </LeftCondition>
                                            <RightCondition>
                                                <Custom ref="itemWithdrawnCondition"/>
                                            </RightCondition>
                                        </Or>
                                    </LeftCondition>
                                    <RightCondition>
                                        <Custom ref="driverAccessCondition"/>
                                    </RightCondition>
                                </And>
                            </LeftCondition>
                            <RightCondition>
                                <Custom ref="openaireRelationCondition"/>
                            </RightCondition>
                        </Or>
                    </RightCondition>
                </And>
            </Definition>
        </Filter>

        <!-- UKETD Filter for records returned by OAI-PMH.
             By default, return an Item record:
                * If it is a "thesis"

             This filter is appended to any existing filter
             when "metadataPrefix=uketd_dc" is specified.
        -->
        <Filter id="uketdDcFilter">
            <Definition>
                <Custom ref="thesisDocumentTypeCondition"/>
            </Definition>
        </Filter>

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

	<Filter id="openAccessFilter">
	  <Definition>
	    <Custom ref="openAccessCondition"/>
	  </Definition>
	</Filter>

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

        <!-- This condition determines if an Item has a "dc.contributor.author" -->
        <CustomCondition id="authorExistsCondition">
            <Class>org.dspace.xoai.filter.DSpaceMetadataExistsFilter</Class>
            <Configuration>
                <string name="field">dc.contributor.author</string>
            </Configuration>
        </CustomCondition>

        <!-- This condition determines if an Item has a "dc.title" -->
        <CustomCondition id="titleExistsCondition">
            <Class>org.dspace.xoai.filter.DSpaceMetadataExistsFilter</Class>
            <Configuration>
                <string name="field">dc.title</string>
            </Configuration>
        </CustomCondition>

        <!-- This condition determines if an Item has a "dc.type" field
             specifying one of the valid DRIVER document types. -->
        <CustomCondition id="driverDocumentTypeCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.type</string>
                <string name="operator">ends_with</string>
                <list name="values">
                    <string>article</string>
                    <string>bachelorThesis</string>
                    <string>masterThesis</string>
                    <string>doctoralThesis</string>
                    <string>book</string>
                    <string>bookPart</string>
                    <string>review</string>
                    <string>conferenceObject</string>
                    <string>lecture</string>
                    <string>workingPaper</string>
                    <string>preprint</string>
                    <string>report</string>
                    <string>annotation</string>
                    <string>contributionToPeriodical</string>
                    <string>patent</string>
                    <string>dataset</string>
                    <string>other</string>
                </list>
            </Configuration>
        </CustomCondition>

        <!-- This condition determines if an Item has a "dc.rights" field
             specifying "open access", which is required for DRIVER
             OR "openAccess", which is required by OpenAIRE. -->
        <CustomCondition id="driverAccessCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.rights</string>
                <string name="operator">contains</string>
                <list name="values">
                    <string>openAccess</string>
                    <string>Open Access</string>
                    <string>open-access</string>
                </list>
            </Configuration>
        </CustomCondition>

        <CustomCondition id="openAccessCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.rights</string>
                <string name="operator">contains</string>
                <list name="values">
                    <string>openAccess</string>
                    <string>Open Access</string>
                    <string>open-access</string>
                </list>
            </Configuration>
        </CustomCondition>


        <!-- This condition determines if an Item is publicly accessible. -->
        <CustomCondition id="itemAccessCondition">
            <Class>org.dspace.xoai.filter.DSpaceAuthorizationFilter</Class>
        </CustomCondition>

        <!-- This condition determines if an Item is withdrawn. This condition
             ensures a basic "tombstone" record is shown for withdrawn items,
             as recommended by OAI-PMH spec. This "tombstone" doesn't display
             any metadata or content files.  -->
        <CustomCondition id="itemWithdrawnCondition">
            <Class>org.dspace.xoai.filter.DSpaceWithdrawnFilter</Class>
        </CustomCondition>

        <!-- This condition determines if an Item has a "dc.relation" field
             which specifies the openAIRE project ID. -->
        <CustomCondition id="openaireRelationCondition">
            <Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
            <Configuration>
                <string name="field">dc.relation</string>
                <string name="operator">starts_with</string>
                <string name="value">info:eu-repo/grantAgreement/</string>
            </Configuration>
        </CustomCondition>
    </Filters>

    <Sets>
        <Set id="driverSet">
            <Spec>driver</Spec>
            <Name>Open Access DRIVERset</Name>
            <!-- Just an alias -->
        </Set>
        <Set id="openaireSet">
            <Spec>openaire</Spec>
            <Name>OpenAIRE</Name>
            <!-- Just an alias -->
        </Set>
	<Set id="openaccessSet">
            <Spec>openaccess</Spec>
            <Name>Open Access Docs</Name>
            <!-- Just an alias -->
        </Set>
    </Sets>
</Configuration>

Reply via email to