Project

General

Profile

« Previous | Next » 

Revision 42187

oai resources and tests

View differences:

modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/information/oai/publisher/PublisherMiscTest.java
1
package eu.dnetlib.data.information.oai.publisher;
2

  
3
import static org.junit.Assert.assertEquals;
4
import static org.junit.Assert.assertFalse;
5

  
6
import java.text.Normalizer;
7

  
8
import org.apache.commons.lang3.StringEscapeUtils;
9
import org.junit.Test;
10

  
11
public class PublisherMiscTest {
12

  
13
	@Test
14
	public void test() {
15
		final String id = "NonavCreation.filmportal.de/DIF_NonAVCreation_EUROPA_TM & © Aardman Animations, LTD";
16
		final String newId = StringEscapeUtils.escapeXml11(id);
17
		assertEquals("NonavCreation.filmportal.de/DIF_NonAVCreation_EUROPA_TM & © Aardman Animations, LTD", newId);
18
		assertFalse(id.equals(newId));
19
	}
20

  
21
	@Test
22
	public void test2() {
23
		// Hochschulschriftenserver - Universität Frankfurt am Main
24
		String s = "Publikationenserver der Georg-August-Universität Göttingen";
25
		System.out.println("String to normalize: " + s);
26
		s = StringEscapeUtils.unescapeXml(s);
27
		System.out.println("unescaped: " + s);
28
		s = Normalizer.normalize(s, Normalizer.Form.NFD);
29
		System.out.println("normalized: " + s);
30
		// remove tilde, dots... over letters
31
		s = s.replaceAll("[\\p{InCombiningDiacriticalMarks}&&[^-_]]", "");
32
		// change punctuation into an underscore
33
		s = s.replaceAll("[\\p{Punct}&&[^-_]]", "_");
34
		// remove all non-word charcheters
35
		s = s.replaceAll("[\\W&&[^-_]]", "");
36
		System.out.println("Converted setSpec to: " + s);
37
	}
38

  
39
}
modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/oai/store/mongo/RecordInfoGeneratorTest.java
1
package eu.dnetlib.data.oai.store.mongo;
2

  
3
import java.io.IOException;
4
import java.util.zip.ZipEntry;
5
import java.util.zip.ZipOutputStream;
6

  
7
import org.apache.commons.io.IOUtils;
8
import org.apache.commons.io.output.ByteArrayOutputStream;
9
import org.bson.types.Binary;
10
import org.junit.Before;
11
import org.junit.Test;
12
import org.springframework.core.io.ClassPathResource;
13

  
14
import eu.dnetlib.oai.conf.OAIConfigurationReader;
15
import eu.dnetlib.oai.mongo.RecordInfoGenerator;
16

  
17
/**
18
 * RecordInfoGenerator Tester.
19
 *
20
 * @author <Authors name>
21
 * @version 1.0
22
 * @since
23
 * 
24
 *        <pre>
25
 * Apr 6, 2016
26
 *        </pre>
27
 */
28
public class RecordInfoGeneratorTest {
29

  
30
	private final RecordInfoGenerator gen = new RecordInfoGenerator();
31
	private final String filePath = "/eu/dnetlib/data/oai/store/mongo/testRecord.xml";
32
	private Binary binaryXML;
33

  
34
	@Before
35
	public void before() throws Exception {
36
		final String testRecord = IOUtils.toString(new ClassPathResource(this.filePath).getInputStream());
37
		this.binaryXML = createCompressRecord(testRecord);
38
	}
39

  
40
	/**
41
	 * Method: decompressRecord(final byte[] input)
42
	 */
43
	@Test
44
	public void testDecompressRecord() throws Exception {
45
		final long timeStart = System.currentTimeMillis();
46
		final String record = this.gen.decompressRecord(this.binaryXML.getData());
47
		final long timeEnd = System.currentTimeMillis();
48
		System.out.println("Decompressed record in ms " + (timeEnd - timeStart));
49
		System.out.println(record);
50
	}
51

  
52
	private Binary createCompressRecord(final String record) throws IOException {
53
		final ByteArrayOutputStream os = new ByteArrayOutputStream();
54
		final ZipOutputStream zos = new ZipOutputStream(os);
55
		final ZipEntry entry = new ZipEntry(OAIConfigurationReader.BODY_FIELD);
56
		zos.putNextEntry(entry);
57
		zos.write(record.getBytes());
58
		zos.closeEntry();
59
		// zos.flush();
60
		zos.close();
61
		return new Binary(os.toByteArray());
62
	}
63

  
64
}
modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/oai/store/mongo/MongoPublisherStoreTest.java
1
/**
2
 *
3
 */
4
package eu.dnetlib.data.oai.store.mongo;
5

  
6
import java.io.IOException;
7

  
8
import org.bson.types.Binary;
9
import org.junit.Assert;
10
import org.junit.Test;
11

  
12
import eu.dnetlib.oai.mongo.MongoPublisherStore;
13
import eu.dnetlib.oai.mongo.RecordInfoGenerator;
14

  
15
/**
16
 * @author sandro
17
 *
18
 */
19
public class MongoPublisherStoreTest {
20

  
21
	/**
22
	 * Test method for {@link eu.dnetlib.data.oai.store.mongo.MongoPublisherStore#createCompressRecord(java.lang.String)}.
23
	 * 
24
	 * @throws IOException
25
	 */
26
	@Test
27
	public void testCreateCompressRecord() throws IOException {
28

  
29
		final MongoPublisherStore store = new MongoPublisherStore();
30
		final RecordInfoGenerator gen = new RecordInfoGenerator();
31
		final StringBuffer buffer = new StringBuffer();
32
		final String input = " CIAO MONDO DA SANDRO!";
33

  
34
		for (int i = 0; i < 10000; i++) {
35
			buffer.append(input);
36
		}
37
		final Binary data = store.createCompressRecord(buffer.toString());
38
		Assert.assertEquals(buffer.toString(), gen.decompressRecord(data.getData()));
39

  
40
	}
41

  
42
}
modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/oai/store/mongo/MetadataExtractorTest.java
1
package eu.dnetlib.data.oai.store.mongo;
2

  
3
import java.io.StringReader;
4

  
5
import org.apache.commons.io.IOUtils;
6
import org.dom4j.Document;
7
import org.dom4j.io.SAXReader;
8
import org.junit.After;
9
import org.junit.Before;
10
import org.junit.Test;
11
import org.springframework.core.io.ClassPathResource;
12

  
13
import eu.dnetlib.oai.mongo.MetadataExtractor;
14

  
15
/**
16
 * MetadataExtractor Tester.
17
 *
18
 * @author alessia
19
 * @version 1.0
20
 * @since
21
 *
22
 *        <pre>
23
 * Apr 6, 2016
24
 *        </pre>
25
 */
