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

Added TextGridMimetypes from tgcrud-common.

parent aadfe379
No related branches found
No related tags found
No related merge requests found
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>oaipmh</artifactId>
<groupId>info.textgrid.middleware</groupId>
<version>1.3.1-SNAPSHOT</version>
</parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>oaipmh-core</artifactId>
<version>1.3.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TextGrid :: TG-OAI-PMH :: Core</name>
<url>http://maven.apache.org</url>
<dependencies>
<!--dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>${cxf.version}</version>
</dependency-->
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>tgcrud-common</artifactId>
<version>${tgcrud.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-hc</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.utils</groupId>
<artifactId>httpclients</artifactId>
<version>${textgrid.httpclients.version}</version>
</dependency>
<!-- >dependency> <groupId>org.openrdf.sesame</groupId> <artifactId>sesame-runtime</artifactId>
<version>2.5.0</version> </dependency -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
......@@ -104,7 +89,6 @@
<version>1.2.14</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>nexus.snapshots</id>
......@@ -117,11 +101,9 @@
<enabled>true</enabled>
</snapshots>
</repository>
<!-- repository> <id>aduna</id> <name>Aduna Software</name> <url>http://repo.aduna-software.org/maven2/releases/</url>
</repository -->
</repositories>
<build>
<pluginManagement>
<plugins>
......@@ -132,14 +114,12 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>oaipmhSchema-xjc</id>
<goals>
......@@ -152,7 +132,6 @@
<clearOutputDir>false</clearOutputDir>
</configuration>
</execution>
<execution>
<id>oaipmhDCSchema-xjc</id>
<goals>
......
......@@ -16,6 +16,7 @@ import info.textgrid.middleware.oaipmh.OaiDcType;
import info.textgrid.middleware.oaipmh.ObjectFactory;
import info.textgrid.middleware.oaipmh.RecordType;
import info.textgrid.middleware.oaipmh.RequestType;
import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
/**
* Query ElasticSearch index for the values mapped to dublinCore for a specific object and collect them into lists
......@@ -60,6 +61,7 @@ public class RecordDeliverer {
private DublinCoreBuilder dbc = new DublinCoreBuilder(odt, of);
private OAI_ESClient oaiEsClient;
// TODO Make this configurable!
String aggregatorURL = "http://textgrid-esx2.gwdg.de/1.0/aggregator/teicorpus/";
public RecordDeliverer(OAI_ESClient oaiEsClient){
......@@ -92,7 +94,7 @@ public class RecordDeliverer {
GetResponse tgObject = recordById.execute().actionGet();
if(tgObject.isExists() && tgObject.getField("format").getValue().toString().equals("text/tg.edition+tg.aggregation+xml")){
if(tgObject.isExists() && tgObject.getField("format").getValue().toString().equals(TextGridMimetypes.EDITION)){
String workUri = tgObject.getField("edition.isEditionOf").getValue().toString();
workUri = workUri.substring(TGConstants.TG_ITEM_IDENTIFIER_PREFIX.length());
......
......@@ -23,6 +23,7 @@ import info.textgrid.middleware.oaipmh.OaiDcType;
import info.textgrid.middleware.oaipmh.ObjectFactory;
import info.textgrid.middleware.oaipmh.RecordType;
import info.textgrid.middleware.oaipmh.RequestType;
import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
/**
* TODO Make aggregator URL configurable!
......@@ -139,8 +140,7 @@ public class RecordListDeliverer {
if (hit != null
&& hit.getFields().get(FORMAT).values().get(0)
.toString()
.equals("text/tg.edition+tg.aggregation+xml")) {
.toString().equals(TextGridMimetypes.EDITION)) {
ObjectFactory of = new ObjectFactory();
OaiDcType odt = new OaiDcType();
......@@ -351,14 +351,6 @@ public class RecordListDeliverer {
return recordList;
}
/**
* @param id
* @param esClient
*/
/**
* @param id
* @param esClient
*/
/**
* @param id
* @param esClient
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>oaipmh</artifactId>
<groupId>info.textgrid.middleware</groupId>
<version>1.3.1-SNAPSHOT</version>
</parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>oaipmh-webapp</artifactId>
<packaging>war</packaging>
<version>1.3.1-SNAPSHOT</version>
<name>TextGrid :: TG-OAI-PMH :: Webapp</name>
<url>http://maven.apache.org</url>
<profiles>
<profile>
<id>public</id>
......@@ -27,7 +24,6 @@
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
......@@ -35,51 +31,42 @@
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-security-cors</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>oaipmh-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>tgoaipmh</finalName>
<plugins>
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>info.textgrid.middleware</groupId>
<artifactId>oaipmh</artifactId>
<version>1.3.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>TextGrid :: TG-OAI-PMH :: Parent</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.host.url>https://ci.bibforge.org/sonar</sonar.host.url>
<cxf.version>2.7.13</cxf.version>
<tgcrud.version>5.5.9-SNAPSHOT</tgcrud.version>
<spring.version>4.0.2.RELEASE</spring.version>
<textgrid.httpclients.version>1.3.0-SNAPSHOT</textgrid.httpclients.version>
<felix.version>2.3.4</felix.version>
......@@ -23,8 +22,7 @@
<slf4j.version>1.7.5</slf4j.version>
<junit.version>4.11</junit.version>
<jdk.version>1.7</jdk.version>
</properties>
</properties>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
......@@ -40,8 +38,7 @@
<showWarnings>true</showWarnings>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
......@@ -53,7 +50,6 @@
</plugin>
</plugins>
</build>
<modules>
<module>oaipmh-core</module>
<module>oaipmh-webapp</module>
......
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