Commit ceef66df authored by Stefan Funk's avatar Stefan Funk 🐧
Browse files

Merge branch 'release/10.3.0.30-DH' into main

parents 2f9bbf6c e5e86043
......@@ -24,8 +24,7 @@ node {
if (tgsnapshot) {
doDebSnapshot('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebSnapshot('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
}
else {
} else {
if (tgrelease) {
doDebRelease('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebRelease('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
......@@ -34,8 +33,7 @@ node {
if (dhsnapshot) {
doDebSnapshot('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebSnapshot('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
}
else {
} else {
if (dhrelease) {
doDebRelease('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebRelease('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
......
For releasing a new version, please have a look at the [DARIAH-DE Release Managmenet Page] (https://wiki.de.dariah.eu/display/DARIAH3/DARIAH-DE+Release+Management).
Specials in TG- and DH-crud releases are the following:
* Please set the **RELEASE** version to “x.y.z-TG" or x.y.z.DH“ for TextGrid or DARIAH-DE Crud Service releases. Depending on that only TG- or DH-crud RELEASE DEB packages will be deployed!
* Please set the **SNAPSHOT** version to “x.y.z-TG-SNAPSHOT“ or “x.y.z.DH-SNAPSHOT“ for TextGrid or DARIAH-DE Crud Service snapshots. Depending on that only TG- or DH-crud SNAPSHOT DEB packages will be deployed!
* Please do a “mvn clean package“ before committing and pushing to develop and master branches, versions in documentation will be filtered then and adapts to new versions.
......@@ -5,7 +5,7 @@
<parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>crud</artifactId>
<version>10.3.0.23-DH</version>
<version>10.3.0.30-DH</version>
</parent>
<artifactId>crud-base</artifactId>
<name>DARIAHDE :: CrudService :: Base</name>
......@@ -70,12 +70,17 @@
<dependency>
<groupId>info.textgrid.utils</groupId>
<artifactId>httpclients</artifactId>
<version>${common.httpclients.version}</version>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.utils</groupId>
<artifactId>esutils</artifactId>
<version>${common.esutils.version}</version>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>jpairtree</artifactId>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
......@@ -87,11 +92,6 @@
<artifactId>cxf-rt-rs-security-cors</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>org.springframework</groupId>
<artifactId>spring-web</artifactId>
......
......@@ -41,19 +41,19 @@ import org.apache.jena.rdf.model.ModelFactory;
import org.w3._1999._02._22_rdf_syntax_ns_.RdfType;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import info.textgrid.middleware.common.LTPUtils;
import info.textgrid.middleware.common.RDFConstants;
import info.textgrid.middleware.common.TextGridMimetypes;
import info.textgrid.namespaces.metadata.core._2010.GeneratedType.Warning;
import info.textgrid.namespaces.metadata.core._2010.MetadataContainerType;
import info.textgrid.namespaces.metadata.core._2010.RelationType;
import info.textgrid.namespaces.middleware.adaptormanager.AdaptorManager;
import info.textgrid.namespaces.middleware.tgcrud.common.CrudOperations;
import info.textgrid.namespaces.middleware.tgcrud.common.LTPUtils;
import info.textgrid.namespaces.middleware.tgcrud.common.RDFUtils;
import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
/*******************************************************************************
/**
* TODOLOG
*
*******************************************************************************
**
* CHANGELOG
*
* 2020-04-06 - Funk - Using new (and much faster) EXIF extraction method now.
......@@ -78,9 +78,9 @@ import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
*
* 2010-09-09 - Funk - First version.
*
******************************************************************************/
*/
/*******************************************************************************
/**
* <p>
* While the TG-crud takes care of all TextGrid metadata file changes (add Generated elements,
* owners, etc.), the Adaptor Manager is used to work with the content of the TextGrid data files:
......@@ -92,9 +92,9 @@ import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
*
* @author Stefan E. Funk, DAASI International GmbH
* @author Stefan E. Funk, SUB Göttingen
* @version 2020-04-06
* @version 2021-03-16
* @since 2010-09-09
******************************************************************************/
*/
public class TGCrudServiceAdaptorManager {
......@@ -298,7 +298,7 @@ public class TGCrudServiceAdaptorManager {
READING_INTO_MODEL + " (existing RDF): " + rdfWriterString);
try {
model.read(new StringReader(rdfWriterString), null, RDFUtils.RDF_XML);
model.read(new StringReader(rdfWriterString), null, RDFConstants.RDF_XML);
} catch (Exception e) {
e.printStackTrace();
}
......@@ -320,11 +320,11 @@ public class TGCrudServiceAdaptorManager {
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, METH,
READING_INTO_MODEL + " (EXIF triples): " + exifString);
model.read(new StringReader(exifString), null, RDFUtils.NTRIPLES);
model.read(new StringReader(exifString), null, RDFConstants.NTRIPLES);
// Write model as RDF/XML into the StringWriter.
StringWriter rdfWriter = new StringWriter();
model.write(rdfWriter, RDFUtils.RDF_XML, null);
model.write(rdfWriter, RDFConstants.RDF_XML, null);
String rdfWriterString = rdfWriter.toString();
rdfWriter.close();
......@@ -396,7 +396,7 @@ public class TGCrudServiceAdaptorManager {
rdfWriter.close();
// Read the existing RDF into the model.
model.read(new StringReader(rdfWriterString), null, RDFUtils.RDF_XML);
model.read(new StringReader(rdfWriterString), null, RDFConstants.RDF_XML);
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, METH,
"RDF/XML read into Jena model: " + rdfWriter.toString());
......@@ -419,14 +419,14 @@ public class TGCrudServiceAdaptorManager {
n3Writer.close();
// Read the QName triples into the model.
model.read(new StringReader(n3WriterString), null, RDFUtils.NTRIPLES);
model.read(new StringReader(n3WriterString), null, RDFConstants.NTRIPLES);
TGCrudServiceUtilities.serviceLog(CrudService.DEBUG, METH,
"NTRIPLES read into the Jena model: " + n3WriterString);
// Write model as RDF/XML into the StringWriter.
StringWriter rdfWriter = new StringWriter();
model.write(rdfWriter, RDFUtils.RDF_XML, null);
model.write(rdfWriter, RDFConstants.RDF_XML, null);
String rdfWriterString = rdfWriter.toString();
rdfWriter.close();
......
......@@ -50,7 +50,7 @@ import info.textgrid.namespaces.metadata.core._2010.ObjectType;
import info.textgrid.namespaces.middleware.adaptormanager.AdaptorManager;
import info.textgrid.namespaces.middleware.tgauth_crud.TgCrudCheckAccessResponse;
import info.textgrid.namespaces.middleware.tgcrud.common.CrudOperations;
import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
import info.textgrid.middleware.common.TextGridMimetypes;
/**
* TODOLOG
......
......@@ -38,36 +38,49 @@ import org.xml.sax.SAXException;
import org.xmlpull.v1.XmlPullParserException;
import info.textgrid.middleware.common.elasticsearch.ESJsonBuilder;
import info.textgrid.namespaces.metadata.core._2010.MetadataContainerType;
import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
import info.textgrid.middleware.common.TextGridMimetypes;
/*******************************************************************************
/**
* TODOLOG
*
*******************************************************************************
**
* CHANGELOG
*
* 2016-01-29 Funk Commented out projectfile handling, esutils is not supporting that anymore!
* 2015-08-13 Funk Added ADM and TECH metadata methods. 2014-05-23 Funk Adapted to new ESUtils
* version 0.6.0. 2014-05-08 Funk Added JSON debugging logging. Removed ElasticSearchException due
* to version change to 1.0.1. 2013-12-11 Funk Removed some Exceptions due to Sonar hints. Mostly
* RuntimeExceptions... 2013-10-23 Funk Added public method for adding key/value pairs (mainly for
* setting the nearlyPublish flag in ElasticSearch). 2013-10-08 Funk Adapted to new ESUtils class,
* some minor class refactored. 2013-09-24 Funk Added more logging and error handling. 2013-09-23
* Funk Preparing for the new ElasticSearch code. 2013-06-19 Funk Added some test code for testing
* the ElasticSearch utilities. 2013-05-22 Funk Copied from TGCrudServiceStorageExistImpl.
* 2016-01-29 - Funk - Commented out projectfile handling, esutils is not supporting that anymore!
*
******************************************************************************/
* 2015-08-13 - Funk - Added ADM and TECH metadata methods.
*
* 2014-05-23 - Funk - Adapted to new ESUtils version 0.6.0.
*
* 2014-05-08 - Funk - Added JSON debugging logging. Removed ElasticSearchException due to version
* change to 1.0.1.
*
* 2013-12-11 - Funk - Removed some Exceptions due to Sonar hints. Mostly RuntimeExceptions...
*
* 2013-10-23 - Funk - Added public method for adding key/value pairs (mainly for setting the
* nearlyPublish flag in ElasticSearch).
*
* 2013-10-08 - Funk Adapted to new ESUtils class, some minor class refactored.
*
* 2013-09-24 - Funk - Added more logging and error handling.
*
* 2013-09-23 - Funk - Preparing for the new ElasticSearch code.
*
* 2013-06-19 - Funk - Added some test code for testing the ElasticSearch utilities.
*
* 2013-05-22 - Funk - Copied from TGCrudServiceStorageExistImpl.
*/
/*******************************************************************************
/**
* <p>
* This storage implementation grants CRUD operations to the TextGrid ElasticSearch database.
* </p>
*
* @author Stefan E. Funk, DAASI International GmbH
* @author Fatih Berber, GWDG
* @version 2015-08-13
* @version 2021-03-16
* @since 2010-09-09
******************************************************************************/
*/
public class TGCrudServiceStorageElasticSearchImpl extends CrudStorageAbs<MetadataContainerType> {
......@@ -809,6 +822,7 @@ public class TGCrudServiceStorageElasticSearchImpl extends CrudStorageAbs<Metada
* @throws SAXException
* @throws ParserConfigurationException
*/
@SuppressWarnings("resource")
private void init() throws TransformerConfigurationException, IoFault, SAXException,
ParserConfigurationException {
......
/*******************************************************************************
* This software is copyright (c) 2017 by
*
*
* - TextGrid Consortium (http://www.textgrid.de)
* - DAASI International GmbH (http://www.daasi.de)
*
......@@ -20,8 +20,8 @@
package info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice;
import info.textgrid.namespaces.metadata.core._2010.MetadataContainerType;
import info.textgrid.namespaces.middleware.tgcrud.common.JPairtree;
import info.textgrid.namespaces.middleware.tgcrud.common.TextGridMimetypes;
import info.textgrid.middleware.common.JPairtree;
import info.textgrid.middleware.common.TextGridMimetypes;
import info.textgrid.utils.existclient.ExistClient;
import info.textgrid.utils.existclient.ExistStatusCodes;
import info.textgrid.utils.httpclient.TGHttpResponse;
......@@ -38,12 +38,12 @@ import org.apache.cxf.helpers.IOUtils;
/*******************************************************************************
* TODOLOG
*
*
*******************************************************************************
* CHANGELOG
*
*
* 2015-08-13 Funk Added ADM and TECH metadata methods.
* 2015-02-11 Funk Using Mail ByteArrayDataSource now, instead of Axiom!
* 2015-02-11 Funk Using Mail ByteArrayDataSource now, instead of Axiom!
* 2014-10-30 Funk Adapted to new tgcrud-common package.
* 2013-09-19 Funk Fixed TG-2044: NPE at eXist error.
* 2013-05-22 Funk Removed the deprecated getLatestRevision method.
......@@ -58,7 +58,7 @@ import org.apache.cxf.helpers.IOUtils;
* 2011-02-01 Funk Fixed Bug TG-1091.
* 2011-01-15 Funk Delete now deletes aggregation data, too.
* 2010-09-09 Funk First version.
*
*
******************************************************************************/
/*******************************************************************************
......@@ -66,10 +66,10 @@ import org.apache.cxf.helpers.IOUtils;
* This storage implementation grants CRUD operations to the TextGrid eXist XML
* database.
* </p>
*
*
* TODO Use only one ExistClient, do not instantiate a new one for every eXist
* database access.
*
*
* @author Stefan E. Funk, DAASI International GmbH
* @version 2015-08-13
* @since 2010-09-09
......@@ -106,7 +106,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #
* create(info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
......@@ -161,7 +161,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage
* #createMetadata(info.textgrid.namespaces.middleware.tgcrud.services.
......@@ -208,7 +208,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #
* delete(info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
......@@ -269,7 +269,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage
* #deleteMetadata(info.textgrid.namespaces.middleware.tgcrud.services.
......@@ -283,7 +283,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #getLatestRevision(java.net.URI, boolean)
*/
......@@ -295,7 +295,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #getLatestRevisionPublic(java.net.URI, boolean)
*/
......@@ -307,7 +307,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieve(java.net.URI)
*/
......@@ -319,7 +319,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrievePublic(java.net.URI)
*/
......@@ -331,7 +331,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieveMetadata(java.net.URI)
*/
......@@ -363,7 +363,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieveMetadataPublic(java.net.URI)
*/
......@@ -396,7 +396,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieveAdmMD(java.net.URI)
*/
......@@ -407,7 +407,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieveAdmMDPublic(java.net.URI)
*/
......@@ -419,7 +419,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieveTechMD(java.net.URI)
*/
......@@ -430,7 +430,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #retrieveTechMDPublic(java.net.URI)
*/
......@@ -441,7 +441,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #
* update(info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
......@@ -455,7 +455,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage
* #updateMetadata(info.textgrid.namespaces.middleware.tgcrud.services.
......@@ -503,7 +503,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #move(java.net.URI)
*/
......@@ -514,7 +514,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #copy(java.net.URI)
*/
......@@ -525,7 +525,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #addKeyValuePair(java.net.URI, java.lang.String,
* java.lang.Object)
......@@ -538,7 +538,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage #resolve(java.net.URI)
*/
......@@ -549,7 +549,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage#create(info.textgrid.namespaces.middleware.tgcrud.services.
* tgcrudservice.CrudObject, java.lang.String)
......@@ -562,7 +562,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage#deletePublic(info.textgrid.namespaces.middleware.tgcrud.
* services.tgcrudservice.CrudObject)
......@@ -575,7 +575,7 @@ public class TGCrudServiceStorageExistImpl
/*
* (non-Javadoc)
*
*
* @see info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice.
* CrudStorage#deleteMetadataPublic(info.textgrid.namespaces.middleware.
* tgcrud.services.tgcrudservice.CrudObject)
......@@ -594,11 +594,11 @@ public class TGCrudServiceStorageExistImpl
* <p>
* Stores an input stream anywhere in the eXist database using REST.
* </p>
*
*
* <p>
* http://exist.sourceforge.net/devguide_rest.html
* </p>
*
*
* @param theUri
* @param theDatabasePath
* @param theData
......@@ -655,10 +655,10 @@ public class TGCrudServiceStorageExistImpl
* <p>
* Removes the given documents from the eXist database.
* </p>
*
*
* TODO Maybe use better the DELETE from the eXist client, for Ubbo do not
* want to use the delete SQL script!
*
*
* @param theDatabasePathCommaSeparatedListString
* @return The HTTP status code.
* @throws IoFault
......@@ -709,9 +709,9 @@ public class TGCrudServiceStorageExistImpl
* <p>
* Gets a TextGrid metadata document from the XML database by URI.
* </p>
*
*
* TODO Use InputStream for response body and return ObjectType??
*
*
* @param theDatabasePath
* @param theUri
* @param isPublic
......
......@@ -40,8 +40,8 @@ import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.CountingOutputStream;
import info.textgrid.namespaces.metadata.core._2010.MetadataContainerType;
import info.textgrid.namespaces.middleware.tgcrud.common.JPairtree;
import info.textgrid.namespaces.middleware.tgcrud.common.LTPUtils;
import info.textgrid.middleware.common.JPairtree;
import info.textgrid.middleware.common.LTPUtils;
/**
* CHANGELOG
......
......@@ -661,6 +661,7 @@ public class TGCrudServiceUtilities extends CrudServiceUtilities {
* @return The storage implementation.
* @throws IoFault
*/
@SuppressWarnings("unchecked")
private static CrudStorageAbs<MetadataContainerType> getStorageImplementation(
CrudServiceConfigurator theConfiguration, String theClassName) throws IoFault {
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>crud</artifactId>
<version>10.3.0.23-DH</version>
<version>10.3.0.30-DH</version>
</parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>crud-common</artifactId>
......@@ -17,6 +17,11 @@
<artifactId>jena-core</artifactId>
<version>${jena.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>const</artifactId>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
......@@ -50,7 +55,7 @@
<dependency>