Recalculate Bounding Boxes#200
Conversation
…ses. geosolutions-it#199" This reverts commit e218762.
|
Sorry, it wasn't clear from the contributing guidelines, are you ok with multi-commit pull requests, or do you prefer them to be rebase-squashed into one commit? |
| renc.remove(GSResourceEncoder.KEYWORDS); | ||
| renc.remove(GSResourceEncoder.METADATA); | ||
| renc.remove(GSResourceEncoder.METADATALINKS); | ||
| String body = renc.toString(); |
There was a problem hiding this comment.
Update: never mind! After adding a method to XmlElement to recursively delete empty children, I was able to use the GS*Encoder classes instead of building the xml with Strings.
When I switched to using GSEncoder classes, I noted that several extra elements were added to the resulting XML documents. These extra empty elements could overwrite existing keywords, metadata, and metadatalinks. While I can remove a hard-coded list of extra elements now, the same kind of problem can occur in the future if new fields are added to the encoders without updating this class. I opted to revert to simple String construction instead of GSEncoder classes to ensure that this functionality would continue to be stable in the future.
…der classes. geosolutions-it#199"" This reverts commit cd51198.
…c implementation of geosolutions-it#199.
| String sUrl = baseUrl + "?recalculate=" + calculationMode.getParamValue(); | ||
| LOGGER.debug("Constructed the following url for bounding box recalculation: " + sUrl); | ||
|
|
||
| renc.recursivelyRemoveEmptyChildren(); |
There was a problem hiding this comment.
Here is an example usage of the new XmlElement method.
…d calls, reverted a class member to previous visibility, renamed a variable.
Addresses Issue #199. Includes tests. Adds the ability to recursively delete all of the empty child nodes of an XmlElement.