<?xml version="1.0" encoding="UTF-8"?>
<!-- 
United States Geological Survey - Water Resources Disipline - National Water Information System

The EstimationEquation schema defines the XML structure that holds the an equation used to estimate daily values from daily values at near sites or sites with similar characteristics.

Version 1.1 - 14/18/2012 - Original schema design.
-->
<xsd:schema xmlns="http://water.usgs.gov/XML/AQ" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://water.usgs.gov/XML/AQ" elementFormDefault="qualified" version="1.0">
	<xsd:include schemaLocation="../shared/IEEE754FloatValue.xsd"/>
        <xsd:include schemaLocation="../shared/HistoryGroup.xsd"/>

	<xsd:element name="Threshold">
		<xsd:annotation>
			<xsd:documentation>
				<Definition>The time-series data verification threshold for primary computations. Indicates whether a value exceeds a specified threshold. If a value exceeds the specified threshold, it will not be displayed on the Web.</Definition>
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
                                <xsd:element name="ThresholdCode" type="xsd:string">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The code identifying a threshold test method.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

                                <xsd:element name="SequenceNumber" type="xsd:integer">
          				<xsd:annotation>
            					<xsd:documentation>
              						<Definition>The sequence number of the testing threshold.</Definition>
            					</xsd:documentation>
          				</xsd:annotation>
        			</xsd:element>

				<xsd:element name="StartDateTime" type="DateTimeWithDatum">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The starting date and time that the testing threshold is in effect.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

				<xsd:element name="EndDateTime" type="DateTimeWithDatum">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The end date and time that the testing threshold is in effect.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

                               <xsd:element name="AlternateName" type="xsd:string"  minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The user-specified name to be used in place of the threshold_nm from the THRESHOLD_CD table when test violations are reported.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>

                                <xsd:element name="ThresholdMeasure" type="IEEE754FloatValueType">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The threshold value used for test.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			
				<xsd:element name="LimitMeasure" type="IEEE754FloatValueType" minOccurs="0">
					<xsd:annotation>
						<xsd:documentation>
							<Definition>The upper limit that this test is applied to.</Definition>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
                                <xsd:group ref="HistoryGroup"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>
