Skip to content

Commit

Permalink
Merge pull request #37 from 52North/develop
Browse files Browse the repository at this point in the history
Merge develop
  • Loading branch information
bpross-52n authored Jul 16, 2019
2 parents 78a70c4 + 0290e59 commit 2fee920
Show file tree
Hide file tree
Showing 57 changed files with 3,750 additions and 238 deletions.
284 changes: 143 additions & 141 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,141 +1,143 @@
### https://raw.github.com/github/gitignore/master/Java.gitignore

*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


### https://raw.github.com/github/gitignore/master/Maven.gitignore

target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml


### https://raw.github.com/github/gitignore/master/Global/NetBeans.gitignore

nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/


### https://raw.github.com/github/gitignore/master/Global/Eclipse.gitignore

*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# PDT-specific
.buildpath

# sbteclipse plugin
.target

# TeXlipse plugin
.texlipse


### https://raw.github.com/github/gitignore/master/Global/Windows.gitignore

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk


### https://raw.github.com/github/gitignore/master/Global/Linux.gitignore

*~

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*


### https://raw.github.com/github/gitignore/master/Global/OSX.gitignore

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

webapp/logs/

### https://raw.github.com/github/gitignore/master/Java.gitignore

*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*


### https://raw.github.com/github/gitignore/master/Maven.gitignore

target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml


### https://raw.github.com/github/gitignore/master/Global/NetBeans.gitignore

nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/


### https://raw.github.com/github/gitignore/master/Global/Eclipse.gitignore

*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# PDT-specific
.buildpath

# sbteclipse plugin
.target

# TeXlipse plugin
.texlipse


### https://raw.github.com/github/gitignore/master/Global/Windows.gitignore

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk


### https://raw.github.com/github/gitignore/master/Global/Linux.gitignore

*~

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*


### https://raw.github.com/github/gitignore/master/Global/OSX.gitignore

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

webapp/logs/

logs/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java
sudo: false
install: true
script: mvn -fae -U -B clean install
script: mvn -fae -U -B clean install -Pintegration-test
jdk:
- openjdk8
- openjdk9
Expand Down
2 changes: 2 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ This project includes:
Java Architecture for XML Binding under CDDL 1.1 or GPL2 w/ CPE
Java Property Utility under The Apache Software License, Version 2.0
JavaBeans(TM) Activation Framework under COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
javaPS input/output handler under The Apache Software License, Version 2.0
javaps-test-processes under The Apache Software License, Version 2.0
javax.inject under The Apache Software License, Version 2.0
JCL 1.2 implemented over SLF4J under MIT License
Joda-Time under Apache 2
Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# javaPS
# javaPS [![Maven Central](https://img.shields.io/maven-central/v/org.n52.wps/javaPS.svg)](https://search.maven.org/search?q=g:org.n52.wps%20and%20a:webapp) [![Total alerts](https://img.shields.io/lgtm/alerts/g/52North/javaPS.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/52North/javaPS/alerts/) [![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/52North/javaPS.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/52North/javaPS/context:java)

## Description

Expand All @@ -16,7 +16,7 @@ javaPS implements the [OGC WPS specification, version 2.0](http://docs.opengeosp
* General Features
* Full java-based Open Source implementation.
* Pluggable framework for algorithms and XML data handling and processing frameworks
* Built upon the [iceland project](https://github.com/52North/iceland)
* Built upon the [arctic-sea project](https://github.com/52North/arctic-sea)
* Streaming de-/encoders for inputs and outputs

## License
Expand All @@ -25,8 +25,17 @@ This project is licensed under the Apache Software License, version 2.0.

## Changelog

* Changes since last release
* N/A First release
### New features ---

- Updated to arctic-sea v6
- Added Dockerfile

### Fixed issues ---

- Test if inputs are null, This can be the case for optional inputs
- Enabled storing of outputs encoded in base64
- Removed test algorithm
- Updated jackson-databind dependency

## Quick Start

Expand Down Expand Up @@ -78,4 +87,5 @@ https://52north.org/software/licensing/guidelines/
* GLUES
* TaMIS
* OGC Testbeds
* RIESGOS

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.n52.shetland.ogc.ows.OwsMetadata;
import org.n52.shetland.ogc.wps.InputOccurence;
import org.n52.shetland.ogc.wps.description.impl.BoundingBoxInputDescriptionImpl;
import org.n52.shetland.ogc.wps.description.impl.BoundingBoxInputDescriptionImpl.AbstractBuilder;
import org.n52.javaps.description.TypedBoundingBoxInputDescription;

public class TypedBoundingBoxInputDescriptionImpl extends BoundingBoxInputDescriptionImpl implements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,23 @@ private void persist(Path directory,

Encoder base64encoder = Base64.getEncoder();

OutputStream outputStream = base64encoder.wrap(new FileOutputStream(outputFile.toFile()));
IOUtils.copy(in, outputStream);
OutputStream outputStream = null;
OutputStream fileOutputStream = null;

try {
fileOutputStream = new FileOutputStream(outputFile
.toFile());

outputStream = base64encoder.wrap(fileOutputStream);
IOUtils.copy(in, outputStream);
} finally {
if (fileOutputStream != null) {
fileOutputStream.close();
}
if (outputStream != null) {
outputStream.close();
}
}
}

} else {
Expand Down
9 changes: 8 additions & 1 deletion engine/src/main/java/org/n52/javaps/utils/IOUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,14 @@ public static List<File> unzipAll(File file) throws IOException {

try (ZipInputStream zipInputStream = new ZipInputStream(new BufferedInputStream(new FileInputStream(file)))) {
while ((entry = zipInputStream.getNextEntry()) != null) {
entryFile = new File(tempDir, entry.getName());
String entryName = entry.getName();
if (entryName.isEmpty()) {
throw new IOException("Empty zip entry.");
}
entryFile = new File(tempDir, entryName);
if (!entryFile.toPath().normalize().startsWith(tempDir.toPath())) {
throw new IOException("Bad zip entry: " + entryName);
}
boolean created = entryFile.createNewFile();
if (!created) {
LOGGER.info("File already exists: " + entryFile.getAbsolutePath());
Expand Down
Loading

0 comments on commit 2fee920

Please sign in to comment.