Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 3242:1dca41dba135
Move annotation code to base class ChartGenerator
flys-artifacts/trunk@4874 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 04 Jul 2012 22:28:44 +0000 |
parents | 1203e12c97a6 |
children | dd3ddc8ecb14 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Wed Jul 04 06:54:39 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Wed Jul 04 22:28:44 2012 +0000 @@ -731,7 +731,7 @@ CallContext context) throws ArtifactDatabaseException { - log.debug("FLYSArtifactCollection.getFacetThemeFromAttribute"); + log.debug("FLYSArtifactCollection.getFacetThemeFromAttribute(facet=" + facet + ", index=" + index); ArtifactDatabase db = context.getDatabase(); CallMeta meta = context.getMeta(); @@ -767,13 +767,13 @@ Node theme = (Node) XMLUtils.xpath( tmp, - "art:themes/theme[@facet='" + facet + + "art:themes/theme[@facet='" + facet + "' and @index='" + String.valueOf(index) + "']", XPathConstants.NODE, ArtifactNamespaceContext.INSTANCE); if (theme == null) { - log.warn("Could not find the theme in attribute of: " + uuid); + log.warn("Could not find the theme in attribute of: " + facet + " " + uuid); Theme t = getThemeForFacet( uuid, facet, pattern, index, outName, context); @@ -786,6 +786,9 @@ addThemeToAttribute(uuid, attr, t, context); theme = t.toXML().getFirstChild(); } + /*else { + log.debug("getFacetThemeFromAttribute: " + XMLUtils.toString(theme)); + }*/ Document doc = XMLUtils.newDocument(); doc.appendChild(doc.importNode(theme, true)); @@ -847,7 +850,7 @@ try { setCollectionItemAttribute(uuid, attr, context); - log.debug("Successfully added theme to item attribute."); + //log.debug("addThemeToAttribute: Successfully added theme to item attribute: " + XMLUtils.toString(attr)); } catch (ArtifactDatabaseException e) { // do nothing @@ -884,9 +887,10 @@ } Document attr = XMLUtils.newDocument(); - addThemeToAttribute(uuid, attr, t, context); + log.debug("initItemAttribute for facet " + facet + ": " + XMLUtils.toString(attr)); + return attr; } @@ -949,7 +953,7 @@ try { FLYSArtifact artifact = (FLYSArtifact) db.getRawArtifact(uuid); log.debug("Got raw artifact"); - flysContext.put(flysContext.ARTIFACT_KEY, artifact); + flysContext.put(FLYSContext.ARTIFACT_KEY, artifact); } catch (ArtifactDatabaseException dbe) { log.error("Exception caught when trying to get art.", dbe);