Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java @ 1171:a3108f0a2fe7
Bugfix: merge facets for the Collection's attribute only if the new and old facet's name and owner artifact are equal.
flys-artifacts/trunk@2736 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 14 Sep 2011 10:04:19 +0000 |
parents | 59ae2a823e73 |
children | 16c74ca3586e |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Wed Sep 14 09:36:28 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Wed Sep 14 10:04:19 2011 +0000 @@ -67,8 +67,8 @@ Document doc, Node outs, ElementCreator cr, - Output a, - Output b) + Output a, /* new output */ + Output b) /* old output */ { Element output = cr.create("output"); cr.addAttr(output, "name", a.getName()); @@ -90,8 +90,8 @@ Document doc, ElementCreator cr, Element output, - List<Facet> a, - List<Facet> b) + List<Facet> a, /* new facets */ + List<Facet> b) /* old facets */ { int num = a.size(); @@ -113,8 +113,8 @@ Document doc, ElementCreator cr, Element output, - ManagedFacet a, - List<Facet> list) + ManagedFacet a, /* new facets */ + List<Facet> list) /* old facets */ { String nameA = a.getName() + a.getIndex(); @@ -127,6 +127,12 @@ String nameB = facet.getName() + facet.getIndex(); if (nameA.equals(nameB)) { + ManagedFacet b = (ManagedFacet) facet; + + if (!b.getArtifact().equals(a.getArtifact())) { + continue; + } + Node n = facet.toXML(doc); if (n != null) {