-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recalculate Bounding Boxes #200
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.