/** * parses the XmlBean representing the getCapabilities request and creates a * SosGetCapabilities request * * @param getCapsDoc * XmlBean created from the incoming request stream * @return Returns SosGetCapabilitiesRequest representing the request * */ private OwsServiceRequest parseGetCapabilities(GetCapabilitiesDocument getCapsDoc) { GetCapabilities getCaps = getCapsDoc.getGetCapabilities(); GetCapabilitiesRequest request = new GetCapabilitiesRequest(getCaps.getService()); if (getCaps.getAcceptFormats() != null && getCaps.getAcceptFormats().sizeOfOutputFormatArray() != 0) { request.setAcceptFormats(Arrays.asList(getCaps.getAcceptFormats().getOutputFormatArray())); } if (getCaps.getAcceptVersions() != null && getCaps.getAcceptVersions().sizeOfVersionArray() != 0) { request.setAcceptVersions(Arrays.asList(getCaps.getAcceptVersions().getVersionArray())); } if (getCaps.getSections() != null && getCaps.getSections().getSectionArray().length != 0) { request.setSections(Arrays.asList(getCaps.getSections().getSectionArray())); } return request; }
private void addSections(GetCapabilitiesDocument.GetCapabilities gc, GetCapabilitiesRequest request) throws EncodingException { if (request.isSetSections()) { gc.addNewSections().set(encodeOws(new OwsSections().setSections(request.getSections()))); } }
final String[] selectedSections = sectionParamShell.getSpecifiedTypedValueArray(String[].class); for (final String selectedSection : selectedSections) { sections.addSection(selectedSection); sections.addSection((String) sectionParamShell.getSpecifiedValue());
final String[] selectedSections = sectionParamShell.getSpecifiedTypedValueArray(String[].class); for (final String selectedSection : selectedSections) { sections.addSection(selectedSection); sections.addSection((String) sectionParamShell.getSpecifiedValue());
private void addSections(GetCapabilitiesType gct, GetCapabilitiesRequest request) throws EncodingException { if (request.isSetSections()) { gct.addNewSections().set(encodeOws(new OwsSections().setSections(request.getSections()))); } }
/** * parses the XmlBean representing the getCapabilities request and creates a * SosGetCapabilities request * * @param getCapsDoc * XmlBean created from the incoming request stream * @return Returns SosGetCapabilitiesRequest representing the request * * * @throws OwsExceptionReport * * If parsing the XmlBean failed */ private AbstractServiceRequest<?> parseGetCapabilities(GetCapabilitiesDocument getCapsDoc) throws OwsExceptionReport { GetCapabilitiesRequest request = new GetCapabilitiesRequest(); GetCapabilities getCaps = getCapsDoc.getGetCapabilities(); request.setService(getCaps.getService()); if (getCaps.getAcceptFormats() != null && getCaps.getAcceptFormats().sizeOfOutputFormatArray() != 0) { request.setAcceptFormats(Arrays.asList(getCaps.getAcceptFormats().getOutputFormatArray())); } if (getCaps.getAcceptVersions() != null && getCaps.getAcceptVersions().sizeOfVersionArray() != 0) { request.setAcceptVersions(Arrays.asList(getCaps.getAcceptVersions().getVersionArray())); } if (getCaps.getSections() != null && getCaps.getSections().getSectionArray().length != 0) { request.setSections(Arrays.asList(getCaps.getSections().getSectionArray())); } return request; }
/** * Sets the "Sections" element */ public void setSections(net.opengis.ows.x11.SectionsType sections) { synchronized (monitor()) { check_orphaned(); net.opengis.ows.x11.SectionsType target = null; target = (net.opengis.ows.x11.SectionsType)get_store().find_element_user(SECTIONS$2, 0); if (target == null) { target = (net.opengis.ows.x11.SectionsType)get_store().add_element_user(SECTIONS$2); } target.set(sections); } }
/** * parses the XmlBean representing the getCapabilities request and creates a * SosGetCapabilities request * * @param getCapsDoc * XmlBean created from the incoming request stream * @return Returns SosGetCapabilitiesRequest representing the request * * * @throws DecodingException * * If parsing the XmlBean failed */ private OwsServiceRequest parseGetCapabilities(final GetCapabilitiesDocument getCapsDoc) throws DecodingException { final GetCapabilitiesType getCapsType = getCapsDoc.getGetCapabilities2(); final GetCapabilitiesRequest request = new GetCapabilitiesRequest(getCapsType.getService()); if (getCapsType.getAcceptFormats() != null && getCapsType.getAcceptFormats().sizeOfOutputFormatArray() != 0) { request.setAcceptFormats(Arrays.asList(getCapsType.getAcceptFormats().getOutputFormatArray())); } if (getCapsType.getAcceptVersions() != null && getCapsType.getAcceptVersions().sizeOfVersionArray() != 0) { request.setAcceptVersions(Arrays.asList(getCapsType.getAcceptVersions().getVersionArray())); } if (getCapsType.getSections() != null && getCapsType.getSections().getSectionArray().length != 0) { request.setSections(Arrays.asList(getCapsType.getSections().getSectionArray())); } if (getCapsType.getExtensionArray() != null && getCapsType.getExtensionArray().length > 0) { request.setExtensions(parseExtensibleRequestExtension(getCapsType.getExtensionArray())); } return request; }