update to content-rdf 1.0.4

This commit is contained in:
Jörg Prante 2016-11-13 20:47:25 +01:00
parent cd31542138
commit 2dfaf33589
8 changed files with 6 additions and 38 deletions

View file

@ -1,13 +1,13 @@
plugins { plugins {
id "org.sonarqube" version "2.2" id "org.sonarqube" version "2.2"
id "org.ajoberstar.github-pages" version "1.6.0-rc.1" id "org.ajoberstar.github-pages" version "1.6.0-rc.1"
id "org.xbib.gradle.plugin.jbake" version "1.1.0" id "org.xbib.gradle.plugin.jbake" version "1.2.1"
} }
allprojects { allprojects {
group = 'org.xbib' group = 'org.xbib'
version = '1.0.0' version = '1.0.1'
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'maven' apply plugin: 'maven'

View file

@ -6,7 +6,6 @@ import java.net.URL;
import org.xbib.helianthus.client.ClientFactory; import org.xbib.helianthus.client.ClientFactory;
import org.xbib.helianthus.client.http.HttpClient; import org.xbib.helianthus.client.http.HttpClient;
import org.xbib.oai.OAIConstants; import org.xbib.oai.OAIConstants;
import org.xbib.oai.OAISession;
import org.xbib.oai.client.getrecord.GetRecordRequest; import org.xbib.oai.client.getrecord.GetRecordRequest;
import org.xbib.oai.client.identify.IdentifyRequest; import org.xbib.oai.client.identify.IdentifyRequest;
import org.xbib.oai.client.listidentifiers.ListIdentifiersRequest; import org.xbib.oai.client.listidentifiers.ListIdentifiersRequest;
@ -19,7 +18,7 @@ import org.xbib.oai.util.ResumptionToken;
* OAI client API * OAI client API
* *
*/ */
public interface OAIClient extends OAISession, OAIConstants { public interface OAIClient extends OAIConstants, AutoCloseable {
OAIClient setURL(URL uri, boolean trustAlways) throws URISyntaxException; OAIClient setURL(URL uri, boolean trustAlways) throws URISyntaxException;

View file

@ -28,7 +28,6 @@ import java.time.Instant;
import java.time.ZoneId; import java.time.ZoneId;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
@ -106,7 +105,7 @@ public class DOAJClientTest {
File file = File.createTempFile("doaj.", ".xml"); File file = File.createTempFile("doaj.", ".xml");
file.deleteOnExit(); file.deleteOnExit();
FileWriter fileWriter = new FileWriter(file); FileWriter fileWriter = new FileWriter(file);
do { while (listRecordsRequest != null) {
try { try {
listRecordsRequest.addHandler(simpleMetadataHandler); listRecordsRequest.addHandler(simpleMetadataHandler);
client = oaiClient.getHttpClient(); client = oaiClient.getHttpClient();
@ -128,7 +127,7 @@ public class DOAJClientTest {
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);
listRecordsRequest = null; listRecordsRequest = null;
} }
} while (listRecordsRequest != null); }
fileWriter.close(); fileWriter.close();
oaiClient.close(); oaiClient.close();
logger.info("count={}", count.get()); logger.info("count={}", count.get());

View file

@ -1,6 +1,3 @@
dependencies { dependencies {
compile "org.xbib:content-rdf:1.0.3" compile "org.xbib:content-rdf:1.0.4"
//testCompile "xerces:xercesImpl:${versions.xerces}"
//testCompile "xalan:xalan:${versions.xalan}"
//testCompile "com.fasterxml.woodstox:woodstox-core:${versions.woodstox}"
} }

View file

@ -1,10 +0,0 @@
package org.xbib.oai;
import java.io.Closeable;
/**
* OAI session.
*/
public interface OAISession extends Closeable {
}

View file

@ -1,6 +1,5 @@
package org.xbib.oai.server; package org.xbib.oai.server;
import org.xbib.oai.OAISession;
import org.xbib.oai.exceptions.OAIException; import org.xbib.oai.exceptions.OAIException;
import org.xbib.oai.server.getrecord.GetRecordServerRequest; import org.xbib.oai.server.getrecord.GetRecordServerRequest;
import org.xbib.oai.server.getrecord.GetRecordServerResponse; import org.xbib.oai.server.getrecord.GetRecordServerResponse;
@ -15,7 +14,6 @@ import org.xbib.oai.server.listrecords.ListRecordsServerResponse;
import org.xbib.oai.server.listsets.ListSetsServerRequest; import org.xbib.oai.server.listsets.ListSetsServerRequest;
import org.xbib.oai.server.listsets.ListSetsServerResponse; import org.xbib.oai.server.listsets.ListSetsServerResponse;
import java.net.URISyntaxException;
import java.net.URL; import java.net.URL;
import java.util.Date; import java.util.Date;
@ -26,8 +24,6 @@ public interface OAIServer {
URL getURL(); URL getURL();
OAISession newSession() throws URISyntaxException;
/** /**
* This verb is used to retrieve information about a repository. * This verb is used to retrieve information about a repository.
* Some of the information returned is required as part of the OAI-PMH. * Some of the information returned is required as part of the OAI-PMH.

View file

@ -1,6 +1,5 @@
package org.xbib.oai.server; package org.xbib.oai.server;
import org.xbib.oai.OAISession;
import org.xbib.oai.exceptions.OAIException; import org.xbib.oai.exceptions.OAIException;
import org.xbib.oai.server.getrecord.GetRecordServerRequest; import org.xbib.oai.server.getrecord.GetRecordServerRequest;
import org.xbib.oai.server.getrecord.GetRecordServerResponse; import org.xbib.oai.server.getrecord.GetRecordServerResponse;
@ -102,11 +101,6 @@ public class PropertiesOAIServer implements OAIServer {
return properties.getProperty(GRANULARITY); return properties.getProperty(GRANULARITY);
} }
@Override
public OAISession newSession() {
return null;
}
@Override @Override
public Date getLastModified() { public Date getLastModified() {
return null; return null;

View file

@ -1,6 +1,5 @@
package org.xbib.oai.server; package org.xbib.oai.server;
import org.xbib.oai.OAISession;
import org.xbib.oai.exceptions.OAIException; import org.xbib.oai.exceptions.OAIException;
import org.xbib.oai.server.getrecord.GetRecordServerRequest; import org.xbib.oai.server.getrecord.GetRecordServerRequest;
import org.xbib.oai.server.getrecord.GetRecordServerResponse; import org.xbib.oai.server.getrecord.GetRecordServerResponse;
@ -67,12 +66,6 @@ public class SimpleServer implements OAIServer {
return null; return null;
} }
@Override
public OAISession newSession() throws URISyntaxException {
//return new DefaultOAIClient().setURL(getURL());
return null;
}
@Override @Override
public Date getLastModified() { public Date getLastModified() {
return new Date(); return new Date();