# HG changeset patch # User Felix Wolfsteller # Date 1350884085 -7200 # Node ID 6b0683f5c5305588f06684ac856a39caefcf8c9c # Parent e1f81795401f2a6e2510867f326288097ea8036e Documentation added, cosmetics. diff -r e1f81795401f -r 6b0683f5c530 flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Thu Oct 18 20:14:48 2012 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Mon Oct 22 07:34:45 2012 +0200 @@ -249,6 +249,7 @@ } + /** Clone the internal map of map of state-name to state-data. */ protected Map cloneData() { Map copy = new TreeMap(); @@ -518,7 +519,7 @@ String.valueOf(context.isInBackground()), true); - CalculationMessage message = (CalculationMessage) messages.getLast(); + CalculationMessage message = (CalculationMessage) messages.getLast(); cr.addAttr( inBackground, "steps", @@ -743,6 +744,7 @@ } + /** Remove and return statedata associated to name. */ protected StateData removeData(String name) { return this.data.remove(name); } @@ -760,6 +762,7 @@ return data.get(name); } + /** * A derived Artifact class can use this method to set the data */ @@ -767,6 +770,7 @@ this.data = data; } + /** Return named data item, null if not found. */ public String getDataAsString(String name) { StateData data = getData(name); @@ -887,9 +891,11 @@ } + /** Return all produced facets. */ public List getFacets() { List all = new ArrayList(); + // Iterate over facets of each state. for (List fs: facets.values()) { all.addAll(fs); } @@ -1488,6 +1494,7 @@ } + /** Destroy and clean up state with given id. */ protected void destroyState(String id, Object context) { State s = getState(context, id); s.endOfLife(this, context);