Skip to content
Snippets Groups Projects
Commit fbf255a7 authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

Remove some unused deps in pom file

Reformatted OAIPMHImpl (unneccessarrily)
Tests improved!
parent 902cab82
No related branches found
No related tags found
No related merge requests found
...@@ -38,27 +38,17 @@ ...@@ -38,27 +38,17 @@
<artifactId>cxf-rt-frontend-jaxws</artifactId> <artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version> <version>${cxf.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.cxf</groupId> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId> <artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version> <version>${cxf.version}</version>
</dependency> </dependency>
<!--dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.0</version>
</dependency-->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>${junit.version}</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!--dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency-->
<dependency> <dependency>
<groupId>org.elasticsearch</groupId> <groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId> <artifactId>elasticsearch</artifactId>
...@@ -96,17 +86,11 @@ ...@@ -96,17 +86,11 @@
<artifactId>metsModsMapping</artifactId> <artifactId>metsModsMapping</artifactId>
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
<!--dependency> <dependency>
<groupId>org.apache.jena</groupId> <groupId>de.shadowhunt.maven.plugins</groupId>
<artifactId>jena-core</artifactId> <artifactId>package-info-maven-plugin</artifactId>
<version>3.4.0</version> <version>1.4.5</version>
</dependency--> </dependency>
<!-- dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.6.0</version>
</dependency-->
</dependencies> </dependencies>
<build> <build>
<pluginManagement> <pluginManagement>
...@@ -170,29 +154,28 @@ ...@@ -170,29 +154,28 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<!-- We use this plugin to ensure that our usage of the <!-- We use this plugin to ensure that our usage of the maven-jaxb2-plugin
maven-jaxb2-plugin is JDK 8 compatible in absence of a fix is JDK 8 compatible in absence of a fix for https://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-80. -->
for https://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-80. --> <groupId>org.codehaus.mojo</groupId>
<groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId>
<artifactId>properties-maven-plugin</artifactId> <version>1.0-alpha-2</version>
<version>1.0-alpha-2</version> <executions>
<executions> <execution>
<execution> <id>set-additional-system-properties</id>
<id>set-additional-system-properties</id> <goals>
<goals> <goal>set-system-properties</goal>
<goal>set-system-properties</goal> </goals>
</goals> </execution>
</execution> </executions>
</executions> <configuration>
<configuration> <properties>
<properties> <property>
<property> <name>javax.xml.accessExternalSchema</name>
<name>javax.xml.accessExternalSchema</name> <value>file,http</value>
<value>file,http</value> </property>
</property> </properties>
</properties> </configuration>
</configuration> </plugin>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId> <artifactId>jaxb2-maven-plugin</artifactId>
......
...@@ -354,7 +354,7 @@ public class OAIPMHImpl implements OAIPMHProducer { ...@@ -354,7 +354,7 @@ public class OAIPMHImpl implements OAIPMHProducer {
JAXBElement<OAIPMHType> oaipmhRoot = obf.createOAIPMH(oai); JAXBElement<OAIPMHType> oaipmhRoot = obf.createOAIPMH(oai);
ErrorHandler requestErrors = RecordListDelivererAbstract.requestChecker(request); ErrorHandler requestErrors = RecordListDelivererAbstract.requestChecker(request);
//System.out.println("DU KOMMST NICHT VORBEI!!!"); // System.out.println("DU KOMMST NICHT VORBEI!!!");
if (requestErrors.getError().getCode() != null) { if (requestErrors.getError().getCode() != null) {
oai.getError().add(requestErrors.getError()); oai.getError().add(requestErrors.getError());
} else { } else {
...@@ -364,7 +364,7 @@ public class OAIPMHImpl implements OAIPMHProducer { ...@@ -364,7 +364,7 @@ public class OAIPMHImpl implements OAIPMHProducer {
if (RecordListDelivererAbstract.isIdiomMets()) { if (RecordListDelivererAbstract.isIdiomMets()) {
recListDeliv = this.recordListIDIOM; recListDeliv = this.recordListIDIOM;
} else if (RecordListDelivererAbstract.isDublinCore()) { } else if (RecordListDelivererAbstract.isDublinCore()) {
//System.out.println("UHLA"); // System.out.println("UHLA");
recListDeliv = this.recordListDC; recListDeliv = this.recordListDC;
} }
......
...@@ -659,18 +659,18 @@ public class OaiPmhTextgridOnlineTests { ...@@ -659,18 +659,18 @@ public class OaiPmhTextgridOnlineTests {
// Count response objects at first. // Count response objects at first.
int recordCount = 0; int recordCount = 0;
int i = res.indexOf("<ns2:" + recordOrHeader + ">", 0); int i = res.indexOf("<" + recordOrHeader + ">", 0);
while (i != -1) { while (i != -1) {
recordCount++; recordCount++;
i++; i++;
i = res.indexOf("<ns2:" + recordOrHeader + ">", i); i = res.indexOf("<" + recordOrHeader + ">", i);
} }
System.out.println("\t" + theThreadName + " " + recordOrHeader + "s: " + recordCount); System.out.println("\t" + theThreadName + " " + recordOrHeader + "s: " + recordCount);
// Check if token tag is existing. // Check if token tag is existing.
int tokStart = res.indexOf("<ns2:resumptionToken"); int tokStart = res.indexOf("<resumptionToken");
int tokEnd = res.indexOf("</ns2:resumptionToken"); int tokEnd = res.indexOf("</resumptionToken");
if (tokStart == -1 && tokEnd == -1) { if (tokStart == -1 && tokEnd == -1) {
System.out.println("\t" + theThreadName + " token: no token"); System.out.println("\t" + theThreadName + " token: no token");
...@@ -807,6 +807,12 @@ public class OaiPmhTextgridOnlineTests { ...@@ -807,6 +807,12 @@ public class OaiPmhTextgridOnlineTests {
} }
} }
if (loopCount < numberOfPagesToTest) {
System.out.println(theThreadName + ERROR + ": " + "Must have done " + numberOfPagesToTest
+ " loops, but did only " + loopCount);
assertTrue(false);
}
System.out.println("\t" + theThreadName + OK); System.out.println("\t" + theThreadName + OK);
} }
...@@ -899,4 +905,4 @@ public class OaiPmhTextgridOnlineTests { ...@@ -899,4 +905,4 @@ public class OaiPmhTextgridOnlineTests {
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment