# sos package

## Submodules

This module includes GML...Parser classes.

class `sos.gmlparser.``GMLTimeInstantParser`

  Bases: `sos.xmlparser.XMLParser`

  Parse an xml node to extract timePosition as QgsTimeInstant

  `parse`(xml)

class `sos.gmlparser.``GMLTimeParser`

  Bases: `sos.xmlparser.XMLParser`

  Parse an xml node to extract type and process it with correct parser

  `parse`(xml)

class `sos.gmlparser.``GMLTimePeriodParser`

  Bases: `sos.xmlparser.XMLParser`

  Parse an xml node to extract beginPosition and endPosition as QgsTimePeriod

  `parse`(xml)

QgsTime... classes

class `sos.qgstime.``QgsTime`(timePrimitive=0)

  Bases: `object`

  Abstract base class for QgsTime types

  `TimeInstant` = 1
  `TimePeriod` = 2
  `primitive`

class `sos.qgstime.``QgsTimeInstant`(time='')

  Bases: `sos.qgstime.QgsTime`

  Represents a time instant

  `date`
  `time`

class `sos.qgstime.``QgsTimePeriod`(begin='', end='')

  Bases: `sos.qgstime.QgsTime`

  Represents a time period with begin date and time and end date and time

  `beginDate`
  `beginTime`
  `endDate`
  `endTime`

sos module

exception `sos.sos.``ExceptionReport`(exceptionCode, exceptionText)

  Bases: `exceptions.Exception`

  SOS Exception

  `exceptionCode`
  `exceptionText`

class `sos.sos.``FilterRequest`(service)

  Bases: `object`

  Filter request: Spatial, Temporal and Scalar with Operator and Operands

  `scalarValue`
  `spatialValue`
  `temporalValue`

class `sos.sos.``ObservationsLayer`(name='Observations', xmlFile=None, only1stGeo=False)

  Bases: `PyQt4.QtCore.QObject`

  Encapsulate QgsVectorLayer generation

  `error`
  `failed`
  `finished`
  `name`
  `toVectorLayer`()

    Generate QgsVectorLayer

  `vectorLayer`

class `sos.sos.``SOSCapabilities`

  Capabilities data

class `sos.sos.``SOSFilterCapabilities`

  Filter capabilities data

class `sos.sos.``SOSObservationOffering`

  Observation offering data

class `sos.sos.``SOSOperationMetadata`

  Operations metadata

class `sos.sos.``SOSProvider`

  Bases: `object`

  Fake QgsVectorDataProvider

  `getFeatures`()

    :return QgsFeaures generator

  `getObservation`(foi='', time=None)

    Only for testing purposes!

  `setObservation`(foi, time, observedProperty, value)

    Parameters: | foi (str) – Feature Of Interest time (str) – Phenomenom Time observedProperty (str) – Property value (float) – observed value

class `sos.sos.``SOSServiceIdentification`

  Bases: `PyQt4.QtCore.QObject`

  Service Identification data

class `sos.sos.``SOSServiceProvider`

  Bases: `PyQt4.QtCore.QObject`

  Service Provider data

class `sos.sos.``SensorObservationService`(url, xmlFile=None)

  Bases: `PyQt4.QtCore.QObject`

  Represent a Sensor Observation Service

  static `capabilitiesUrl`(url)
  `capabilitiesVersion`
  `capabilitiesXml`
  `getObservations`(offering='', properties=[], features=[], procedures=[], filters=None, resultModel='')

    Parameters: | offering (str) – Offering name properties (str list) – Selected properties names features (str list) – Selected features of interest names procedures (str list) – Selected procedures names filters (FilterRequest) – Configured filters resultModel (str) – Selected result model
    Returns: | xml data

  `getObservationsUrl`
  `identification`
  `observationOfferingList`
  `operationsMetadata`
  `provider`
  `scalarOperators`
  `spatialOperands`
  `spatialOperators`
  `temporalOperands`
  `temporalOperators`
  `url`
  `version`

SOS...Parser classes All classes to parse SOS or O&M XML data

class `sos.sosparser.``XMLParserFactory`

  XML parsers factory.

  classmethod `getInstance`(tagname, preffix='')

    Parameters: | tagname (str) – XML tag name preffix (str) – Class name prefix
    Returns: | XMLParser
    Raise: | NotImplementedError

class `sos.sosparser.``SOSCapabilitiesParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

class `sos.sosparser.``SOSServiceIdentificationParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

class `sos.sosparser.``SOSServiceProviderParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

class `sos.sosparser.``SOSObservationOfferingParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

class `sos.sosparser.``SOSOperationMetadataParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

class `sos.sosparser.``SOSFilterCapabilitiesParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

class `sos.sosparser.``SOSObservationsParser`

  Bases: `sos.xmlparser.XMLParser`

  `parse`(xml)

XMLParser module, includes a xml parser factory and a XML parser abstract base class

class `sos.xmlparser.``XMLParserFactory`

  XML parsers factory.

  classmethod `getInstance`(tagname, preffix='')

    Parameters: | tagname (str) – XML tag name preffix (str) – Class name prefix
    Returns: | XMLParser
    Raise: | NotImplementedError

class `sos.xmlparser.``XMLParser`

  Bases: `object`

  XML parser base class

  `parse`(xml=None)

    Parameters: | xml (QDomElement or str) – XML to parse

  static `search`(xml, query)

    Parameters: | xml (QDomNode) – XML to parse query (str) –
    Returns: | QDomNode, str generator

  static `searchFirst`(xml, query)

    Parameters: | xml (QDomNode) – XML to parse query (str) –
    Returns: | QDomNode, str