|
SensorNet
Data Center Services Design Document
David Resseguie resseguiedr@ornl.gov |
To facilitate the communication of feature data between clients and servers, OGC has developed the Web Feature Service Interface Specification (WFS). The WFS specification describes the request and response documents for web services using HTTP as the distributed computing platform for creating or modifying feature instances and for querying features based on both spatial and non-spatial constraints. SensorNet takes advantage of these open standards and uses a WFS interface for access to node, sensor, and observation and measurement (O&M) data. The SensorNet nodes use transactional WFS services to insert and update O&M data at the SensorNet Data Center. The transactional WFS services are also used for updating mutable properties of nodes and sensors - i.e. for mobile devices.
This document describes how SensorNet uses WFS services to implement a standards-based sensor network.
A SensorNet Data Center (SDC) consists of the following main components related to the serving of feature data.
The SensorNet feature definitions are described below.
The presented client certificate is passed to the policy server to generate a list of allowed owner labels and functional labels the user is allowed to read and/or write. Details of the Policy Server interface are hidden from SensorNet clients and are thus not given here.
An example helps illustrate this concept. Below is an XML document for an observation from a Smith's Detection Centurion.
<snet:Feature xmlns:snet="http://www.sensornet.gov/snet" xmlns:gml="http://www.opengis.net/gml" gml:id="1234">
<gml:description>A test feature only.</gml:description>
<snet:Location>
<gml:Point>
<gml:coordinates>-84.3122716,35.9281064</gml:coordinates>
</gml:Point>
</snet:Location>
<snet:Datetime>
<gml:TimePeriod>
<gml:begin>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:17:26Z</gml:timePosition>
</gml:TimeInstant>
</gml:begin>
<gml:end>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:18:26Z</gml:timePosition>
</gml:TimeInstant>
</gml:end>
</gml:TimePeriod>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>data.chem.smiths.centurian</snet:FunctionalLabel>
<snet:AssociationId>NDC.ORNL.1-100006801</snet:AssociationId>
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN />
<snet:Data schemaURI="http://www.sensornet.gov/schema">
<cent:DetectorData xmlns:cent="http://www.sensornet.gov/centurion" id="501">
<cent:Alarmed>False</cent:Alarmed>
<cent:AmbientTemp>36</cent:AmbientTemp>
<cent:AirInFilterDirty>False</cent:AirInFilterDirty>
<cent:AutoCalibrationFailed>False</cent:AutoCalibrationFailed>
<cent:DriftFlow>378</cent:DriftFlow>
<cent:MoistureTooHigh>False</cent:MoistureTooHigh>
<cent:PgramSampleIndex>1330504</cent:PgramSampleIndex>
<cent:SampleFlow>58</cent:SampleFlow>
<cent:SampleTemp>30</cent:SampleTemp>
<cent:VerifiationFailed>False</cent:VerifiationFailed>
<cent:Alarms />
<cent:Plasmagram totalScan="161">
-466 -490 -409 -409 -452 -479 -508 -483 -426 -371
...
482 504 532 556
</cent:Plasmagram>
</cent:DetectorData>
</snet:Data>
</snet:Feature>
The colored portion is the type-specific content, stored as children of the snet:Data element.
The gml:id, or feature ID, is assigned when the feature is inserted and uniquely identifies a feature.
This is informational text accompanying the feature.
This property is optional and serves as a means of linking or relating one or more features to a target feature or referent. The ID used here is the feature ID of the associated feature.
Contains one or more elements, the content of which is the type-specific feature data. An XML Schema Document (XSD) should exist, at least in principle, for each property value. That is, a consumer of the feature should be able to determine how to process the feature content from the FunctionalLabel property. The optional schemaURI attribute specifies the URI of the schema describing the type-specific properties.
Gives the name of the data center the feature was originally submitted to.
The Datetime property specifies the temporal domain in which the feature is valid. It is specified as either a GML TimeInstant or GML TimePeriod. All datetimes must be represented in ISO 8601 extended format1, as defined for the dateTime element in the XML Schema.
GML TimeInstant
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:53:37Z</gml:timePosition>
</gml:TimeInstant>
GML TimePeriod
<gml:TimePeriod>
<gml:begin>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:52:39Z</gml:timePosition>
</gml:TimeInstant>
</gml:begin>
<gml:end>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:53:39Z</gml:timePosition>
</gml:TimeInstant>
</gml:end>
</gml:TimePeriod>
Each feature must have a fully qualified FunctionalLabel property. Requests can include one or more labels with wildcards to identify features of interest, and access control and authorization uses the labels to determine a user's access for retrievals and insertions. A detailed description of functional labels is provided, including suggested best practices for organizing the label hierarchy.
The Location property specifies the geographic range of the feature. It is specified as either a GML point or GML bounding box.
GML Point - specified by longitude and latitude
<gml:Point>
<gml:coordinates>-84.3122716,35.9281064</gml:coordinates>
</gml:Point>
GML Box - specified by west longitude, south latitude, east longitude, north latitude.
<gml:Box>
<gml:coordinates>-84.3122716,35.9281064 -82.84752,37.523</gml:coordinates>
</gml:Box>
This is an optional owner label. Access control and authorization includes verification that a user has access to a feature with a particular owner label.
Gives the sensitivity level of the feature - i.e. "OUO", "Public", etc.
Gives the distinguished name of the feature submitter's digital certificate.
In addition to the snet:Feature properties, the snet:Group feature type has the additional properties:
Descriptive (verbose) name of this logical group.
Compact format ID of this logical group. (i.e. useful for labeling icons)
<snet:Group gml:id="1234">
<gml:description>An example group feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.group.logical</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:GroupName>Example Logical Group</snet:GroupName>
<snet:GroupId>EXPLGRP</snet:GroupId>
</snet:Group>
In addition to the snet:Feature properties, the snet:DataSource feature type has the additional properties:
Descriptive (verbose) name of this data source.
Compact format ID of this data source. (i.e. useful for labeling icons)
Gives the type of this data source, such as "Node", "Sensor", and "External".
Indicates if this is a mobile or fixed data source. "true" indicates the node is mobile, "false" indicates fixed.
Indicates the operational status of this data source, usually "ACTIVE".
Verbose description of any deployment specific notes. These notes may include access restritions, driving directions,etc.
Gives name and contact information for the point of contact for this data source.
Gives the manufacturer of this data source.
Gives the model of this data source.
Gives additional meta data properties about this data source. The schemaURI attribute specifies the URI of the schema describing the type-specific properties.
<snet:DataSource gml:id="1234">
<gml:description>An example external data source feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.datasource.external.acme.model01</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:DataSourceId>EXPLDS01</snet:DataSourceId>
<snet:DataSourceName>Example Data Source Feature</snet:DataSourceName>
<snet:DataSourceManufacturer>ACME</snet:DataSourceManufacturer>
<snet:DataSourceModel>MODEL01</snet:DataSourceModel>
<snet:DataSourceType>External</snet:DataSourceType>
<snet:DeploymentNotes/>
<snet:DataSourceMetaData schemaURI="http://www.foo.com/schema/datasource.xsd">
<MyMetaData01 />
<MyMetaData02 />
</snet:DataSourceMetaData>
<snet:MobileDataSource>false</snet:MobileDataSource>
<snet:OperationalStatus>ACTIVE</snet:OperationalStatus>
<snet:PointOfContact>J. Doe (865-555-1212)</snet:PointOfContact>
</snet:DataSource>
<snet:Node gml:id="1234">
<gml:description>An example node feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.datasource.node.acme.model01</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:DataSourceId>EXPLNODE01</snet:DataSourceId>
<snet:DataSourceName>Example Node Feature</snet:DataSourceName>
<snet:DataSourceManufacturer>ACME</snet:DataSourceManufacturer>
<snet:DataSourceModel>MODEL01</snet:DataSourceModel>
<snet:DataSourceType>Node</snet:DataSourceType>
<snet:DeploymentNotes>Security clearance allowed for site access.</snet:DeploymentNotes>
<snet:DataSourceMetaData schemaURI="http://www.foo.com/schema/node.xsd">
<MyMetaData01 />
<MyMetaData02 />
</snet:DataSourceMetaData>
<snet:MobileDataSource>true</snet:MobileDataSource>
<snet:OperationalStatus>ACTIVE</snet:OperationalStatus>
<snet:PointOfContact>J. Doe (865-555-1212)</snet:PointOfContact>
</snet:Node>
<snet:Sensor gml:id="1234">
<gml:description>An example sensor feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.datasource.sensor.acme.model01</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:DataSourceId>EXPLSENSOR01</snet:DataSourceId>
<snet:DataSourceName>Example Sensor Feature</snet:DataSourceName>
<snet:DataSourceManufacturer>ACME</snet:DataSourceManufacturer>
<snet:DataSourceModel>MODEL01</snet:DataSourceModel>
<snet:DataSourceType>Sensor</snet:DataSourceType>
<snet:DeploymentNotes>Located on top of guard station.</snet:DeploymentNotes>
<snet:DataSourceMetaData schemaURI="http://www.foo.com/schema/sensor.xsd">
<MyMetaData01 />
<MyMetaData02 />
</snet:DataSourceMetaData>
<snet:MobileDataSource>true</snet:MobileDataSource>
<snet:OperationalStatus>ACTIVE</snet:OperationalStatus>
<snet:PointOfContact>J. Doe (865-555-1212)</snet:PointOfContact>
</snet:Sensor>
In addition to the snet:Feature properties, the snet:Observation feature type has the additional properties:
For an snet:Observation, the snet:Data property us used to represent the actual observation data. It is recommended, but not required, that observation data be represented using the OGC Observation and Measurement (O&M) specification. Regardless, the schemaURI attribute should specifies the URI of the schema describing the observation data.
A verbose description explaining what is being observed, how the observation was made, what the result means, etc.
<snet:Observation gml:id="1234">
<gml:description>An example observation feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.data.chem.acme.model01</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:Data schemaURI="http://www.foo.com/schema/observation.xsd">
<Property1/>
<Property2/>
<Property3/>
</snet:Data>
<snet:ObservationDescription>Example observation from a fictional Acme Model01 sensor.</snet:ObservationDescription>
</snet:Observation>
In addition to the snet:Feature properties, the snet:Event feature type has the additional properties:
In addition to the description of snet:Data for the snet:Feature feature type, this element is used within an snet:Event feature type to describe the data causing the event.
Gives the type of event, such as "Alert", "MaintenanceNotification", etc.
A message associated with this event. The event message may be formatted as a CAP message.
<snet:Event gml:id="1234">
<gml:description>An example event feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.event.maint.lowbattery</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:Data/>
<snet:EventType>MaintenanceNotification</snet:EventType>
<snet:EventMessage>Low battery on sensor "SENSOR01"</snet:EventMessage>
</snet:Event>
<snet:Alert gml:id="1234">
<gml:description>An example alert feature</gml:description>
<snet:Location>
<gml:Box>
<gml:coordinates>-85,35 -80,40</gml:coordinates>
</gml:Box>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T00:00:00Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:DataCenter />
<snet:FunctionalLabel>demo.event.alert.overthreshold</snet:FunctionalLabel>
<snet:AssociationId />
<snet:OwnerLabel>owner1</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:SubmitterCertificateDN/>
<snet:Data schemaURI="http://www.foo.com/schema/observation.xsd">
<Property1/>
<Property2/>
<Property3/>
</snet:Data>
<snet:EventType>Alert</snet:EventType>
<snet:EventMessage>Sensor "SENSOR01" has gone over threshold.</snet:EventMessage>
</snet:Event>
The notation for functional labels is tokens separated by a '.' similar to Java's package naming convention.
Example labels might include:
SensorNet has defined an initial set of category names for the first couple of hierarchical levels. This certainly does not preclude the introduction of new names or discontinued use of existing names in the future. Moreover, such changes will have no effect on the software components comprising the authorization and access control system. Rather, only the data used by the system (e.g., role definitions) need be altered to respond to such future changes.
The XML schema for each feature is determined by the feature type as required by the WFS specification. But a fully qualified functional label may be the identifier specifying the XML schema for the more specific feature content containing the actual observation and measurement data.
A wfs:GetFeature request can be mapped to a set of labels specifying the kinds or types of features desired. Similarly, authorization roles specify separate sets of read and write labels for which entities mapped to the role have access rights to retrieve and store, respectively. In the case of requests and roles, labels in a set are viewed inclusively, and the labels may include a wildcard value ('*') for the final category name. Wildcards specify a universal match with all categories at that level or deeper in the hierarchy. For example,
model.dispersion.*
would match all dispersion model results, whether produced by SCIPUFF, HYSPLIT, CAMEO, ALOHA, or any other model. That is, the above label would match all of the following fully qualified labels
model.dispersion.scipuff
model.dispersion.hysplit
model.dispersion.cameo
but would not match any of the following
model.effects.ripdlipi
model.evac.orems
data.met.noaa.dcnet
The following table gives more examples of fully qualified labels that would and would not match.
| Label Expression | Matching Labels | Non-Matching Labels |
|---|---|---|
| model.* |
model.dispersion.scipuff model.evac.orems model.effects.ripdlipi model.waterflow.hytras |
data.noaa.dcnet data.chem.centurion.detection data.rad.farwest event.node.disconnect |
| data.met.* |
data.met.noaa.dcnet data.met.wind |
data.chem.centurion.detection data.rad.farwest model.dispersion.scipuff |
Having wildcards in role labels allows the role to capture new feature types as they are envisioned and added. For example, a role with model.dispersion.* is authorized for any new feature type with a functional label starting with model.dispersion.
All SensorNet specific elements the namespace URI http://www.sensornet.gov/snet.
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<!-- one of the supported operators below -->
</ogc:Filter>
The prototype SensorNet WFS supports the following filters:
<ogc:And xmlns:ogc="http://www.opengis.net/ogc">
<!-- one or more filter operators -->
</ogc:And>
<ogc:Or xmlns:ogc="http://www.opengis.net/ogc">
<!-- one or more filter operators -->
</ogc:Or>
<ogc:Not xmlns:ogc="http://www.opengis.net/ogc">
<!-- one filter operator -->
</ogc:Not>
<ogc:PropertyIsBetween>
<ogc:PropertyName>snet:Datetime</ogc:PropertyName>
<ogc:LowerBoundary>2005-01-28T00:00:00Z</ogc:LowerBoundary>
<ogc:UpperBoundary>2005-02-02T00:00:00Z</ogc:UpperBoundary>
</ogc:PropertyIsBetween>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>snet:OwnerLabel</ogc:PropertyName>
<ogc:Literal>NDC.ORNL.1-100000306</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsLike wildCard="*" singleChar="?" escape="!">
<ogc:PropertyName>snet:FunctionalLabel</ogc:PropertyName>
<ogc:Literal>datasource.sensor.rad.*</ogc:Literal>
</ogc:PropertyIsLike>
<ogc:BBOX>
<ogc:PropertyName>snet:Location</ogc:PropertyName>
<gml:Box xmlns:gml="http://www.opengis.net/gml">
<gml:coordinates>-85.0,30.0 -80.0,35.0</gml:coordinates>
</gml:Box>
</ogc:BBOX>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And>
<ogc:BBOX>
<ogc:PropertyName>Location</ogc:PropertyName>
<gml:Box xmlns:gml="http://www.opengis.net/gml">
<gml:coordinates>-85.0,30.0 -80.0,35.0</gml:coordinates>
</gml:Box>
</ogc:BBOX>
<ogc:PropertyIsBetween>
<ogc:PropertyName>Datetime</ogc:PropertyName>
<ogc:LowerBoundary>2005-01-28T00:00:00Z</ogc:LowerBoundary>
<ogc:UpperBoundary>2005-02-02T00:00:00Z</ogc:UpperBoundary>
</ogc:PropertyIsBetween>
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>OwnerLabel</ogc:PropertyName>
<ogc:Literal>TestOwner</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsLike wildCard="*" singleChar="?" escape="!">
<ogc:PropertyName>snet:FunctionalLabel</ogc:PropertyName>
<ogc:Literal>test.*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Or>
<ogc:Not>
<ogc:PropertyIsLike wildCard="*" singleChar="?" escape="!">
<ogc:PropertyName>snet:FunctionalLabel</ogc:PropertyName>
<ogc:Literal>test.bad.*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Not>
</ogc:And>
</ogc:Filter>
To perform a WFS insert transaction, the following request XML is wrapped around the feature to be inserted. Multiple inserts may be included in one request, if desired. In the case of an error, a transaction result of either wfs:PARTIAL or wfs:FAILURE will be returned.
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" handle="ExampleTransactionRequest" version="1.0.0" service="WFS">
<wfs:Insert handle="InsertTransaction1">
<!-- Any SensorNet Feature -->
</wfs:Insert>
<wfs:Insert handle="InsertTransaction2">
<!-- Any SensorNet Feature -->
</wfs:Insert>
</wfs:Transaction>
<wfs:WFS_TransactionResponse xmlns:wfs="http://www.opengis.net/wfs">
<wfs:InsertResult handle="InsertTransaction1">
<ogc:FeatureId fid="123" xmlns:ogc="http://www.opengis.net/ogc" />
</wfs:InsertResult>
<wfs:InsertResult handle="InsertTransaction2">
<ogc:FeatureId fid="124" xmlns:ogc="http://www.opengis.net/ogc" />
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:Status>
<wfs:SUCCESS />
</wfs:Status>
</wfs:TransactionResult>
</wfs:WFS_TransactionResponse>
WFS insert requests are used for various purposes within SensorNet.
Logical groups, nodes, sensors, and other datasources are "registered" by inserting either an snet:Group, snet:Node, snet:Sensor, or snet:DataSource feature respectively. When registering one of these feature types, the returned feature ID should be recorded so that it may be used as the association ID property for any associated features. Groups and data sources may be registered through a management application or automatically.
The current SensorNet nodes are designed to self-register themselves and any attached sensors. In the current system, when a node is powered on, it checks to see if it has a feature ID assigned to it. If not, it constructs a WFS insert request with an snet:Node feature representing itself. It then stores the returned feature ID for future use. Similarly, for each attached sensor (or when a new sensor is added), if the node does not have a feature ID associated with that sensor, it creates a WFS insert request with an snet:Sensor feature representing the sensor and stores the returned feature ID.
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" handle="ExampleTransactionRequest" version="1.0.0" service="WFS">
<wfs:Insert handle="SensorInsertTransaction">
<snet:Sensor xmlns:snet="http://www.sensornet.gov/snet" xmlns:gml="http://www.opengis.net/gml">
<gml:description>FarWest 2070 Gamma Radiation Detector</gml:description>
<snet:Location>
<gml:Point>
<gml:coordinates>2.2,1.1</gml:coordinates>
</gml:Point>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-03T18:12:38Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:FunctionalLabel>sensor.rad.farwest</snet:FunctionalLabel>
<snet:AssociationId>NDC.ORNL.1-100000751</snet:AssociationId>
<snet:OwnerLabel>ORNL</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:DataSourceId>NTG-02</snet:DataSourceId>
<snet:DataSourceName>Farwest</snet:DataSourceName>
<snet:DataSourceManufacturer>FarWest Technology, Inc.</snet:DataSourceManufacturer>
<snet:DataSourceModel>2070</snet:DataSourceModel>
<snet:DataSourceType>Sensor</snet:DataSourceType>
<snet:DeploymentNotes />
<snet:DataSourceMetaData>
<SensorMetaData sensor="Farwest">
<DataName>DoseAvg</DataName>
<DataField>1</DataField>
<Description>average dose</Description>
<Unit>mRAD/hr</Unit>
<Type>integer</Type>
</SensorMetaData>
<SensorMetaData sensor="Farwest">
<DataName>Dose</DataName>
<DataField>2</DataField>
<Description>dose</Description>
<Unit>mRAD/hr</Unit>
<Type>integer</Type>
</SensorMetaData>
</snet:DataSourceMetaData>
<snet:MobileDataSource>false</snet:MobileDataSource>
<snet:OperationalStatus>ACTIVE</snet:OperationalStatus>
<snet:PointOfContact>J. Doe (865-555-1212)</snet:PointOfContact>
</snet:Sensor>
</wfs:Insert>
</wfs:Transaction>
<wfs:TransactionResponse xmlns:wfs="http://www.opengis.net/wfs">
<wfs:InsertResult handle="SensorInsertTransaction">
<ogc:FeatureId fid="NDC.ORNL.1-100010495" xmlns:ogc="http://www.opengis.net/ogc" />
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:SUCCESS />
</wfs:TransactionResult>
</wfs:TransactionResponse>
Observation and measurement data from sensors are inserted as snet:Observation features. The feature ID of the sensor producing the observation is used as the association ID of the observation. The returned feature ID may not need to be recorded unless the data is also the cause of an event or alert.
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" handle="ExampleTransactionRequest" version="1.0.0" service="WFS">
<wfs:Insert handle="ObservationInsertTransaction">
<snet:Observation xmlns:snet="http://www.sensornet.gov/snet" xmlns:gml="http://www.opengis.net/gml">
<gml:description>FarWest 2070 Gamma Radiation Detector Measurement Data</gml:description>
<snet:Location>
<gml:Point>
<gml:coordinates>2.2,1.1</gml:coordinates>
</gml:Point>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-03T18:12:40Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:FunctionalLabel>data.rad.farwest</snet:FunctionalLabel>
<snet:AssociationId>NDC.ORNL.1-100010495</snet:AssociationId>
<snet:OwnerLabel>ORNL</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:Data>
<SensorData id="334865" gid="NTG-02" time="2005-03-03T18:11:01Z">
<DoseAvg unit="mRAD/hr">3</DoseAvg>
<Dose unit="mRAD/hr">47</Dose>
</SensorData>
</snet:Data>
<snet:ObservationDescription>Observation from Farwest</snet:ObservationDescription>
</snet:Observation>
</wfs:Insert>
</wfs:Transaction>
<wfs:TransactionResponse xmlns:wfs="http://www.opengis.net/wfs">
<wfs:InsertResult handle="ObservationInsertTransaction">
<ogc:FeatureId fid="NDC.ORNL.1-100010496" xmlns:ogc="http://www.opengis.net/ogc" />
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:SUCCESS />
</wfs:TransactionResult>
</wfs:TransactionResponse>
Events and alerts are inserted as snet:Event and snet:Alert features respectively. The feature ID of either the node, sensor, or data (as appropriate) causing the event is used as the association ID of the event.
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" handle="ExampleTransactionRequest" version="1.0.0" service="WFS">
<wfs:Insert handle="ObservationInsertTransaction">
<snet:Alert xmlns:snet="http://www.sensornet.gov/snet" xmlns:gml="http://www.opengis.net/gml">
<gml:description>FarWest 2070 Gamma Radiation Detector Data Event</gml:description>
<snet:Location>
<gml:Point>
<gml:coordinates>2.2,1.1</gml:coordinates>
</gml:Point>
</snet:Location>
<snet:Datetime>
<gml:TimeInstant>
<gml:timePosition>2005-03-04T20:54:06Z</gml:timePosition>
</gml:TimeInstant>
</snet:Datetime>
<snet:FunctionalLabel>event.data.farwest</snet:FunctionalLabel>
<snet:AssociationId>NDC.ORNL.1-100010496</snet:AssociationId>
<snet:OwnerLabel>ORNL</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:Data />
<snet:EventType>Alert</snet:EventType>
</snet:Alert>
</wfs:Insert>
</wfs:Transaction>
<wfs:TransactionResponse xmlns:wfs="http://www.opengis.net/wfs">
<wfs:InsertResult handle="ObservationInsertTransaction">
<ogc:FeatureId fid="NDC.ORNL.1-100010497" xmlns:ogc="http://www.opengis.net/ogc" />
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:SUCCESS />
</wfs:TransactionResult>
</wfs:TransactionResponse>
When a node or sensor moves, location update features are inserted as snet:LocationHistory features. The feature ID of either the associated node or sensor (as appropriate) is used as the association ID of the history record.
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" handle="ExampleTransactionRequest" version="1.0.0" service="WFS">
<wfs:Insert handle="LocationHistoryInsertTransaction">
<snet:LocationHistory xmlns:snet="http://www.sensornet.gov/snet" xmlns:gml="http://www.opengis.net/gml">
<gml:description>Location update for node A</gml:description>
<snet:Location>
<gml:Point>
<gml:coordinates>2.2,1.1</gml:coordinates>
</gml:Point>
</snet:Location>
<snet:Datetime>
<gml:TimePeriod>
<gml:begin>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:15:26Z</gml:timePosition>
</gml:TimeInstant>
</gml:begin>
<gml:end>
<gml:TimeInstant>
<gml:timePosition>2005-03-07T22:20:26Z</gml:timePosition>
</gml:TimeInstant>
</gml:end>
</gml:TimePeriod>
</snet:Datetime>
<snet:FunctionalLabel>history.location.datasource.node.acme.nodeA</snet:FunctionalLabel>
<snet:AssociationId>NDC.ORNL.1-100010496lt;/snet:AssociationId>
<snet:OwnerLabel>ORNL</snet:OwnerLabel>
<snet:SensitivityLabel>OUO</snet:SensitivityLabel>
<snet:Data />
</snet:LocationHistory>
</wfs:Insert>
</wfs:Transaction>
<wfs:TransactionResponse xmlns:wfs="http://www.opengis.net/wfs">
<wfs:InsertResult handle="ObservationInsertTransaction">
<ogc:FeatureId fid="NDC.ORNL.1-100010497" xmlns:ogc="http://www.opengis.net/ogc" />
</wfs:InsertResult>
<wfs:TransactionResult>
<wfs:Status>
<wfs:SUCCESS />
</wfs:Status>
</wfs:TransactionResult>
</wfs:TransactionResponse>
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" handle="ExampleGetFeatureRequest" outputFormat="GML3" version="1.0.0" service="WFS" maxFeatures="100">
<wfs:Query typeName="snet:Feature" handle="ExampleQuery">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<!-- any filter -->
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
The response to a GetFeature request is a feature collection with matching features.
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml">
<gml:boundingBox>
<gml:Box>
<gml:coordinates>19.5,74.5 20.5,75.5</gml:coordinates>
</gml:Box>
</gml:boundingBox>
<gml:featureMember>
<snet:Feature>
<!-- Any SensorNet feature -->
</snet:Feature>
</gml:featureMember>
<gml:featureMember>
...
</gml:featureMember>
...
</gml:FeatureCollection>
<wfs:GetFeature
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:snet="http://www.sensornet.gov/snet"
handle="ExampleGetFeatureRequest"
outputFormat="GML3" version="1.0.0" service="WFS" maxFeatures="100">
<wfs:Query typeName="snet:Sensor" handle="ExampleSensorQuery"></wfs:Query>
</wfs:GetFeature>
<wfs:GetFeature
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:snet="http://www.sensornet.gov/snet"
xmlns:gml="http://www.opengis.net/gml"
handle="ExampleGetFeatureRequest"
outputFormat="GML3" version="1.0.0" service="WFS" maxFeatures="100">
<wfs:Query typeName="snet:Observation" handle="ExampleObservationQuery">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:And xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>snet:AssociationId</ogc:PropertyName>
<ogc:Literal>SENSOR-001</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsBetween>
<ogc:PropertyName>snet:Datetime/gml:TimeInstant/gml:timePosition</ogc:PropertyName>
<ogc:LowerBoundary>
<ogc:Literal>2002-07-01T12:00:00</ogc:Literal>
</ogc:LowerBoundary>
<ogc:UpperBoundary>
<ogc:Literal>2002-07-01T12:40:00</ogc:Literal>
</ogc:UpperBoundary>
</ogc:PropertyIsBetween>
</ogc:And>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>