Mercurial > dive4elements > river
changeset 4403:d4f88fda6ed3
Improve debugging inf FLYSArtifact
Improve debugging inf FLYSArtifact when building filter facets.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 05 Nov 2012 16:02:52 +0100 |
parents | c84630d544a1 |
children | 193f11d20bd8 |
files | flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Mon Nov 05 15:17:58 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Mon Nov 05 16:02:52 2012 +0100 @@ -323,6 +323,9 @@ * @see filterFacets */ protected Map<String, List<Facet>> buildFilterFacets(Document document) { + if (log.isDebugEnabled()) { + log.debug("Building filter factes for artifact " + this.getName()); + } NodeList nodes = (NodeList)XMLUtils.xpath( document, @@ -339,7 +342,7 @@ for (int i = 0, N = nodes.getLength(); i < N; ++i) { Element element = (Element)nodes.item(i); String oName = element.getAttribute("name"); - if (oName.length() == 0) { + if (oName == null || oName.isEmpty()) { continue; } @@ -362,6 +365,10 @@ log.warn(nfe); index = 0; } + if (log.isDebugEnabled()) { + log.debug("Creating filter facet " + fName + " with index " + index + + " for out " + oName); + } facets.add(new DefaultFacet(index, fName, "")); } @@ -1129,10 +1136,13 @@ filtered.add(nout); } } + else if (debug) { + log.debug("No filter Factes for Output: " + outName); + } } if (debug) { - log.debug("All Facets after filtering = " + filtered.size()); + log.debug("Number of outs after filtering = " + filtered.size()); } return filtered;