Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/collections/CollectionAttribute.java @ 1993:85132c9edd64
Make reuse of the old CollectionAttribute during the describe() operation of FLYSArtifactCollection - remove the old facets only.
flys-artifacts/trunk@3430 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 16 Dec 2011 09:19:11 +0000 |
parents | a7c437c9547e |
children | ca6ccf722c24 |
comparison
equal
deleted
inserted
replaced
1992:e1c9f28e2675 | 1993:85132c9edd64 |
---|---|
56 output.getType())); | 56 output.getType())); |
57 } | 57 } |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 public void setSettings(String outputKey, Settings settings) { | |
62 if (settings == null) { | |
63 logger.warn("Tried to set empty Settings for '" + outputKey + "'"); | |
64 return; | |
65 } | |
66 | |
67 if (outputMap == null) { | |
68 logger.warn("Tried to add facet but no Outputs are existing yet."); | |
69 return; | |
70 } | |
71 | |
72 Output output = outputMap.get(outputKey); | |
73 | |
74 if (output == null) { | |
75 logger.warn("Tried to add facet for unknown Output: " + outputKey); | |
76 return; | |
77 } | |
78 | |
79 output.setSettings(settings); | |
80 } | |
81 | |
82 | |
61 public void addFacet(String outputKey, Facet facet) { | 83 public void addFacet(String outputKey, Facet facet) { |
62 if (facet == null) { | 84 if (facet == null) { |
63 logger.warn("Tried to add empty facet."); | 85 logger.warn("Tried to add empty facet."); |
64 return; | 86 return; |
65 } | 87 } |
82 | 104 |
83 | 105 |
84 public void setLoadedRecommendations(Node loadedRecommendations) { | 106 public void setLoadedRecommendations(Node loadedRecommendations) { |
85 // TODO Replace this Node with a Java class object. | 107 // TODO Replace this Node with a Java class object. |
86 this.loadedRecommendations = loadedRecommendations; | 108 this.loadedRecommendations = loadedRecommendations; |
109 } | |
110 | |
111 | |
112 public void clearFacets(String outputKey) { | |
113 if (outputKey == null || outputKey.length() == 0) { | |
114 logger.warn("Tried to clear Facets, but no Output key specified!"); | |
115 return; | |
116 } | |
117 | |
118 if (outputMap == null) { | |
119 logger.warn("Tried to clear Facets, but no Outputs existing!"); | |
120 return; | |
121 } | |
122 | |
123 Output output = outputMap.get(outputKey); | |
124 if (output == null) { | |
125 logger.warn("Tried to clear Facets for unknown Out: " + outputKey); | |
126 return; | |
127 } | |
128 | |
129 output.setFacets(new ArrayList<Facet>()); | |
87 } | 130 } |
88 | 131 |
89 | 132 |
90 public Document toXML() { | 133 public Document toXML() { |
91 Document doc = XMLUtils.newDocument(); | 134 Document doc = XMLUtils.newDocument(); |