Skip to content

Commit 4b55e10

Browse files
authored
Merge pull request #47 from 52North/develop
Merge develop
2 parents d8219ae + 9a15629 commit 4b55e10

39 files changed

+1002
-730
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,5 @@ Temporary Items
141141
webapp/logs/
142142

143143
logs/
144+
.idea/
145+
*.iml

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN mvn --batch-mode --errors --fail-fast \
1212

1313
FROM jetty:jre8
1414

15-
ARG JAVAPS_VERSION=1.3.0-SNAPSHOT
15+
ARG JAVAPS_VERSION=1.4.0-SNAPSHOT
1616
ENV JAVAPS_VERSION ${JAVAPS_VERSION}
1717
ENV JAVAPS_ROOT ${JETTY_BASE}/webapps/ROOT
1818
ENV JAVAPS_TMP ${JAVAPS_ROOT}/WEB-INF/tmp

alpine.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN mvn --batch-mode --errors --fail-fast \
1212

1313
FROM jetty:jre8-alpine
1414

15-
ARG JAVAPS_VERSION=1.3.0-SNAPSHOT
15+
ARG JAVAPS_VERSION=1.4.0-SNAPSHOT
1616
ENV JAVAPS_VERSION ${JAVAPS_VERSION}
1717
ENV JAVAPS_ROOT ${JETTY_BASE}/webapps/ROOT
1818
ENV JAVAPS_TMP ${JAVAPS_ROOT}/WEB-INF/tmp

engine/src/main/java/org/n52/javaps/algorithm/ProcessOutputs.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
*/
1717
package org.n52.javaps.algorithm;
1818

19+
import org.n52.javaps.io.Data;
20+
import org.n52.shetland.ogc.ows.OwsCode;
21+
1922
import java.util.HashMap;
2023
import java.util.Map;
2124