26
public class MetadataExtractorTest {
27

  
28
	final MetadataExtractor extractor = new MetadataExtractor();
29
	final SAXReader reader = new SAXReader();
30
	private Document doc;
31
	private final String filePath = "/eu/dnetlib/data/oai/store/mongo/testRecord.xml";
32

  
33
	@Before
34
	public void before() throws Exception {
35
		final String testRecord = IOUtils.toString(new ClassPathResource(this.filePath).getInputStream());
36
		this.doc = this.reader.read(new StringReader(testRecord));
37
	}
38

  
39
	@After
40
	public void after() throws Exception {}
41

  
42
	/**
43
	 * Method: evaluate(final Document xmlDoc)
44
	 */
45
	@Test
46
	public void testEvaluate() throws Exception {
47
		final long timeStart = System.currentTimeMillis();
48
		final String metadata = this.extractor.apply(this.doc);
49
		final long timeEnd = System.currentTimeMillis();
50
		System.out.println("Got metadata in ms " + (timeEnd - timeStart));
51
		System.out.println(metadata);
52
	}
53

  
54
}
modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/oai/store/mongo/ProvenanceExtractorTest.java
1
package eu.dnetlib.data.oai.store.mongo;
2

  
3
import java.io.StringReader;
4

  
5
import org.apache.commons.io.IOUtils;
6
import org.dom4j.Document;
7
import org.dom4j.io.SAXReader;
8
import org.junit.After;
9
import org.junit.Before;
10
import org.junit.Test;
11
import org.springframework.core.io.ClassPathResource;
12

  
13
import eu.dnetlib.oai.mongo.ProvenanceExtractor;
14

  
15
/**
16
 * ProvenanceExtractor Tester.
17
 *
18
 * @author <Authors name>
19
 * @version 1.0
20
 * @since
21
 * 
22
 *        <pre>
23
 * Apr 6, 2016
24
 *        </pre>
25
 */
