private AbstractProcess parseComponent(final ComponentType componentType) throws OwsExceptionReport { final org.n52.sos.ogc.sensorML.Component component = new org.n52.sos.ogc.sensorML.Component(); parseAbstractProcess(componentType, component); parseAbstractDerivableComponent(componentType, component); parseAbstractComponent(componentType, component); if (componentType.isSetPosition()) { component.setPosition(parsePosition(componentType.getPosition())); } component.setSensorDescriptionXmlString(addSensorMLWrapperForXmlDescription(componentType)); return component; }
private void addComponentValues(final ComponentType ct, final org.n52.shetland.ogc.sensorML.Component component) throws EncodingException { // set inputs if (component.isSetInputs()) { ct.setInputs(createInputs(component.getInputs())); } // set position if (component.isSetPosition()) { ct.setPosition(createPosition(component.getPosition())); } // set location if (component.isSetLocation()) { ct.setSmlLocation(createLocation(component.getLocation())); } // set outputs if (component.isSetOutputs()) { ct.setOutputs(createOutputs(component.getOutputs())); } }
/** * @param stream * a DescribeSensorResponse stream. * @return all parsed components in a map identified by their unique id. */ public Map<String, ComponentType> parseSensorDescriptions(InputStream stream) { Map<String, ComponentType> sensorDescriptions = new HashMap<String, ComponentType>(); ComponentDocument[] components = parseNetworkComponentsFromDescribeSensorResponse(stream); for (ComponentDocument componentDocument : components) { ComponentType networkComponent = componentDocument.getComponent(); if (networkComponent.getIdentificationArray().length > 0) { Identification identification = networkComponent.getIdentificationArray(0); String id = xmlHelper.getUniqueId(identification.getIdentifierList()); if (id != null) { sensorDescriptions.put(id, networkComponent); } } } return sensorDescriptions; }
completeProcedure(lookup.getProcedure(procedureId), component); if (component.getCapabilitiesArray() == null) { LOGGER.trace("No related features in capabilities block => Link all features available!"); LOGGER.warn("Not yet implemented."); Outputs outputs = component.getOutputs(); Capabilities sensorCapabilties = component.getCapabilitiesArray(0); for (String phenomenonId : xmlHelper.getRelatedPhenomena(outputs)) { Phenomenon phenomenon = lookup.getPhenomenon(phenomenonId);
/** * Sets the "Component" element */ public void setComponent(net.opengis.sensorML.x101.ComponentType component) { synchronized (monitor()) { check_orphaned(); net.opengis.sensorML.x101.ComponentType target = null; target = (net.opengis.sensorML.x101.ComponentType)get_store().find_element_user(COMPONENT$0, 0); if (target == null) { target = (net.opengis.sensorML.x101.ComponentType)get_store().add_element_user(COMPONENT$0); } target.set(component); } }
private void addComponentValues(final ComponentType ct, final org.n52.sos.ogc.sensorML.Component component) throws OwsExceptionReport { // set inputs if (component.isSetInputs()) { ct.setInputs(createInputs(component.getInputs())); } // set position if (component.isSetPosition()) { ct.setPosition(createPosition(component.getPosition())); } // set location if (component.isSetLocation()) { ct.setSmlLocation(createLocation(component.getLocation())); } // set outputs if (component.isSetOutputs()) { extendOutputs(component); ct.setOutputs(createOutputs(component.getOutputs())); } }
private AbstractProcess parseComponent(final ComponentType componentType) throws DecodingException { final org.n52.shetland.ogc.sensorML.Component component = new org.n52.shetland.ogc.sensorML.Component(); parseAbstractProcess(componentType, component); parseAbstractDerivableComponent(componentType, component); parseAbstractComponent(componentType, component); if (componentType.isSetPosition()) { component.setPosition(parsePosition(componentType.getPosition())); } component.setXml(addSensorMLWrapperForXmlDescription(componentType)); return component; }
private void completeProcedure(Procedure procedure, ComponentType component) { Identification identification = component.getIdentificationArray(0); procedure.setLabel(xmlHelper.getShortName(identification.getIdentifierList())); }