/** * Tries to append an object of the {@code KEYWORD[something]} form. The given value is typically, * but not necessarily, a {@link FormattableObject} object or an instance of an interface that can * be converted to {@code FormattableObject}. * * @return {@code true} on success, or {@code false} if the given type is not recognized. */ final boolean appendElement(final Object value) { if (value instanceof FormattableObject) { append((FormattableObject) value); } else if (value instanceof IdentifiedObject) { append(ReferencingServices.getInstance().toFormattableObject((IdentifiedObject) value)); } else if (value instanceof MathTransform) { append((MathTransform) value); } else if (value instanceof Unit<?>) { append((Unit<?>) value); } else if (value instanceof GeographicBoundingBox) { append((GeographicBoundingBox) value, BBOX_ACCURACY); } else if (value instanceof VerticalExtent) { appendVerticalExtent(Extents.getVerticalRange(new SimpleExtent(null, (VerticalExtent) value, null))); } else if (value instanceof TemporalExtent) { appendTemporalExtent(Extents.getTimeRange(new SimpleExtent(null, null, (TemporalExtent) value))); } else { return false; } return true; }
/** * Tries to append an object of the {@code KEYWORD[something]} form. The given value is typically, * but not necessarily, a {@link FormattableObject} object or an instance of an interface that can * be converted to {@code FormattableObject}. * * @return {@code true} on success, or {@code false} if the given type is not recognized. */ final boolean appendElement(final Object value) { if (value instanceof FormattableObject) { append((FormattableObject) value); } else if (value instanceof IdentifiedObject) { append(ReferencingServices.getInstance().toFormattableObject((IdentifiedObject) value)); } else if (value instanceof MathTransform) { append((MathTransform) value); } else if (value instanceof Unit<?>) { append((Unit<?>) value); } else if (value instanceof GeographicBoundingBox) { append((GeographicBoundingBox) value, BBOX_ACCURACY); } else if (value instanceof VerticalExtent) { appendVerticalExtent(Extents.getVerticalRange(new SimpleExtent(null, (VerticalExtent) value, null))); } else if (value instanceof TemporalExtent) { appendTemporalExtent(Extents.getTimeRange(new SimpleExtent(null, null, (TemporalExtent) value))); } else { return false; } return true; }
append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY); appendVerticalExtent(Extents.getVerticalRange(area)); appendTemporalExtent(Extents.getTimeRange(area));
append(Extents.getGeographicBoundingBox(area), BBOX_ACCURACY); appendVerticalExtent(Extents.getVerticalRange(area)); appendTemporalExtent(Extents.getTimeRange(area));