Mercurial > dive4elements > river
changeset 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 | f45bbc80bd3d |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedDomFacet.java |
diffstat | 2 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Sep 23 11:58:08 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon Sep 26 13:10:17 2011 +0000 @@ -1,3 +1,20 @@ +2011-09-23 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Fix (revert) access to position in ManagedDomFacet. + + * src/main/java/de/intevation/flys/artifacts/model/ManagedDomFacet.java: + (getPosition): Do not add prefix when querying position ("pos") + attribute, add a logger for faster future debugging. + +2011-09-23 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Squash positional conflict-bug. + + * src/main/java/de/intevation/flys/collections/AttributeWriter.java: + (mergeFacets): Removed, replaced in parts by pickFacet. + (pickFacet): New, return facet to be added to document. + Documentation added. + 2011-09-23 Felix Wolfsteller <felix.wolfsteller@intevation.de> Squash a bug about wrongly named "art:pos" attribute in ManagedDomFacet (was
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedDomFacet.java Fri Sep 23 11:58:08 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedDomFacet.java Mon Sep 26 13:10:17 2011 +0000 @@ -1,5 +1,7 @@ package de.intevation.flys.artifacts.model; +import org.apache.log4j.Logger; + import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -22,6 +24,8 @@ protected Element facet; + private static Logger logger = Logger.getLogger(ManagedDomFacet.class); + public ManagedDomFacet(Element facet) { super(null, -1, null, null, -1, -1); @@ -76,7 +80,7 @@ if (this.position < 0) { String position = facet.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, - ArtifactNamespaceContext.NAMESPACE_PREFIX + ":" + "pos"); + "pos"); if (position != null && position.length() > 0) { this.position = Integer.parseInt(position);