22-
import org.n52.shetland.ogc.ows.OwsCode;
23-
import org.n52.javaps.io.Data;
24-
2525
/**
2626
* TODO JavaDoc
2727
*
@@ -37,4 +37,8 @@ public ProcessOutputs(Map<? extends OwsCode, ? extends Data<?>> m) {
3737
super(m);
3838
}
3939

40+
public ProcessOutputs(int initialCapacity) {
41+
super(initialCapacity);
42+
}
43+
4044
}

engine/src/main/java/org/n52/javaps/algorithm/annotation/AnnotatedAlgorithmMetadata.java

Lines changed: 86 additions & 85 deletions
Large diffs are not rendered by default.

engine/src/main/java/org/n52/javaps/description/TypedBoundingBoxDescription.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
*
2626
* @author Christian Autermann
2727
*/
28-
public interface TypedBoundingBoxDescription extends BoundingBoxDescription, TypedDataDescription<Class<
29-
? extends BoundingBoxData>> {
28+
public interface TypedBoundingBoxDescription extends BoundingBoxDescription,
29+
TypedDataDescription<Class<? extends BoundingBoxData>> {
3030

3131
@Override
3232
default Class<?> getPayloadType() {

engine/src/main/java/org/n52/javaps/description/TypedDataDescription.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
*/
1717
package org.n52.javaps.description;
1818

19-
import org.n52.shetland.ogc.wps.description.DataDescription;
2019
import org.n52.javaps.io.Data;
20+
import org.n52.shetland.ogc.wps.description.DataDescription;
2121

2222
/**
23-
*
2423
* @author Christian Autermann
2524
*/
2625
public interface TypedDataDescription<X> extends DataDescription {
@@ -31,8 +30,8 @@ public interface TypedDataDescription<X> extends DataDescription {
3130

3231
Class<? extends Data<?>> getBindingType();
3332

34-
interface Builder<X, T extends TypedDataDescription<X>, B extends Builder<X, T, B>> extends DataDescription.Builder<
35-
T, B> {
33+
interface Builder<X, T extends TypedDataDescription<X>, B extends Builder<X, T, B>>
34+
extends DataDescription.Builder<T, B> {
3635
B withType(X type);
3736
}
3837

engine/src/main/java/org/n52/javaps/description/TypedGroupInputDescription.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,39 @@
1616
*/
1717
package org.n52.javaps.description;
1818

19+
import org.n52.javaps.algorithm.ProcessInputs;
20+
import org.n52.javaps.io.Data;
21+
import org.n52.javaps.io.GroupInputData;
1922
import org.n52.shetland.ogc.wps.description.GroupInputDescription;
2023

2124
/**
22-
*
2325
* @author Christian Autermann
2426
*/
25-
public interface TypedGroupInputDescription extends GroupInputDescription, TypedProcessInputDescriptionContainer {
27+
public interface TypedGroupInputDescription extends GroupInputDescription, TypedProcessInputDescriptionContainer,
28+
TypedProcessInputDescription<Class<? extends Data<ProcessInputs>>> {
29+
30+
@Override
31+
default Class<? extends Data<ProcessInputs>> getType() {
32+
return GroupInputData.class;
33+
}
34+
35+
@Override
36+
default Class<?> getPayloadType() {
37+
return ProcessInputs.class;
38+
}
39+
40+
@Override
41+
default Class<? extends Data<?>> getBindingType() {
42+
return GroupInputData.class;
43+
}
44+
2645
@Override
2746
default TypedGroupInputDescription asGroup() {
2847
return this;
2948
}
3049

50+
interface Builder<T extends TypedGroupInputDescription, B extends Builder<T, B>>
51+
extends GroupInputDescription.Builder<T, B>,
52+
TypedProcessInputDescriptionContainer.Builder<T, B> {
53+
}
3154
}

engine/src/main/java/org/n52/javaps/description/TypedGroupOutputDescription.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,41 @@
1616
*/
1717
package org.n52.javaps.description;
1818

19+
import org.n52.javaps.algorithm.ProcessOutputs;
20+
import org.n52.javaps.io.Data;
21+
import org.n52.javaps.io.GroupOutputData;
1922
import org.n52.shetland.ogc.wps.description.GroupOutputDescription;
2023

2124
/**
22-
*
2325
* @author Christian Autermann
2426
*/
25-
public interface TypedGroupOutputDescription extends GroupOutputDescription, TypedProcessOutputDescriptionContainer {
27+
public interface TypedGroupOutputDescription
28+
extends GroupOutputDescription, TypedProcessOutputDescriptionContainer,
29+
TypedProcessOutputDescription<Class<? extends Data<ProcessOutputs>>> {
30+
31+
@Override
32+
default Class<? extends Data<ProcessOutputs>> getType() {
33+
return GroupOutputData.class;
34+
}
35+
36+
@Override
37+
default Class<?> getPayloadType() {
38+
return ProcessOutputs.class;
39+
}
40+
41+
@Override
42+
default Class<? extends Data<?>> getBindingType() {
43+
return GroupOutputData.class;
44+
}
45+
2646
@Override
2747
default TypedGroupOutputDescription asGroup() {
2848
return this;
2949
}
3050

51+
interface Builder<T extends TypedGroupOutputDescription, B extends Builder<T, B>>
52+
extends GroupOutputDescription.Builder<T, B>,
53+
TypedProcessOutputDescriptionContainer.Builder<T, B> {
54+
}
55+
3156
}

engine/src/main/java/org/n52/javaps/description/TypedProcessDescription.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@
2323
*
2424
* @author Christian Autermann
2525
*/
26-
public interface TypedProcessDescription extends ProcessDescription, TypedProcessInputDescriptionContainer,
27-
TypedProcessOutputDescriptionContainer {
26+
public interface TypedProcessDescription extends ProcessDescription,
27+
TypedProcessInputDescriptionContainer,
28+
TypedProcessOutputDescriptionContainer {
29+
30+
interface Builder<T extends TypedProcessDescription, B extends Builder<T, B>>
31+
extends ProcessDescription.Builder<T, B>,
32+
TypedProcessInputDescriptionContainer.Builder<T, B>,
33+
TypedProcessOutputDescriptionContainer.Builder<T, B> {
34+
35+
}
2836

2937
}

engine/src/main/java/org/n52/javaps/description/TypedProcessInputDescriptionContainer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
*/
1717
package org.n52.javaps.description;
1818

19-
import java.util.Collection;
20-
2119
import org.n52.shetland.ogc.ows.OwsCode;
2220
import org.n52.shetland.ogc.wps.description.ProcessInputDescriptionContainer;
2321

22+
import java.util.Collection;
23+
2424
/**
25-
*
2625
* @author Christian Autermann
2726
*/
2827
public interface TypedProcessInputDescriptionContainer extends ProcessInputDescriptionContainer {
@@ -37,4 +36,6 @@ default TypedProcessInputDescription<?> getInput(String id) {
3736
@Override
3837
Collection<? extends TypedProcessInputDescription<?>> getInputDescriptions();
3938

39+
interface Builder<T extends TypedProcessInputDescriptionContainer, B extends Builder<T, B>>
40+
extends ProcessInputDescriptionContainer.Builder<T, B> {}
4041
}

engine/src/main/java/org/n52/javaps/description/TypedProcessOutputDescriptionContainer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
*/
1717
package org.n52.javaps.description;
1818

19-
import java.util.Collection;
20-
2119
import org.n52.shetland.ogc.ows.OwsCode;
2220
import org.n52.shetland.ogc.wps.description.ProcessOutputDescriptionContainer;
2321

22+
import java.util.Collection;
23+
2424
/**
25-
*
2625
* @author Christian Autermann
2726
*/
2827
public interface TypedProcessOutputDescriptionContainer extends ProcessOutputDescriptionContainer {
@@ -36,4 +35,7 @@ default TypedProcessOutputDescription<?> getOutput(String id) {
3635

3736
@Override
3837
Collection<? extends TypedProcessOutputDescription<?>> getOutputDescriptions();
38+
39+
interface Builder<T extends TypedProcessOutputDescriptionContainer, B extends Builder<T, B>>
40+
extends ProcessOutputDescriptionContainer.Builder<T, B> {}
3941
}

engine/src/main/java/org/n52/javaps/description/impl/TypedBoundingBoxInputDescriptionImpl.java

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,43 @@
1616
*/
1717
package org.n52.javaps.description.impl;
1818

19-
import java.util.Set;
20-
21-
import org.n52.shetland.ogc.ows.OwsCRS;
22-
import org.n52.shetland.ogc.ows.OwsCode;
23-
import org.n52.shetland.ogc.ows.OwsKeyword;
24-
import org.n52.shetland.ogc.ows.OwsLanguageString;
25-
import org.n52.shetland.ogc.ows.OwsMetadata;
26-
import org.n52.shetland.ogc.wps.InputOccurence;
27-
import org.n52.shetland.ogc.wps.description.impl.BoundingBoxInputDescriptionImpl;
2819
import org.n52.javaps.description.TypedBoundingBoxInputDescription;
20+
import org.n52.shetland.ogc.wps.description.BoundingBoxInputDescription;
21+
import org.n52.shetland.ogc.wps.description.ProcessDescriptionBuilderFactory;
22+
import org.n52.shetland.ogc.wps.description.impl.BoundingBoxInputDescriptionImpl;
2923

30-
public class TypedBoundingBoxInputDescriptionImpl extends BoundingBoxInputDescriptionImpl implements
31-
TypedBoundingBoxInputDescription {
24+
public class TypedBoundingBoxInputDescriptionImpl extends BoundingBoxInputDescriptionImpl
25+
implements TypedBoundingBoxInputDescription {
3226

33-
public TypedBoundingBoxInputDescriptionImpl(OwsCode id, OwsLanguageString title, OwsLanguageString abstrakt, Set<
34-
OwsKeyword> keywords, Set<OwsMetadata> metadata, InputOccurence occurence, OwsCRS defaultCRS, Set<
35-
OwsCRS> supportedCRS) {
36-
super(id, title, abstrakt, keywords, metadata, occurence, defaultCRS, supportedCRS);
27+
protected TypedBoundingBoxInputDescriptionImpl(AbstractBuilder<?, ?> builder) {
28+
super(builder);
3729
}
3830

39-
protected TypedBoundingBoxInputDescriptionImpl(AbstractBuilder<?, ?> builder) {
40-
this(builder.getId(), builder.getTitle(), builder.getAbstract(), builder.getKeywords(), builder.getMetadata(),
41-
new InputOccurence(builder.getMinimalOccurence(), builder.getMaximalOccurence()), builder
42-
.getDefaultCRS(), builder.getSupportedCRS());
31+
protected abstract static class AbstractBuilder<T extends TypedBoundingBoxInputDescription,
32+
B extends AbstractBuilder<T, B>>
33+
extends BoundingBoxInputDescriptionImpl.AbstractBuilder<T, B>
34+
implements TypedBoundingBoxInputDescription.Builder<T, B> {
35+
protected AbstractBuilder(ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory,
36+
BoundingBoxInputDescription entity) {
37+
super(factory, entity);
38+
}
39+
40+
protected AbstractBuilder(
41+
ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory) {
42+
super(factory);
43+
}
4344
}
4445

4546
public static class Builder extends AbstractBuilder<TypedBoundingBoxInputDescription, Builder> {
47+
protected Builder(ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory,
48+
BoundingBoxInputDescription entity) {
49+
super(factory, entity);
50+
}
51+
52+
protected Builder(ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory) {
53+
super(factory);
54+
}
55+
4656
@Override
4757
public TypedBoundingBoxInputDescription build() {
4858
return new TypedBoundingBoxInputDescriptionImpl(this);

engine/src/main/java/org/n52/javaps/description/impl/TypedBoundingBoxOutputDescriptionImpl.java

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,47 @@
1616
*/
1717
package org.n52.javaps.description.impl;
1818

19-
import java.util.Set;
20-
21-
import org.n52.shetland.ogc.ows.OwsCRS;
22-
import org.n52.shetland.ogc.ows.OwsCode;
23-
import org.n52.shetland.ogc.ows.OwsKeyword;
24-
import org.n52.shetland.ogc.ows.OwsLanguageString;
25-
import org.n52.shetland.ogc.ows.OwsMetadata;
26-
import org.n52.shetland.ogc.wps.description.impl.BoundingBoxOutputDescriptionImpl;
2719
import org.n52.javaps.description.TypedBoundingBoxOutputDescription;
20+
import org.n52.shetland.ogc.wps.description.BoundingBoxOutputDescription;
21+
import org.n52.shetland.ogc.wps.description.ProcessDescriptionBuilderFactory;
22+
import org.n52.shetland.ogc.wps.description.impl.BoundingBoxOutputDescriptionImpl;
2823

29-
public class TypedBoundingBoxOutputDescriptionImpl extends BoundingBoxOutputDescriptionImpl implements
30-
TypedBoundingBoxOutputDescription {
31-
32-
public TypedBoundingBoxOutputDescriptionImpl(OwsCode id, OwsLanguageString title, OwsLanguageString abstrakt, Set<
33-
OwsKeyword> keywords, Set<OwsMetadata> metadata, OwsCRS defaultCRS, Set<OwsCRS> supportedCRS) {
34-
super(id, title, abstrakt, keywords, metadata, defaultCRS, supportedCRS);
35-
}
24+
public class TypedBoundingBoxOutputDescriptionImpl extends BoundingBoxOutputDescriptionImpl
25+
implements TypedBoundingBoxOutputDescription {
3626

3727
protected TypedBoundingBoxOutputDescriptionImpl(AbstractBuilder<?, ?> builder) {
38-
this(builder.getId(), builder.getTitle(), builder.getAbstract(), builder.getKeywords(), builder.getMetadata(),
39-
builder.getDefaultCRS(), builder.getSupportedCRS());
28+
super(builder);
4029
}
4130

42-
public abstract static class AbstractBuilder<T extends TypedBoundingBoxOutputDescription, B extends AbstractBuilder<
43-
T, B>> extends BoundingBoxOutputDescriptionImpl.AbstractBuilder<T, B> implements
44-
TypedBoundingBoxOutputDescription.Builder<T, B> {
31+
protected abstract static class AbstractBuilder<T extends TypedBoundingBoxOutputDescription,
32+
B extends AbstractBuilder<T, B>>
33+
extends BoundingBoxOutputDescriptionImpl.AbstractBuilder<T, B>
34+
implements TypedBoundingBoxOutputDescription.Builder<T, B> {
35+
protected AbstractBuilder(ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory,
36+
BoundingBoxOutputDescription entity) {
37+
super(factory, entity);
38+
}
39+
40+
protected AbstractBuilder(
41+
ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory) {
42+
super(factory);
43+
}
4544
}
4645

4746
public static class Builder extends AbstractBuilder<TypedBoundingBoxOutputDescription, Builder> {
47+
protected Builder(ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory,
48+
BoundingBoxOutputDescription entity) {
49+
super(factory, entity);
50+
}
51+
52+
protected Builder(ProcessDescriptionBuilderFactory<?, ?, ?, ?, ?, ?, ?, ?, ?, ?> factory) {
53+
super(factory);
54+
}
55+
4856
@Override
4957
public TypedBoundingBoxOutputDescription build() {
5058
return new TypedBoundingBoxOutputDescriptionImpl(this);
5159
}
52-
5360
}
5461

5562
}

0 commit comments

Comments
 (0)