/** * Gets the sections described in the GetCapabilities operation. * * @param capabilitiesReq * @return a set of type sections */ private Set<Sections> getSections( GetCapabilities capabilitiesReq ) { Set<String> sections = capabilitiesReq.getSections(); Set<Sections> result = new HashSet<Sections>(); if ( !( sections.isEmpty() || sections.contains( "/" ) ) ) { final int length = "/CSW_Capabilities/".length(); for ( String section : sections ) { if ( section.startsWith( "/CSW_Capabilities/" ) ) { section = section.substring( length ); } try { result.add( Sections.valueOf( section ) ); } catch ( IllegalArgumentException ex ) { // unknown section name // the spec does not say what to do, so we ignore it } } } return result; }
public void exportServiceIdentification( XMLStreamWriter writer, ServiceIdentificationType identification, String serviceType, String serviceTypeVersion, String serviceTypeCodeSpace ) throws XMLStreamException { writer.writeStartElement( "http://www.opengis.net/ows", Sections.ServiceIdentification.toString() );