mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 23:13:10 +00:00
Using default filter.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<root.basedir>${basedir}/..</root.basedir>
|
||||
<spring.version>3.2.3.RELEASE</spring.version>
|
||||
<xoai.version>3.2.5</xoai.version>
|
||||
<jtwig.version>1.0.2</jtwig.version>
|
||||
<jtwig.version>2.0.0</jtwig.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
@@ -114,7 +114,7 @@
|
||||
<!-- Templating Engine -->
|
||||
<dependency>
|
||||
<groupId>com.lyncode</groupId>
|
||||
<artifactId>jtwig</artifactId>
|
||||
<artifactId>jtwig-spring</artifactId>
|
||||
<version>${jtwig.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
@@ -1,119 +0,0 @@
|
||||
/**
|
||||
* 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/
|
||||
*/
|
||||
package org.dspace.xoai.filter;
|
||||
|
||||
import com.lyncode.xoai.dataprovider.core.ReferenceSet;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.LogManager;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.solr.client.solrj.util.ClientUtils;
|
||||
import org.dspace.content.DSpaceObject;
|
||||
import org.dspace.core.Context;
|
||||
import org.dspace.xoai.data.DSpaceItem;
|
||||
import org.dspace.xoai.filter.results.DatabaseFilterResult;
|
||||
import org.dspace.xoai.filter.results.SolrFilterResult;
|
||||
import org.dspace.xoai.services.api.database.CollectionsService;
|
||||
import org.dspace.xoai.services.api.database.HandleResolver;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Lyncode Development Team <dspace@lyncode.com>
|
||||
*/
|
||||
public class DSpaceSetSpecFilter extends DSpaceFilter
|
||||
{
|
||||
private static Logger log = LogManager.getLogger(DSpaceSetSpecFilter.class);
|
||||
|
||||
private String setSpec;
|
||||
private HandleResolver handleResolver;
|
||||
private CollectionsService collectionsService;
|
||||
|
||||
public DSpaceSetSpecFilter(CollectionsService collectionsService, HandleResolver handleResolver, String spec)
|
||||
{
|
||||
this.collectionsService = collectionsService;
|
||||
this.handleResolver = handleResolver;
|
||||
setSpec = spec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DatabaseFilterResult buildDatabaseQuery(Context context)
|
||||
{
|
||||
if (setSpec.startsWith("col_"))
|
||||
{
|
||||
try
|
||||
{
|
||||
DSpaceObject dso = handleResolver.resolve(setSpec.replace("col_", ""));
|
||||
return new DatabaseFilterResult(
|
||||
"EXISTS (SELECT tmp.* FROM collection2item tmp WHERE tmp.item_id=i.item_id AND collection_id = ?)",
|
||||
dso.getID());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.error(ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
else if (setSpec.startsWith("com_"))
|
||||
{
|
||||
try
|
||||
{
|
||||
DSpaceObject dso = handleResolver.resolve(setSpec.replace("com_", ""));
|
||||
List<Integer> list = collectionsService.getAllSubCollections(dso.getID());
|
||||
String subCollections = StringUtils.join(list.iterator(), ",");
|
||||
return new DatabaseFilterResult(
|
||||
"EXISTS (SELECT tmp.* FROM collection2item tmp WHERE tmp.item_id=i.item_id AND collection_id IN ("
|
||||
+ subCollections + "))");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
return new DatabaseFilterResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShown(DSpaceItem item)
|
||||
{
|
||||
for (ReferenceSet s : item.getSets())
|
||||
if (s.getSetSpec().equals(setSpec))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolrFilterResult buildSolrQuery()
|
||||
{
|
||||
if (setSpec.startsWith("col_"))
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SolrFilterResult("item.collections:"
|
||||
+ ClientUtils.escapeQueryChars(setSpec));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.error(ex.getMessage(), ex);
|
||||
}
|
||||
}
|
||||
else if (setSpec.startsWith("com_"))
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SolrFilterResult("item.communities:"
|
||||
+ ClientUtils.escapeQueryChars(setSpec));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
return new SolrFilterResult();
|
||||
}
|
||||
|
||||
}
|
@@ -10,201 +10,201 @@
|
||||
Developed by DSpace @ Lyncode <dspace@lyncode.com>
|
||||
-->
|
||||
<Configuration indented="false" maxListIdentifiersSize="100" maxListRecordsSize="100"
|
||||
maxListSetsSize="100" stylesheet="static/style.xsl"
|
||||
xmlns="http://www.lyncode.com/XOAIConfiguration">
|
||||
maxListSetsSize="100" stylesheet="static/style.xsl"
|
||||
xmlns="http://www.lyncode.com/XOAIConfiguration">
|
||||
|
||||
<Contexts>
|
||||
<Context baseurl="request" name="Default Context">
|
||||
<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" />
|
||||
<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 data provider.
|
||||
</Description>
|
||||
</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"/>
|
||||
</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, if fact it returns all items within the driver context -->
|
||||
<Set ref="driverSet" />
|
||||
<!-- Metadata Formats -->
|
||||
<Format ref="oaidc"/>
|
||||
<Format ref="mets" />
|
||||
<Format ref="didl" />
|
||||
<Filter ref="driverFilter"/>
|
||||
<!-- Just an alias, if 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 contexts complains with Driver rules.
|
||||
</Description>
|
||||
</Context>
|
||||
|
||||
<!--
|
||||
OpenAIRE Guidelines 1.1:
|
||||
|
||||
- http://www.openaire.eu/en/component/attachments/download/79%E2%8C%A9=en
|
||||
|
||||
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" />
|
||||
</Context>
|
||||
|
||||
<!--
|
||||
OpenAIRE Guidelines 1.1:
|
||||
|
||||
- http://www.openaire.eu/en/component/attachments/download/79%E2%8C%A9=en
|
||||
|
||||
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, if fact it returns all items within the driver context -->
|
||||
<Set ref="openaireSet" />
|
||||
<!-- Metadata Formats -->
|
||||
<Format ref="oaidc" />
|
||||
<Format ref="mets" />
|
||||
<Filter ref="openAireFilter"/>
|
||||
<!-- Just an alias, if fact it returns all items within the driver context -->
|
||||
<Set ref="openaireSet"/>
|
||||
<!-- Metadata Formats -->
|
||||
<Format ref="oaidc"/>
|
||||
<Format ref="mets"/>
|
||||
<Description>
|
||||
This contexts complains with OpenAIRE rules.
|
||||
</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>
|
||||
<<<<<<< HEAD
|
||||
<Filter refid="thesisFilter" />
|
||||
=======
|
||||
<Filter ref="uketdDcFilter" />
|
||||
>>>>>>> 7c0f545... OAI 2.1
|
||||
</Format>
|
||||
</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_0.xsd</SchemaLocation>
|
||||
</Format>
|
||||
</Formats>
|
||||
|
||||
<Transformers>
|
||||
<Transformer id="driverTransformer">
|
||||
<XSLT>transformers/driver.xsl</XSLT>
|
||||
</Transformer>
|
||||
<Transformer id="openaireTransformer">
|
||||
<XSLT>transformers/openaire.xsl</XSLT>
|
||||
</Transformer>
|
||||
</Transformers>
|
||||
|
||||
</Formats>
|
||||
|
||||
<Filters>
|
||||
<Transformers>
|
||||
<Transformer id="driverTransformer">
|
||||
<XSLT>transformers/driver.xsl</XSLT>
|
||||
</Transformer>
|
||||
<Transformer id="openaireTransformer">
|
||||
<XSLT>transformers/openaire.xsl</XSLT>
|
||||
</Transformer>
|
||||
</Transformers>
|
||||
|
||||
|
||||
<Filters>
|
||||
<Filter id="driverFilter">
|
||||
<Definition>
|
||||
<And>
|
||||
<LeftCondition>
|
||||
<And>
|
||||
<LeftCondition>
|
||||
<Custom ref="titleExistsCondition" />
|
||||
<Custom ref="titleExistsCondition"/>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<Custom ref="authorExistsCondition" />
|
||||
<Custom ref="authorExistsCondition"/>
|
||||
</RightCondition>
|
||||
</And>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<And>
|
||||
<LeftCondition>
|
||||
<Custom ref="driverDocumentTypeCondition" />
|
||||
<Custom ref="driverDocumentTypeCondition"/>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<And>
|
||||
<LeftCondition>
|
||||
<Custom ref="bitstreamAccessCondition" />
|
||||
<Custom ref="bitstreamAccessCondition"/>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<Custom ref="driverAccessCondition" />
|
||||
<Custom ref="driverAccessCondition"/>
|
||||
</RightCondition>
|
||||
</And>
|
||||
</RightCondition>
|
||||
@@ -220,20 +220,20 @@
|
||||
<LeftCondition>
|
||||
<And>
|
||||
<LeftCondition>
|
||||
<Custom ref="titleExistsFilter" />
|
||||
<Custom ref="titleExistsFilter"/>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<Custom ref="authorExistsFilter" />
|
||||
<Custom ref="authorExistsFilter"/>
|
||||
</RightCondition>
|
||||
</And>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<And>
|
||||
<LeftCondition>
|
||||
<Custom ref="driverDocumentTypeFilter" />
|
||||
<Custom ref="driverDocumentTypeFilter"/>
|
||||
</LeftCondition>
|
||||
<RightCondition>
|
||||
<Custom ref="openaireRelationFilter" />
|
||||
<Custom ref="openaireRelationFilter"/>
|
||||
</RightCondition>
|
||||
</And>
|
||||
</RightCondition>
|
||||
@@ -243,7 +243,13 @@
|
||||
|
||||
<Filter id="uketdDcFilter">
|
||||
<Definition>
|
||||
<Custom ref="thesisDocumentTypeCondition" />
|
||||
<Custom ref="thesisDocumentTypeCondition"/>
|
||||
</Definition>
|
||||
</Filter>
|
||||
|
||||
<Filter id="defaultFilter">
|
||||
<Definition>
|
||||
<Custom ref="bitstreamAccessCondition"/>
|
||||
</Definition>
|
||||
</Filter>
|
||||
|
||||
@@ -270,8 +276,8 @@
|
||||
</Configuration>
|
||||
</CustomCondition>
|
||||
|
||||
<CustomCondition id="driverDocumentTypeCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
|
||||
<CustomCondition id="driverDocumentTypeCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
|
||||
<Configuration>
|
||||
<string name="field">dc.type</string>
|
||||
<string name="operator">ends_with</string>
|
||||
@@ -294,10 +300,10 @@
|
||||
<string>other</string>
|
||||
</list>
|
||||
</Configuration>
|
||||
</CustomCondition>
|
||||
</CustomCondition>
|
||||
|
||||
<CustomCondition id="driverAccessCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
|
||||
<CustomCondition id="driverAccessCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
|
||||
<Configuration>
|
||||
<string name="field">dc.rights</string>
|
||||
<string name="operator">contains</string>
|
||||
@@ -306,57 +312,32 @@
|
||||
<string>openAccess</string>
|
||||
</list>
|
||||
</Configuration>
|
||||
</CustomCondition>
|
||||
</CustomCondition>
|
||||
|
||||
<CustomCondition id="bitstreamAccessCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAuthorizationFilter</Class>
|
||||
</CustomCondition>
|
||||
<CustomCondition id="bitstreamAccessCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAuthorizationFilter</Class>
|
||||
</CustomCondition>
|
||||
|
||||
<CustomCondition id="openaireRelationCondition">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
|
||||
<<<<<<< HEAD
|
||||
<Parameter key="field">
|
||||
<Value>dc.relation</Value>
|
||||
</Parameter>
|
||||
<Parameter key="operator">
|
||||
<Value>starts_with</Value>
|
||||
</Parameter>
|
||||
<Parameter key="value">
|
||||
<Value>info:eu-repo/grantAgreement/EC/FP</Value>
|
||||
</Parameter>
|
||||
</Filter>
|
||||
<Filter id="thesisFilter">
|
||||
<Class>org.dspace.xoai.filter.DSpaceAtLeastOneMetadataFilter</Class>
|
||||
<Parameter key="field">
|
||||
<Value>dc.type</Value>
|
||||
</Parameter>
|
||||
<Parameter key="operator">
|
||||
<Value>contains</Value>
|
||||
</Parameter>
|
||||
<Parameter key="value">
|
||||
<Value>Thesis</Value>
|
||||
</Parameter>
|
||||
</Filter>
|
||||
=======
|
||||
<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/EC/FP</string>
|
||||
</Configuration>
|
||||
</CustomCondition>
|
||||
>>>>>>> 7c0f545... OAI 2.1
|
||||
</Filters>
|
||||
|
||||
<Sets>
|
||||
<Set id="driverSet">
|
||||
<Spec>driver</Spec>
|
||||
<Name>Open Access DRIVERset</Name>
|
||||
<!-- Just an alias -->
|
||||
</Set>
|
||||
<Set id="openaireSet">
|
||||
<Spec>ec_fundedresources</Spec>
|
||||
<Name>EC_fundedresources set</Name>
|
||||
<!-- Just an alias -->
|
||||
</Set>
|
||||
</Sets>
|
||||
</CustomCondition>
|
||||
</Filters>
|
||||
|
||||
<Sets>
|
||||
<Set id="driverSet">
|
||||
<Spec>driver</Spec>
|
||||
<Name>Open Access DRIVERset</Name>
|
||||
<!-- Just an alias -->
|
||||
</Set>
|
||||
<Set id="openaireSet">
|
||||
<Spec>ec_fundedresources</Spec>
|
||||
<Name>EC_fundedresources set</Name>
|
||||
<!-- Just an alias -->
|
||||
</Set>
|
||||
</Sets>
|
||||
</Configuration>
|
||||
|
Reference in New Issue
Block a user