26
public class ProvenanceExtractorTest {
27

  
28
	final ProvenanceExtractor extractor = new ProvenanceExtractor();
29
	final SAXReader reader = new SAXReader();
30
	private Document doc;
31
	private final String filePath = "/eu/dnetlib/data/oai/store/mongo/testRecord.xml";
32

  
33
	@Before
34
	public void before() throws Exception {
35
		final String testRecord = IOUtils.toString(new ClassPathResource(this.filePath).getInputStream());
36
		this.doc = this.reader.read(new StringReader(testRecord));
37
	}
38

  
39
	@After
40
	public void after() throws Exception {}
41

  
42
	/**
43
	 * Method: evaluate(final Document xmlDoc)
44
	 */
45
	@Test
46
	public void testEvaluate() throws Exception {
47
		final long timeStart = System.currentTimeMillis();
48
		final String prov = this.extractor.apply(this.doc);
49
		final long timeEnd = System.currentTimeMillis();
50
		System.out.println("Got provenance in ms " + (timeEnd - timeStart));
51
		System.out.println(prov);
52
	}
53

  
54
}
modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/oai/store/parser/MongoQueryParserTest.java
1
package eu.dnetlib.data.oai.store.parser;
2

  
3
import static org.junit.Assert.assertEquals;
4

  
5
import java.time.LocalDateTime;
6
import java.time.format.DateTimeFormatter;
7

  
8
import org.apache.commons.logging.Log;
9
import org.apache.commons.logging.LogFactory;
10
import org.bson.conversions.Bson;
11
import org.bson.types.ObjectId;
12
import org.junit.Test;
13

  
14
import com.google.common.collect.Lists;
15
import com.mongodb.BasicDBObject;
16
import com.mongodb.DBObject;
17
import com.mongodb.util.JSON;
18

  
19
import eu.dnetlib.oai.parser.MongoQueryParser;
20

  
21
public class MongoQueryParserTest {
22

  
23
	private static final Log log = LogFactory.getLog(MongoQueryParserTest.class); // NOPMD by marko on 11/24/08 5:02 PM
24
	private final MongoQueryParser mongoParser = new MongoQueryParser();
25

  
26
	@Test
27
	public void testParseEq() {
28
		final Bson expected = new BasicDBObject("set", "CEDIASManuscripts");
29
		final Bson o = this.mongoParser.parse("set = \"CEDIASManuscripts\"");
30
		assertEquals(expected, o);
31

  
32
	}
33

  
34
	@Test
35
	public void testParseNeq() {
36
		final Bson expected = new BasicDBObject("set", new BasicDBObject("$ne", "CEDIASManuscripts"));
37
		final Bson o = this.mongoParser.parse("set <> \"CEDIASManuscripts\"");
38
		assertEquals(expected, o);
39
	}
40

  
41
	@Test
42
	public void testParseAnd() {
43
		final BasicDBObject expected = new BasicDBObject("$and", Lists.newArrayList(new BasicDBObject("set", new BasicDBObject("$ne", "CEDIASManuscripts")),
44
				new BasicDBObject("pippo", new BasicDBObject("$gt", "x"))));
45
		final Bson o = this.mongoParser.parse("set <> \"CEDIASManuscripts\" AND pippo > x");
46
		log.info(o);
47
		assertEquals(expected, o);
48
	}
49

  
50
	@Test
51
	public void testParseOr() {
52
		final BasicDBObject expected = new BasicDBObject("$or", Lists.newArrayList(new BasicDBObject("set", new BasicDBObject("$ne", "CEDIASManuscripts")),
53
				new BasicDBObject("pippo", new BasicDBObject("$gt", "x"))));
54
		final Bson o = this.mongoParser.parse("set <> \"CEDIASManuscripts\" OR pippo > x");
55
		log.info(o);
56
		assertEquals(expected, o);
57
	}
58

  
59
	@Test
60
	public void testParseNot() {
61
		final BasicDBObject expected = new BasicDBObject("$and", Lists.newArrayList(new BasicDBObject("set", "CEDIASManuscripts"), new BasicDBObject("$not",
62
				new BasicDBObject("pippo", new BasicDBObject("$gt", "x")))));
63
		final Bson o = this.mongoParser.parse("set = \"CEDIASManuscripts\" NOT pippo > x");
64
		// log.info(o)
65
		assertEquals(expected, o);
66
	}
67

  
68
	@Test
69
	public void testParseStar() {
70
		final BasicDBObject expected = new BasicDBObject();
71
		final Bson o = this.mongoParser.parse("*");
72
		final Bson o2 = this.mongoParser.parse("*=*");
73
		assertEquals(expected, o);
74
		assertEquals(expected, o2);
75
	}
76

  
77
	@Test
78
	public void testParseStarAnd() {
79
		final BasicDBObject expected =
80
				new BasicDBObject("$and", Lists.newArrayList(new BasicDBObject(), new BasicDBObject("pippo", new BasicDBObject("$gt", "x"))));
81
		final Bson o = this.mongoParser.parse("* AND pippo > x");
82
		final Bson o2 = this.mongoParser.parse("*=* AND pippo > x");
83
		assertEquals(expected, o);
84
		assertEquals(expected, o2);
85
	}
86

  
87
	@Test
88
	public void testParseIdQuery() {
89
		final BasicDBObject expected = new BasicDBObject("_id", new BasicDBObject("$gt", new ObjectId("5225e093aabf055637bf2c65")));
90
		final Bson o = this.mongoParser.parse("_id > 5225e093aabf055637bf2c65");
91
		assertEquals(expected, o);
92
	}
93

  
94
	@Test
95
	public void testParseUntilDatestamp() {
96
		final LocalDateTime dateTime = this.parseDate("2014-04-03T00:00:00.000Z");
97
		// { "$and" : [ { "oaftype" : { "$ne" : "person"}} , { "datestamp" : { "$lt" : { "$date" : "2014-04-03T00:00:00.000Z"}}}]}
98
		final BasicDBObject expected =
99
				new BasicDBObject("$and", Lists.newArrayList(new BasicDBObject("oaftype", new BasicDBObject("$ne", "person")), new BasicDBObject(
100
						"datestamp", new BasicDBObject("$lt", dateTime))));
101
		// System.out.println(expected);
102
		final Bson o = this.mongoParser.parse("(oaftype <> \"person\") AND datestamp <= 2014-04-02");
103
		assertEquals(expected, o);
104
		// System.out.println(o);
105
	}
106

  
107
	@Test
108
	public void testJsonParsing() {
109
		final String jsonQuery = "{licenses:{$elemMatch:{\"license\" : \"OPEN\", \"hostedby\" : {$ne:\"Europe PubMed Central\"}}}}";
110
		final DBObject query = (DBObject) JSON.parse(jsonQuery);
111
		System.out.println(query);
112
	}
113

  
114
	private LocalDateTime parseDate(final String date) {
115
		final DateTimeFormatter dateNoTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
116
		final DateTimeFormatter iso8601NoMsTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
117
		final DateTimeFormatter iso8601Formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'");;
118
		try {
119
			System.err.println("Using default " + iso8601Formatter.getClass());
120
			return LocalDateTime.parse(date, iso8601Formatter);
121
		} catch (final Exception e) {
122
			e.printStackTrace();
123
			try {
124
				System.err.println("Switching to ISO with no millisecond date formatter: yyyy-MM-dd'T'HH:mm:ssZ");
125
				return LocalDateTime.parse(date, iso8601NoMsTimeFormatter);
126
			} catch (final Exception ex) {
127
				System.err.println("Switching to simple date formatter: yyyy-MM-dd");
128
				return LocalDateTime.parse(date, dateNoTimeFormatter);
129
			}
130
		}
131
	}
132

  
133
}
modules/dnet-data-provision-services/trunk/src/test/java/eu/dnetlib/data/oai/store/sets/MongoSetCollectionTest.java
1
package eu.dnetlib.data.oai.store.sets;
2

  
3
import static org.junit.Assert.assertEquals;
4

  
5
import org.junit.Before;
6
import org.junit.Test;
7

  
8
import eu.dnetlib.oai.sets.MongoSetCollection;
9

  
10
public class MongoSetCollectionTest {
11

  
12
	private MongoSetCollection mongoSetCollection;
13
	private final String strangeSet = "Наукові журнали Національного Авіаційного Університету";
14

  
15
	@Before
16
	public void setup() {
17
		this.mongoSetCollection = new MongoSetCollection();
18
	}
19

  
20
	@Test
21
	public void test() {
22
		final String normalised = this.mongoSetCollection.normalizeSetSpec(this.strangeSet);
23
		assertEquals(MongoSetCollection.DEFAULT_SET, normalised);
24
	}
25

  
26
}
modules/dnet-data-provision-services/trunk/src/test/resources/eu/dnetlib/test/profiles/OAIPublisherConfigurationDSResources/OAIPublisherConfigurationDSResourceType/OAIPublisherConfiguration-1.xml
1
<RESOURCE_PROFILE>
2
	<HEADER>
3
		<RESOURCE_IDENTIFIER value="OAIPublisherConfiguration" />
4
		<RESOURCE_TYPE value="OAIPublisherConfigurationDSResourceType" />
5
		<RESOURCE_KIND value="OAIPublisherConfigurationDSResources" />
6
		<RESOURCE_URI value="" />
7
		<DATE_OF_CREATION value="2001-12-31T12:00:00" />
8
	</HEADER>
9
	<BODY>
10
		    <CONFIGURATION>
11
            <OAISETS>
12
                <OAISET enabled="true">
13
                    <spec>OpenAccess</spec>
14
                    <name>Set of Open Access articles</name>
15
                    <description>Set of records having 'OPEN' license</description>
16
                    <query>(license = "OPEN")</query>
17
                </OAISET>
18
                <OAISET enabled="true">
19
                    <spec>ArticlesInNature</spec>
20
                    <name>Articles published by Nature</name>
21
                    <description>Set of articles published by Nature Publishing Group</description>
22
                    <query>(publisher = "Nature Publishing Group")</query>
23
                </OAISET>
24
                <OAISET enabled="true">
25
                    <spec>publications</spec>
26
                    <name>Publications</name>
27
                    <description>Set of all Publications</description>
28
                    <query>resulttypeid="publication"</query>
29
                </OAISET>
30
            </OAISETS>
31
            <METADATAFORMATS>
32
                <METADATAFORMAT exportable="true" metadataPrefix="oaf">
