@Override public String toString() { return String.format("%s %n[%n defaultCRS=%s,%n otherCRS=%s%n]", this.getClass().getSimpleName(), getDefaultCRS(), CollectionHelper.collectionToString(getOtherCRS())); }
/** * constructor * * @param defaultCRS * the mandatory default CRS */ public InspireSupportedCRS(String defaultCRS) { setDefaultCRS(defaultCRS); }
/** * Write {@link InspireSupportedCRS} to stream * * @param supportedCRSes * {@link InspireSupportedCRS} to write to stream * @param root * indicator if this is a root element and namespaces should be * added * @throws XMLStreamException * If an error occurs when writing the object to stream */ private void writeSupportedCRS(InspireSupportedCRS supportedCRSes, boolean root) throws XMLStreamException { start(QN_SUPPORTED_CRS); if (root) { writeInspireDLSNamespaces(); } writeDefaultCRS(supportedCRSes.getDefaultCRS()); if (supportedCRSes.isSetSupportedCRSs()) { for (String supportedCRS : supportedCRSes.getOtherCRS()) { writeOtherCRS(supportedCRS); } } end(QN_SUPPORTED_CRS); }
/** * Add the other CRS * * @param otherCRS * the other CRS to add * @return this */ public InspireSupportedCRS addOtherCRS(String otherCRS) { getOtherCRS().add(otherCRS); return this; }
/** * Get the supported languages * * @return the supported languages */ protected InspireSupportedCRS getSupportedCRS() { InspireSupportedCRS inspireSupportedCRS = null; if (getInspireHelper().isUseAuthority()) { inspireSupportedCRS = new InspireSupportedCRS(getGeometryHandler().addAuthorityCrsPrefix( getGeometryHandler().getDefaultResponseEPSG())); inspireSupportedCRS.setOtherCRS(getGeometryHandler().addAuthorityCrsPrefix( removeDefaultCRS(getGeometryHandler().getDefaultResponseEPSG(), getCache().getEpsgCodes()))); } else { inspireSupportedCRS = new InspireSupportedCRS(getGeometryHandler().addOgcCrsPrefix( getGeometryHandler().getDefaultResponseEPSG())); inspireSupportedCRS.setOtherCRS(getGeometryHandler().addOgcCrsPrefix( removeDefaultCRS(getGeometryHandler().getDefaultResponseEPSG(), getCache().getEpsgCodes()))); } return inspireSupportedCRS; }
/** * Write {@link InspireSupportedCRS} to stream * * @param supportedCRSes * {@link InspireSupportedCRS} to write to stream * @param root * indicator if this is a root element and namespaces should be * added * @throws XMLStreamException * If an error occurs when writing the object to stream */ private void writeSupportedCRS(InspireSupportedCRS supportedCRSes, boolean root) throws XMLStreamException { start(QN_SUPPORTED_CRS); if (root) { writeInspireDLSNamespaces(); } writeDefaultCRS(supportedCRSes.getDefaultCRS()); if (supportedCRSes.isSetSupportedCRSs()) { for (String supportedCRS : supportedCRSes.getOtherCRS()) { writeOtherCRS(supportedCRS); } } end(QN_SUPPORTED_CRS); }
/** * Add the other CRS * * @param otherCRS * the other CRS to add * @return this */ public InspireSupportedCRS addOtherCRS(String otherCRS) { getOtherCRS().add(otherCRS); return this; }
/** * Get the supported languages * * @return the supported languages */ protected InspireSupportedCRS getSupportedCRS() { InspireSupportedCRS inspireSupportedCRS = null; if (getInspireHelper().isUseAuthority()) { inspireSupportedCRS = new InspireSupportedCRS(getGeometryHandler().addAuthorityCrsPrefix( getGeometryHandler().getDefaultResponseEPSG())); inspireSupportedCRS.setOtherCRS(getGeometryHandler().addAuthorityCrsPrefix( removeDefaultCRS(getGeometryHandler().getDefaultResponseEPSG(), getCache().getEpsgCodes()))); } else { inspireSupportedCRS = new InspireSupportedCRS(getGeometryHandler().addOgcCrsPrefix( getGeometryHandler().getDefaultResponseEPSG())); inspireSupportedCRS.setOtherCRS(getGeometryHandler().addOgcCrsPrefix( removeDefaultCRS(getGeometryHandler().getDefaultResponseEPSG(), getCache().getEpsgCodes()))); } return inspireSupportedCRS; }
@Override public String toString() { return String.format("%s %n[%n defaultCRS=%s,%n otherCRS=%s%n]", this.getClass().getSimpleName(), getDefaultCRS(), CollectionHelper.collectionToString(getOtherCRS())); }
/** * Set the other CRSs, clears the existing collection * * @param otherCRS * the otherCRS to set * @return this */ public InspireSupportedCRS setOtherCRS(Collection<String> otherCRS) { getOtherCRS().clear(); if (CollectionHelper.isNotEmpty(otherCRS)) { getOtherCRS().addAll(otherCRS); } return this; }
/** * constructor * * @param defaultCRS * the mandatory default CRS */ public InspireSupportedCRS(String defaultCRS) { setDefaultCRS(defaultCRS); }
/** * Set the other CRSs, clears the existing collection * * @param otherCRS * the otherCRS to set * @return this */ public InspireSupportedCRS setOtherCRS(Collection<String> otherCRS) { getOtherCRS().clear(); if (CollectionHelper.isNotEmpty(otherCRS)) { getOtherCRS().addAll(otherCRS); } return this; }
/** * Check if other CRSs are set * * @return <code>true</code>, if other CRSs are set */ public boolean isSetSupportedCRSs() { return CollectionHelper.isNotEmpty(getOtherCRS()); }
/** * Check if other CRSs are set * * @return <code>true</code>, if other CRSs are set */ public boolean isSetSupportedCRSs() { return CollectionHelper.isNotEmpty(getOtherCRS()); }