observer);
-
- /**
- * The context observation for this scope. When an observation scope is created, this is null
- * and must be set using {@link #within(IDirectObservation)} on the parent scope.
- *
- * @return
- */
- IDirectObservation getContextObservation();
-
- /**
- * Return a scope focused on a specific root observation as the context for its
- * {@link #observe(Object...)} calls.
- *
- * @param observation
- * @return a new scope focused on the passed observation.
- */
- IContextScope within(IDirectObservation observation);
-
- /**
- * Return a new observation scope that sets the passed scenarios for any future observation.
- *
- * @param scenarios
- * @return
- */
- IContextScope withScenarios(String... scenarios);
-
- /**
- * Make an observation. Must be called on a context scope, possibly focused on a given root
- * observation using {@link #within(IDirectObservation)}. If no root observation is present in
- * the scope, the arguments must fully specify a subject, either through an
- * {@link IAcknowledgement} or a subject observable + a scale. If the parent session was focused
- * on a scale, this is available through {@link #getGeometry()} and the context can decide to
- * use it as a scale for the root subject.
- *
- * In case the observable specifies a relationship, k.LAB will attempt to instantiate it,
- * observing its source/target endpoints as well, unless two subject observations are passed, in
- * which case a specified relationship will be instantiated between them using them as source
- * and target respectively. In the latter case, each relationship will be resolved but
- * configuration detection will only happen upon exiting the scope where observe() is called.
- *
- * If the observation is at root level, or connecting two root-level subject through a
- * relationship, the overall geometry of the context will be automatically adjusted.
- *
- * @param observables either a {@link IObservable} (with a {@link IGeometry} if root subject) or
- * a {@link IAcknowledgement} for a pre-specified root subject.
- * @return a future for the observation being contextualized.
- */
- Future observe(Object... observables);
-
- /**
- *
- * getProvenance.
- *
- *
- * @return the provenance graph. Null in an empty context.
- */
- IProvenance getProvenance();
-
- /**
- * There is one report per root context. Actuators will add sections to it as models are
- * computed, based on the documentation templates associated with models and their parts. The
- * report can be compiled and rendered at any time.
- *
- * @return
- */
- IReport getReport();
-
- /**
- * During a contextualization there normally is a dataflow being run. This will only be null
- * only in special situations, e.g. when expressions are passed a convenience context in order
- * to be evaluated outside of contextualization.
- *
- * @return
- */
- IDataflow> getDataflow();
-
- /**
- * Return the parent observation of the passed observation. The runtime context maintains the
- * logical structure graph (ignores grouping of artifacts).
- *
- * @param observation
- * @return the parent, or null if root subject
- */
- IDirectObservation getParentOf(IObservation observation);
-
- /**
- * Return all children of the passed observation, using the logical structure (i.e. skipping
- * observation groups). The runtime context maintains the structure graph.
- *
- * @param observation an observation. {@link IState States} have no children but no error should
- * be raised.
- * @return the parent, or an empty collection if no children
- */
- Collection getChildrenOf(IObservation observation);
-
- /**
- * Inspect the network graph of the current context, returning all relationships that have the
- * passed subject as target.
- *
- * @param observation a {@link org.integratedmodelling.klab.api.observations.IDirectObservation}
- * object.
- * @return a {@link java.util.Collection} object.
- */
- Collection getOutgoingRelationships(IDirectObservation observation);
-
- /**
- * Inspect the network graph of the current context, returning all relationships that have the
- * passed subject as target.
- *
- * @param observation a {@link org.integratedmodelling.klab.api.observations.IDirectObservation}
- * object.
- * @return a {@link java.util.Collection} object.
- */
- Collection getIncomingRelationships(IDirectObservation observation);
-
-}
\ No newline at end of file
+//package org.integratedmodelling.klab.api.engine;
+//
+//import java.util.Collection;
+//import java.util.concurrent.Future;
+//
+//import org.integratedmodelling.klab.api.auth.IActorIdentity;
+//import org.integratedmodelling.klab.api.auth.IIdentity;
+//import org.integratedmodelling.klab.api.data.IGeometry;
+//import org.integratedmodelling.klab.api.documentation.IReport;
+//import org.integratedmodelling.klab.api.knowledge.IObservable;
+//import org.integratedmodelling.klab.api.model.IAcknowledgement;
+//import org.integratedmodelling.klab.api.observations.IDirectObservation;
+//import org.integratedmodelling.klab.api.observations.IObservation;
+//import org.integratedmodelling.klab.api.observations.IRelationship;
+//import org.integratedmodelling.klab.api.observations.IState;
+//import org.integratedmodelling.klab.api.provenance.IProvenance;
+//import org.integratedmodelling.klab.api.runtime.dataflow.IDataflow;
+//
+///**
+// * The scope for a context and any observations made within it.
+// *
+// * @author Ferd
+// *
+// */
+//public interface IContextScope extends ISessionScope {
+//
+// /**
+// * Return the observer for this context. The original observation scope has the session user as
+// * observer.
+// *
+// * @return
+// */
+// IIdentity getObserver();
+//
+// /**
+// * Return a child scope with the passed observer instead of ours.
+// *
+// * @param scenarios
+// * @return
+// */
+// IContextScope withObserver(IActorIdentity> observer);
+//
+// /**
+// * The context observation for this scope. When an observation scope is created, this is null
+// * and must be set using {@link #within(IDirectObservation)} on the parent scope.
+// *
+// * @return
+// */
+// IDirectObservation getContextObservation();
+//
+// /**
+// * Return a scope focused on a specific root observation as the context for its
+// * {@link #observe(Object...)} calls.
+// *
+// * @param observation
+// * @return a new scope focused on the passed observation.
+// */
+// IContextScope within(IDirectObservation observation);
+//
+// /**
+// * Return a new observation scope that sets the passed scenarios for any future observation.
+// *
+// * @param scenarios
+// * @return
+// */
+// IContextScope withScenarios(String... scenarios);
+//
+// /**
+// * Make an observation. Must be called on a context scope, possibly focused on a given root
+// * observation using {@link #within(IDirectObservation)}. If no root observation is present in
+// * the scope, the arguments must fully specify a subject, either through an
+// * {@link IAcknowledgement} or a subject observable + a scale. If the parent session was focused
+// * on a scale, this is available through {@link #getGeometry()} and the context can decide to
+// * use it as a scale for the root subject.
+// *
+// * In case the observable specifies a relationship, k.LAB will attempt to instantiate it,
+// * observing its source/target endpoints as well, unless two subject observations are passed, in
+// * which case a specified relationship will be instantiated between them using them as source
+// * and target respectively. In the latter case, each relationship will be resolved but
+// * configuration detection will only happen upon exiting the scope where observe() is called.
+// *
+// * If the observation is at root level, or connecting two root-level subject through a
+// * relationship, the overall geometry of the context will be automatically adjusted.
+// *
+// * @param observables either a {@link IObservable} (with a {@link IGeometry} if root subject) or
+// * a {@link IAcknowledgement} for a pre-specified root subject.
+// * @return a future for the observation being contextualized.
+// */
+// Future observe(Object... observables);
+//
+// /**
+// *
+// * getProvenance.
+// *
+// *
+// * @return the provenance graph. Null in an empty context.
+// */
+// IProvenance getProvenance();
+//
+// /**
+// * There is one report per root context. Actuators will add sections to it as models are
+// * computed, based on the documentation templates associated with models and their parts. The
+// * report can be compiled and rendered at any time.
+// *
+// * @return
+// */
+// IReport getReport();
+//
+// /**
+// * During a contextualization there normally is a dataflow being run. This will only be null
+// * only in special situations, e.g. when expressions are passed a convenience context in order
+// * to be evaluated outside of contextualization.
+// *
+// * @return
+// */
+// IDataflow> getDataflow();
+//
+// /**
+// * Return the parent observation of the passed observation. The runtime context maintains the
+// * logical structure graph (ignores grouping of artifacts).
+// *
+// * @param observation
+// * @return the parent, or null if root subject
+// */
+// IDirectObservation getParentOf(IObservation observation);
+//
+// /**
+// * Return all children of the passed observation, using the logical structure (i.e. skipping
+// * observation groups). The runtime context maintains the structure graph.
+// *
+// * @param observation an observation. {@link IState States} have no children but no error should
+// * be raised.
+// * @return the parent, or an empty collection if no children
+// */
+// Collection getChildrenOf(IObservation observation);
+//
+// /**
+// * Inspect the network graph of the current context, returning all relationships that have the
+// * passed subject as target.
+// *
+// * @param observation a {@link org.integratedmodelling.klab.api.observations.IDirectObservation}
+// * object.
+// * @return a {@link java.util.Collection} object.
+// */
+// Collection getOutgoingRelationships(IDirectObservation observation);
+//
+// /**
+// * Inspect the network graph of the current context, returning all relationships that have the
+// * passed subject as target.
+// *
+// * @param observation a {@link org.integratedmodelling.klab.api.observations.IDirectObservation}
+// * object.
+// * @return a {@link java.util.Collection} object.
+// */
+// Collection getIncomingRelationships(IDirectObservation observation);
+//
+//}
\ No newline at end of file
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IEngineService.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IEngineService.java
index b418bc3ee..eb4dcb6bc 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IEngineService.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IEngineService.java
@@ -1,109 +1,105 @@
-package org.integratedmodelling.klab.api.engine;
-
-import org.integratedmodelling.klab.api.actors.IBehavior;
-import org.integratedmodelling.klab.api.auth.IUserIdentity;
-import org.integratedmodelling.klab.api.data.IResource;
-import org.integratedmodelling.klab.api.data.adapters.IKlabData;
-import org.integratedmodelling.klab.api.knowledge.IObservable;
-import org.integratedmodelling.klab.api.model.IAcknowledgement;
-import org.integratedmodelling.klab.api.model.IModel;
-import org.integratedmodelling.klab.api.provenance.IArtifact;
-import org.integratedmodelling.klab.api.runtime.dataflow.IDataflow;
-
-/**
- * A redesign of the engine API and its subcomponents, eventually available as separate services.
- * Unimplemented and only for brainstorming at the moment.
- *
- * @author Ferd
- *
- */
-public interface IEngineService {
-
- /**
- *
- * @author Ferd
- *
- */
- interface ResourceManager {
-
- /**
- *
- * @param urn
- * @param scope
- * @return
- */
- IBehavior resolveBehavior(String urn, IScope scope);
-
- /**
- *
- * @param urn
- * @param scope
- * @return
- */
- IResource resolveResource(String urn, IScope scope);
-
- /**
- *
- * @param originalResource
- * @param scope
- * @return
- */
- IResource contextualize(IResource originalResource, IContextScope scope);
-
- /**
- *
- * @param contextualizedResource
- * @param scope
- * @return
- */
- IKlabData getData(IResource contextualizedResource, IScope scope);
-
- }
-
- interface Reasoner {
-
- }
-
- interface Resolver {
-
- /**
- * Resolve an observable in the passed scope, producing the dataflow that will make the
- * observation.
- *
- * @param observable an {@link IObservable}, {@link IAcknowledgement}, {@link IModel} or a
- * string resolving to one of those.
- * @param scope if not an {@link IAcknowledgement}, must have a specified geometry. If the
- * {@link IObservable} is not a subject, must have a set context observation.
- * @return the dataflow that will create the observation once run by a runtime.
- */
- IDataflow> resolve(Object observable, IContextScope scope);
-
- }
-
- interface Runtime {
-
- /**
- * Run the passed dataflow in the scale of the observer represented in the scope; return the
- * primary artifact.
- *
- * @param
- * @param dataflow
- * @param scope must be or procede from a context scope
- * @return
- */
- T run(IDataflow dataflow, IContextScope scope);
-
-
- }
-
- /**
- * Login through an authenticated user identity and return the root scope for that user. The
- * scope for the user should be stored: if the user was logged in previously, the previously
- * logged in scope should be returned..
- *
- * @param user
- * @return
- */
- IScope login(IUserIdentity user);
-
-}
+//package org.integratedmodelling.klab.api.engine;
+//
+//import org.integratedmodelling.klab.api.actors.IBehavior;
+//import org.integratedmodelling.klab.api.auth.IUserIdentity;
+//import org.integratedmodelling.klab.api.data.IResource;
+//import org.integratedmodelling.klab.api.data.adapters.IKlabData;
+//import org.integratedmodelling.klab.api.knowledge.IObservable;
+//import org.integratedmodelling.klab.api.model.IAcknowledgement;
+//import org.integratedmodelling.klab.api.model.IModel;
+//import org.integratedmodelling.klab.api.provenance.IArtifact;
+//import org.integratedmodelling.klab.api.runtime.dataflow.IDataflow;
+//
+///**
+// * A redesign of the engine API and its subcomponents, eventually available as separate services.
+// * Unimplemented and only for brainstorming at the moment.
+// *
+// * @author Ferd
+// *
+// */
+//public interface IEngineService {
+//
+// /**
+// *
+// * @author Ferd
+// *
+// */
+// interface ResourceManager {
+//
+// /**
+// *
+// * @param urn
+// * @param scope
+// * @return
+// */
+// IBehavior resolveBehavior(String urn, IScope scope);
+//
+// /**
+// *
+// * @param urn
+// * @param scope
+// * @return
+// */
+// IResource resolveResource(String urn, IScope scope);
+//
+// /**
+// *
+// * @param originalResource
+// * @param scope
+// * @return
+// */
+// IResource contextualize(IResource originalResource, IContextScope scope);
+//
+// /**
+// *
+// * @param contextualizedResource
+// * @param scope
+// * @return
+// */
+// IKlabData getData(IResource contextualizedResource, IScope scope);
+//
+// }
+//
+// interface Resolver {
+//
+// /**
+// * Resolve an observable in the passed scope, producing the dataflow that will make the
+// * observation.
+// *
+// * @param observable an {@link IObservable}, {@link IAcknowledgement}, {@link IModel} or a
+// * string resolving to one of those.
+// * @param scope if not an {@link IAcknowledgement}, must have a specified geometry. If the
+// * {@link IObservable} is not a subject, must have a set context observation.
+// * @return the dataflow that will create the observation once run by a runtime.
+// */
+// IDataflow> resolve(Object observable, IContextScope scope);
+//
+// }
+//
+// interface Runtime {
+//
+// /**
+// * Run the passed dataflow in the scale of the observer represented in the scope; return the
+// * primary artifact.
+// *
+// * @param
+// * @param dataflow
+// * @param scope must be or procede from a context scope
+// * @return
+// */
+// T run(IDataflow dataflow, IContextScope scope);
+//
+//
+// }
+//
+// /**
+// * Login through an authenticated user identity and return the root scope for that user. The
+// * scope for the user should be stored: if the user was logged in previously, the previously
+// * logged in scope should be returned..
+// *
+// * @param user
+// * @return
+// */
+// IScope login(IUserIdentity user);
+//
+//}
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IScope.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IScope.java
index 377183e1e..a94a268ad 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IScope.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/IScope.java
@@ -1,82 +1,82 @@
-package org.integratedmodelling.klab.api.engine;
-
-import java.io.Serializable;
-
-import org.integratedmodelling.kim.api.IParameters;
-import org.integratedmodelling.klab.api.auth.IUserIdentity;
-import org.integratedmodelling.klab.api.engine.IEngineService.Reasoner;
-import org.integratedmodelling.klab.api.engine.IEngineService.Resolver;
-import org.integratedmodelling.klab.api.engine.IEngineService.ResourceManager;
-import org.integratedmodelling.klab.api.engine.IEngineService.Runtime;
-import org.integratedmodelling.klab.api.runtime.monitoring.IChannel;
-
-public interface IScope extends IChannel, Serializable {
-
- enum Type {
- USER, // root-level scope
- SCRIPT, // session-level scope
- API, // session for the REST API through a client
- APPLICATION, // session for an application, including the Explorer
- SESSION, // raw session for direct use within Java code
- CONTEXT // context, on which observe() can be called
- }
-
- /**
- * Return the reasoner service assigned to this scope.
- *
- * @return
- */
- Reasoner getReasoner();
-
- /**
- * Return the resolver service assigned to this scope.
- *
- * @return
- */
- Resolver getResolver();
-
- /**
- * Return the runtime service assigned to this scope.
- *
- * @return
- */
- Runtime getRuntime();
-
- /**
- * Return the resources service assigned to this scope.
- *
- * @return
- */
- ResourceManager getResources();
-
- /**
- * The scope is created for an authenticated user by the engine.
- *
- * @return
- */
- IUserIdentity getUser();
-
- /**
- * Each scope can carry arbitrary data linked to it.
- *
- * @return
- */
- IParameters getData();
-
- /**
- * Start a raw session with a given identifier and return the scope that controls it.
- *
- * @param sessionName
- * @return
- */
- ISessionScope runSession(String sessionName);
-
- /**
- * Run an application or script and return the scope that controls it.
- *
- * @param behavior
- * @return
- */
- ISessionScope runApplication(String behaviorName);
-
-}
+//package org.integratedmodelling.klab.api.engine;
+//
+//import java.io.Serializable;
+//
+//import org.integratedmodelling.kim.api.IParameters;
+//import org.integratedmodelling.klab.api.auth.IUserIdentity;
+//import org.integratedmodelling.klab.api.engine.IEngineService.Reasoner;
+//import org.integratedmodelling.klab.api.engine.IEngineService.Resolver;
+//import org.integratedmodelling.klab.api.engine.IEngineService.ResourceManager;
+//import org.integratedmodelling.klab.api.engine.IEngineService.Runtime;
+//import org.integratedmodelling.klab.api.runtime.monitoring.IChannel;
+//
+//public interface IScope extends IChannel, Serializable {
+//
+// enum Type {
+// USER, // root-level scope
+// SCRIPT, // session-level scope
+// API, // session for the REST API through a client
+// APPLICATION, // session for an application, including the Explorer
+// SESSION, // raw session for direct use within Java code
+// CONTEXT // context, on which observe() can be called
+// }
+//
+// /**
+// * Return the reasoner service assigned to this scope.
+// *
+// * @return
+// */
+// Reasoner getReasoner();
+//
+// /**
+// * Return the resolver service assigned to this scope.
+// *
+// * @return
+// */
+// Resolver getResolver();
+//
+// /**
+// * Return the runtime service assigned to this scope.
+// *
+// * @return
+// */
+// Runtime getRuntime();
+//
+// /**
+// * Return the resources service assigned to this scope.
+// *
+// * @return
+// */
+// ResourceManager getResources();
+//
+// /**
+// * The scope is created for an authenticated user by the engine.
+// *
+// * @return
+// */
+// IUserIdentity getUser();
+//
+// /**
+// * Each scope can carry arbitrary data linked to it.
+// *
+// * @return
+// */
+// IParameters getData();
+//
+// /**
+// * Start a raw session with a given identifier and return the scope that controls it.
+// *
+// * @param sessionName
+// * @return
+// */
+// ISessionScope runSession(String sessionName);
+//
+// /**
+// * Run an application or script and return the scope that controls it.
+// *
+// * @param behavior
+// * @return
+// */
+// ISessionScope runApplication(String behaviorName);
+//
+//}
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/ISessionScope.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/ISessionScope.java
index 5818cd550..eaf4374c8 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/ISessionScope.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/engine/ISessionScope.java
@@ -1,43 +1,43 @@
-package org.integratedmodelling.klab.api.engine;
-
-import org.integratedmodelling.klab.api.data.IGeometry;
-
-public interface ISessionScope extends IScope {
-
- public enum Status {
- WAITING, STARTED, CHANGED, FINISHED, ABORTED, /* this only sent by UIs for now */ INTERRUPTED, EMPTY
- }
-
- /**
- * Never null. The session scope's geometry is the "focal" geometry of the user (where/when the
- * user agent is looking); the geometry in each {@link IContextScope} is the actual view
- * during observation.
- *
- * @return
- */
- IGeometry getGeometry();
-
- /**
- * A session may represent a raw session, a script or an application. In each case a name is
- * supplied and can be retrieved.
- *
- * @return
- */
- String getName();
-
- /**
- * Create a context scope in this session. The scope is initially focused on the geometry that
- * the session was focused on at the time of the call.
- *
- * @return
- */
- IContextScope createContext(String id);
-
- /**
- * Return the status of the session scope at the time of the call.
- *
- * @return
- */
- Status getStatus();
-
-}
+//package org.integratedmodelling.klab.api.engine;
+//
+//import org.integratedmodelling.klab.api.data.IGeometry;
+//
+//public interface ISessionScope extends IScope {
+//
+// public enum Status {
+// WAITING, STARTED, CHANGED, FINISHED, ABORTED, /* this only sent by UIs for now */ INTERRUPTED, EMPTY
+// }
+//
+// /**
+// * Never null. The session scope's geometry is the "focal" geometry of the user (where/when the
+// * user agent is looking); the geometry in each {@link IContextScope} is the actual view
+// * during observation.
+// *
+// * @return
+// */
+// IGeometry getGeometry();
+//
+// /**
+// * A session may represent a raw session, a script or an application. In each case a name is
+// * supplied and can be retrieved.
+// *
+// * @return
+// */
+// String getName();
+//
+// /**
+// * Create a context scope in this session. The scope is initially focused on the geometry that
+// * the session was focused on at the time of the call.
+// *
+// * @return
+// */
+// IContextScope createContext(String id);
+//
+// /**
+// * Return the status of the session scope at the time of the call.
+// *
+// * @return
+// */
+// Status getStatus();
+//
+//}
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/runtime/IContextualizationScope.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/runtime/IContextualizationScope.java
index 42309a14d..f92bfeeda 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/runtime/IContextualizationScope.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/api/runtime/IContextualizationScope.java
@@ -22,7 +22,6 @@
import org.integratedmodelling.klab.api.data.artifacts.IObjectArtifact;
import org.integratedmodelling.klab.api.data.general.IExpression;
import org.integratedmodelling.klab.api.documentation.IReport;
-import org.integratedmodelling.klab.api.engine.IContextScope;
import org.integratedmodelling.klab.api.knowledge.IConcept;
import org.integratedmodelling.klab.api.knowledge.IMetadata;
import org.integratedmodelling.klab.api.knowledge.IObservable;
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/CustomProperty.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/CustomProperty.java
index c9545616d..eddaaa8b3 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/CustomProperty.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/CustomProperty.java
@@ -15,6 +15,12 @@ public class CustomProperty {
private String value;
private boolean onlyAdmin;
+ public CustomProperty(String key, String value, boolean onlyAdmin) {
+ this.key = key;
+ this.value = value;
+ this.onlyAdmin = onlyAdmin;
+ }
+
public String getKey() {
return key;
}
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/ExternalAuthenticationCredentials.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/ExternalAuthenticationCredentials.java
index 45d202283..d1f2ade12 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/ExternalAuthenticationCredentials.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/ExternalAuthenticationCredentials.java
@@ -17,18 +17,20 @@ public class ExternalAuthenticationCredentials {
parameterKeys = new HashMap<>();
parameterKeys.put("basic", new String[]{"username", "password"});
parameterKeys.put("oidc", new String[]{"url", "grant_type", "client_id", "client_secrets", "scope", "provider_id"});
+ parameterKeys.put("s3", new String[]{"accessKey", "secretKey"});
}
/**
* Credentials, depending on scheme
*
- * for basic: username and password for oidc: Authentication URL, grant type, client ID, client
- * secret, scope, provider
+ * for basic: username and password
+ * for oidc: Authentication URL, grant type, client ID, client secret, scope, provider
+ * for s3: endpoint URL, access key, secret key
*/
private List credentials = new ArrayList<>();
/**
- * one of basic, oidc, ...
+ * one of basic, oidc, s3...
*/
private String scheme = "basic";
diff --git a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/Layout.java b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/Layout.java
index 01fab0cc9..927409a72 100644
--- a/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/Layout.java
+++ b/api/org.integratedmodelling.klab.api/src/org/integratedmodelling/klab/rest/Layout.java
@@ -24,8 +24,8 @@
Footer (max 1 elemento)
Attributi
-Guardando la definizione che usa Quasar di Layout (che è la cosa corrispondente) ci sono 2 cose interessanti che magari verrebbero bene più avanti:
-- Un Layout puó essere un container quindi puó passare ad essere pure lui un componente. Nel caso di Quasar, questo fa sí che le dimensioni facciano riferimento alla página intera o al Panel dove è messo (per maggiori dettagli mi dici). Per noi questo potrebbe essere utile pensando a una view generale che sostituisca l'explorer come ben dicevi tu
+Guardando la definizione che usa Quasar di Layout (che � la cosa corrispondente) ci sono 2 cose interessanti che magari verrebbero bene pi� avanti:
+- Un Layout pu� essere un container quindi pu� passare ad essere pure lui un componente. Nel caso di Quasar, questo fa s� che le dimensioni facciano riferimento alla p�gina intera o al Panel dove � messo (per maggiori dettagli mi dici). Per noi questo potrebbe essere utile pensando a una view generale che sostituisca l'explorer come ben dicevi tu
- Usano una serie di lettere per gestire le sovrapposizioni:
Fondamentalmente si gestisce se i pannelli laterali coprono o no l'header e il footer
@@ -33,17 +33,17 @@
Header
Footer
Non so se Header e Footer sono rimasugli di altre implementazioni, pero credo che non sono necessari.
-Quasar ha dei componenti specifici però fondamentalmente gestisce dettagli estetici. Un panel messo nella proprietà header di View non penso abbia bisogno di ulteriori dettagli, quindi mi centrerei in Panel
-Panel è un contenitore di elementi eterogenei posizionati a seconda di come si definiscono e del layout previsto per il pannello,
-Un pannello puó contenere altri pannelli e cosí successivamente
-Personalmente credo che tutti i componenti dovrebbero essere contenuti in un pannello e non possano essere lasciati soli, più che altro per essere un po' coerenti
+Quasar ha dei componenti specifici per� fondamentalmente gestisce dettagli estetici. Un panel messo nella propriet� header di View non penso abbia bisogno di ulteriori dettagli, quindi mi centrerei in Panel
+Panel � un contenitore di elementi eterogenei posizionati a seconda di come si definiscono e del layout previsto per il pannello,
+Un pannello pu� contenere altri pannelli e cos� successivamente
+Personalmente credo che tutti i componenti dovrebbero essere contenuti in un pannello e non possano essere lasciati soli, pi� che altro per essere un po' coerenti
Attributi
-visible: visibilità che púo essere legata a una variabile
-layout: qualche descrizione sul tipo di layout. Qua ci si puó mettere di tutto, però in un principio con orizzontale, verticale ed indicare se puoi andare a capo dovrebbe essere sufficiente. La storia del a capo è per sapere se si cambia la dimensione degli elementi per starci o quando non ci si sta si va a nuova linea.
-Magari si puó anche pensare in un GridLayout o in un Flex più avanti.
+visible: visibilit� che p�o essere legata a una variabile
+layout: qualche descrizione sul tipo di layout. Qua ci si pu� mettere di tutto, per� in un principio con orizzontale, verticale ed indicare se puoi andare a capo dovrebbe essere sufficiente. La storia del a capo � per sapere se si cambia la dimensione degli elementi per starci o quando non ci si sta si va a nuova linea.
+Magari si pu� anche pensare in un GridLayout o in un Flex pi� avanti.
Group
-Un gruppo credo dovrebbe essere qualcosa di omogeneo per poter gestire elementi come se fossero una unità. È necessario per i radioButton e i checkButton
+Un gruppo credo dovrebbe essere qualcosa di omogeneo per poter gestire elementi come se fossero una unit�. � necessario per i radioButton e i checkButton
Attributi
Credo che possono essere gli stessi di un componente:
@@ -60,13 +60,13 @@
align
width: qui userei o percentuale o cose fisse senza dimensioni specifiche (xs, s, m, etc) e poi lo stile li definisce
Ed in questo momento non mi viene in mente alto
-E poi lascerei una serie di attributi come un Map visto che il funzionamento di ogni componente avrà le sue necessita specifiche
+E poi lascerei una serie di attributi come un Map visto che il funzionamento di ogni componente avr� le sue necessita specifiche
Alert
Confirm
Questi due li stiamo trattando in una maniera speciale, penso che potranno avere un panel e dentro ci sia quello che vuoi
-Sarebbero piú simili ad una View pero con una parte dove metti il panel con il contenuto, e una parte con i bottoni specifici (alert solo ok, confirm ok e cancel)
-Oppure un tipo Dialog que puó avere delle implementazioni per alert e confirm
+Sarebbero pi� simili ad una View pero con una parte dove metti il panel con il contenuto, e una parte con i bottoni specifici (alert solo ok, confirm ok e cancel)
+Oppure un tipo Dialog que pu� avere delle implementazioni per alert e confirm
--------------------------------------------------------------------------------------------------------
*
*
@@ -83,6 +83,7 @@ public static class MenuItem {
private String text; // a slash is used to define nested menus
private String id;
+ private String url;
public String getText() {
return text;
@@ -96,7 +97,12 @@ public String getId() {
public void setId(String id) {
this.id = id;
}
-
+ public String getUrl() {
+ return url;
+ }
+ public void setUrl(String url) {
+ this.url = url;
+ }
}
private List panels = new ArrayList<>();
diff --git a/api/pom.xml b/api/pom.xml
index f081a74c1..08b61910d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -193,8 +193,8 @@
- eclipse-2022-06
- https://download.eclipse.org/releases/2022-06/
+ eclipse-2022-09
+ https://download.eclipse.org/releases/2022-09/
p2
diff --git a/authorities/klab.authority.caliper/.classpath b/authorities/klab.authority.caliper/.classpath
index 002ad570e..6fc81d614 100644
--- a/authorities/klab.authority.caliper/.classpath
+++ b/authorities/klab.authority.caliper/.classpath
@@ -13,19 +13,20 @@
+
-
-
+
-
+
+
diff --git a/authorities/klab.authority.caliper/.settings/org.eclipse.jdt.core.prefs b/authorities/klab.authority.caliper/.settings/org.eclipse.jdt.core.prefs
index 2f5cc74c3..d089a9b73 100644
--- a/authorities/klab.authority.caliper/.settings/org.eclipse.jdt.core.prefs
+++ b/authorities/klab.authority.caliper/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/authorities/klab.authority.gbif/.classpath b/authorities/klab.authority.gbif/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/authorities/klab.authority.gbif/.classpath
+++ b/authorities/klab.authority.gbif/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/authorities/klab.authority.gbif/.settings/org.eclipse.jdt.core.prefs b/authorities/klab.authority.gbif/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/authorities/klab.authority.gbif/.settings/org.eclipse.jdt.core.prefs
+++ b/authorities/klab.authority.gbif/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/authorities/klab.authority.iupac/.classpath b/authorities/klab.authority.iupac/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/authorities/klab.authority.iupac/.classpath
+++ b/authorities/klab.authority.iupac/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/authorities/klab.authority.iupac/.settings/org.eclipse.jdt.core.prefs b/authorities/klab.authority.iupac/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/authorities/klab.authority.iupac/.settings/org.eclipse.jdt.core.prefs
+++ b/authorities/klab.authority.iupac/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/authorities/klab.authority.wrb/.classpath b/authorities/klab.authority.wrb/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/authorities/klab.authority.wrb/.classpath
+++ b/authorities/klab.authority.wrb/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/authorities/klab.authority.wrb/.settings/org.eclipse.jdt.core.prefs b/authorities/klab.authority.wrb/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/authorities/klab.authority.wrb/.settings/org.eclipse.jdt.core.prefs
+++ b/authorities/klab.authority.wrb/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/client/org.integratedmodelling.klab.client/.classpath b/client/org.integratedmodelling.klab.client/.classpath
index 8d901def9..79e43b5ee 100644
--- a/client/org.integratedmodelling.klab.client/.classpath
+++ b/client/org.integratedmodelling.klab.client/.classpath
@@ -1,72 +1,76 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/org.integratedmodelling.klab.client/.settings/org.eclipse.jdt.core.prefs b/client/org.integratedmodelling.klab.client/.settings/org.eclipse.jdt.core.prefs
index 11265a345..f78f7f772 100644
--- a/client/org.integratedmodelling.klab.client/.settings/org.eclipse.jdt.core.prefs
+++ b/client/org.integratedmodelling.klab.client/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.source=17
diff --git a/client/pom.xml b/client/pom.xml
index b345e552a..53e4ae5dd 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -193,8 +193,8 @@
- eclipse-2022-06
- https://download.eclipse.org/releases/2022-06/
+ eclipse-2022-09
+ https://download.eclipse.org/releases/2022-09/
p2
diff --git a/components/klab.component.alignment/.classpath b/components/klab.component.alignment/.classpath
index 35d190649..7ed96f202 100644
--- a/components/klab.component.alignment/.classpath
+++ b/components/klab.component.alignment/.classpath
@@ -1,33 +1,34 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.alignment/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.alignment/.settings/org.eclipse.jdt.core.prefs
index 8406321eb..d44fef534 100644
--- a/components/klab.component.alignment/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.alignment/.settings/org.eclipse.jdt.core.prefs
@@ -2,8 +2,10 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8
diff --git a/components/klab.component.alignment/pom.xml b/components/klab.component.alignment/pom.xml
index 5c1d80cf1..a27288035 100644
--- a/components/klab.component.alignment/pom.xml
+++ b/components/klab.component.alignment/pom.xml
@@ -37,7 +37,7 @@
org.json
json
- 20230227
+ 20231013
diff --git a/components/klab.component.amp/.classpath b/components/klab.component.amp/.classpath
index 002ad570e..6fc81d614 100644
--- a/components/klab.component.amp/.classpath
+++ b/components/klab.component.amp/.classpath
@@ -13,19 +13,20 @@
+
-
-
+
-
+
+
diff --git a/components/klab.component.amp/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.amp/.settings/org.eclipse.jdt.core.prefs
index 2f5cc74c3..d089a9b73 100644
--- a/components/klab.component.amp/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.amp/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.ecology/.classpath b/components/klab.component.ecology/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/components/klab.component.ecology/.classpath
+++ b/components/klab.component.ecology/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.ecology/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.ecology/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/components/klab.component.ecology/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.ecology/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.geotrellis/.classpath b/components/klab.component.geotrellis/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/components/klab.component.geotrellis/.classpath
+++ b/components/klab.component.geotrellis/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.geotrellis/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.geotrellis/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..c59405a62 100644
--- a/components/klab.component.geotrellis/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.geotrellis/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,24 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=warning
diff --git a/components/klab.component.hydrology/.classpath b/components/klab.component.hydrology/.classpath
index 002ad570e..6fc81d614 100644
--- a/components/klab.component.hydrology/.classpath
+++ b/components/klab.component.hydrology/.classpath
@@ -13,19 +13,20 @@
+
-
-
+
-
+
+
diff --git a/components/klab.component.hydrology/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.hydrology/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/components/klab.component.hydrology/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.hydrology/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowProcessResolver.java b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowProcessResolver.java
new file mode 100644
index 000000000..26d8ab02d
--- /dev/null
+++ b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowProcessResolver.java
@@ -0,0 +1,237 @@
+package org.integratedmodelling.geoprocessing.hydrology;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.integratedmodelling.kim.api.IKimExpression;
+import org.integratedmodelling.kim.api.IParameters;
+import org.integratedmodelling.klab.Extensions;
+import org.integratedmodelling.klab.Observables;
+import org.integratedmodelling.klab.Units;
+import org.integratedmodelling.klab.api.data.ILocator;
+import org.integratedmodelling.klab.api.data.general.IExpression;
+import org.integratedmodelling.klab.api.data.mediation.IUnit;
+import org.integratedmodelling.klab.api.extensions.ILanguageProcessor.Descriptor;
+import org.integratedmodelling.klab.api.model.contextualization.IResolver;
+import org.integratedmodelling.klab.api.observations.IObservation;
+import org.integratedmodelling.klab.api.observations.IProcess;
+import org.integratedmodelling.klab.api.observations.IState;
+import org.integratedmodelling.klab.api.observations.scale.space.IGrid.Cell;
+import org.integratedmodelling.klab.api.observations.scale.space.ISpace;
+import org.integratedmodelling.klab.api.provenance.IArtifact;
+import org.integratedmodelling.klab.api.provenance.IArtifact.Type;
+import org.integratedmodelling.klab.api.runtime.IContextualizationScope;
+import org.integratedmodelling.klab.components.geospace.Geospace;
+import org.integratedmodelling.klab.components.geospace.extents.Grid;
+import org.integratedmodelling.klab.components.geospace.extents.Shape;
+import org.integratedmodelling.klab.components.geospace.extents.Space;
+import org.integratedmodelling.klab.components.geospace.processing.ContributingCell;
+import org.integratedmodelling.klab.components.runtime.contextualizers.AbstractContextualizer;
+import org.integratedmodelling.klab.data.storage.BasicFileMappedStorage;
+import org.integratedmodelling.klab.exceptions.KlabException;
+import org.integratedmodelling.klab.exceptions.KlabValidationException;
+import org.integratedmodelling.klab.scale.Scale;
+import org.integratedmodelling.klab.utils.Pair;
+import org.integratedmodelling.klab.utils.Parameters;
+import org.locationtech.jts.geom.Point;
+
+/**
+ * Generic flow accumulator resolver that will compute an arbitrary quality by following flow
+ * directions from the outlets and executing arbitrary expressions.
+ *
+ * @author ferdinando.villa
+ *
+ */
+public class AccumulateFlowProcessResolver extends AbstractContextualizer implements IResolver, IExpression {
+
+ private Descriptor accumulateDescriptor;
+ private Descriptor distributeDescriptor;
+ private IContextualizationScope context;
+
+ public AccumulateFlowProcessResolver() {
+ }
+
+ public AccumulateFlowProcessResolver(IParameters parameters, IContextualizationScope context) {
+
+ this.context = context;
+ if (parameters.containsKey("evaluate")) {
+ Object expression = parameters.get("evaluate");
+ boolean forceScalar = false;
+ if (expression instanceof IKimExpression) {
+ forceScalar = ((IKimExpression) expression).isForcedScalar();
+ expression = ((IKimExpression) expression).getCode();
+ }
+ this.accumulateDescriptor = Extensions.INSTANCE.getLanguageProcessor(Extensions.DEFAULT_EXPRESSION_LANGUAGE).describe(
+ expression.toString(),
+ context.getExpressionContext().scalar(forceScalar ? Forcing.Always : Forcing.AsNeeded));
+ }
+ if (parameters.containsKey("distribute")) {
+ boolean forceScalar = false;
+ Object expression = parameters.get("distribute");
+ if (expression instanceof IKimExpression) {
+ forceScalar = ((IKimExpression) expression).isForcedScalar();
+ expression = ((IKimExpression) expression).getCode();
+ }
+ this.distributeDescriptor = Extensions.INSTANCE.getLanguageProcessor(Extensions.DEFAULT_EXPRESSION_LANGUAGE).describe(
+ expression.toString(),
+ context.getExpressionContext().scalar(forceScalar ? Forcing.Always : Forcing.AsNeeded));
+ }
+ if (this.accumulateDescriptor == null && this.distributeDescriptor == null) {
+ throw new IllegalArgumentException("flow accumulation resolver: no expression to evaluate");
+ }
+ }
+
+ @Override
+ public Type getType() {
+ return Type.NUMBER;
+ }
+
+ @Override
+ public IProcess resolve(IProcess process, IContextualizationScope context) throws KlabException {
+
+ IState target = context.getState(Observables.INSTANCE.getDescribedType(process.getObservable().getType()), null);
+ if (target == null) {
+ throw new KlabValidationException("cannot find state changed by " + process.getObservable());
+ }
+
+ IState flowdirection = context.getArtifact("flow_directions_d8", IState.class);
+
+ // IUnit tUnit = target.getObservable().getUnit();
+ Grid grid = Space.extractGrid(target);
+
+ if (grid == null) {
+ throw new KlabValidationException("Runoff must be computed on a grid extent");
+ }
+
+ // if (tUnit != null && tUnit.equals(Units.INSTANCE.SQUARE_METERS)) {
+ // tUnit = null;
+ // }
+
+ /*
+ * synchronized in case we parallelize the walker, which we don't do at the moment (not sure
+ * what happens with synchronous writes).
+ */
+ Map states = Collections.synchronizedMap(new HashMap<>());
+ states.put("self", target);
+ IExpression downstreamExpression = null;
+ IExpression upstreamExpression = null;
+
+ for (Pair a : context.getArtifacts(IState.class)) {
+ // if (context.getScale().getTime() != null) {
+ // a.setSecond(a.getSecond().at(context.getScale().getTime()));
+ // }
+ states.put(a.getFirst(), a.getSecond());
+ }
+
+ if (accumulateDescriptor != null) {
+ // // check inputs and see if the expr is worth anything in this context
+ // for (String input : accumulateDescriptor.getIdentifiers()) {
+ // if (accumulateDescriptor.isScalar(input) && context.getArtifact(input,
+ // IState.class)
+ // != null) {
+ // IState state = context.getArtifact(input, IState.class);
+ // states.put(input, state);
+ // }
+ // }
+ downstreamExpression = accumulateDescriptor.compile();
+ }
+
+ if (distributeDescriptor != null) {
+ // check inputs and see if the expr is worth anything in this context
+ // for (String input : distributeDescriptor.getIdentifiers()) {
+ // if (distributeDescriptor.isScalar(input) && context.getArtifact(input,
+ // IState.class)
+ // != null) {
+ // IState state = context.getArtifact(input, IState.class);
+ // states.put(input, state);
+ // }
+ // }
+ upstreamExpression = distributeDescriptor.compile();
+ }
+
+ try (BasicFileMappedStorage positionCache = new BasicFileMappedStorage<>(Boolean.class, grid.getCellCount())) {
+
+ for (IArtifact artifact : context.getArtifact("stream_outlet")) {
+
+ ISpace space = ((IObservation) artifact).getSpace();
+
+ if (space == null) {
+ continue;
+ }
+
+ Point point = ((Shape) space.getShape()).getJTSGeometry().getCentroid();
+ long xy = grid.getOffsetFromWorldCoordinates(point.getX(), point.getY());
+ Cell start = grid.getCell(xy);
+ compute(start, flowdirection, target, states, downstreamExpression, upstreamExpression, true,
+ target.get(Scale.create(context.getScale().getTime(), start)), positionCache, context);
+ }
+ }
+
+ return process;
+ }
+
+ /*
+ * Computation of runoff accumulates the runoff from upstream cells, ending at the outlet This
+ * function is called with the outlet cell as parameter.
+ */
+ private Object compute(Cell cell, IState flowdirection, IState result, Map states,
+ IExpression downstreamExpression, IExpression upstreamExpression, boolean isOutlet, Object previousValue,
+ BasicFileMappedStorage positionCache, IContextualizationScope scope) {
+
+ Object ret = previousValue;
+
+ if (positionCache.get(cell.getOffsetInGrid())) {
+ return ret;
+ }
+
+ positionCache.set(Boolean.TRUE, cell.getOffsetInGrid());
+
+ Parameters parameters = Parameters.create();
+ parameters.put("current", previousValue);
+
+ ILocator locator = cell;
+ if (scope.getScale().getTime() != null) {
+ locator = Scale.create(scope.getScale().getTime(), cell);
+ }
+
+ /*
+ * collect values of all states @ self
+ */
+ for (String state : states.keySet()) {
+ parameters.put(state, states.get(state).get(locator));
+ }
+
+ /*
+ * build the cell descriptor to give us access to the neighborhood
+ */
+ parameters.put("cell", new ContributingCell(cell, ((Number) flowdirection.get(locator)).intValue(), flowdirection, states,
+ isOutlet, locator));
+
+ // call upstream before recursion, in upstream order
+ if (upstreamExpression != null) {
+ result.set(cell, (ret = upstreamExpression.eval(scope, parameters)));
+ }
+
+ List upstreamCells = Geospace.getUpstreamCells(cell, flowdirection, context.getScale().getTime(), null);
+ for (Cell upstream : upstreamCells) {
+ compute(upstream, flowdirection, result, states, downstreamExpression, upstreamExpression, false, ret, positionCache,
+ scope);
+ }
+
+ /*
+ * call downstream after recursion, i.e. in downstream order
+ */
+ if (downstreamExpression != null) {
+ result.set(locator, (ret = downstreamExpression.eval(context, parameters)));
+ }
+
+ return ret;
+ }
+
+ @Override
+ public Object eval(IContextualizationScope context, Object... parameters) throws KlabException {
+ return new AccumulateFlowProcessResolver(Parameters.create(parameters), context);
+ }
+}
diff --git a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowResolver.java b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowResolver.java
index 9d69adf7e..ca8033c07 100644
--- a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowResolver.java
+++ b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/hydrology/AccumulateFlowResolver.java
@@ -9,6 +9,7 @@
import org.integratedmodelling.kim.api.IParameters;
import org.integratedmodelling.klab.Extensions;
import org.integratedmodelling.klab.Units;
+import org.integratedmodelling.klab.api.data.ILocator;
import org.integratedmodelling.klab.api.data.general.IExpression;
import org.integratedmodelling.klab.api.data.mediation.IUnit;
import org.integratedmodelling.klab.api.extensions.ILanguageProcessor.Descriptor;
@@ -29,6 +30,7 @@
import org.integratedmodelling.klab.data.storage.BasicFileMappedStorage;
import org.integratedmodelling.klab.exceptions.KlabException;
import org.integratedmodelling.klab.exceptions.KlabValidationException;
+import org.integratedmodelling.klab.scale.Scale;
import org.integratedmodelling.klab.utils.Pair;
import org.integratedmodelling.klab.utils.Parameters;
import org.locationtech.jts.geom.Point;
@@ -110,8 +112,12 @@ public IState resolve(IState target, IContextualizationScope context) throws Kla
IExpression upstreamExpression = null;
for (Pair a : context.getArtifacts(IState.class)) {
- states.put(a.getFirst(), a.getSecond());
+// if (context.getScale().getTime() != null) {
+// a.setSecond(a.getSecond().at(context.getScale().getTime()));
+// }
+ states.put(a.getFirst(), a.getSecond());
}
+
if (accumulateDescriptor != null) {
// // check inputs and see if the expr is worth anything in this context
// for (String input : accumulateDescriptor.getIdentifiers()) {
@@ -152,7 +158,7 @@ public IState resolve(IState target, IContextualizationScope context) throws Kla
long xy = grid.getOffsetFromWorldCoordinates(point.getX(), point.getY());
Cell start = grid.getCell(xy);
compute(start, flowdirection, target, states, downstreamExpression, upstreamExpression, true, null,
- positionCache);
+ positionCache, context);
}
}
@@ -165,7 +171,7 @@ public IState resolve(IState target, IContextualizationScope context) throws Kla
*/
private Object compute(Cell cell, IState flowdirection, IState result, Map states,
IExpression downstreamExpression, IExpression upstreamExpression, boolean isOutlet, Object previousValue,
- BasicFileMappedStorage positionCache) {
+ BasicFileMappedStorage positionCache, IContextualizationScope scope) {
Object ret = previousValue;
@@ -178,34 +184,39 @@ private Object compute(Cell cell, IState flowdirection, IState result, Map parameters = Parameters.create();
parameters.put("current", previousValue);
+ ILocator locator = cell;
+ if (scope.getScale().getTime() != null) {
+ locator = Scale.create(scope.getScale().getTime(), cell);
+ }
+
/*
* collect values of all states @ self
*/
for (String state : states.keySet()) {
- parameters.put(state, states.get(state).get(cell));
+ parameters.put(state, states.get(state).get(locator));
}
/*
* build the cell descriptor to give us access to the neighborhood
*/
parameters.put("cell",
- new ContributingCell(cell, ((Number) flowdirection.get(cell)).intValue(), flowdirection, states, isOutlet));
+ new ContributingCell(cell, ((Number) flowdirection.get(cell)).intValue(), flowdirection, states, isOutlet, locator));
// call upstream before recursion, in upstream order
if (upstreamExpression != null) {
- result.set(cell, (ret = upstreamExpression.eval(context, parameters)));
+ result.set(cell, (ret = upstreamExpression.eval(scope, parameters)));
}
List upstreamCells = Geospace.getUpstreamCells(cell, flowdirection, null);
for (Cell upstream : upstreamCells) {
- compute(upstream, flowdirection, result, states, downstreamExpression, upstreamExpression, false, ret, positionCache);
+ compute(upstream, flowdirection, result, states, downstreamExpression, upstreamExpression, false, ret, positionCache, scope);
}
/*
* call downstream after recursion, i.e. in downstream order
*/
if (downstreamExpression != null) {
- result.set(cell, (ret = downstreamExpression.eval(context, parameters)));
+ result.set(locator, (ret = downstreamExpression.eval(context, parameters)));
}
return ret;
diff --git a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/morphology/AspectResolver.java b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/morphology/AspectResolver.java
new file mode 100644
index 000000000..5fc0ae814
--- /dev/null
+++ b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/morphology/AspectResolver.java
@@ -0,0 +1,71 @@
+package org.integratedmodelling.geoprocessing.morphology;
+
+import static org.hortonmachine.gears.libs.modules.HMConstants.floatNovalue;
+
+import java.awt.image.DataBuffer;
+
+import org.hortonmachine.hmachine.modules.geomorphology.aspect.OmsAspect;
+import org.hortonmachine.hmachine.modules.geomorphology.gradient.OmsGradient;
+import org.integratedmodelling.geoprocessing.TaskMonitor;
+import org.integratedmodelling.klab.api.data.general.IExpression;
+import org.integratedmodelling.klab.api.model.contextualization.IResolver;
+import org.integratedmodelling.klab.api.observations.IState;
+import org.integratedmodelling.klab.api.observations.scale.space.ISpace;
+import org.integratedmodelling.klab.api.provenance.IArtifact.Type;
+import org.integratedmodelling.klab.api.runtime.IContextualizationScope;
+import org.integratedmodelling.klab.components.geospace.utils.GeotoolsUtils;
+import org.integratedmodelling.klab.components.runtime.contextualizers.AbstractContextualizer;
+import org.integratedmodelling.klab.exceptions.KlabException;
+import org.integratedmodelling.klab.exceptions.KlabValidationException;
+
+public class AspectResolver extends AbstractContextualizer implements IResolver, IExpression {
+
+
+ @Override
+ public Type getType() {
+ return Type.NUMBER;
+ }
+
+ @Override
+ public IState resolve(IState target, IContextualizationScope context) throws KlabException {
+
+ IState dem = context.getArtifact("elevation", IState.class);
+ ISpace space = target.getSpace();
+
+ if (!(target.isSpatiallyDistributed() && space.isRegular())) {
+ throw new KlabValidationException("Aspect must be computed on a grid extent");
+ }
+
+ TaskMonitor taskMonitor = new TaskMonitor(context.getMonitor());
+ taskMonitor.setTaskName("Aspect");
+
+ OmsAspect aspect = new OmsAspect();
+ aspect.inElev = GeotoolsUtils.INSTANCE.stateToCoverage(dem, context.getScale(), DataBuffer.TYPE_FLOAT, floatNovalue,
+ false);
+ aspect.pm = taskMonitor;
+ aspect.doProcess = true;
+ aspect.doReset = false;
+ aspect.doRound = true;
+ aspect.doRadiants = false;
+ try {
+ aspect.process();
+ } catch (Exception e) {
+ throw new KlabException(e);
+ }
+ if (!context.getMonitor().isInterrupted()) {
+ GeotoolsUtils.INSTANCE.coverageToState(aspect.outAspect, target, context.getScale(), (a) -> {
+ if (a == (double) floatNovalue)
+ return Double.NaN;
+ return a;
+ });
+ }
+ return target;
+ }
+
+ @Override
+ public Object eval(IContextualizationScope context, Object... params) throws KlabException {
+ AspectResolver ret = new AspectResolver();
+ return ret;
+ }
+
+}
diff --git a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/morphology/GradientResolver.java b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/morphology/GradientResolver.java
new file mode 100644
index 000000000..07c4a6f63
--- /dev/null
+++ b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/morphology/GradientResolver.java
@@ -0,0 +1,69 @@
+package org.integratedmodelling.geoprocessing.morphology;
+
+import static org.hortonmachine.gears.libs.modules.HMConstants.floatNovalue;
+
+import java.awt.image.DataBuffer;
+
+import org.hortonmachine.hmachine.modules.geomorphology.gradient.OmsGradient;
+import org.integratedmodelling.geoprocessing.TaskMonitor;
+import org.integratedmodelling.klab.api.data.general.IExpression;
+import org.integratedmodelling.klab.api.model.contextualization.IResolver;
+import org.integratedmodelling.klab.api.observations.IState;
+import org.integratedmodelling.klab.api.observations.scale.space.ISpace;
+import org.integratedmodelling.klab.api.provenance.IArtifact.Type;
+import org.integratedmodelling.klab.api.runtime.IContextualizationScope;
+import org.integratedmodelling.klab.components.geospace.utils.GeotoolsUtils;
+import org.integratedmodelling.klab.components.runtime.contextualizers.AbstractContextualizer;
+import org.integratedmodelling.klab.exceptions.KlabException;
+import org.integratedmodelling.klab.exceptions.KlabValidationException;
+
+public class GradientResolver extends AbstractContextualizer implements IResolver, IExpression {
+
+
+ @Override
+ public Type getType() {
+ return Type.NUMBER;
+ }
+
+ @Override
+ public IState resolve(IState target, IContextualizationScope context) throws KlabException {
+
+ IState dem = context.getArtifact("elevation", IState.class);
+ ISpace space = target.getSpace();
+
+ if (!(target.isSpatiallyDistributed() && space.isRegular())) {
+ throw new KlabValidationException("Gradient must be computed on a grid extent");
+ }
+
+
+ TaskMonitor taskMonitor = new TaskMonitor(context.getMonitor());
+ taskMonitor.setTaskName("Gradient");
+
+ OmsGradient gradient = new OmsGradient();
+ gradient.inElev = GeotoolsUtils.INSTANCE.stateToCoverage(dem, context.getScale(), DataBuffer.TYPE_FLOAT, floatNovalue,
+ false);
+ gradient.pm = taskMonitor;
+ gradient.doProcess = true;
+ gradient.doReset = false;
+ try {
+ gradient.process();
+ } catch (Exception e) {
+ throw new KlabException(e);
+ }
+ if (!context.getMonitor().isInterrupted()) {
+ GeotoolsUtils.INSTANCE.coverageToState(gradient.outSlope, target, context.getScale(), (a) -> {
+ if (a == (double) floatNovalue)
+ return Double.NaN;
+ return a;
+ });
+ }
+ return target;
+ }
+
+ @Override
+ public Object eval(IContextualizationScope context, Object... params) throws KlabException {
+ GradientResolver ret = new GradientResolver();
+ return ret;
+ }
+
+}
diff --git a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/remotesensing/SentinelResolver.java b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/remotesensing/SentinelResolver.java
index 1e86edea1..e4f0ebbe6 100644
--- a/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/remotesensing/SentinelResolver.java
+++ b/components/klab.component.hydrology/src/main/java/org/integratedmodelling/geoprocessing/remotesensing/SentinelResolver.java
@@ -116,10 +116,8 @@ public IState resolve(IState target, IContextualizationScope context) throws Kla
DefaultGeographicCRS.WGS84).transform(outputCrs, true);
RegionMap regionTransformed = RegionMap.fromEnvelopeAndGrid(regionEnvelopeTransformed, (int) cols, (int) rows);
- HMRaster outRaster = HMStacCollection.readRasterBandOnRegion(regionTransformed, stacBand, items, taskMonitor);
+ HMRaster outRaster = HMStacCollection.readRasterBandOnRegion(regionTransformed, stacBand, items, true, HMRaster.MergeMode.AVG, taskMonitor);
- // apply averaging based on the amount of times the cell has been assigned a value
- outRaster.applyCountAverage(taskMonitor);
GridCoverage2D outCoverage = outRaster.buildCoverage();
diff --git a/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/hydrology.kdl b/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/hydrology.kdl
index bb6c4e171..6a7fe6305 100644
--- a/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/hydrology.kdl
+++ b/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/hydrology.kdl
@@ -86,6 +86,55 @@ export number flowaccumulation
class org.integratedmodelling.geoprocessing.hydrology.ContributingAreaResolver
}
+export process flowaccumulationprocess
+
+ "Perform arbitrary calculation on each cell's neighborhood in the order established by
+ the flow directions, with access to values upstream and in the neighborhood of each
+ raster cell through a 'cell' variable that provides access to neighborhood inspection
+ capabilities. Identical to flowaccumulation but used as change process to set the
+ values of the changed state."
+
+ label 'Accumulate upstream flow'
+{
+ import number flow_directions_d8
+ "The D8 numeric code for flow direction"
+
+ import object stream_outlet
+ "Stream outlets. Only the location of the outlets will be used; if the outlet spatial
+ extent is not a point, the centroid cell will be used."
+
+ value expression evaluate
+ "An expression that returns the value in each cell. The 'cell' variable contains
+ a proxy to the cell that can produce the neighborhood, the upstream portion of the
+ neighborhood, arbitrary neighbors in each direction, and (when the cell is from the
+ neighborhood) the opposite relative to the focal cell. Each cell knows the values of
+ all the dependencies in its location. All these values are extracted using cell.xxx
+ where xxx is: neighbo[u]rhood, upstream, downstream (producing a list of cells); n, s, e,
+ w, ne, se, nw, se (producing one cell or null if at the edges); or the name of each
+ quality dependency (producing the value of that dependency at the cell). The expression
+ 'xxx.self' where xxx is one of the cells returned by 'cell.upstream' produces the value
+ of the target state at each upstream location. That is the only context where using
+ 'self' makes any sense, as it will not have been computed unless the cell is from the
+ upstream neighborhood."
+
+ value expression distribute
+ "An expression that is evaluated in the opposite order as 'evaluate', starting at the
+ outlet(s) and moving upstream. All parameters are the same as 'evaluate' except that
+ 'current' is the value of the output at the previously computed downstream cell, evaluated
+ before the expression is called, and repeated equal in case the focal cell is not the
+ only upstream cell (its value is null at the outlet). The variable 'cell' can be interrogated
+ using 'cell.outlet' to check if the
+ current cell is an outlet. The 'cell.downstream' and 'cell.upstream' are also defined as
+ before; remember that the upstream values of the output haven't been computed yet. If
+ 'distribute' is paired with 'evaluate', a flow accumulation step will follow all the
+ 'distribute' evaluations."
+
+ geometry T1S2
+
+ class org.integratedmodelling.geoprocessing.hydrology.AccumulateFlowProcessResolver
+}
+
+
export value accumulateflow
"Perform arbitrary calculation on each cell's neighborhood in the order established by
diff --git a/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/morphology.kdl b/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/morphology.kdl
index d73390d53..a0f242e46 100644
--- a/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/morphology.kdl
+++ b/components/klab.component.hydrology/src/main/resources/components/org.integratedmodelling.geoprocessing/services/morphology.kdl
@@ -67,4 +67,31 @@ export object findmaxima
default "custom"
class org.integratedmodelling.geoprocessing.morphology.MaximaFinderInstantiator
+}
+
+export number aspect
+ "Estimates the aspect (i.e. the inclination angle of the gradient)
+ by considering a reference system which puts the zero towards the
+ north and the rotation angle anticlockwise. Hence, aspect is 0 in
+ the North direction and increases clockwise."
+ label 'Aspect'
+{
+ import number elevation
+ "The digital elevation model."
+
+ geometry S2
+
+ class org.integratedmodelling.geoprocessing.morphology.AspectResolver
+}
+
+export number gradient
+ "Estimates the gradient in each site, defined as the module of the gradient vector."
+ label 'Gradient'
+{
+ import number elevation
+ "The digital elevation model."
+
+ geometry S2
+
+ class org.integratedmodelling.geoprocessing.morphology.GradientResolver
}
\ No newline at end of file
diff --git a/components/klab.component.landcover/.classpath b/components/klab.component.landcover/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/components/klab.component.landcover/.classpath
+++ b/components/klab.component.landcover/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.landcover/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.landcover/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/components/klab.component.landcover/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.landcover/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.mca/.classpath b/components/klab.component.mca/.classpath
index d2bc4e02a..6fc81d614 100644
--- a/components/klab.component.mca/.classpath
+++ b/components/klab.component.mca/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.mca/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.mca/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/components/klab.component.mca/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.mca/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.mca/src/main/java/org/integratedmodelling/owa/OWAResolver.java b/components/klab.component.mca/src/main/java/org/integratedmodelling/owa/OWAResolver.java
index e2b009359..3bde09c7b 100644
--- a/components/klab.component.mca/src/main/java/org/integratedmodelling/owa/OWAResolver.java
+++ b/components/klab.component.mca/src/main/java/org/integratedmodelling/owa/OWAResolver.java
@@ -28,7 +28,7 @@
import org.integratedmodelling.klab.utils.Parameters;
-/*
+/**
* Resolver for Ordered Weighted Averages (OWA) of multiple observations. OWAs are used in multi-criteria analysis
* to guide decision making in spatially distributed contexts by associating a degree of importance, risk or
* vulnerability to each location in a certain scope based on the relative relevance of a set of observables and the
diff --git a/components/klab.component.ml/.classpath b/components/klab.component.ml/.classpath
index d2bc4e02a..5869b871e 100644
--- a/components/klab.component.ml/.classpath
+++ b/components/klab.component.ml/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.ml/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.ml/.settings/org.eclipse.jdt.core.prefs
index 8406321eb..d44fef534 100644
--- a/components/klab.component.ml/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.ml/.settings/org.eclipse.jdt.core.prefs
@@ -2,8 +2,10 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8
diff --git a/components/klab.component.noisemodelling/.classpath b/components/klab.component.noisemodelling/.classpath
index d2bc4e02a..5869b871e 100644
--- a/components/klab.component.noisemodelling/.classpath
+++ b/components/klab.component.noisemodelling/.classpath
@@ -1,38 +1,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/klab.component.noisemodelling/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.noisemodelling/.settings/org.eclipse.jdt.core.prefs
index 8406321eb..d44fef534 100644
--- a/components/klab.component.noisemodelling/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.noisemodelling/.settings/org.eclipse.jdt.core.prefs
@@ -2,8 +2,10 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=1.8
diff --git a/components/klab.component.opencpu/.classpath b/components/klab.component.opencpu/.classpath
index 002ad570e..6fc81d614 100644
--- a/components/klab.component.opencpu/.classpath
+++ b/components/klab.component.opencpu/.classpath
@@ -13,19 +13,20 @@
| |
+
-
-
+
-
+
+
diff --git a/components/klab.component.opencpu/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.opencpu/.settings/org.eclipse.jdt.core.prefs
index 2f5cc74c3..d089a9b73 100644
--- a/components/klab.component.opencpu/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.opencpu/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.random/.classpath b/components/klab.component.random/.classpath
index 2e8d71174..f5a60b0d5 100644
--- a/components/klab.component.random/.classpath
+++ b/components/klab.component.random/.classpath
@@ -6,8 +6,9 @@
-
+
+
@@ -23,15 +24,15 @@
+
-
-
+
diff --git a/components/klab.component.random/.settings/org.eclipse.jdt.core.prefs b/components/klab.component.random/.settings/org.eclipse.jdt.core.prefs
index cb635b1c2..529020c74 100644
--- a/components/klab.component.random/.settings/org.eclipse.jdt.core.prefs
+++ b/components/klab.component.random/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,11 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
-org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/components/klab.component.random/src/main/java/org/integratedmodelling/random/adapters/RecreationIDBAdapter.java b/components/klab.component.random/src/main/java/org/integratedmodelling/random/adapters/RecreationIDBAdapter.java
index 5b1edd225..5e24378f6 100644
--- a/components/klab.component.random/src/main/java/org/integratedmodelling/random/adapters/RecreationIDBAdapter.java
+++ b/components/klab.component.random/src/main/java/org/integratedmodelling/random/adapters/RecreationIDBAdapter.java
@@ -93,12 +93,11 @@ public void encodeData(Urn urn, Builder builder, IGeometry geometry, IContextual
IScale scale = geometry instanceof IScale ? (IScale) geometry : Scale.create(geometry);
if (scale.getSpace() != null) {
-
- RecreationIDB ridb = new RecreationIDB();
- String input = buildRecreationIDBInput(parameters);
- RecreationIDBOutputDeserializer.RecreationAreas recreationAreas = ridb.recreationAreas(input,apiKey);
- List