private void writeName( final XMLStreamWriter writer, final String name ) throws XMLStreamException { if ( name != null ) { writeElement( writer, "Name", name ); } }
private void writeName( final XMLStreamWriter writer, final String name ) throws XMLStreamException { if ( name != null ) { writeElement( writer, WMSNS, "Name", name ); } }
/** * Writes an empty element 'Value' in the given namespace and with the given value * * @param writer * @param ns * the namespaceURI * @param value * the value to write * @throws XMLStreamException */ public void writeValue( XMLStreamWriter writer, String ns, String value ) throws XMLStreamException { XMLAdapter.writeElement( writer, ns, "Value", value ); }
private void writeScaleDenominators( final XMLStreamWriter writer, final DoublePair scaleDenominators ) throws XMLStreamException { final Double min = scaleDenominators.first; if ( !min.isInfinite() ) { writeElement( writer, WMSNS, "MinScaleDenominator", scaleFormat.format( min ) ); } final Double max = scaleDenominators.second; if ( !max.isInfinite() ) { writeElement( writer, WMSNS, "MaxScaleDenominator", scaleFormat.format( max ) ); } }
private void writeTitle( final XMLStreamWriter writer, final List<LanguageString> titles, final String name ) throws XMLStreamException { if ( titles != null && !titles.isEmpty() ) { writeElement( writer, WMSNS, "Title", titles.get( 0 ).getString() ); } else if ( name != null ) { writeElement( writer, WMSNS, "Title", name ); } }
private void writeTitle( final XMLStreamWriter writer, final List<LanguageString> titles, final String name ) throws XMLStreamException { if ( titles != null && !titles.isEmpty() ) { writeElement( writer, "Title", titles.get( 0 ).getString() ); } else if ( name != null ) { writeElement( writer, "Title", name ); } }
private void writeImageFormats( XMLStreamWriter writer ) throws XMLStreamException { for ( String f : controller.getSupportedImageFormats() ) { writeElement( writer, "Format", f ); } }
private void writeAbstract( final XMLStreamWriter writer, final List<LanguageString> abstracts ) throws XMLStreamException { if ( abstracts != null && !abstracts.isEmpty() ) { writeElement( writer, "Abstract", abstracts.get( 0 ).getString() ); } }
private void writeAbstract( final XMLStreamWriter writer, final List<LanguageString> abstracts ) throws XMLStreamException { if ( abstracts != null && !abstracts.isEmpty() ) { writeElement( writer, WMSNS, "Abstract", abstracts.get( 0 ).getString() ); } }
void writeImageFormats( XMLStreamWriter writer ) throws XMLStreamException { for ( String f : controller.getSupportedImageFormats() ) { writeElement( writer, "Format", f ); } }
private void exportAccessConstraints( XMLStreamWriter writer, ServiceIdentificationType identification ) throws XMLStreamException { List<String> accessConstraints = identification.getAccessConstraints(); if ( accessConstraints.isEmpty() ) { accessConstraints.add( "NONE" ); } else { for ( String ac : accessConstraints ) { if ( !ac.isEmpty() ) { writeElement( writer, "http://www.opengis.net/ows", "AccessConstraints", ac ); } } } }
private void writeKeywordList( final XMLStreamWriter writer, final List<Pair<List<LanguageString>, CodeType>> keywordList ) throws XMLStreamException { if ( keywordList != null && !keywordList.isEmpty() ) { writer.writeStartElement( "KeywordList" ); for ( final Pair<List<LanguageString>, CodeType> kws : keywordList ) { for ( final LanguageString ls : kws.first ) { // <!ELEMENT Keyword (#PCDATA) > writeElement( writer, "Keyword", ls.getString() ); } } writer.writeEndElement(); } }
static void writeSrs( List<ICRS> crsList, XMLStreamWriter writer ) throws XMLStreamException { for ( ICRS crs : crsList ) { if ( crs.getAlias().startsWith( "AUTO" ) ) { writeElement( writer, WMSNS, "CRS", crs.getAlias().replace( "AUTO", "AUTO2" ) ); } else { writeElement( writer, WMSNS, "CRS", crs.getAlias() ); } } }
private void writeKeywords( XMLStreamWriter writer ) throws XMLStreamException { List<Pair<List<LanguageString>, CodeType>> keywords = identification == null ? null : identification.getKeywords(); if ( keywords != null && !keywords.isEmpty() ) { writer.writeStartElement( "KeywordList" ); for ( Pair<List<LanguageString>, CodeType> key : keywords ) { for ( LanguageString lanString : key.first ) { writeElement( writer, "Keyword", lanString.getString() ); } } writer.writeEndElement(); } }
private void writeExceptionFormats( XMLStreamWriter writer ) throws XMLStreamException { ExceptionsManager exceptionsManager = controller.getExceptionsManager(); for ( String format : exceptionsManager.getSupportedFormats( WMSConstants.VERSION_130 ) ) { writeElement( writer, "Format", format ); } }
private void writeCapabilitiesFormats( XMLStreamWriter writer ) throws XMLStreamException { for ( String f : controller.getCapabilitiesManager().getSupportedFormats() ) { writeElement( writer, WMSNS, "Format", f ); } }
private void writeInfoFormats( XMLStreamWriter writer ) throws XMLStreamException { for ( String f : controller.getFeatureInfoManager().getSupportedFormats() ) { writeElement( writer, "Format", f ); } }
void writeInfoFormats( XMLStreamWriter writer ) throws XMLStreamException { for ( String f : controller.getFeatureInfoManager().getSupportedFormats() ) { writeElement( writer, "Format", f ); } }
private void writeServiceIdentificationParts( XMLStreamWriter writer ) throws XMLStreamException { if ( identification != null ) { maybeWriteElement( writer, "Fees", identification.getFees() ); List<String> constr = identification.getAccessConstraints(); if ( constr != null ) { for ( String cons : constr ) { maybeWriteElement( writer, "AccessConstraints", cons ); } } } else { writeElement( writer, "Fees", "none" ); writeElement( writer, "AccessConstraints", "none" ); } } private boolean isGetSupported( WMSConstants.WMSRequestType requestType ) {
private void writeExtendedCapabilities( XMLStreamWriter writer ) { List<OMElement> caps = controller.getExtendedCapabilities( "1.3.0" ); if ( caps != null ) { for ( OMElement c : caps ) { try { XMLStreamReader reader = c.getXMLStreamReader(); XMLStreamUtils.skipStartDocument( reader ); writeElement( writer, reader ); } catch ( Throwable e ) { LOG.warn( "Could not export extended capabilities snippet" ); LOG.trace( "Stack trace", e ); } } } }