Commit 365e21e8 authored by Stefan Funk's avatar Stefan Funk 🐧
Browse files

Merge branch 'release/11.0.0-DH-RELEASE'

parents ddfa477b 2fe1c87f
CHANGES 2020-06-18
==================
11.0.0-SNAPSHOT
===============
- increase CXF version to 3.3.6
- allowing BagIt 1.0 in RDAResearchDataRepositoryInteropWG new bagit-profile version 0.2
* Merge feature/elastic6
CHANGES in version 9.8.2
========================
10.6.3-ES6-SNAPSHOT
===================
- added RESTful method #recache for DH-crud only (for the moment)
- increased CXF to version 3.2.8
* Fix #35572: TG-crud shall deliver filenames and mimetype as HTML headers
* Fix #35026: Check if dir exists before creating it using .mkdirs()
CHANGES in version 9.4.1
========================
10.4.0-ES6-SNAPSHOT
===================
- dhcrud: added Matomo support for DARIAH-DE Repository index and landing pages
* Increase CXF version to 3.3.9
* Adapt dhcrud classes and config files to ES6
10.3.0.1-DH
===========
* Remove client folder and added online tests to crudclient-online module
10.2.5.7-SNAPSHOT
=================
* Increase CXF version to 3.3.6
* Allowing BagIt 1.0 in RDAResearchDataRepositoryInteropWG new bagit-profile version 0.2
9.8.2
=====
* Add RESTful method #recache for DH-crud only (for the moment)
* Increase CXF to version 3.2.8
9.4.1
=====
* Add Matomo support for DARIAH-DE Repository index and landing pages (dhcrud)
......@@ -16,28 +16,23 @@ node {
stage('Publish') {
def pom = readMavenPom file: 'pom.xml'
def pVersion = pom.version
def tgsnapshot = pVersion.contains("TG-SNAPSHOT")
def dhsnapshot = pVersion.contains("DH-SNAPSHOT")
def tgrelease = pVersion.contains("TG")
def dhrelease = pVersion.contains("DH")
def snapshot = pVersion.contains("SNAPSHOT")
def tgrelease = pVersion.contains("TG-RELEASE")
def dhrelease = pVersion.contains("DH-RELEASE")
if (tgsnapshot) {
if (snapshot) {
doDebSnapshot('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebSnapshot('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
} else {
if (tgrelease) {
doDebRelease('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebRelease('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
}
}
if (dhsnapshot) {
doDebSnapshot('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebSnapshot('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
} else {
if (dhrelease) {
doDebRelease('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebRelease('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
}
}
if (tgrelease) {
doDebRelease('tgcrud-webapp', 'tgcrud-webapp/target', pVersion)
doDebRelease('tgcrud-webapp-public', 'tgcrud-webapp-public/target', pVersion)
}
if (dhrelease) {
doDebRelease('dhcrud-webapp', 'dhcrud-webapp/target', pVersion)
doDebRelease('dhcrud-webapp-public', 'dhcrud-webapp-public/target', pVersion)
}
}
}
......@@ -5,7 +5,7 @@
<parent>
<groupId>info.textgrid.middleware</groupId>
<artifactId>crud</artifactId>
<version>10.0.3.49.1-DOC</version>
<version>11.0.0-DH-RELEASE</version>
</parent>
<artifactId>crud-base</artifactId>
<name>DARIAHDE :: CrudService :: Base</name>
......@@ -27,11 +27,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>crud-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>tgauth-client</artifactId>
......@@ -77,14 +72,19 @@
<artifactId>esutils</artifactId>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>const</artifactId>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>info.textgrid.middleware</groupId>
<artifactId>jpairtree</artifactId>
<version>${common.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
......@@ -92,6 +92,11 @@
<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>
......@@ -151,7 +156,7 @@
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<dependencies>
<!-- Xerces comes from Jena and seems not to work with this plugin,
<!-- Xerces comes from Jena and seems not to work with this plugin,
please see https://issues.apache.org/jira/browse/CXF-5106 -->
<dependency>
<groupId>xerces</groupId>
......
/*******************************************************************************
* This software is copyright (c) 2017 by
/**
* This software is copyright (c) 2020 by
*
* - TextGrid Consortium (http://www.textgrid.de)
* - DAASI International GmbH (http://www.daasi.de)
* TextGrid Consortium (https://textgrid.de)
*
* DAASI International GmbH (https://daasi.de)
*
* This is free software. You can redistribute it and/or modify it under the
* terms described in the GNU Lesser General Public License v3 of which you
* should have received a copy. Otherwise you can download it from
* This is free software. You can redistribute it and/or modify it under the terms described in the
* GNU Lesser General Public License v3 of which you should have received a copy. Otherwise you can
* download it from
*
* http://www.gnu.org/licenses/lgpl-3.0.txt
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* @copyright TextGrid Consortium (http://www.textgrid.de)
* @copyright DAASI International GmbH (http://www.daasi.de)
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public
* License v3
* @copyright TextGrid Consortium (https://textgrid.de)
* @copyright DAASI International GmbH (https://daasi.de)
* @license GNU Lesser General Public License v3 (http://www.gnu.org/licenses/lgpl-3.0.txt)
* @author Stefan E. Funk (stefan.e.funk@daasi.de)
******************************************************************************/
*/
package info.textgrid.namespaces.middleware.tgcrud.services.tgcrudservice;
......@@ -24,330 +24,335 @@ import java.net.URL;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import javax.activation.DataHandler;
/*******************************************************************************
/**
* TODOLOGS
*
* TODO Some of the attributes must still be generalised with the TextGrid
* object, such as createdDate and LastModifiedDate. We want all this
* to be handled by the admMD object of GeneratedType.
* TODO Some of the attributes must still be generalised with the TextGrid object, such as
* createdDate and LastModifiedDate. We want all this to be handled by the admMD object of
* GeneratedType.
*
*******************************************************************************
**
* CHANGELOG
*
* 2017-09-26 Funk Added abstract method isCollection.
* 2017-09-07 Funk Added wrapper checksum getter and setter.
* 2015-10-23 Funk Added technical and provenance metadata.
* 2015-10-20 Funk Added mimetype.
* 2015-08-07 Funk Refactored constructors to always need an URI.
* 2015-01-30 Funk Generalised from TGCrudTextGridObject.
*
******************************************************************************/
* 2020-06-16 - Funk - Add portal config file.
*
* 2017-09-26 - Funk - Add abstract method isCollection.
*
* 2017-09-07 - Funk - Add wrapper checksum getter and setter.
*
* 2015-10-23 - Funk - Add technical and provenance metadata.
*
* 2015-10-20 - Funk - Add mimetype.
*
* 2015-08-07 - Funk - Refactor constructors to always need an URI.
*
* 2015-01-30 - Funk- Generalise from TGCrudTextGridObject.
*/
/*******************************************************************************
/**
* <p>
* This generic object class just binds together a metadata object and a
* DataHandler for the storage interfaces.
* This generic object class just binds together a metadata object and a DataHandler for the storage
* interfaces.
* </p>
*
* @author Stefan E. Funk, DAASI International GmbH
* @version 2017-09-07
* @version 2020-06-19
* @since 2015-01-30
******************************************************************************/
public abstract class CrudObject<T> {
// **
// STATIC FINALS
// **
protected static final int BASELINE_DATA = 1;
protected static final int AGGREGATION_DATA = 2;
protected static final int ORIGINAL_DATA = 3;
protected static final int BINARY_DATA = 4;
protected static final int RDF_DATA = 5;
protected static final int PROJECTFILE_DATA = 6;
// **
// INSTANCE VARIABLES
// **
private URI uri = null;
private DataHandler data = null;
private List<String> relations = null;
private int kindOfData = BINARY_DATA;
private T metadata = null;
private T admMD = null;
private String techMD = null;
private String provMD = null;
private URL location = null;
// **
// CONSTRUCTORS
// **
/**
* @param theUri
*/
public CrudObject(URI theUri) {
this.uri = theUri;
}
// **
// GETTERS AND SETTERS
// **
/**
* @return The URI
*/
public URI getUri() {
return this.uri;
}
/**
* @param theUri
*/
public void setUri(URI theUri) {
this.uri = theUri;
}
/**
* @return The metadata object
*/
public T getMetadata() {
return this.metadata;
}
/**
* @param theMetadata
*/
public void setMetadata(T theMetadata) {
this.metadata = theMetadata;
}
/**
* @return The administrative metadata object.
*/
public T getAdmMD() {
return this.admMD;
}
/**
* @param theAdmMd
*/
public void setAdmMD(T theAdmMd) {
this.admMD = theAdmMd;
}
/**
* @return The technical metadata object.
*/
public String getTechMD() {
return this.techMD;
}
/**
* @param theTechMd
*/
public void setTechMD(String theTechMd) {
this.techMD = theTechMd;
}
/**
* @return The provenance metadata object.
*/
public String getProvMD() {
return this.provMD;
}
/**
* @param theProvMd
*/
public void setProvMD(String theProvMd) {
this.provMD = theProvMd;
}
/**
* @return The data handler.
*/
public DataHandler getData() {
return this.data;
}
/**
* @param theData
*/
public void setData(DataHandler theData) {
this.data = theData;
}
/**
* @return The relations of the object as a list of strings.
*/
public List<String> getRelations() {
return this.relations;
}
/**
* @param theRelations
*/
public void setRelations(List<String> theRelations) {
this.relations = theRelations;
}
/**
* @return The kind of data.
*/
public int getKindOfData() {
return this.kindOfData;
}
/**
* @param theKindOfData
*/
public void setKindOfData(int theKindOfData) {
this.kindOfData = theKindOfData;
}
/**
* @return The location of the resource.
*/
public URL getLocation() {
return this.location;
}
/**
* @param theLocation
*/
public void setLocation(URL theLocation) {
this.location = theLocation;
}
// **
// ABSTRACTS
// **
/**
* @return The file size
*/
public abstract long getFilesize();
/**
* @param theFilesize
*/
public abstract void setFilesize(long theFilesize);
/**
* @return The file size of the container holding data and metadata files
* (SIP, BAG, etc.).
*/
public abstract long getWrapperSize();
/**
* @param theWrapperSize
*/
public abstract void setWrapperSize(long theWrapperSize);
/**
* @return The checksum
*/
public abstract String getChecksum();
/**
* @param theChecksum
*/
public abstract void setChecksum(String theChecksum);
/**
* @return The checksum type
*/
public abstract String getChecksumType();
/**
* @param theChecksumType
*/
public abstract void setChecksumType(String theChecksumType);
/**
* @return The checksum origin
*/
public abstract String getChecksumOrigin();
/**
* @param theChecksumOrigin
*/
public abstract void setChecksumOrigin(String theChecksumOrigin);
/**
* @return The checksum
*/
public abstract String getWrapperChecksum();
/**
* @param theChecksum
*/
public abstract void setWrapperChecksum(String theChecksum);
/**
* @return The checksum type
*/
public abstract String getWrapperChecksumType();
/**
* @param theChecksumType
*/
public abstract void setWrapperChecksumType(String theChecksumType);
/**
* @return The checksum origin
*/
public abstract String getWrapperChecksumOrigin();
/**
* @param theChecksumOrigin
*/
public abstract void setWrapperChecksumOrigin(String theChecksumOrigin);
/**
* @return The creation date of the object.
* @throws ParseException
*/
public abstract Date getCreationDate() throws ParseException;
/**
* @param theDate
* @throws IoFault
*/
public abstract void setCreationDate(Date theDate) throws IoFault;
/**
* @return The lastModified date of the object.
* @throws ParseException
*/
public abstract Date getLastModifiedDate() throws ParseException;
/**
* @param theDate
* @throws IoFault
*/
public abstract void setLastModifiedDate(Date theDate) throws IoFault;
/**
* @return The mimetype of the object.
*/
public abstract String getMimetype();
/**
* @param theMimetype
* @throws IoFault
*/
public abstract void setMimetype(String theMimetype) throws IoFault;
/**
* @return Is object a collection? Or maybe not?
*/
public abstract boolean isCollection();
// **
// STATIC FINALS
// **
protected static final int BASELINE_DATA = 1;
protected static final int AGGREGATION_DATA = 2;
protected static final int ORIGINAL_DATA = 3;
protected static final int BINARY_DATA = 4;
protected static final int RDF_DATA = 5;
protected static final int PROJECTFILE_DATA = 6;
protected static final int PORTALCONFIG_DATA = 7;
// **
// INSTANCE VARIABLES
// **
private URI uri = null;
private DataHandler data = null;
private List<String> relations = null;
private int kindOfData = BINARY_DATA;
private T metadata = null;
private T admMD = null;
private String techMD = null;