<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="5.0"
            xmlns:nwis="http://water.usgs.gov/XML/NWIS/5.0" 
            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            elementFormDefault="qualified">

  <xsd:include schemaLocation="Sensor.xsd"/>
  <xsd:include schemaLocation="GageMeasurementPoint.xsd"/>
  <xsd:include schemaLocation="../ADAPS/TsLocation.xsd"/>
  <xsd:include schemaLocation="../shared/DateTimeWithDatum.xsd"/>
  <xsd:include schemaLocation="../shared/HistoryGroup.xsd"/>

<xsd:complexType name="LocationSensor" abstract="false">
    <xsd:annotation>
      <xsd:documentation>
        <Definition>A specific sensor installed at a specific location at a site.</Definition>
      </xsd:documentation>
    </xsd:annotation>
      <xsd:sequence>
        <xsd:element ref="Location">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The location at a site where the sensor is installed.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Sensor" type="Sensor">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The type of sensor installed at the location.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="StartDateTime" type="DateTimeWithDatum" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The date and time that the sensor was installed at the location.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="EndDateTime" type="DateTimeWithDatum" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>The date and time that the sensor was removed from the location.</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="PrimarySensorIndicator" type="xsd:boolean" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>Is this sensor a primary reference (non-recording) sensor (true or false)?</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="PrimaryRecorderIndicator" type="xsd:boolean" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>Is this sensor being recorded on the primary (preferred Input) recorder (true or false)?</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="StillingWellIndicator" type="xsd:boolean" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>
              <Definition>Does this sensor measure the water level within a stilling well (true or false)</Definition>
            </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:group ref="HistoryGroup"/>
        <xsd:element ref="GageMeasurementPoint" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
</xsd:schema>
