diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OAI_ESClient.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OAI_ESClient.java index 98e6ef893188a4355959e569e89a776dfeb63215..a22a718248a3cd866875ae8facb2c75ae8bb739c 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/OAI_ESClient.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OAI_ESClient.java @@ -2,7 +2,6 @@ package info.textgrid.middleware; import java.util.ArrayList; import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.http.HttpHost; @@ -16,150 +15,156 @@ import org.elasticsearch.client.RestHighLevelClient; * * @author Maximilian Brodhun, SUB Göttingen * @author Stefan E. Funk, SUB Göttingen - * @version 2019-10-28 + * @version 2019-10-30 * @since 2014-01-09 */ public class OAI_ESClient { - private Log log = LogFactory.getLog(OAI_ESClient.class); - private static String url; - //private static int port; - private static int[] ports; - private static String esCluster; - private static String esIndex; - private static String esType; - //public static Client oaiESClient; - private static RestHighLevelClient esClient; - - /** - * Constructor for the connection to an ElasticSearch index - * @param url address for the ELasticSearch connection - * @param port for the ElasticSearch connection - * @param clusterName indicating the name of the cluster where the index exists - */ - - public OAI_ESClient(String url, int[] ports, int itemLimit){ - - //int port = Integer.parseInt(thePort); - - /*this.log.info("ElasticSearch connection settings:"); - this.log.info("url = " + url); - this.log.info("port = " + port); - this.log.info("cluster name = " + clusterName);*/ - - OAI_ESClient.setUrl(url); - - OAI_ESClient.setPorts(ports); - - - List<HttpHost> hosts = new ArrayList<HttpHost>(); - for(int port : ports) { - hosts.add(new HttpHost(url, port, "http")); - } - - setEsClient(new RestHighLevelClient( - RestClient.builder( - hosts.toArray(new HttpHost[hosts.size()])))); - - log.info("ElasticSearchClient started with settings: " + url + " ," + ports.toString() + " http"); - } - - /** - * - * @return esIndex - */ - public static String getEsIndex() { - return esIndex; - } - - /** - * - * @param esIndex - */ - public static void setEsIndex(String esIndex) { - OAI_ESClient.esIndex = esIndex; - } - - /** - * - * @return esType - */ - public static String getEsType() { - return esType; - } - - /** - * - * @param esType - */ - public static void setEsType(String esType) { - OAI_ESClient.esType = esType; - } - - - - /** - * - * @return esCluster - */ - public static String getClusterName() { - return esCluster; - } - - /** - * - * @param esCluster - */ - public static void setClusterName(String esCluster) { - OAI_ESClient.esCluster = esCluster; - } - - /** - * - * @return url - */ - public static String getUrl() { - return url; - } - - /** - * - * @param url - */ - public static void setUrl(String url) { - OAI_ESClient.url = url; - } - - /** - * - * @return port - */ - public static int[] getPort() { - return ports; - } - - /** - * - * @param port - */ - public static void setPorts(int ports[]) { - // System.out.println("SETTER OF PORTS: " +ports[0]); - OAI_ESClient.ports = ports; - } - - /** - * - * @param oaiClient - */ - public static void setOaiESClient(RestHighLevelClient theOaiClient){ - OAI_ESClient.esClient = theOaiClient; - } - - public static RestHighLevelClient getEsClient() { - return esClient; - } - - public static void setEsClient(RestHighLevelClient esClient) { - OAI_ESClient.esClient = esClient; - } + private Log log = LogFactory.getLog(OAI_ESClient.class); + private static String url; + private static int[] ports; + private static String esCluster; + private static String esIndex; + private static String esType; + private static RestHighLevelClient esClient; + + /** + * Constructor for the connection to an ElasticSearch index + * + * @param url address for the ELasticSearch connection + * @param port for the ElasticSearch connection + * @param clusterName indicating the name of the cluster where the index exists + */ + + public OAI_ESClient(String url, int[] ports, int itemLimit) { + + // int port = Integer.parseInt(thePort); + + /* + * this.log.info("ElasticSearch connection settings:"); this.log.info("url = " + url); + * this.log.info("port = " + port); this.log.info("cluster name = " + clusterName); + */ + + OAI_ESClient.setUrl(url); + + OAI_ESClient.setPorts(ports); + + + List<HttpHost> hosts = new ArrayList<HttpHost>(); + for (int port : ports) { + hosts.add(new HttpHost(url, port, "http")); + } + + setEsClient(new RestHighLevelClient( + RestClient.builder( + hosts.toArray(new HttpHost[hosts.size()])))); + + this.log.info( + "ElasticSearchClient started with settings: " + url + " ," + ports.toString() + " http"); + } + + /** + * + * @return esIndex + */ + public static String getEsIndex() { + return esIndex; + } + + /** + * + * @param esIndex + */ + public static void setEsIndex(String esIndex) { + OAI_ESClient.esIndex = esIndex; + } + + /** + * + * @return esType + */ + public static String getEsType() { + return esType; + } + + /** + * + * @param esType + */ + public static void setEsType(String esType) { + OAI_ESClient.esType = esType; + } + + + + /** + * + * @return esCluster + */ + public static String getClusterName() { + return esCluster; + } + + /** + * + * @param esCluster + */ + public static void setClusterName(String esCluster) { + OAI_ESClient.esCluster = esCluster; + } + + /** + * + * @return url + */ + public static String getUrl() { + return url; + } + + /** + * + * @param url + */ + public static void setUrl(String url) { + OAI_ESClient.url = url; + } + + /** + * + * @return port + */ + public static int[] getPort() { + return ports; + } + + /** + * + * @param port + */ + public static void setPorts(int ports[]) { + OAI_ESClient.ports = ports; + } + + /** + * + * @param oaiClient + */ + public static void setOaiESClient(RestHighLevelClient theOaiClient) { + OAI_ESClient.esClient = theOaiClient; + } + + /** + * @return + */ + public static RestHighLevelClient getEsClient() { + return esClient; + } + + /** + * @param esClient + */ + public static void setEsClient(RestHighLevelClient esClient) { + OAI_ESClient.esClient = esClient; + } + } diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java index 401b30a2973ea725a9ff2bbef2821b4fabd6b772..193a63e1193180a703854172065523696ba9861e 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordDelivererDC.java @@ -2,8 +2,6 @@ package info.textgrid.middleware; import java.io.IOException; import java.text.ParseException; - -import java.util.Map; import javax.xml.datatype.DatatypeConfigurationException; import org.apache.commons.logging.LogFactory; import org.elasticsearch.action.get.GetRequest; @@ -16,11 +14,11 @@ import info.textgrid.middleware.oaipmh.HeaderType; import info.textgrid.middleware.oaipmh.RecordType; /** - * FIXME + * FIXME Was magst Du denn hier fixen, Herr Max? * * @author Maximilian Brodhun, SUB Göttingen * @author Stefan E. Funk, SUB Göttingen - * @version 2019-10-28 + * @version 2019-10-30 * @since 2014-02-17 */ public class RecordDelivererDC extends RecordDelivererAbstract { @@ -49,7 +47,8 @@ public class RecordDelivererDC extends RecordDelivererAbstract { private String[] languageList; private String[] publisherList; private String[] relationList; - //private String[] relationForWorkList; + // FIXME Why is this commented out? I just adapted beans.xml file. + // private String[] relationForWorkList; private String[] rightList; private String[] sourceList; private String[] subjectList; @@ -87,19 +86,21 @@ public class RecordDelivererDC extends RecordDelivererAbstract { if (id.startsWith(this.repositoryObjectURIPrefix)) { changedId = changedId.replace(this.repositoryObjectURIPrefix, ""); } - - GetRequest getRequest = new GetRequest(OAI_ESClient.getEsIndex(), OAI_ESClient.getEsType(), changedId).fetchSourceContext(fetchSourceContext); - GetResponse esResultObject=null; - - try { - esResultObject = - OAI_ESClient.getEsClient().get(getRequest, RequestOptions.DEFAULT); - - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - log.error("Could not fetch the result of ElasticSearch"); - } + + GetRequest getRequest = + new GetRequest(OAI_ESClient.getEsIndex(), OAI_ESClient.getEsType(), changedId) + .fetchSourceContext(fetchSourceContext); + GetResponse esResultObject = null; + + try { + esResultObject = + OAI_ESClient.getEsClient().get(getRequest, RequestOptions.DEFAULT); + + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + log.error("Could not fetch the result of ElasticSearch"); + } if (esResultObject.isExists()) { @@ -129,13 +130,16 @@ public class RecordDelivererDC extends RecordDelivererAbstract { setRecordHeader(dateOfCreation, identifier, record, dublinCoreBuilder); } - if (this.textgrid == true && esResultObject.getSourceAsMap().get(this.formatField).equals(this.formatToFilter)) { - - String workUri = DublinCoreFieldLoader.fillList(esResultObject, new String[] {relationToFurtherMetadataObject}).get(0); + if (this.textgrid == true + && esResultObject.getSourceAsMap().get(this.formatField).equals(this.formatToFilter)) { + + String workUri = DublinCoreFieldLoader + .fillList(esResultObject, new String[] {this.relationToFurtherMetadataObject}).get(0); workUri = workUri.substring(this.repositoryObjectURIPrefix.length()); dublinCoreBuilder = putContentIntoDCFieldLists(esResultObject, furtherDCElements(workUri)); identifier = esResultObject.getSourceAsMap().get(this.identifierField).toString(); - String dateOfCreation = esResultObject.getSourceAsMap().get(this.dateOfObjectCreation).toString(); + String dateOfCreation = + esResultObject.getSourceAsMap().get(this.dateOfObjectCreation).toString(); setRecordHeader(dateOfCreation, identifier, record, dublinCoreBuilder); record.setMetadata(dublinCoreBuilder.getDC()); @@ -160,7 +164,7 @@ public class RecordDelivererDC extends RecordDelivererAbstract { * @param dateOfCreation * @param identifier * @param record object containing all elements for the record in the OAI-PMH response - * @param dbc object containing the dublin core elements for the XML file + * @param dbc object containing the dublin core elements for the XML file * @return */ private static RecordType setRecordHeader(String dateOfCreation, String identifier, @@ -188,32 +192,32 @@ public class RecordDelivererDC extends RecordDelivererAbstract { */ private GetResponse furtherDCElements(String id) { - String[] includes = this.workFields; - String[] excludes = Strings.EMPTY_ARRAY; - FetchSourceContext fetchSourceContext = - new FetchSourceContext(true, includes, excludes); - + String[] includes = this.workFields; + String[] excludes = Strings.EMPTY_ARRAY; + FetchSourceContext fetchSourceContext = + new FetchSourceContext(true, includes, excludes); + if (!id.endsWith(".0")) { id = id.concat(".0"); } - + GetRequest getRequest = new GetRequest(OAI_ESClient.getEsIndex(), OAI_ESClient.getEsType(), id) - .fetchSourceContext(fetchSourceContext); - GetResponse responseWorkValues=null; + .fetchSourceContext(fetchSourceContext); + GetResponse responseWorkValues = null; try { - responseWorkValues = OAI_ESClient.getEsClient().get(getRequest, RequestOptions.DEFAULT); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + responseWorkValues = OAI_ESClient.getEsClient().get(getRequest, RequestOptions.DEFAULT); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } return responseWorkValues; } /** - * In case of TextGrid data from two objects are necessary. The edition object and the linked work object. - * In result for building the DC-Object both objects from the ES-Index are needed + * In case of TextGrid data from two objects are necessary. The edition object and the linked work + * object. In result for building the DC-Object both objects from the ES-Index are needed * * @param responseWorkValues contains the edition object * @param relatedWorkObject contains the work object related to edition object @@ -431,12 +435,12 @@ public class RecordDelivererDC extends RecordDelivererAbstract { this.relationList = relationsList; } - /** - * @param relationsList - */ - /*public void setRelationsForWork(String[] relationsList) { - this.relationForWorkList = relationsList; - }*/ + // /** + // * @param relationsForWorkList + // */ + // public void setRelationsForWork(String[] relationsForWorkList) { + // this.relationForWorkList = relationsForWorkList; + // } /** * @param rightsList diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererAbstract.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererAbstract.java index fb4d819c276dd22a3903e1f64258ffc3c4ce49c4..39b5fbc4e90e9bc7b399e99b1c602f16efba4b54 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererAbstract.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererAbstract.java @@ -50,12 +50,13 @@ public abstract class RecordListDelivererAbstract implements RecordListDeliverer + request.getResumptionToken() + " argument is invalid or expired."); } } - + // Check if query to ElastisSearch responses with more then zero results - if(true) { - + // FIXME what the heck? + if (true) { + } - + // Check params in general. List<String> errorValues = new ArrayList<String>(); @@ -73,8 +74,6 @@ public abstract class RecordListDelivererAbstract implements RecordListDeliverer + "or is missing required arguments: " + errorValues); } - - return result; } diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java index b8f949f69bafffc20734b468cfe038fd71e7ab14..bbd1ef4f41234b8f8aa175eef67512ab2ae4d4ab 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/RecordListDelivererDC.java @@ -33,17 +33,28 @@ import info.textgrid.middleware.oaipmh.ResumptionTokenType; */ public class RecordListDelivererDC extends RecordListDelivererAbstract { + // ** + // FINALS + // ** + + private static final int LIFETIME_RES_TOKEN = 600; + // ** // STATICS // ** private static org.apache.commons.logging.Log log = LogFactory.getLog(OAIPMHImpl.class); + protected static Map<String, Integer> cursorCollector = new Hashtable<String, Integer>(); // ** // CLASS VARIABLES // ** private OAI_ESClient oaiEsClient; + + private boolean foundItems; + private int searchResponseSize; + private long resultSize; private String[] fields; private String[] workFields; private String formatField; @@ -54,7 +65,7 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { private String rangeField; private String modifiedField; private String identifierField; - private boolean foundItems; + private String modifiedValue; // ** // DC-Field Lists @@ -70,19 +81,12 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { private String[] languageList; private String[] publisherList; private String[] relationList; - private String[] relationForWorkList; + private String[] relationsForWorkList; private String[] rightList; private String[] sourceList; private String[] subjectList; private String[] titleList; private String[] typeList; - private String modifiedValue; - private static final int lifeTimeResToken = 600; - private long resultSize; - - static Map<String, Integer> cursorCollector = new Hashtable<String, Integer>(); - - private int searchResponseSize; /** * @param textgrid @@ -165,10 +169,10 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { searchSourceBuilder.query(recordFilter); searchSourceBuilder.size(this.searchResponseSize); searchRequest.source(searchSourceBuilder); - if (resumptionToken != null) { + if (resumptionToken != null) { SearchScrollRequest scrollRequest = new SearchScrollRequest(resumptionToken); - scrollRequest.scroll(TimeValue.timeValueSeconds(lifeTimeResToken)); + scrollRequest.scroll(TimeValue.timeValueSeconds(LIFETIME_RES_TOKEN)); try { scrollResp = OAI_ESClient.getEsClient().scroll(scrollRequest, RequestOptions.DEFAULT); @@ -176,11 +180,9 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { // TODO Auto-generated catch block e.printStackTrace(); } - } else { - searchRequest.source(searchSourceBuilder); - searchRequest.scroll(TimeValue.timeValueMinutes(lifeTimeResToken)); + searchRequest.scroll(TimeValue.timeValueMinutes(LIFETIME_RES_TOKEN)); try { scrollResp = OAI_ESClient.getEsClient().search(searchRequest, RequestOptions.DEFAULT); } catch (IOException e) { @@ -190,7 +192,7 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { } log.info("Queried fields: " + this.fields.toString()); - log.info("Lifetime for resumption token is set to: " + lifeTimeResToken); + log.info("Lifetime for resumption token is set to: " + LIFETIME_RES_TOKEN); scrollID = scrollResp.getScrollId(); @@ -284,7 +286,7 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { result.setPublisher(DublinCoreFieldLoader.fillList(hit, this.publisherList)); result.setRelation(DublinCoreFieldLoader.fillList(hit, this.relationList)); result.setRelation( - DublinCoreFieldLoader.fillList(responseWorkValues, this.relationForWorkList)); + DublinCoreFieldLoader.fillList(responseWorkValues, this.relationsForWorkList)); result.setRights(DublinCoreFieldLoader.fillList(hit, this.rightList)); result.setSource(DublinCoreFieldLoader.fillList(hit, this.sourceList)); result.setSubject(DublinCoreFieldLoader.fillList(hit, this.subjectList)); @@ -574,10 +576,10 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { } /** - * @param relationsList + * @param relationsForWorkList */ - public void setRelationsForWork(String[] relationsList) { - this.relationForWorkList = relationsList; + public void setRelationsForWork(String[] relationsForWorkList) { + this.relationsForWorkList = relationsForWorkList; } /** @@ -720,10 +722,16 @@ public class RecordListDelivererDC extends RecordListDelivererAbstract { this.oaiEsClient = oaiEsClient; } + /** + * @return + */ public long getResultSize() { return this.resultSize; } + /** + * @param resultSize + */ public void setResultSize(long resultSize) { this.resultSize = resultSize; } diff --git a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml index 09c3b77dab028757752fb74a736f6b68407236c6..39368f9cf30c49a426ae6159e5fdc4852cc24f86 100644 --- a/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml +++ b/oaipmh-webapp/src/main/webapp/WEB-INF/beans.xml @@ -14,12 +14,14 @@ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"> - <description>Configuration for the TextGrid/DARIAH-DE OAI-PMH Interface</description> + <description>Configuration for the TextGrid/DARIAH-DE OAI-PMH Interface + </description> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> - <bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <bean id="propertyPlaceholderConfigurer" + class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>file:/etc/dhrep/oaipmh/oaipmh.properties</value> @@ -29,36 +31,47 @@ <property name="ignoreUnresolvablePlaceholders" value="true" /> </bean> - <bean id="ElasticSearchClient" class="info.textgrid.middleware.OAI_ESClient"> - <constructor-arg index="0" value="${elasticSearch.url}" /> - <constructor-arg index="1" value="${elasticSearch.port}" /> - <constructor-arg index="2" value="${elasticSearch.itemLimit}" /> + <bean id="ElasticSearchClient" + class="info.textgrid.middleware.OAI_ESClient"> + <constructor-arg index="0" + value="${elasticSearch.url}" /> + <constructor-arg index="1" + value="${elasticSearch.ports}" /> + <constructor-arg index="2" + value="${elasticSearch.itemLimit}" /> <property name="esIndex" value="${elasticSearch.index}" /> <property name="esType" value="${elasticSearch.type}" /> </bean> <!--bean id="drc" class="info.textgrid.middleware.oaipmh.${DeletedRecordInfo}" --> - <bean id="RepIdentification" class="info.textgrid.middleware.RepIdentification"> + <bean id="RepIdentification" + class="info.textgrid.middleware.RepIdentification"> <constructor-arg index="0" value="${RepositoryName}" /> <constructor-arg index="1" value="${BaseUrl}" /> - <constructor-arg index="2" value="${DeletedRecordInfo}" /> - <constructor-arg index="3" value="${EarliestDateStamp}" /> + <constructor-arg index="2" + value="${DeletedRecordInfo}" /> + <constructor-arg index="3" + value="${EarliestDateStamp}" /> <constructor-arg index="4" value="${Granularity}" /> <constructor-arg index="5" value="${ProtocolVersion}" /> <constructor-arg index="6" value="${AdminMail}" /> </bean> - <bean id="RecordListDC" class="info.textgrid.middleware.RecordListDelivererDC"> + <bean id="RecordListDC" + class="info.textgrid.middleware.RecordListDelivererDC"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> <property name="fields" value="${fields}" /> <property name="workFields" value="${workFields}" /> <property name="formatField" value="${formatField}" /> <property name="formatToFilter" value="${formatToFilter}" /> - <property name="dateOfObjectCreation" value="${dateOfObjectCreation}" /> - <property name="relationToFurtherMetadataObject" value="${relationToFurtherMetadataObject}" /> - <property name="repositoryObjectURIPrefix" value="${repositoryObjectURIPrefix}" /> + <property name="dateOfObjectCreation" + value="${dateOfObjectCreation}" /> + <property name="relationToFurtherMetadataObject" + value="${relationToFurtherMetadataObject}" /> + <property name="repositoryObjectURIPrefix" + value="${repositoryObjectURIPrefix}" /> <property name="FieldForRange" value="${rangeField}" /> <property name="contributor" value="${contributorList}" /> <property name="coverage" value="${coverageList}" /> @@ -70,7 +83,8 @@ <property name="languages" value="${languageList}" /> <property name="publishers" value="${publisherList}" /> <property name="relations" value="${relationList}" /> - <property name="relationsForWork" value="${relationsForWorkList}" /> + <property name="relationsForWork" + value="${relationsForWorkList}" /> <property name="rights" value="${rightsList}" /> <property name="sources" value="${sourceList}" /> <property name="subjects" value="${subjectList}" /> @@ -78,22 +92,28 @@ <property name="types" value="${typeList}" /> <property name="modifiedField" value="${modifiedField}" /> <property name="identifierField" value="${identifierField}" /> - <property name="searchResponseSize" value="${searchResponseSize}" /> + <property name="searchResponseSize" + value="${searchResponseSize}" /> </bean> - <bean id="RecordListIDIOM" class="info.textgrid.middleware.RecordListDelivererIDIOM"> + <bean id="RecordListIDIOM" + class="info.textgrid.middleware.RecordListDelivererIDIOM"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> </bean> - <bean scope="prototype" id="RecordDC" class="info.textgrid.middleware.RecordDelivererDC"> + <bean scope="prototype" id="RecordDC" + class="info.textgrid.middleware.RecordDelivererDC"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> <property name="formatField" value="${formatField}" /> <property name="formatToFilter" value="${formatToFilter}" /> - <property name="dateOfObjectCreation" value="${dateOfObjectCreation}" /> - <property name="relationToFurtherMetadataObject" value="${relationToFurtherMetadataObject}" /> - <property name="repositoryObjectURIPrefix" value="${repositoryObjectURIPrefix}" /> + <property name="dateOfObjectCreation" + value="${dateOfObjectCreation}" /> + <property name="relationToFurtherMetadataObject" + value="${relationToFurtherMetadataObject}" /> + <property name="repositoryObjectURIPrefix" + value="${repositoryObjectURIPrefix}" /> <property name="identifierField" value="${identifierField}" /> <property name="fields" value="${fields}" /> <property name="workFields" value="${workFields}" /> @@ -107,54 +127,65 @@ <property name="languages" value="${languageList}" /> <property name="publishers" value="${publisherList}" /> <property name="relations" value="${relationList}" /> - <property name="relationsForWork" value="${relationsForWorkList}" /> + <!-- property name="relationsForWork" value="${relationsForWorkList}" / --> <property name="rights" value="${rightsList}" /> <property name="sources" value="${sourceList}" /> <property name="subjects" value="${subjectList}" /> <property name="titles" value="${titleList}" /> <property name="types" value="${typeList}" /> </bean> - - <bean id="RecordIDIOM" class="info.textgrid.middleware.RecordDelivererIDIOM"> + + <bean id="RecordIDIOM" + class="info.textgrid.middleware.RecordDelivererIDIOM"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> </bean> - <bean id="ListIdentifierDC" class="info.textgrid.middleware.IdentifierListDelivererDC"> + <bean id="ListIdentifierDC" + class="info.textgrid.middleware.IdentifierListDelivererDC"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> - <property name="dateOfObjectCreation" value="${dateOfObjectCreation}" /> - <property name="repositoryObjectURIPrefix" value="${repositoryObjectURIPrefix}" /> - <property name="identifierListFields" value="${identifierListFields}"></property> + <property name="dateOfObjectCreation" + value="${dateOfObjectCreation}" /> + <property name="repositoryObjectURIPrefix" + value="${repositoryObjectURIPrefix}" /> + <property name="identifierListFields" + value="${identifierListFields}"></property> <property name="FieldForRange" value="${rangeField}" /> <property name="identifierField" value="${identifierField}" /> - <property name="searchResponseSize" value="${searchResponseSize}" /> + <property name="searchResponseSize" + value="${searchResponseSize}" /> </bean> - - <bean id="ListIdentifierIDIOM" class="info.textgrid.middleware.IdentifierListDelivererIDIOM"> + + <bean id="ListIdentifierIDIOM" + class="info.textgrid.middleware.IdentifierListDelivererIDIOM"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> </bean> - <bean id="SetDeliverer" class="info.textgrid.middleware.SetDeliverer"> + <bean id="SetDeliverer" + class="info.textgrid.middleware.SetDeliverer"> <constructor-arg index="0" value="${textgrid}" /> <constructor-arg index="1" value="${dariah}" /> <property name="formatField" value="${formatField}" /> <property name="formatToFilter" value="${formatToFilter}" /> <property name="identifierField" value="${identifierField}" /> - <property name="repositoryObjectURIPrefix" value="${repositoryObjectURIPrefix}" /> + <property name="repositoryObjectURIPrefix" + value="${repositoryObjectURIPrefix}" /> <property name="specField" value="${specField}" /> <property name="specFieldPrefix" value="${specFieldPrefix}" /> </bean> - <bean id="MetadataFormatList" class="info.textgrid.middleware.MetadataFormatListDeliverer"> + <bean id="MetadataFormatList" + class="info.textgrid.middleware.MetadataFormatListDeliverer"> </bean> <!-- REST Interface --> <bean id="rest" class="info.textgrid.middleware.Rest" /> - <bean id="cors-filter" class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter"> + <bean id="cors-filter" + class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter"> <property name="allowOrigins"> <util:list /> </property> @@ -174,7 +205,8 @@ <property name="dariah" value="${dariah}" /> </bean> - <jaxrs:server id="root" address="/root" publishedEndpointUrl="${RS_ENDPOINT}"> + <jaxrs:server id="root" address="/root" + publishedEndpointUrl="${RS_ENDPOINT}"> <jaxrs:serviceBeans> <ref bean="rest" /> </jaxrs:serviceBeans> @@ -183,7 +215,8 @@ </jaxrs:providers> </jaxrs:server> - <jaxrs:server id="queryEndpoint" address="/oai" publishedEndpointUrl="${RS_ENDPOINT}"> + <jaxrs:server id="queryEndpoint" address="/oai" + publishedEndpointUrl="${RS_ENDPOINT}"> <jaxrs:serviceBeans> <ref bean="oai" /> </jaxrs:serviceBeans> diff --git a/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.dariah.properties b/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.dariah.properties index d0c1e94744e1d9da66c675ce6193752b66b81516..d361cc2610e5a880d6efff60d232b343fe7d93d6 100644 --- a/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.dariah.properties +++ b/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.dariah.properties @@ -2,7 +2,7 @@ ## ElasticSearch Endpoint ## ############################## -RS_ENDPOINT = http://trep.de.dariah.eu/oaipmh +RS_ENDPOINT = https://repository.de.dariah.eu/1.0/oaipmh ############################ ## ElasticSearch Config ## @@ -26,12 +26,12 @@ dariah = true ############################# RepositoryName = DARIAH-DE Repository -BaseUrl = http://trep.de.dariah.eu +BaseUrl = https://repository.de.dariah.eu/1.0/oaipmh/oai DeletedRecordInfo = NO EarliestDateStamp = 2011-06-11T02:32:40Z Granularity = YYYY_MM_DD_THH_MM_SS_Z ProtocolVersion = 2.0 -AdminMail = funk@sub.uni-goettingen.de +AdminMail = support@de.dariah.eu ###################### ## Field Settings ## diff --git a/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.textgrid.properties b/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.textgrid.properties index b5404bc7f0767fdcf8e2376bffae6b65e1a883c1..155cfca4ca2958aa4ec6e38d70ec700581bee929 100644 --- a/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.textgrid.properties +++ b/oaipmh-webapp/src/main/webapp/WEB-INF/oaipmh.textgrid.properties @@ -2,17 +2,17 @@ ## ElasticSearch Endpoint ## ############################## -RS_ENDPOINT = http://textgrid-esx1.gwdg.de/tgoaipmh +RS_ENDPOINT = https://textgridlab.org/1.0/tgoaipmh ############################ ## ElasticSearch Config ## ############################ elasticSearch.url = 127.0.0.1 -elasticSearch.port = 9302 -elasticSearch.clusterName = tg-esx1-dev-instance +elasticSearch.ports = 9202 9203 elasticSearch.index = textgrid-public elasticSearch.type = metadata +elasticSearch.itemLimit = 100 ######################## ## Project Choosing ## @@ -26,12 +26,12 @@ dariah = false ############################# RepositoryName = TextGrid Repository -BaseUrl = http://textgrid-esx1.gwdg.de +BaseUrl = https://textgridlab.org/1.0/tgoaipmh/oai DeletedRecordInfo = NO EarliestDateStamp = 2011-06-11T02:32:40Z Granularity = YYYY_MM_DD_THH_MM_SS_Z ProtocolVersion = 2.0 -AdminMail = funk@sub.uni-goettingen.de +AdminMail = support@de.dariah.eu ###################### ## Field Settings ##