33
                    <NAMESPACE>http://namespace.openaire.eu/oaf</NAMESPACE>
34
                    <SCHEMA>http://www.openaire.eu/schema/0.1/oaf-0.1.xsd</SCHEMA>
35
                    <SOURCE_METADATA_FORMAT interpretation="openaire" layout="index" name="oaf"/>
36
                    <TRANSFORMATION_RULE/>
37
                    <BASE_QUERY>*</BASE_QUERY>
38
                </METADATAFORMAT>
39
                <METADATAFORMAT metadataPrefix="oai_dc" exportable="false">
40
                    <NAMESPACE>http://www.openarchives.org/OAI/2.0/oai_dc/</NAMESPACE>
41
                    <SCHEMA>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</SCHEMA>
42
                    <SOURCE_METADATA_FORMAT interpretation="openaire" layout="index" name="oaf"/>
43
                    <TRANSFORMATION_RULE>oaf2dc_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU=</TRANSFORMATION_RULE>
44
                    <BASE_QUERY>oaftype="result"</BASE_QUERY>
45
                </METADATAFORMAT>
46
            </METADATAFORMATS>
47
            <INDICES>
48
                <INDEX name="objIdentifier" repeatable="false">
49
                    <SOURCE name="oaf" layout="index" interpretation="openaire" path="//*[local-name() ='objIdentifier']"/>
50
                </INDEX>
51
                <INDEX name="set" repeatable="true">
52
                    <SOURCE name="oaf" layout="index" interpretation="openaire" path="//collectedfrom/@name"/>
53
                </INDEX>
54
                <INDEX name="publisher" repeatable="true">
55
                    <SOURCE name="oaf" layout="index" interpretation="openaire" path="//publisher"/>
56
                </INDEX>
57
                <INDEX name="license" repeatable="false">
58
                    <SOURCE name="oaf" layout="index" interpretation="openaire" path="//bestlicense/@classid"/>
59
                </INDEX>
60
                <INDEX name="oaftype" repeatable="false">
61
                    <SOURCE name="oaf" layout="index" interpretation="openaire" path="local-name(//*[local-name()='entity']/*)"/>
62
                </INDEX>
63
                <INDEX name="resulttypeid" repeatable="false">
64
                    <SOURCE name="oaf" layout="index" interpretation="openaire" path="//*[local-name()='entity']/*[local-name()='result']/resulttype/@classid"/>
65
                </INDEX>
66
            </INDICES>
67
        </CONFIGURATION>
68
		<STATUS>
69
			<LAST_UPDATE value="2001-12-31T12:00:00" />
70
		</STATUS>
71
		<SECURITY_PARAMETERS>SECURITY_PARAMETERS</SECURITY_PARAMETERS>
72
	</BODY>
73
</RESOURCE_PROFILE>
modules/dnet-data-provision-services/trunk/src/test/resources/eu/dnetlib/data/oai/store/mongo/testRecord.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<record xmlns:dc="http://purl.org/dc/elements/1.1/"
3
        xmlns:dr="http://www.driver-repository.eu/namespace/dr"
4
        xmlns:dri="http://www.driver-repository.eu/namespace/dri"
5
        xmlns:oaf="http://namespace.openaire.eu/oaf"
6
        xmlns:oai="http://www.openarchives.org/OAI/2.0/"
7
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8
	<header xmlns="http://namespace.openaire.eu/">
9
		<dri:objIdentifier>od_______263::06235d139088d4b2ca45ace37c458a01</dri:objIdentifier>
10
		<dri:recordIdentifier>oai:DiVA.org:su-91808</dri:recordIdentifier>
11
		<dri:dateOfCollection/>
12
		<dri:mdFormat/>
13
		<dri:mdFormatInterpretation/>
14
		<dri:repositoryId>866c86e1-0e6a-4e12-b5ed-b7e0eb956381_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId>
15
		<dr:objectIdentifier/>
16
		<dr:dateOfCollection>2016-04-05T06:52:25.98Z</dr:dateOfCollection>
17
		<dr:dateOfTransformation>2016-04-05T06:53:01.394Z</dr:dateOfTransformation>
18
		<oaf:datasourceprefix>od_______263</oaf:datasourceprefix>
19
	</header>
20
	<metadata xmlns="http://namespace.openaire.eu/">
21
		<oaf:entity>
22
			<dc:title>Evaluation and Tuning of Model Trajectoriesand Spreading Rates in the Baltic Sea Using Surface Drifter Observations</dc:title>
23
			<dc:creator>Kjellsson, Joakim</dc:creator>
24
			<dc:creator>Döös, Kristofer</dc:creator>
25
			<dc:creator>Soomere, Tarmo</dc:creator>
26
			<dc:date>2013</dc:date>
27
			<dc:description>Results from experiments with surface drifters in the Baltic Sea in 2010–2011 are presented and discussed. In a first experiment, 12 SVP-B (Surface Velocity Program, with Barometer) drifters with a drogue at 12–18 m depth were deployed in the Baltic Sea. In a second experiment, shallow drifters extending to a depth of 1.5 m were deployed in the Gulf of Finland. Results from the SVP-B drifter experiment are compared to results from a regional ocean model and a trajectory code. Differences between the observed SVP-B drifters and simulated drifters are found for absolute dispersion (i.e., squared displacement from initial position) and relative dispersion (i.e., squared distance between two initially paired drifters). The former is somewhat underestimated since the simulated currents are neither as fast nor as variable as those observed. The latter is underestimated both due to the above-mentioned reasons and due to the resolution of the ocean model. For the shallower drifters, spreading in the upper 1–2 m of the Gulf of Finland is investigated. The spreading rate is about 200 m/day for separations &lt;0.5 km, 500 m/day for separations below 1 km and in the range of 0.5–3 km/day for separations in the range of 1–4 km. The spreading rate does not follow Richardson’s law. The initial spreading, up to a distance of about d=100–150 m, is governed by the power law d∼t 0.27 whereas for larger separations the distance increases as d∼t2.5.</dc:description>
28
			<dc:description>BalticWay</dc:description>
29
			<dc:format>application/pdf</dc:format>
30
			<dc:identifier>http://urn.kb.se/resolve?urn=urn:nbn:se:su:diva-91808</dc:identifier>
31
			<dc:language>eng</dc:language>
32
			<dc:publisher>Stockholms universitet, Meteorologiska institutionen (MISU)</dc:publisher>
