<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema  targetNamespace="http://www.cs.indiana.edu/dde/namespaces/2008/02/catalog/types"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:lead="http://schemas.leadproject.org/2007/01/lms/lead" 
             xmlns:fgdc="http://schemas.leadproject.org/2007/01/lms/fgdc" 
             xmlns:le="http://schemas.leadproject.org/2007/01/lms/leadelements" 
             xmlns:cat="http://www.cs.indiana.edu/dde/namespaces/2008/02/catalog/types"
             xml:lang="en"
             elementFormDefault="qualified"
             attributeFormDefault="unqualified">

	<!-- Imports and Includes-->
	<xsd:import namespace="http://schemas.leadproject.org/2007/01/lms/lead" schemaLocation="../LMS/LEAD.xsd"/>

	<!-- ************ -->
	<!-- Object Types -->
	<!-- ************ -->
	<xsd:simpleType name="catalogAggregationType">
		<xsd:annotation>
			<xsd:documentation>
				THE OBJECT TYPES ARE DEFINED FOR EACH DOMAIN AND 
				MUST ALSO BE DEFINED IN THE DATABASE.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="FILE"/>
			<xsd:enumeration value="COLLECTION"/>
			<xsd:enumeration value="EXPERIMENT"/>
			<xsd:enumeration value="PROJECT"/>
		</xsd:restriction>
	</xsd:simpleType>


	<xsd:group name="catalogObjectGroup">
		<xsd:annotation>
			<xsd:documentation>
				If the catalog is to contain objects from a single schema, then an element
				of that type should be the only choice listed.  If the catalog is to contain
				objects from different schemas, there should be an element reference to the
				object elements in each schema.  The object elements can have the same names, 
				but in that case, they should be from different namespaces - otherwise they 
				are not different schemas.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element ref="lead:LEADresource"/>
		</xsd:choice>
	</xsd:group>


	<!-- ************** -->
	<!-- Add Properties -->
	<!-- ************** -->
	<xsd:complexType name="catalogPropertyAddType">
		<xsd:sequence>
			<xsd:choice>
				<xsd:element ref="fgdc:theme"/>
				<xsd:element ref="fgdc:place"/>
				<xsd:element ref="fgdc:stratum"/>
				<xsd:element ref="fgdc:temporal"/>
				<xsd:element ref="lead:geospatial"/>
				<xsd:element ref="fgdc:dsgpoly"/>
				<xsd:element ref="le:vertdom"/>
				<xsd:element ref="lead:eainfo"/>
				<xsd:element ref="fgdc:detailed"/>
				<xsd:element ref="fgdc:overview"/>
				<xsd:element ref="lead:distinfo"/>
				<xsd:element ref="fgdc:stdorder"/>
				<xsd:element ref="lead:dataqual"/>
				<xsd:element ref="le:procstep"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
	
	<xsd:element name="catalogPropertyAdd" type="cat:catalogPropertyAddType"/>


	<!-- ***************** -->
	<!-- Update Properties -->
	<!-- ***************** -->
	<xsd:complexType name="catalogPropertyUpdateType">
		<xsd:sequence>
			<xsd:choice>
				<xsd:element ref="lead:citation"/>
				<xsd:element ref="lead:descript"/>
				<xsd:element ref="lead:status"/>
				<xsd:element ref="lead:accconst"/>
				<xsd:element ref="lead:useconst"/>
				<xsd:element ref="fgdc:theme"/>
				<xsd:element ref="fgdc:place"/>
				<xsd:element ref="fgdc:stratum"/>
				<xsd:element ref="fgdc:temporal"/>
				<xsd:element ref="lead:metainfo"/>
				<xsd:element ref="lead:timeperd"/>
				<xsd:element ref="fgdc:bounding"/>
				<xsd:element ref="fgdc:dsgpoly"/>
				<xsd:element ref="le:vertdom"/>
				<xsd:element ref="fgdc:detailed"/>
				<xsd:element ref="fgdc:overview"/>
				<xsd:element ref="fgdc:cntinfo"/>
				<xsd:element ref="fgdc:stdorder"/>
				<xsd:element ref="fgdc:complete"/>
				<xsd:element ref="le:procstep"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:element name="catalogPropertyUpdate" type="cat:catalogPropertyUpdateType"/>


	<!-- ********************************** -->
	<!-- AddQuery Meatadata Property Filter -->
	<!-- ********************************** -->
	<xsd:group name="propertyFilterGroup">
		<xsd:annotation>
			<xsd:documentation>
				All of the query response object types based on one or 
				more property filters use this group.
				The order of metadata properties included is based on the 
				order of the filters in the query.  Other than those where 
				the occurrance restriction is unbounded will generally only
				have a single instance since they occur only once in the schema.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:choice maxOccurs="unbounded">
				<xsd:element ref="lead:citation"/>
				<xsd:element ref="lead:descript"/>
				<xsd:element ref="lead:status"/>
				<xsd:element ref="lead:accconst"/>
				<xsd:element ref="lead:useconst"/>
				<xsd:element ref="fgdc:theme"/>
				<xsd:element ref="fgdc:place"/>
				<xsd:element ref="fgdc:stratum"/>
				<xsd:element ref="fgdc:temporal"/>
				<xsd:element ref="lead:metainfo"/>
				<xsd:element ref="lead:timeperd"/>
				<xsd:element ref="fgdc:bounding"/>
				<xsd:element ref="fgdc:dsgpoly"/>
				<xsd:element ref="le:vertdom"/>
				<xsd:element ref="fgdc:detailed"/>
				<xsd:element ref="fgdc:overview"/>
				<xsd:element ref="fgdc:cntinfo"/>
				<xsd:element ref="fgdc:stdorder"/>
				<xsd:element ref="fgdc:complete"/>
				<xsd:element ref="le:procstep"/>
				<xsd:element ref="le:resourceID"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:group>


</xsd:schema>
