Skip to content

Commit

Permalink
Merge pull request #46 from lukecampbell/coops
Browse files Browse the repository at this point in the history
Adds SML 1.0.1 Network Identifier XPath for CO-OPS
  • Loading branch information
daf committed Mar 2, 2015
2 parents 17ec420 + 7178249 commit f6addf0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyoos/parsers/ioos/describe_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ def __new__(cls, element):
for ds_type, constructor in [('networkID', NetworkDS), ('stationID', StationDS), ('sensorID', SensorDS)]:
if root.find(sml_str % ds_type) is not None:
return super(IoosDescribeSensor, cls).__new__(constructor)

# NOAA CO-OPS
sml_str = ".//{{{0}}}identifier/{{{0}}}Term[@definition='urn:ioos:def:identifier:NOAA::networkID']".format(SML_NS)
if root.find(sml_str) is not None:
return super(IoosDescribeSensor, cls).__new__(NetworkDS)

# if we don't find the proper request from the IOOS definitions,
# try to adapt a generic DescribeSensor request to the dataset
from pyoos.parsers.ioos.one.describe_sensor import GenericSensor
Expand Down

0 comments on commit f6addf0

Please sign in to comment.