annotate gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultArtifact.java @ 5861:172338b1407f

GWT client: Added copyright header.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 14:30:15 +0200
parents 5aa05a7a34b7
children ea9eef426962
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
6 * documentation coming with Dive4Elements River for details.
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.shared.model;
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
870
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
11 import java.util.List;
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
12
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 /**
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 * The default implementation of an artifact that might be used in the client.
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 *
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 */
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 public class DefaultArtifact implements Artifact {
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
855
2c48d75c4ab7 Minor cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 227
diff changeset
21 /** The artifact's uuid. */
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 protected String uuid;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
855
2c48d75c4ab7 Minor cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 227
diff changeset
24 /** The artifacts hash value. */
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 protected String hash;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
862
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
27 /** Determines if the artifact is in background mode.*/
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
28 protected boolean inBackground;
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
29
870
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
30 protected List<CalculationMessage> messages;
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
31
855
2c48d75c4ab7 Minor cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 227
diff changeset
32 /** The current artifact description. */
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 protected ArtifactDescription artifactDescription;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 /**
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 * This constructor should not be used to create new instances of this
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 * class. An empty artifact without uuid and hash will be the result of
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 * this constructor call.
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 */
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 public DefaultArtifact() {
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43
862
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
44 public DefaultArtifact(String uuid, String hash) {
870
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
45 this(uuid, hash, false, null);
862
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
46 }
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
47
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
48
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 /**
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 * This constructor creates a new artifact instance with a uuid and a hash.
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 *
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 * @param uuid The artifact's uuid.
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 * @param hash The artifact's hash.
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 */
870
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
55 public DefaultArtifact(
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
56 String uuid,
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
57 String hash,
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
58 boolean inBackground,
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
59 List<CalculationMessage> messages
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
60 ) {
862
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
61 this.uuid = uuid;
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
62 this.hash = hash;
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
63 this.inBackground = inBackground;
870
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
64 this.messages = messages;
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 public String getUuid() {
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 return uuid;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 public String getHash() {
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 return hash;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77
227
7f7f6d2c4b2c We can now distinuish between different artifact types based on its name in the DESCRIBE. The ArtifactCreator returns concrete instances of Artifacts now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 10
diff changeset
78 public String getName() {
7f7f6d2c4b2c We can now distinuish between different artifact types based on its name in the DESCRIBE. The ArtifactCreator returns concrete instances of Artifacts now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 10
diff changeset
79 return "default";
7f7f6d2c4b2c We can now distinuish between different artifact types based on its name in the DESCRIBE. The ArtifactCreator returns concrete instances of Artifacts now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 10
diff changeset
80 }
7f7f6d2c4b2c We can now distinuish between different artifact types based on its name in the DESCRIBE. The ArtifactCreator returns concrete instances of Artifacts now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 10
diff changeset
81
7f7f6d2c4b2c We can now distinuish between different artifact types based on its name in the DESCRIBE. The ArtifactCreator returns concrete instances of Artifacts now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 10
diff changeset
82
862
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
83 public boolean isInBackground() {
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
84 return inBackground;
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
85 }
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
86
c9549074ecd1 Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 855
diff changeset
87
870
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
88 public List<CalculationMessage> getBackgroundMessages() {
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
89 return messages;
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
90 }
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
91
d5fb88ba99d2 Display status message and progress information in the WSPLGEN loading panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 862
diff changeset
92
10
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93 public ArtifactDescription getArtifactDescription() {
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94 return artifactDescription;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
95 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98 public void setArtifactDescription(ArtifactDescription description) {
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 this.artifactDescription = description;
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 }
fc616c192902 Modified the Artifact interface and added a DefaultArtifact implementation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org