forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
2,810 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
dspace-oai/src/main/java/org/dspace/xoai/filter/ItemsWithBitstreamFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/** | ||
* 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 java.sql.SQLException; | ||
|
||
import org.apache.log4j.LogManager; | ||
import org.apache.log4j.Logger; | ||
import org.dspace.content.Bundle; | ||
import org.dspace.content.Item; | ||
import org.dspace.handle.factory.HandleServiceFactory; | ||
import org.dspace.handle.service.HandleService; | ||
import org.dspace.xoai.data.DSpaceItem; | ||
import org.dspace.xoai.filter.results.SolrFilterResult; | ||
|
||
|
||
/** | ||
* Created by Philip Vissenaekens (philip at atmire dot com) | ||
* Date: 21/04/15 | ||
* Time: 15:18 | ||
*/ | ||
public class ItemsWithBitstreamFilter extends DSpaceFilter { | ||
|
||
private static Logger log = LogManager.getLogger(ItemsWithBitstreamFilter.class); | ||
|
||
private static final HandleService handleService | ||
= HandleServiceFactory.getInstance().getHandleService(); | ||
|
||
@Override | ||
public SolrFilterResult buildSolrQuery() { | ||
return new SolrFilterResult("item.hasbitstream:true"); | ||
} | ||
|
||
@Override | ||
public boolean isShown(DSpaceItem item) { | ||
try { | ||
String handle = DSpaceItem.parseHandle(item.getIdentifier()); | ||
if (handle == null) { | ||
return false; | ||
} | ||
Item dspaceItem = (Item) handleService.resolveToObject(context, handle); | ||
for (Bundle b : dspaceItem.getBundles("ORIGINAL")) { | ||
if (b.getBitstreams().size() > 0) { | ||
return true; | ||
} | ||
} | ||
} catch (SQLException e) { | ||
log.error(e.getMessage(), e); | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
dspace-oai/src/test/java/org/dspace/xoai/tests/stylesheets/RioxxXslTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* 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.tests.stylesheets; | ||
|
||
import static org.dspace.xoai.tests.support.XmlMatcherBuilder.xml; | ||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.core.Is.is; | ||
import static org.hamcrest.core.IsEqual.equalTo; | ||
|
||
import org.dspace.xoai.tests.support.XmlMatcherBuilder; | ||
import org.junit.Test; | ||
|
||
public class RioxxXslTest extends AbstractXSLTest { | ||
@Test | ||
public void rioxxCanTransformInput() throws Exception { | ||
String result = apply("rioxx.xsl").to(resource("xoai-rioxx-test.xml")); | ||
|
||
assertThat(result, is(rioxx().withXPath("//dc:title", equalTo("The Intercorrelation Between " + | ||
"Executive Function, Physics Problem Solving, Mathematical, and Matrix Reasoning Skills: " + | ||
"Reflections from a Small-Scale Experiment")))); | ||
} | ||
|
||
private XmlMatcherBuilder rioxx() { | ||
return xml() | ||
.withNamespace("rioxx", "http://www.rioxx.net/schema/v3.0/rioxx/") | ||
.withNamespace("rioxxterms", "http://docs.rioxx.net/schema/v3.0/rioxxterms/") | ||
.withNamespace("dcterms", "http://purl.org/dc/terms/") | ||
.withNamespace("dc", "http://purl.org/dc/elements/1.1/"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?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/ | ||
--> | ||
<rioxx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rioxx.net/schema/v3.0/rioxx/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rioxxterms="http://docs.rioxx.net/schema/v3.0/rioxxterms/"> | ||
<dc:description>Data on Secchi disc depth (the depth at which a standard white disc lowered into the water just becomes invisible to a surface observer) show that water clarity in the North Sea declined during the 20th century, with likely consequences for marine primary production. However, the causes of this trend remain unknown. Here we analyse the hypothesis that changes in the North Sea's wave climate were largely responsible by causing an increase in the concentrations of suspended particulate matter (SPM) in the water column through the resuspension of seabed sediments. First, we analysed the broad-scale statistical relationships between SPM and bed shear stress due to waves and tides. We used hindcasts of wave and current data to construct a space–time dataset of bed shear stress between 1997 and 2017 across the northwest European Continental Shelf and compared the results with satellite-derived SPM concentrations. Bed shear stress was found to drive most of the inter-annual variation in SPM in the hydrographically mixed waters of the central and southern North Sea. We then used a long-term wave reanalysis to construct a time series of bed shear stress from 1900 to 2010. This shows that bed shear stress increased significantly across much of the shelf during this period, with increases of over 20 % in the southeastern North Sea. An increase in bed shear stress of this magnitude would have resulted in a large reduction in water clarity. Wave-driven processes are rarely included in projections of climate change impacts on marine ecosystems, but our analysis indicates that this should be reconsidered for shelf sea regions.</dc:description> | ||
|
||
<dc:language>en</dc:language> | ||
|
||
<rioxxterms:publisher> | ||
<rioxxterms:name>European Geosciences Union</rioxxterms:name> | ||
<rioxxterms:id>https://isni.org/isni/0000000110927289</rioxxterms:id> | ||
</rioxxterms:publisher> | ||
|
||
<dc:source>1812-0792</dc:source> | ||
|
||
<dc:title>Increasing turbidity in the North Sea during the 20th century due to changing wave climate</dc:title> | ||
|
||
<dcterms:dateAccepted>2019-10-02</dcterms:dateAccepted> | ||
|
||
<rioxxterms:creator | ||
first-named-author="true"> | ||
<rioxxterms:name>Wilson, Robert J.</rioxxterms:name> | ||
<rioxxterms:id>https://orcid.org/0000-0002-0592-366X</rioxxterms:id> | ||
</rioxxterms:creator> | ||
|
||
<rioxxterms:creator> | ||
<rioxxterms:name>Heath, Michael R.</rioxxterms:name> | ||
<rioxxterms:id>https://orcid.org/0000-0001-6602-3107</rioxxterms:id> | ||
<rioxxterms:id> https://viaf.org/viaf/15147423189944882613</rioxxterms:id> | ||
</rioxxterms:creator> | ||
|
||
<rioxxterms:publication_date>2019-12-09</rioxxterms:publication_date> | ||
|
||
<rioxxterms:record_public_release_date>2019-10-15</rioxxterms:record_public_release_date> | ||
|
||
<dc:type>https://purl.org/coar/resource_type/c_2df8fbb1</dc:type> | ||
|
||
<rioxxterms:grant | ||
funder_name="Australian Research Council" | ||
funder_id="https://ror.org/05mmh0f86"> | ||
DP190101507 | ||
</rioxxterms:grant> | ||
|
||
<rioxxterms:grant | ||
funder_name="John Templeton Foundation" | ||
funder_id="https://ror.org/035tnyy05"> | ||
61387 | ||
</rioxxterms:grant> | ||
|
||
<dc:relation | ||
rel="item" | ||
type="application/pdf" | ||
coar_type="https://purl.org/coar/resource_type/c_6501" | ||
coar_version="https://purl.org/coar/version/c_ab4af688f83e57aa" | ||
deposit_date="2019-12-11" | ||
resource_exposed_date="2019-12-11" | ||
access_rights_="https://purl.org/coar/access_right/c_abf2" | ||
license_ref="https://creativecommons.org/licenses/by-nc-nd/4.0/"> | ||
https://strathprints.strath.ac.uk/70117/7/Wilson_Heath_OS2019_Increasing_turbidity_in_the_North_Sea_during_the_20th_century.pdf | ||
</dc:relation> | ||
|
||
<!-- Other expressions (or 'instances') - publisher version --> | ||
<rioxxterms:ext_relation | ||
rel="cite-as" | ||
coar_type="https://purl.org/coar/resource_type/c_6501" | ||
coar_version="https://purl.org/coar/version/c_970fb48d4fbd8a85"> | ||
https://doi.org/10.1007/s11229-020-02724-x | ||
</rioxxterms:ext_relation> | ||
|
||
<!-- related dataset --> | ||
<rioxxterms:ext_relation | ||
rel="cite-as" | ||
coar_type="https://purl.org/coar/resource_type/c_ddb1"> | ||
https://doi.org/10.15129/5d28213e-8f9f-402a-b550-fc588518cb8b | ||
</rioxxterms:ext_relation > | ||
|
||
<!-- related software --> | ||
<rioxxterms:ext_relation | ||
rel="cite-as" | ||
coar_type="https://purl.org/coar/resource_type/QH80-2R4E"> | ||
https://doi.org/10.5281/zenodo.3478185 | ||
</rioxxterms:ext_relation> | ||
</rioxx> |
Oops, something went wrong.