Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/AbstractExporter.java @ 695:45cd58a2a2bb facets-slt
OutGenerators doOut() takes a facet object now instead of just its name.
flys-artifacts/branches/facets-slt@2137 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 16 Jun 2011 14:31:41 +0000 |
parents | a7947972fdeb |
children | dad1a2c88f9f |
comparison
equal
deleted
inserted
replaced
694:68c6c75a6f7c | 695:45cd58a2a2bb |
---|---|
10 | 10 |
11 import au.com.bytecode.opencsv.CSVWriter; | 11 import au.com.bytecode.opencsv.CSVWriter; |
12 | 12 |
13 import de.intevation.artifacts.Artifact; | 13 import de.intevation.artifacts.Artifact; |
14 import de.intevation.artifacts.CallContext; | 14 import de.intevation.artifacts.CallContext; |
15 | |
16 import de.intevation.artifactdatabase.state.Facet; | |
15 | 17 |
16 import de.intevation.artifacts.common.ArtifactNamespaceContext; | 18 import de.intevation.artifacts.common.ArtifactNamespaceContext; |
17 import de.intevation.artifacts.common.utils.XMLUtils; | 19 import de.intevation.artifacts.common.utils.XMLUtils; |
18 | 20 |
19 import de.intevation.flys.artifacts.resources.Resources; | 21 import de.intevation.flys.artifacts.resources.Resources; |
103 * @param facet The facet to add - NOTE: the facet needs to fit to the first | 105 * @param facet The facet to add - NOTE: the facet needs to fit to the first |
104 * facet inserted into this exporter. Otherwise this artifact/facet is | 106 * facet inserted into this exporter. Otherwise this artifact/facet is |
105 * skipped. | 107 * skipped. |
106 * @param attr The attr document. | 108 * @param attr The attr document. |
107 */ | 109 */ |
108 public void doOut(Artifact artifact, String facet, Document attr) { | 110 public void doOut(Artifact artifact, Facet facet, Document attr) { |
109 logger.debug("AbstractExporter.doOut: " + facet); | 111 String name = facet.getName(); |
110 | 112 |
111 if (!isFacetValid(facet)) { | 113 logger.debug("AbstractExporter.doOut: " + name); |
112 logger.warn("Facet '" + facet + "' not valid. No output created!"); | 114 |
115 if (!isFacetValid(name)) { | |
116 logger.warn("Facet '" + name + "' not valid. No output created!"); | |
113 return; | 117 return; |
114 } | 118 } |
115 | 119 |
116 addData(artifact); | 120 addData(artifact); |
117 } | 121 } |