Skip to content

Commit 5aa0ee3

Browse files
committed
Switch OAI-PMH harvester library
Using https://github.com/hbz/oai-harvester2 via jitpack.io See #360
1 parent 07db26d commit 5aa0ee3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ subprojects {
8181
repositories {
8282
mavenLocal()
8383
mavenCentral()
84+
maven { url 'https://jitpack.io' }
8485
}
8586
}
8687

metafacture-biblio/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies {
2121
api project(':metafacture-framework')
2222
implementation project(':metafacture-commons')
2323
implementation project(':metafacture-flowcontrol')
24-
implementation 'org.dspace:oclc-harvester2:0.1.12'
24+
implementation 'com.github.hbz:oai-harvester2:master-SNAPSHOT'
2525
implementation ('xalan:xalan:2.7.0') {
2626
exclude group: 'xalan', module: 'serializer'
2727
exclude group: 'xercesImpl', module: 'xercesImpl'

metafacture-biblio/src/main/java/org/metafacture/biblio/OaiPmhOpener.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010
import java.io.Reader;
1111

1212
import javax.xml.parsers.ParserConfigurationException;
13-
import javax.xml.transform.TransformerException;
13+
import javax.xml.xpath.XPathException;
1414

1515
import org.metafacture.framework.MetafactureException;
1616
import org.metafacture.framework.ObjectReceiver;
1717
import org.metafacture.framework.annotations.Description;
1818
import org.metafacture.framework.annotations.In;
1919
import org.metafacture.framework.annotations.Out;
2020
import org.metafacture.framework.helpers.DefaultObjectPipe;
21+
import org.oclc.oai.harvester2.app.RawWrite;
2122
import org.xml.sax.SAXException;
2223

23-
import ORG.oclc.oai.harvester2.app.RawWrite;
24-
2524
/**
2625
* Opens an OAI-PMH stream and passes a reader to the receiver.
2726
*
@@ -111,10 +110,10 @@ public void process(final String baseUrl) {
111110
e.printStackTrace();
112111
} catch (SAXException e) {
113112
e.printStackTrace();
114-
} catch (TransformerException e) {
115-
e.printStackTrace();
116113
} catch (NoSuchFieldException e) {
117114
e.printStackTrace();
115+
} catch (XPathException e) {
116+
e.printStackTrace();
118117
}
119118
try {
120119
getReceiver().process(

0 commit comments

Comments
 (0)