<!-- For each Framework and Dataset element defined in the GetCapabilities.xml
document (See Section 7.1.4.1 and 71.4.1.10, GDAS Specifications Document),
 a "framework_config" and "dataset_config" element must be configured
in a dataSourceConfig.xml document. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="data_source_list" type="data_source_list_type"/>
    <xs:complexType name="data_source_list_type">
        <xs:sequence>
            <xs:element name="framework_config" type="framework_config_type" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <!-- Contains 3 attributes to define uniqueness and to pair with a 
    "Framework" element that exists in the GetCapabilities.xml -->
    <xs:complexType name="framework_config_type">
        <xs:sequence>
            <xs:element name="dataset_config" type="dataset_config_type" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
        <!-- The following attributes have the same values as set in
        a corresponding "Framework" Element in the GetCapabilities.xml -->
        <xs:attribute name="FrameworkName" type="xs:string" use="required"/>
        <xs:attribute name="FrameworkVersion" type="xs:string" use="required"/>
        <xs:attribute name="FrameworkDomain" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- Contains data that is used to configure a connection to a data store, and to
    instantiate the proper Data Retriever to make the connection-->
    <xs:complexType name="dataset_config_type">
        <xs:sequence>
            <xs:element name="parameter" type="parameter_type" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="geo_linkage_field_type" type="geo_linkage_field_type" maxOccurs="1"/>
            <xs:element name="data_retriever_class" type="data_retriever_class_type" maxOccurs="1"/>
        </xs:sequence>
        <!-- These attributes are the same as the attributes found
        in a corresponding "Dataset" in the GetCapabilities.xml -->
        <xs:attribute name="DatasetName" type="xs:string" use="required"/>
        <xs:attribute name="DatasetDomain" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- Used to describe characteristics of a data store type (ex. username,
    driver name, password etc) -->
    <xs:complexType name="parameter_type">
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- Defines what type of data the "geoLinkId" is -->
    <xs:complexType name="geo_linkage_field_type">
        <xs:attribute name="value" type="geo_linkage_restriction"/>
    </xs:complexType>
    <!-- Restrict what value can be used for the "geo_linkage_field_type"-->
    <xs:simpleType name="geo_linkage_restriction">
        <xs:restriction base="xs:string">
            <xs:enumeration value="string"/>
            <xs:enumeration value="number"/>
            <xs:enumeration value="float"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- Used to define the name of the DataRetrieverInterface to instatiate
        in order to mine the data store.  This must be the fully qualified name, starting
        at the package level, EXCLUDING .java (ex: org.nfis.gdas.JDBCDataRetriever) -->
    <xs:complexType name="data_retriever_class_type">
        <xs:attribute name="data_retriever_class_name" type="xs:string" use="required"/>
    </xs:complexType>
</xs:schema>
