Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedDomFacet.java @ 1637:866c1f37f2bd
Fix getPosition() in ManagedDomFacet.
flys-artifacts/trunk@2822 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 26 Sep 2011 13:10:17 +0000 |
parents | c2edf0032cf8 |
children | 614ffddb860e |
comparison
equal
deleted
inserted
replaced
1636:c2edf0032cf8 | 1637:866c1f37f2bd |
---|---|
1 package de.intevation.flys.artifacts.model; | 1 package de.intevation.flys.artifacts.model; |
2 | |
3 import org.apache.log4j.Logger; | |
2 | 4 |
3 import org.w3c.dom.Document; | 5 import org.w3c.dom.Document; |
4 import org.w3c.dom.Element; | 6 import org.w3c.dom.Element; |
5 import org.w3c.dom.Node; | 7 import org.w3c.dom.Node; |
6 | 8 |
19 * touched. | 21 * touched. |
20 */ | 22 */ |
21 public class ManagedDomFacet extends ManagedFacet { | 23 public class ManagedDomFacet extends ManagedFacet { |
22 | 24 |
23 protected Element facet; | 25 protected Element facet; |
26 | |
27 private static Logger logger = Logger.getLogger(ManagedDomFacet.class); | |
24 | 28 |
25 | 29 |
26 public ManagedDomFacet(Element facet) { | 30 public ManagedDomFacet(Element facet) { |
27 super(null, -1, null, null, -1, -1); | 31 super(null, -1, null, null, -1, -1); |
28 | 32 |
74 @Override | 78 @Override |
75 public int getPosition() { | 79 public int getPosition() { |
76 if (this.position < 0) { | 80 if (this.position < 0) { |
77 String position = facet.getAttributeNS( | 81 String position = facet.getAttributeNS( |
78 ArtifactNamespaceContext.NAMESPACE_URI, | 82 ArtifactNamespaceContext.NAMESPACE_URI, |
79 ArtifactNamespaceContext.NAMESPACE_PREFIX + ":" + "pos"); | 83 "pos"); |
80 | 84 |
81 if (position != null && position.length() > 0) { | 85 if (position != null && position.length() > 0) { |
82 this.position = Integer.parseInt(position); | 86 this.position = Integer.parseInt(position); |
83 } | 87 } |
84 } | 88 } |