remove obsolete COPAC

This commit is contained in:
Jörg Prante 2025-01-02 09:28:47 +01:00
parent 3d8d1534ff
commit 3936c03f1e
4 changed files with 25 additions and 22 deletions

View file

@ -1,10 +1,8 @@
plugins { plugins {
id "pmd"
id 'maven-publish' id 'maven-publish'
id 'signing' id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1" id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1"
//id "com.github.spotbugs" version "6.0.0-beta.3"
id "org.cyclonedx.bom" version "1.7.4" id "org.cyclonedx.bom" version "1.7.4"
id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0" id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0"
} }
@ -34,7 +32,6 @@ subprojects {
apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/compile/java.gradle')
apply from: rootProject.file('gradle/test/junit5.gradle') apply from: rootProject.file('gradle/test/junit5.gradle')
apply from: rootProject.file('gradle/documentation/asciidoc.gradle') apply from: rootProject.file('gradle/documentation/asciidoc.gradle')
apply from: rootProject.file('gradle/quality/pmd.gradle')
apply from: rootProject.file('gradle/publish/maven.gradle') apply from: rootProject.file('gradle/publish/maven.gradle')
} }
apply from: rootProject.file('gradle/publish/sonatype.gradle') apply from: rootProject.file('gradle/publish/sonatype.gradle')

View file

@ -1,6 +1,6 @@
plugins { plugins {
id 'org.xbib.gradle.plugin.jflex' version '3.0.2' id 'org.xbib.gradle.plugin.jflex' version '3.1.0'
id 'org.xbib.gradle.plugin.jacc' version '3.0.2' id 'org.xbib.gradle.plugin.jacc' version '3.1.0'
} }
dependencies { dependencies {

View file

@ -1,19 +1,21 @@
package org.xbib.z3950.groovy package org.xbib.z3950.groovy
import groovy.util.logging.Log import groovy.util.logging.Log
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
import org.xbib.z3950.client.jdk.JDKZClient import org.xbib.z3950.client.jdk.JDKZClient
import java.util.logging.Level import java.util.logging.Level
@Log @Log
class COPACTest { class JiscTest {
@Disabled
@Test @Test
void testCOPAC() { void testCOPAC() {
String host = "z3950.copac.ac.uk" String host = "z3950.libraryhub.jisc.ac.uk"
int port = 210 int port = 210
String database = "COPAC" String database = "NBK"
String query = "@attr 1=1 smith" String query = "@attr 1=1 smith"
// "1.2.840.10003.5.10"; // MARC // "1.2.840.10003.5.10"; // MARC
String preferredRecordSyntax = "xml" // "1.2.840.10003.5.109.10" // xml String preferredRecordSyntax = "xml" // "1.2.840.10003.5.109.10" // xml
@ -25,11 +27,13 @@ class COPACTest {
.setDatabases(Collections.singletonList(database)) .setDatabases(Collections.singletonList(database))
.setPreferredRecordSyntax(preferredRecordSyntax) .setPreferredRecordSyntax(preferredRecordSyntax)
.build() .build()
client.withCloseable {cl -> client.searchPQF(query,
cl.searchPQF(query, from, length, from,
(status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total), length,
record -> log.log(Level.INFO, "found record " + record), // MODS null,
() -> log.log(Level.WARNING, "timeout")) (status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total),
} record -> log.log(Level.INFO, "found record " + record), // MODS
() -> log.log(Level.WARNING, "timeout"))
client.close()
} }
} }

View file

@ -14,8 +14,8 @@ class LVITest {
@Test @Test
void testLVI() { void testLVI() {
String host = "localhost" String host = "sru.hbz-nrw.de"
int port = 1210 int port = 210
String database = "lvi" String database = "lvi"
//String query = "@attr 1=1 Schmidt" // OK! //String query = "@attr 1=1 Schmidt" // OK!
//String query = "@attr 1=1 \"Schmidt, Heiner\"" // OK! //String query = "@attr 1=1 \"Schmidt, Heiner\"" // OK!
@ -41,12 +41,14 @@ class LVITest {
.setPreferredRecordSyntax(preferredRecordSyntax) .setPreferredRecordSyntax(preferredRecordSyntax)
.setElementSetName("F") .setElementSetName("F")
.build() .build()
client.withCloseable {cl -> client.searchPQF(query,
cl.searchPQF(query, from, size, from,
(status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total), size,
record -> dump(MarcRecord.from(record.asStream(), StandardCharsets.UTF_8)), null,
() -> log.log(Level.WARNING, "timeout")) (status, total, returned, elapsedMillis) -> log.log(Level.INFO, "total records = " + total),
} record -> dump(MarcRecord.from(record.asStream(), StandardCharsets.UTF_8)),
() -> log.log(Level.WARNING, "timeout"))
client.close()
} }
static void dump(Iterable<MarcRecord> iterable) { static void dump(Iterable<MarcRecord> iterable) {