elevationDimension.setPresentation(
Presentation.DISCRETE_INTERVAL, BigDecimal.valueOf(12));
List<Element> elList = ElementUtils.search(
elevationDimension.getRoot(), new Filter() {
public boolean matches(Object obj) {
if (obj instanceof Element) {
final Element el = ((Element) obj);
if (el.getName().equals(
GSDimensionInfoEncoder.DIMENSIONINFO)) {
return true;
}
}
return false;
}
});
// using set we get only one element called
// Presentation.DISCRETE_INTERVAL
Assert.assertEquals(elList.size(), 1);
elevationDimension.setPresentation(Presentation.LIST);
// this kind of presentation do not support a resolution parameter
elList = ElementUtils.search(
elevationDimension.getRoot(), new Filter() {
public boolean matches(Object obj) {
if (obj instanceof Element) {
final Element el = ((Element) obj);
if (el.getName().equals(
GSDimensionInfoEncoder.RESOLUTION)) {