Skip to content

Commit

Permalink
Preparing for hierarchial activities
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinando Villa committed Nov 12, 2024
1 parent 5d62526 commit 02f4e33
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 1,265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.integratedmodelling.klab.api.knowledge.Artifact;
import org.integratedmodelling.klab.api.knowledge.Observable;
import org.integratedmodelling.klab.api.lang.ServiceCall;
import org.integratedmodelling.klab.api.provenance.Activity;
import org.integratedmodelling.klab.api.services.runtime.Actuator;

import java.io.Serial;
Expand All @@ -27,6 +28,7 @@ public class ActuatorImpl implements Actuator {
private Actuator.Type actuatorType;
private long internalId; // ID within the graph, can't be the same as the observation
private double resolvedCoverage;
private Activity activity;

@Override
public long getId() {
Expand Down Expand Up @@ -134,6 +136,20 @@ public void setInternalId(long internalId) {
this.internalId = internalId;
}

/**
* Non-API: the actuator carries the activity it represents, which it transfers to the scope of execution
* so that provenance can be reconstructed.
*
* @return
*/
public Activity getActivity() {
return activity;
}

public void setActivity(Activity activity) {
this.activity = activity;
}

@Override
public String toString() {
return "ActuatorImpl{ " + this.id + "}";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.integratedmodelling.klab.services.resolver;
package org.integratedmodelling.common.services.client.resolver;

import org.integratedmodelling.common.utils.Utils;
import org.integratedmodelling.klab.api.knowledge.observation.Observation;
Expand Down
Loading

0 comments on commit 02f4e33

Please sign in to comment.