33
			<dc:publisher>Stockholms universitet, Meteorologiska institutionen (MISU)</dc:publisher>
34
			<dc:publisher>Institute of Cybernetics, Tallinn University of Technology</dc:publisher>
35
			<dc:relation>Preventive Methods for Coastal Protection : Towards the Use of Ocean Dynamics for Pollution Control, p. 251-281</dc:relation>
36
			<dc:relation>info:eu-repo/grantAgreement/EC/FP7/217246</dc:relation>
37
			<dc:subject>surface drifters; rco; ocean model; trajectory;</dc:subject>
38
			<dc:type>Chapter in book</dc:type>
39
			<dc:type>info:eu-repo/semantics/bookPart</dc:type>
40
			<dc:type>text</dc:type>
41
			<dr:CobjCategory>0013</dr:CobjCategory>
42
			<dr:CobjIdentifier>urn:isbn:978-3-319-00440-2</dr:CobjIdentifier>
43
			<dr:CobjIdentifier>urn:isbn:978-3-319-00439-6</dr:CobjIdentifier>
44
			<dr:CobjIdentifier>doi:10.1007/978-3-319-00440-2_8</dr:CobjIdentifier>
45
			<oaf:dateAccepted>2013-01-01</oaf:dateAccepted>
46
			<oaf:projectid>corda_______::217246</oaf:projectid>
47
			<oaf:collectedDatasourceid>opendoar____::263</oaf:collectedDatasourceid>
48
			<oaf:accessrights>OPEN</oaf:accessrights>
49
			<oaf:hostedBy id="opendoar____::263" name="Publikationer från Stockholms universitet"/>
50
			<oaf:collectedFrom id="opendoar____::263" name="Publikationer från Stockholms universitet"/>
51
			<oaf:identifier identifierType="doi">10.1007/978-3-319-00440-2_8</oaf:identifier>
52
		</oaf:entity>
53
	</metadata>
54
	<about xmlns="http://namespace.openaire.eu/">
55
		<provenance xmlns="http://www.openarchives.org/OAI/2.0/provenance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/provenance http://www.openarchives.org/OAI/2.0/provenance.xsd">
56
			<originDescription altered="true" harvestDate="2016-04-05T06:52:25.98Z">
57
				<baseURL>http://su.diva-portal.org/dice/oai</baseURL>
58
				<identifier>oai:DiVA.org:su-91808</identifier>
59
				<datestamp>2013-07-05T10:47:00Z</datestamp>
60
				<metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
61
			</originDescription>
62
		</provenance>
63
		<oaf:datainfo>
64
			<oaf:inferred>false</oaf:inferred>
65
			<oaf:deletedbyinference>false</oaf:deletedbyinference>
66
			<oaf:trust>0.9</oaf:trust>
67
			<oaf:inferenceprovenance/>
68
			<oaf:provenanceaction classid="sysimport:crosswalk:repository"
69
			                      classname="sysimport:crosswalk:repository"
70
			                      schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions"/>
71
		</oaf:datainfo>
72
	</about>
73
</record>
modules/dnet-data-provision-services/trunk/src/main/java/eu/dnetlib/oai/parser/MongoQueryParser.java
213 213

  
214 214
		final DateTimeFormatter dateNoTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
215 215
		final DateTimeFormatter iso8601NoMsTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
216
		final DateTimeFormatter iso8601Formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ssZ");
216
		final DateTimeFormatter iso8601Formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ");
217 217
		OAIDate res = null;
