private static void exportServiceIdentification( XMLStreamWriter writer, ServiceIdentificationType ident ) throws XMLStreamException { writer.writeStartElement( OWS_NS, "ServiceIdentification" ); if ( ident == null ) { writeElement( writer, OWS_NS, "Title", "deegree 3 WPS" ); writeElement( writer, OWS_NS, "Abstract", "deegree 3 WPS implementation" ); } else { List<String> title = ident.getTitle(); writeElement( writer, OWS_NS, "Title", title.isEmpty() ? "deegree 3 WPS" : title.get( 0 ) ); List<String> _abstract = ident.getAbstract(); writeElement( writer, OWS_NS, "Abstract", _abstract.isEmpty() ? "deegree 3 WPS implementation" : _abstract.get( 0 ) ); } writeElement( writer, OWS_NS, "ServiceType", "WPS" ); writeElement( writer, OWS_NS, "ServiceTypeVersion", "1.0.0" ); writer.writeEndElement(); }
exportSimpleStrings( writer, serviceID.getTitle(), OWS110_NS, "Title" ); exportSimpleStrings( writer, serviceID.getAbstract(), OWS110_NS, "Abstract" ); exportKeyWords110( writer, serviceID.getKeywords() );
writer.writeStartElement( "http://www.opengis.net/ows", Sections.ServiceIdentification.toString() ); for ( String oneTitle : identification.getTitle() ) { writeElement( writer, "http://www.opengis.net/ows", "Title", oneTitle );
/** * @param si * @return null, if si is null */ public static ServiceIdentification convertFromJAXB( ServiceIdentificationType si ) { if ( si == null ) { return null; } List<Pair<List<LanguageString>, CodeType>> keywords = null; if ( si.getKeywords() != null ) { keywords = map( si.getKeywords(), KW_MAPPER ); } List<LanguageString> titles = map( si.getTitle(), LANG_MAPPER ); List<LanguageString> abstracts = map( si.getAbstract(), LANG_MAPPER ); String fees = si.getFees(); List<String> accessConstraints = si.getAccessConstraints(); return new ServiceIdentification( null, titles, abstracts, keywords, null, null, null, fees, accessConstraints ); }