comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelPairSelectState.java @ 5867:59ff03ff48f1

River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 15:23:01 +0200
parents 4897a58c8746
children af13ceeba52a
comparison
equal deleted inserted replaced
5866:9a6741ccf6d4 5867:59ff03ff48f1
20 import org.dive4elements.artifactdatabase.ProtocolUtils; 20 import org.dive4elements.artifactdatabase.ProtocolUtils;
21 import org.dive4elements.artifactdatabase.state.Facet; 21 import org.dive4elements.artifactdatabase.state.Facet;
22 22
23 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; 23 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
24 24
25 import org.dive4elements.river.artifacts.FLYSArtifact; 25 import org.dive4elements.river.artifacts.D4EArtifact;
26 import org.dive4elements.river.artifacts.model.FacetTypes; 26 import org.dive4elements.river.artifacts.model.FacetTypes;
27 import org.dive4elements.river.artifacts.resources.Resources; 27 import org.dive4elements.river.artifacts.resources.Resources;
28 28
29 import org.dive4elements.river.utils.StringUtil; 29 import org.dive4elements.river.utils.StringUtil;
30 30
55 /** 55 /**
56 * Overridden to do nothing. 56 * Overridden to do nothing.
57 */ 57 */
58 @Override 58 @Override
59 public Object computeAdvance( 59 public Object computeAdvance(
60 FLYSArtifact artifact, 60 D4EArtifact artifact,
61 String hash, 61 String hash,
62 CallContext context, 62 CallContext context,
63 List<Facet> facets, 63 List<Facet> facets,
64 Object old 64 Object old
65 ) { 65 ) {
68 } 68 }
69 69
70 70
71 /** 71 /**
72 * Create elements for document (prepopulated with data, if any). 72 * Create elements for document (prepopulated with data, if any).
73 * @param artifact FLYSArtifact to get data from. 73 * @param artifact D4EArtifact to get data from.
74 * @param name DataName, expceted to be "diffids". 74 * @param name DataName, expceted to be "diffids".
75 */ 75 */
76 @Override 76 @Override
77 protected Element[] createItems( 77 protected Element[] createItems(
78 ElementCreator cr, 78 ElementCreator cr,
83 logger.debug("createItems: " + name); 83 logger.debug("createItems: " + name);
84 if (name.equals("diffids")) { 84 if (name.equals("diffids")) {
85 Element item = ProtocolUtils.createArtNode(cr, "item", null, null); 85 Element item = ProtocolUtils.createArtNode(cr, "item", null, null);
86 Element label = ProtocolUtils.createArtNode(cr, "label", null, null); 86 Element label = ProtocolUtils.createArtNode(cr, "label", null, null);
87 Element value = ProtocolUtils.createArtNode(cr, "value", null, null); 87 Element value = ProtocolUtils.createArtNode(cr, "value", null, null);
88 FLYSArtifact flys = (FLYSArtifact) artifact; 88 D4EArtifact flys = (D4EArtifact) artifact;
89 String s = flys.getDataAsString("diffids"); 89 String s = flys.getDataAsString("diffids");
90 value.setTextContent(s); 90 value.setTextContent(s);
91 item.appendChild(label); 91 item.appendChild(label);
92 item.appendChild(value); 92 item.appendChild(value);
93 return new Element[] { item }; 93 return new Element[] { item };
99 /** 99 /**
100 * Creats the data element used for the static part of DESCRIBE document. 100 * Creats the data element used for the static part of DESCRIBE document.
101 */ 101 */
102 @Override 102 @Override
103 protected Element createStaticData( 103 protected Element createStaticData(
104 FLYSArtifact flys, 104 D4EArtifact flys,
105 ElementCreator creator, 105 ElementCreator creator,
106 CallContext cc, 106 CallContext cc,
107 String name, 107 String name,
108 String value, 108 String value,
109 String type 109 String type

http://dive4elements.wald.intevation.org