218 218
		try {
219 219
			log.debug("Using default " + iso8601Formatter.getClass());
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_Error_noverb.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
3
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
         xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6
  <responseDate>$date$</responseDate>
7
  <request>$url$</request>
8
  <error code="$errcode$">$errmsg$</error>
9
</OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/clearcaches.st
1
CACHES CLEARED
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_ListMetadataFormats.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
3
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
         xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6
 
7
 	<responseDate>$date$</responseDate>
8
	<request verb="ListMetadataFormats">$url$</request>
9
 
10
 	<ListMetadataFormats>
11
	$formats:{
12
		<metadataFormat>
13
			<metadataPrefix>$it.prefix$</metadataPrefix>
14
			<schema>$it.schema$</schema>
15
			<metadataNamespace>$it.namespace$</metadataNamespace>
16
		</metadataFormat>
17
	}$
18
	</ListMetadataFormats>
19

  
20
</OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_Error.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
3
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
         xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6
  <responseDate>$date$</responseDate>
7
  <request verb="$verb$">$url$</request>
8
  <error code="$errcode$">$errmsg$</error>
9
</OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_ListSets.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6
<responseDate>$date$</responseDate>
7
<request verb="ListSets">$url$</request>
8
<ListSets>
9
$sets:{
10
<set>
11
	<setSpec>$it.setSpec$</setSpec>
12
	<setName>$it.setName$</setName>
13
	$if(it.setDescription)$
14
	<setDescription>
15
		<oaidc:dc xmlns:oaidc="http://www.openarchives.org/OAI/2.0/oai_dc/" 
16
  			xmlns="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17
        	xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
18
        	<description>$it.setDescription$</description>
19
    	</oaidc:dc>
20
	</setDescription>
21
	$endif$
22
</set>
23
}$
24

  
25
</ListSets>
26
</OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_Identify.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
5
<responseDate>$date$</responseDate>
6
<request verb="Identify">$url$</request>
7
<Identify>
8
<repositoryName>$repoName$</repositoryName>
9
<baseURL>$url$</baseURL>
10
<protocolVersion>2.0</protocolVersion>
11
<adminEmail>$email$</adminEmail>
12
<earliestDatestamp>$earliestDatestamp$</earliestDatestamp>
13
<deletedRecord>$deletedRecord$</deletedRecord>
14
<granularity>$granularity$</granularity>
15
</Identify>
16
</OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_ListRecords.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<oai:OAI-PMH xmlns:oai="http://www.openarchives.org/OAI/2.0/"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6

  
7
	<oai:responseDate>$date$</oai:responseDate>
8
	<oai:request verb="ListRecords" $info.from$ $info.until$ $info.metadataprefix$ $info.set$>$url$</oai:request>
9

  
10
	<oai:ListRecords>
11
	$info.documents:{
12
	<oai:record>
13
        $if(it.deleted)$
14
		<oai:header status="deleted">
15
		$else$
16
		<oai:header>
17
		$endif$
18
			<oai:identifier>$it.identifier$</oai:identifier>
19
					<oai:datestamp>$it.normalizedDatestamp$</oai:datestamp>
20
            $it.setspecs:{set|
21
			<oai:setSpec>$set$</oai:setSpec>
22
			}$
23
            </oai:header>
24
            $if(!it.deleted)$
25
            <oai:metadata>
26
			 $it.metadata$ 
27
			</oai:metadata>
28
			$endif$
29
			
30
			$if(it.provenance)$
31
        	<oai:about>$it.provenance$</oai:about>
32
        	$endif$
33
		</oai:record>
34
	}$
35
	
36
	$if(info.resumptiontoken)$
37
	<oai:resumptionToken cursor="$info.cursor$" 
38
	$if(info.withSize)$
39
		completeListSize="$info.size$" 
40
	$endif$ 
41
	>$info.resumptiontoken$</oai:resumptionToken>
42
$endif$
43
</oai:ListRecords>
44
</oai:OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_GetRecord.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<oai:OAI-PMH xmlns:oai="http://www.openarchives.org/OAI/2.0/"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
				http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6

  
7
<oai:responseDate>$date$</oai:responseDate>
8
<oai:request verb="GetRecord" identifier="$record.identifier$"
9
	metadataPrefix="$record.prefix$">$url$</oai:request>
10
<oai:GetRecord>
11
<oai:record>
12
$if(record.deleted)$
13
	<oai:header status="deleted">
14
$else$
15
	<oai:header>
16
$endif$
17
	<oai:identifier>$record.identifier$</oai:identifier>
18
	<oai:datestamp>$record.normalizedDatestamp$</oai:datestamp>
19
	$record.setspecs:{set|
20
	<oai:setSpec>$set$</oai:setSpec>
21
	}$ 
22
</oai:header>
23
$if(!record.deleted)$
24
<oai:metadata>
25
	$record.metadata$ 
26
</oai:metadata>
27
$endif$
28

  
29
$if(record.provenance)$
30
<oai:about>
31
$record.provenance$
32
</oai:about>
33
$endif$
34

  
35
</oai:record>
36
</oai:GetRecord>
37
</oai:OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_ListMetadataFormats_withid.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" 
3
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
         xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
5
         http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
6
 
7
 	<responseDate>$date$</responseDate>
8
	<request verb="ListMetadataFormats" identifier="$identifier$">$url$</request>
9
 
10
 	<ListMetadataFormats>
11
	$formats:{
12
		<metadataFormat>
13
			<metadataPrefix>$it.prefix$</metadataPrefix>
14
			<schema>$it.schema$</schema>
15
			<metadataNamespace>$it.namespace$</metadataNamespace>
16
		</metadataFormat>
17
	}$
18
	</ListMetadataFormats>
19

  
20
</OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/enabling/views/oai/OAI_ListIdentifiers.st
1
<?xml version="1.0" encoding="UTF-8"?>
2
<oai:OAI-PMH xmlns:oai="http://www.openarchives.org/OAI/2.0/"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
5

  
6
<oai:responseDate>$date$</oai:responseDate>
7
<oai:request verb="ListIdentifiers" $info.from$ $info.until$ $info.metadataprefix$ $info.set$>$url$</oai:request>
8

  
9
<oai:ListIdentifiers>
10
$info.identifiers:{
11
	$if(it.deleted)$ 
12
  	<oai:header status="deleted">
13
  	$else$
14
	<oai:header>
15
	$endif$
16
		<oai:identifier>$it.identifier$</oai:identifier>
17
		<oai:datestamp>$it.normalizedDatestamp$</oai:datestamp>
18
		$it.setspecs:{set|
19
		<oai:setSpec>$set$</oai:setSpec>
20
	}$ 
21
	</oai:header>
22
}$ 
23
$if(info.resumptiontoken)$
24
	<oai:resumptionToken cursor="$info.cursor$" 
25
	$if(info.withSize)$
26
		completeListSize="$info.size$" 
27
	$endif$ 
28
	>$info.resumptiontoken$</oai:resumptionToken>
29
$endif$
30

  
31
</oai:ListIdentifiers>
32
</oai:OAI-PMH>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/publisher/cache/ehcache.xml
1
<ehcache>
2

  
3
	<!-- Sets the path to the directory where cache .data files are created. 
4
		If the path is a Java System Property it is replaced by its value in the 
5
		running VM. The following properties are translated: user.home - User's home 
6
		directory user.dir - User's current working directory java.io.tmpdir - Default 
7
		temp file path -->
8
	<diskStore path="java.io.tmpdir"/>
9

  
10

  
11
	<!--Default Cache configuration. These will applied to caches programmatically 
12
		created through the CacheManager. The following attributes are required for 
13
		defaultCache: maxInMemory - Sets the maximum number of objects that will 
14
		be created in memory eternal - Sets whether elements are eternal. If eternal, 
15
		timeouts are ignored and the element is never expired. timeToIdleSeconds 
16
		- Sets the time to idle for an element before it expires. i.e. The maximum 
17
		amount of time between accesses before an element expires Is only used if 
18
		the element is not eternal. Optional attribute. A value of 0 means that an 
19
		Element can idle for infinity timeToLiveSeconds - Sets the time to live for 
20
		an element before it expires. i.e. The maximum time between creation time 
21
		and when an element expires. Is only used if the element is not eternal. 
22
		overflowToDisk - Sets whether elements can overflow to disk when the in-memory 
23
		cache has reached the maxInMemory limit. -->
24

  
25
	<!-- <defaultCache maxElementsInMemory="1000" overflowToDisk="true" -->
26
	<!-- eternal="true" diskPersistent="false" timeToIdleSeconds="0" -->
27
	<!-- timeToLiveSeconds="0" memoryStoreEvictionPolicy="LRU" -->
28
	<!-- diskExpiryThreadIntervalSeconds="120" diskSpoolBufferSizeMB="5" /> -->
29

  
30

  
31
	<cache name="unaryFunctions" maxElementsInMemory="5" eternal="false"
32
	       timeToIdleSeconds="500" timeToLiveSeconds="500" overflowToDisk="false"/>
33

  
34
	<cache name="oaiDB" maxElementsInMemory="1" eternal="false"
35
	       timeToIdleSeconds="1800" timeToLiveSeconds="1800" overflowToDisk="false"/>
36

  
37
	<!-- 	<cache name="publisherfields" maxElementsInMemory="30" eternal="false" -->
38
	<!-- 		timeToIdleSeconds="1800" timeToLiveSeconds="1800" overflowToDisk="false" /> -->
39

  
40
	<!-- 	<cache name="publisheridscheme" maxElementsInMemory="1" eternal="false" -->
41
	<!-- 		timeToIdleSeconds="1800" timeToLiveSeconds="1800" overflowToDisk="false" /> -->
42

  
43
	<!-- 	<cache name="publisheridnamespace" maxElementsInMemory="1" -->
44
	<!-- 		eternal="false" timeToIdleSeconds="1800" timeToLiveSeconds="1800" -->
45
	<!-- 		overflowToDisk="false" /> -->
46

  
47

  
48
</ehcache>
49

  
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/applicationContext-dnet-oai-publisher.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
4
	xmlns:util="http://www.springframework.org/schema/util"
5
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
6
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
7

  
8
	<bean id="oaiCacheManager"
9
		class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
10
		p:cacheManagerName="oaiCacheManger"
11
		p:configLocation="classpath:/eu/dnetlib/data/information/oai/cache/ehcache.xml" />
12

  
13
	<bean id="mdformatsEhCache" class="net.sf.ehcache.Cache"
14
		factory-bean="oaiCacheManager" factory-method="getCache">
15
		<constructor-arg value="metadataFormats" />
16
	</bean>
17
	
18
	<bean id="mdFormatsCache" class="eu.dnetlib.miscutils.cache.EhCache"
19
		p:cache-ref="mdformatsEhCache" />
20
		
21
	<!-- beans -->
22
	<bean id="oaiProperties" class="eu.dnetlib.data.information.oai.publisher.OAIProperties"
23
		p:repoEmail="${services.oai.publisher.repo.email}" p:repoName="${services.oai.publisher.repo.name}"
24
		p:earliestDatestamp="${services.oai.publisher.repo.earliestdatestamp}"
25
		p:baseUrl="${services.oai.publisher.baseUrl}" p:deletedRecordSupport="${services.oai.publisher.deletedrecords}"
26
		p:dateGranularity="${services.oai.publisher.repo.granularity}" />
27

  
28
	<bean id="dnetOAICore"
29
		class="eu.dnetlib.data.information.oai.publisher.core.DNetOAICore"
30
		p:pageSize="${services.oai.publisher.dnet.pagesize}"/>
31

  
32
	<!-- Tracing -->
33

  
34
	<bean name="oaiControllerInterceptor"
35
		class="eu.dnetlib.data.information.oai.publisher.core.CoreInterceptor">
36
		<property name="enterMessage"
37
			value="ENTER: $[targetClassShortName].$[methodName]($[arguments])" />
38
		<property name="exitMessage"
39
			value="EXIT: $[targetClassShortName].$[methodName]() : $[invocationTime]ms" />
40
	</bean>
41

  
42
	<bean
43
		class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
44
		<property name="beanNames" value="dnetOAICore" />
45
		<property name="proxyTargetClass" value="true" />
46
		<property name="interceptorNames">
47
			<list>
48
				<value>oaiControllerInterceptor</value>
49
			</list>
50
		</property>
51
	</bean>
52

  
53
</beans>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/applicationContext-dnet-oai-utils.xml
5 5

  
6 6

  
7 7
	<bean id="oaiConfigurationExistReader"
8
	      class="eu.dnetlib.oai.conf.OAIConfigurationExistReader"/>
8
	      class="eu.dnetlib.oai.conf.OAIConfigurationExistReader" />
9 9

  
10 10
	<bean id="oaiConfigurationStringReader"
11
	      class="eu.dnetlib.oai.conf.OAIConfigurationStringReader"/>
11
	      class="eu.dnetlib.oai.conf.OAIConfigurationStringReader" />
12 12

  
13 13
	<bean id="configurationParser"
14
	      class="eu.dnetlib.oai.conf.OAIConfigurationParser"/>
14
	      class="eu.dnetlib.oai.conf.OAIConfigurationParser" />
15 15

  
16 16
	<bean id="publisherConfigurationWriter"
17
	      class="eu.dnetlib.oai.conf.OAIConfigurationWriter"/>
18

  
19
	<bean id="oaiUtilsCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
20
	      p:cacheManager-ref="oaiUtilsCache"/>
21

  
22
	<bean id="oaiUtilsCache"
23
	      class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
24
	      p:cacheManagerName="oaiUtilsCache"
25
	      p:configLocation="classpath:/eu/dnetlib/oai/publisher/cache/ehcache.xml"/>
26

  
17
	      class="eu.dnetlib.oai.conf.OAIConfigurationWriter" />
18
	
19
	      
27 20
</beans>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/xslt/xslt/addDMFBlock.xslt
1
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0">
2
   
3
    <xsl:template match="//*[local-name()='metadata']">
4
        <metadata>
5
            <dmf>
6
                <xsl:apply-templates/>
7
            </dmf>
8
        </metadata>
9
    </xsl:template>
10

  
11
    <xsl:template match="@*|node()">
12
        <xsl:copy>
13
            <xsl:apply-templates select="@*|node()"/>
14
        </xsl:copy>
15
    </xsl:template>
16
</xsl:stylesheet>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/applicationContext-dnet-oai-publisher.properties
1
services.oai.publisher.dnet.pagesize			=	100
2
services.oai.publisher.repo.name				=	D-NET Service for supporting Open Archive Initiative requests
3
services.oai.publisher.repo.email				=	bardi@isti.cnr.it
4
services.oai.publisher.repo.granularity			= 	YYYY-MM-DDThh:mm:ssZ
5
services.oai.publisher.repo.earliestdatestamp	=	2013-10-03T15:53:06Z
6
services.oai.publisher.baseUrl					=
7
#do we support deleted records? NO, TRANSIENT, PERSISTENT
8
services.oai.publisher.deletedrecords			=	TRANSIENT	
9

  
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/store/applicationContext-mongodb-publisher-store.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
       xmlns:p="http://www.springframework.org/schema/p" xmlns="http://www.springframework.org/schema/beans"
4
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
5

  
6
	<bean id="mongodbPublisherStoreDao" class="eu.dnetlib.data.oai.store.mongo.MongoPublisherStoreDAO"
7
		p:metadataCollection="metadata" />
8

  
9
	<bean id="publisherMongoClient" class="com.mongodb.MongoClient">
10
		<constructor-arg index="0" type="com.mongodb.ServerAddress">
11
			<bean class="com.mongodb.ServerAddress">
12
				<constructor-arg index="0"
13
					value="${services.publisher.oai.host}" />
14
				<constructor-arg index="1"
15
					value="${services.publisher.oai.port}" />
16
			</bean>
17
		</constructor-arg>
18
	</bean>
19

  
20
	<bean id="recordChangeDetector" class="eu.dnetlib.data.oai.store.DummyRecordChangeDetector" />
21

  
22
	<bean id="mongoQueryParser" class="eu.dnetlib.data.oai.store.parser.MongoQueryParser" />
23

  
24
	<bean id="metadataExtractor" class="eu.dnetlib.data.oai.store.mongo.MetadataExtractor" />
25

  
26
	<bean id="recordInfoGenerator" class="eu.dnetlib.data.oai.store.mongo.RecordInfoGenerator" />
27

  
28
	<bean id="mongoSetCollection" class="eu.dnetlib.data.oai.store.sets.MongoSetCollection" />
29

  
30
	<bean id="provenanceExtractor" class="eu.dnetlib.data.oai.store.mongo.ProvenanceExtractor" />
31

  
32
	<bean id="theOAICacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
33
        p:cache-manager-ref="oaiStoreCacheManager" />
34

  
35
	<bean id="oaiStoreCacheManager"
36
		class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
37
		p:cacheManagerName="oaiStoreCacheManger"
38
		p:configLocation="classpath:/eu/dnetlib/data/oai/store/mongo/cache/ehcache.xml" />
39

  
40
	<bean id="mongoOaistoreEhCache" class="net.sf.ehcache.Cache"
41
		factory-bean="oaiStoreCacheManager" factory-method="getCache">
42
		<constructor-arg value="oaistores" />
43
	</bean>
44

  
45
	<bean id="mongoOaistoreCache" class="eu.dnetlib.miscutils.cache.EhCache"
46
		p:cache-ref="mongoOaistoreEhCache" />
47

  
48
	<bean id="mongoOaistoreEhCacheByMdPrefix" class="net.sf.ehcache.Cache"
49
		factory-bean="oaiStoreCacheManager" factory-method="getCache">
50
		<constructor-arg value="oaistoresByPrefix" />
51
	</bean>
52

  
53
	<bean id="mongoOaistoreCacheByMdPrefix" class="eu.dnetlib.miscutils.cache.EhCache"
54
		p:cache-ref="mongoOaistoreEhCacheByMdPrefix" />
55

  
56
</beans>
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/store/applicationContext-mongodb-publisher-store.properties
1
services.publisher.oai.host=localhost
2
services.publisher.oai.port=27017
3
#services.publisher.oai.db=oaistore
4

  
modules/dnet-data-provision-services/trunk/src/main/resources/eu/dnetlib/oai/store/applicationContext-dnet-oai-store-service.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
4
	xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
5
	xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
6
	xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
7
	xmlns:util="http://www.springframework.org/schema/util"
8
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
9
    	http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
10
        http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
11
        http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
12
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
13
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
14
        http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">
15

  
16
	<!-- endpoints -->
17
	<jaxws:endpoint id="oaiStoreServiceEndpoint"
18
		implementor="#oaiStoreService" implementorClass="eu.dnetlib.data.oai.store.OAIStoreService"
19
		address="/oaistore" />
20

  
21
	<template:instance name="serviceRegistrationManager"
22
		t:serviceRegistrationManagerClass="eu.dnetlib.enabling.tools.registration.ValidatingServiceRegistrationManagerImpl"
23
		t:name="oaiStoreServiceRegistrationManager" t:service="oaiStoreService"
24
		t:endpoint="oaiStoreServiceEndpoint" t:jobScheduler="jobScheduler"
25
		t:serviceRegistrator="blackboardServiceRegistrator" />
26

  
27
	<bean id="oaiStoreService" class="eu.dnetlib.data.oai.store.OAIStoreServiceImpl"
28
		init-method="start" destroy-method="stop" p:notificationHandler-ref="oaiStoreNotificationHandler" />
29

  
30
	<bean id="oaiStoreNotificationHandler"
31
		class="eu.dnetlib.enabling.tools.blackboard.BlackboardServerExecutorNotificationHandler"
32
		p:blackboardExecutor-ref="oaiStoreBlackboardExecutor" />
33

  
34
	<bean id="oaiStoreBlackboardExecutor"
35
		class="eu.dnetlib.enabling.tools.blackboard.BlackboardServerActionExecutor"
36
		p:blackboardHandler-ref="blackboardHandler"
37
		p:actionType="eu.dnetlib.data.oai.store.actions.OAIStoreActions"
38
		p:incomplete="false">
39
		<property name="actionMap">
40
			<map>
41
				<entry key="SYNC">
42
					<bean class="eu.dnetlib.data.oai.store.actions.SyncAction" />
43
				</entry>
44
				<entry key="COUNT_SETS">
45
					<bean class="eu.dnetlib.data.oai.store.actions.CountSetsAction"/>
46
				</entry>
47
				<entry key="REFRESH_CONFIG">
48
					<bean class="eu.dnetlib.data.oai.store.actions.RefreshConfigAction" />
49
				</entry>
50
				<entry key="ENSURE_INDEXES">
51
					<bean class="eu.dnetlib.data.oai.store.actions.EnsureIndexesAction" />
52
				</entry>
53
				<entry key="CREATE_STORE">
54
					<bean class="eu.dnetlib.data.oai.store.actions.CreateStoreAction" />
55
				</entry>
56
				<entry key="CREATE_OAI_INDEX">
57
					<bean class="eu.dnetlib.data.oai.store.actions.CreateOAIIndexAction" />
58
				</entry>
59
				<entry key="DROP_STORE">
60
					<bean class="eu.dnetlib.data.oai.store.actions.DropStoreAction" />
61
				</entry>
62
			</map>
63
		</property>
64
	</bean>
65

  
66
	<bean id="synchronizer" class="eu.dnetlib.data.oai.store.sync.OAIStoreSynchronizer" />
67

  
68
	<bean id="oaiSetHelper" class="eu.dnetlib.data.oai.store.conf.OAISetHelper"/>
69

  
70
	<bean id="oaiSetsCounter" class="eu.dnetlib.data.oai.store.conf.OAISetsCounter" />
71

  
72
</beans>

Also available in: Unified diff