<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dag.com/metacenter/schemas" xmlns:common="http://dag.com/metacenter/schemas/common" targetNamespace="http://dag.com/metacenter/schemas">
	<annotation>
		<documentation>
		Schema Definitions for the Metacenter Public API.
		</documentation>
	</annotation>
	<import namespace="http://dag.com/metacenter/schemas/common" schemaLocation="common.xsd"/>
	<element name="metadataCriteria">
		<annotation>
			<documentation>
			Specifies the Criteria for retrieving object metadata. Both values and relationships on a selection of objects can
			be retrieved by specifying the appropriate criteria.
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="objCriteria" type="tns:ObjCriteria" minOccurs="0" maxOccurs="unbounded">
					<annotation>
						<documentation>
						Specifies a List of Object Identifiers whose metadata is to be retrieved. This is used in conjunction with the Object Selector.
						</documentation>
					</annotation>
				</element>
				<element name="attrCriteria" type="tns:AttributeCriteria" minOccurs="0">
					<annotation>
						<documentation>
						Specifies any Global attribute criteria when attribute loading is enabled
						</documentation>
					</annotation>
				</element>
				<element name="relCriteria" type="tns:RelationshipCriteria" minOccurs="0" maxOccurs="unbounded">
					<annotation>
						<documentation>
						Specifies any Global relationship criteria when relationship loading is enabled
						</documentation>
					</annotation>
				</element>
				<element name="typeAttrCriteria" type="tns:ObjectTypeAttributeCriteria" minOccurs="0" maxOccurs="unbounded">
					<annotation>
						<documentation>
						Specifies any per type  attribute criteria when attribute loading is enabled
						</documentation>
					</annotation>
				</element>
				<element name="typeRelCriteria" type="tns:ObjectTypeRelCriteria" minOccurs="0" maxOccurs="unbounded">
					<annotation>
						<documentation>
						Specifies any per type  relationship criteria when relationship loading is enabled
						</documentation>
					</annotation>
				</element>
				<element name="formatCriteria" type="tns:FormatCriteria" minOccurs="0">
					<annotation>
						<documentation>
						Specified any formatting criteria (in addition to that implied by the Attribute Types themselves)
						</documentation>
					</annotation>
				</element>
			</sequence>
			<attribute name="objectSelectorType" type="common:ObjectSelectorType">
				<annotation>
					<documentation>
					How is the Object List specified for retrieving metadata?
					</documentation>
				</annotation>
			</attribute>
			<attribute name="isLoadAttributes" type="boolean" default="true">
				<annotation>
					<documentation>
					Should we load attribute metadata? If true, then Attribute Criteria may be specified to limit the number
					of Attributes returned, otherwise all attribute metadata will be returned. If false, no attribute metadata is returned.
					</documentation>
				</annotation>
			</attribute>
			<attribute name="isLoadSqlAttributeResult" type="boolean" default="false">
				<annotation>
					<documentation>
					Should we load SQL attribute results? If true, the query in SQL attribute will be executed and query results  
					will be returned as metadata value. If false, query will not be executed and no metadata is returned.
					</documentation>
				</annotation>
			</attribute>			
			<attribute name="isLoadRels" type="boolean" default="false">
				<annotation>
					<documentation>
					Should we load "relationship" metadata? If true, then Relationship Attribute Criteria may be specified to limit the number
					of relationships returned, otherwise all relationship metadata will be returned. If false, no relationship  metadata is returned.
					</documentation>
				</annotation>
			</attribute>
			<attribute name="isLoadRelObjMetadata" type="boolean" default="false">
				<annotation>
					<documentation>
					Should we load attribute metadata on the Related objects themselves? If true, then attribute metadata on the related objects will also be populated (conforming to the attribute criteria, if specified)
					</documentation>
				</annotation>
			</attribute>
		</complexType>
	</element>
	<element name="metadataResult">
		<complexType>
			<sequence>
				<element name="metamodel" type="tns:Metamodel"/>
				<element name="catalog" type="tns:Catalog"/>
			</sequence>
		</complexType>
	</element>
	<element name="searchCriteria">
		<annotation>
			<documentation>
			A search Criteria for retrieving objects from Metacenter. Specifies the Search Query,  scope of the Search
			and Paging information.
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="scope" type="tns:Scope"/>
				<element name="query" type="string"/>
				<element name="sort" type="tns:Sort" minOccurs="0" maxOccurs="1"/>
				<element name="fieldList" type="tns:SearchObjectFieldList" minOccurs="0" maxOccurs="1"/>
			</sequence>
			<attribute name="start" type="long"/>
			<attribute name="rows" type="long" default="100"/>
		</complexType>
	</element>
	<element name="searchResult">
		<annotation>
			<documentation>
			A representation of the Results from a Search Query which consists of a list of Search Objects
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="fieldList" type="tns:SearchObjectFieldList" minOccurs="0" maxOccurs="1"/>
				<element name="searchObj" type="tns:SearchObject" minOccurs="0" maxOccurs="unbounded"/>
			</sequence>
			<attribute name="totalHits" type="long"/>
		</complexType>
	</element>
	<element name="typeCriteria" type="tns:ObjectTypeCriteria">
		<annotation>
			<documentation>
			A criteria for retrieving Object Types
			</documentation>
		</annotation>
	</element>
	<element name="typeResult">
		<annotation>
			<documentation>
			A list of Object Types
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="type" type="tns:ObjectType" maxOccurs="unbounded"/>
			</sequence>
		</complexType>
	</element>
	<element name="appCriteria">
		<annotation>
			<documentation>
			A criteria for retrieving Applications based on their Application Ids
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="appIdsChoice" type="tns:AppIdsChoice"/>
			</sequence>
		</complexType>
	</element>
	<element name="appResult">
		<annotation>
			<documentation>
			A list of Applications
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="app" type="tns:Application" maxOccurs="unbounded"/>
			</sequence>
		</complexType>
	</element>
	<element name="pickListResult">
		<annotation>
			<documentation>
			A list of PickLists
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="pickList" type="tns:PickList" maxOccurs="unbounded"/>
			</sequence>
		</complexType>
	</element>
	<element name="relTypeResult">
		<annotation>
			<documentation>
			A list of Relationship Types
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="relType" type="tns:RelationshipType" maxOccurs="unbounded"/>
			</sequence>
		</complexType>
	</element>
	<element name="envCriteria">
		<annotation>
			<documentation>
			A Criteria for retrieving Environments
			Environments for the given Application will be returned
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="appIdsChoice" type="tns:AppIdsChoice"/>
			</sequence>
		</complexType>
	</element>
	<element name="envResult">
		<annotation>
			<documentation>
			A list of Environments
			</documentation>
		</annotation>
		<complexType>
			<sequence>
				<element name="env" type="tns:Environment" minOccurs="0" maxOccurs="unbounded"/>
			</sequence>
		</complexType>
	</element>
	<complexType name="AppIdsChoice">
		<choice>
			<element name="physicalAppId" type="integer" minOccurs="0" maxOccurs="unbounded"/>
			<element name="logicalAppId" type="string" minOccurs="0" maxOccurs="unbounded"/>
		</choice>
	</complexType>
	<complexType name="AttrIdsChoice">
		<choice>
			<element name="physicalAttrId" type="long" minOccurs="0" maxOccurs="unbounded"/>
			<element name="logicalAttrId" type="string" minOccurs="0" maxOccurs="unbounded"/>
		</choice>
	</complexType>
	<complexType name="ObjIdChoice">
		<choice>
			<element name="objUid" type="string"/>
			<element name="physicalObjId" type="long"/>
			<element name="logicalObjId" type="string"/>
		</choice>
	</complexType>	
	<complexType name="TypeIdChoice">
		<choice>
			<element name="physicalTypeId" type="long"/>
			<element name="logicalTypeId" type="string"/>
		</choice>
	</complexType>
	<complexType name="TypeIdsChoice">
		<choice>
			<element name="physicalTypeId" type="long" maxOccurs="unbounded"/>
			<element name="logicalTypeId" type="string" maxOccurs="unbounded"/>
		</choice>
	</complexType>
	<complexType name="RelAttrIdChoice">
		<choice>
			<element name="physicalRelAttrId" type="long" minOccurs="0"/>
			<element name="logicalRelAttrId" type="string" minOccurs="0"/>
		</choice>
	</complexType>
	<complexType name="RelTypesChoice">
		<choice>
			<element name="relTypeIdChoice" type="tns:RelTypeIdChoice"/>
			<element name="relFlowTypeIdChoice" type="tns:RelFlowTypeIdChoice"/>
		</choice>
	</complexType>
	<complexType name="RelTypeIdChoice">
		<choice>
			<element name="physicalRelTypeId" type="long" minOccurs="0"/>
			<element name="logicalRelTypeId" type="string" minOccurs="0"/>
		</choice>
	</complexType>
	<complexType name="RelFlowTypeIdChoice">
		<choice>
			<element name="physicalRelFlowTypeId" type="long" minOccurs="0"/>
			<element name="logicalRelFlowTypeId" type="string" minOccurs="0"/>
		</choice>
	</complexType>	
	<complexType name="Metamodel">
		<sequence>
			<element name="app" type="tns:Application" minOccurs="0" maxOccurs="unbounded"/>
			<element name="attrType" type="tns:AttributeType" minOccurs="0" maxOccurs="unbounded"/>
			<element name="relType" type="tns:RelationshipType" minOccurs="0" maxOccurs="unbounded"/>
			<element name="pickList" type="tns:PickList" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>	
	<complexType name="Catalog">
		<sequence>
			<element name="obj" type="tns:ObjectInstance" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>	
	<complexType name="ObjectInstance">
		<annotation>
			<documentation>
			An Object that is an instance of a given Object Type within a given Application and Environment.
			An object contains attribute and relationship metadata.
			Within a given Metacenter instance an Object is uniquely identified by a combination of its Environment, Object Type
			and Keys
			For convenience, an object is identified within a given Metacenter instance by a uid which is available in the Seach index, or
			it may be identified by  the database physical Id, or by a Logical Id.
			</documentation>
		</annotation>
		<sequence>
			<element name="key" type="common:ObjectKeyType" maxOccurs="10">
				<annotation>
					<documentation>
					A sequence of keys (1 to 10)  for partial object identification
					</documentation>
				</annotation>
			</element>
			<element name="metadata" type="tns:AttributeMetadata" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
					Encapsulates all the attribute metadata for the object
					</documentation>
				</annotation>
			</element>
			<element name="relSet" type="tns:RelationshipMetadata" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
					Encapsulates all the relationship metadata for the object
					</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="uid" type="string"/>
		<attribute name="physicalId" type="long"/>
		<attribute name="logicalId" type="long"/>
		<attribute ref="common:name" use="required"/>
		<attribute name="objectIdPath" type="string"/>
		<attribute name="typeIdPath" type="string"/>
		<attribute name="objectNamePath" type="string"/>
		<attributeGroup ref="common:auditInfo"/>
		<attribute name="refPhysicalTypeId" type="long" use="required"/>
		<attribute name="refPhysicalEnvId" type="long" use="required"/>
	</complexType>
	<complexType name="AttributeMetadata">
		<annotation>
			<documentation>
			A representation of the Metadata Values(s) for a given Attribute
			</documentation>
		</annotation>
		<sequence>
			<element name="val" type="tns:MetadataValue" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attributeGroup ref="common:auditInfo"/>
		<attribute name="refPhysicalAttrId" type="long" use="required">
			<annotation>
				<documentation>
				The Attrbute to which this Metadata applies
				</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="MetadataValue">
		<annotation>
			<documentation>
				A representation of a single Metadata Value
				The value is always a "string" whose actual type is defined by the Attribute Type of the Attribute that holds the metadata
			</documentation>
		</annotation>
		<simpleContent>
			<extension base="string">
				<attribute name="defaultVal" type="string">
					<annotation>
						<documentation>
						The Default Value for the Metadata. Specified on the Attribute as well, but repeated here for convenience
						</documentation>
					</annotation>
				</attribute>
				<attribute name="rawVal" type="string">
					<annotation>
						<documentation>
						The  value of the metadata before formatting
						</documentation>
					</annotation>
				</attribute>
				<attribute name="varExpr" type="string">
					<annotation>
						<documentation>
						Variable expression from which the value was derived.
						</documentation>
					</annotation>
				</attribute>
				<attribute name="refPhysicalObjId" type="long">
					<annotation>
						<documentation>
						For "Linked Data List" attributes, the object Id of the related object
						</documentation>
					</annotation>
				</attribute>
				<attribute name="refPhysicalAppId" type="integer">
					<annotation>
						<documentation>
						For "Linked Data List" attributes, the Environment Id of the related object
						</documentation>
					</annotation>
				</attribute>
			</extension>
		</simpleContent>
	</complexType>
	<complexType name="RelationshipMetadata">
		<annotation>
			<documentation>
			Represents the Relationship Metadata on a given RelationshipAttribute.
			</documentation>
		</annotation>
		<sequence>
			<element name="relObjInst" type="tns:RelatedObjectInstance" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
					An instance of a Related Object
					</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="refPhysicalRelAttrId" type="long" use="required">
			<annotation>
				<documentation>
				The Relationship Attribute to which this Relationship Metadata applies
				</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="RelatedObjectInstance">
		<annotation>
			<documentation>
			Wraps a Related Object adding additional context information such as Relationship Type and Description
			</documentation>
		</annotation>
		<sequence>
			<element name="relObj" type="tns:ObjectInstance" minOccurs="0" maxOccurs="1">
				<annotation>
					<documentation>
					The Wrapped Related Object.
					</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="refPhysicalRelTypeId" type="integer" use="required"/>
		<attribute ref="common:description"/>
	</complexType>
	<complexType name="ObjectType">
		<annotation>
			<documentation>
			An Object Type that Object Instances conform to. A given Object Type falls under a single Application
			</documentation>
		</annotation>
		<sequence>
			<element name="attr" type="tns:Attribute" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
					An Object Type has Attributes. An Attribute has an AttributeType and (in the context of an object) may hold "simple" values
					or related objects.
					</documentation>
				</annotation>
			</element>
			<element name="childType" type="tns:ChildObjectType" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attribute name="physicalId" type="long"/>
		<attribute name="logicalId" type="long"/>
		<attribute ref="common:name" use="required"/>
		<attribute ref="common:description"/>
		<attribute name="semanticAlias" type="string">
			<annotation>
				<documentation>
				A "generalized" name for an Object Type (such as "Column" or "Table" for easy Searches)
				</documentation>
			</annotation>
		</attribute>
		<attribute name="isContainer" type="boolean">
			<annotation>
				<documentation>
				Is this a "Container" type? i.e. mainly introduced to organize the Object Type hierarchy
				Instances of these Container types are created automatically by Metacenter
				</documentation>
			</annotation>
		</attribute>
		<attribute name="idPath" type="string"/>
		<attribute name="isSystem" type="boolean"/>
		<attributeGroup ref="common:auditInfo"/>
		<attribute name="refPhysicalAppId" type="integer" use="required">
			<annotation>
				<documentation>
				The Application that this Object Type belongs to
				</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="ChildObjectType">
		<annotation>
			<documentation>
			This is a representation of the "Parent-Child" relationship between a Parent Type and its Child Types
			</documentation>
		</annotation>
		<attribute name="refPhysicalTypeId" type="long" use="required">
			<annotation>
				<documentation>
				A Reference to the Child Type
				</documentation>
			</annotation>
		</attribute>
		<attribute name="isShortcut" type="boolean" use="required">
			<annotation>
				<documentation>
				Are objects of the child Type only shortcuts to their real location.
				</documentation>
			</annotation>
		</attribute>
		<attribute ref="common:label" use="required"/>
	</complexType>
	<complexType name="Attribute">
		<annotation>
			<documentation>
			The definition of an Attribute. An Attribute belongs to a single Object Type
			An attribute can be a "value" attribute (String Long, Date Long, Data List etc.)
			or it can be a Relationship attribute (which relates to other objects)
			</documentation>
		</annotation>
		<attribute name="physicalId" type="long" use="required"/>
		<attribute name="logicalId" type="long"/>
		<attribute ref="common:name" use="required"/>
		<attribute ref="common:description"/>
		<attribute ref="common:label"/>
		<attribute name="isRequired" type="boolean"/>
		<attribute name="semanticAlias" type="string">
			<annotation>
				<documentation>
				The "generalized" name of an Attribute suitable for Searches (such as table_name, data_type etc.)
				</documentation>
			</annotation>
		</attribute>
		<attribute name="pickListId" type="long"/>
		<attributeGroup ref="common:sqlAttrDef">
			<annotation>
				<documentation>
					The "Sql Definition" for a a Sql attribute
				</documentation>
			</annotation>
		</attributeGroup>
		<attributeGroup ref="common:linkedObjectConstraintAttrDef">
			<annotation>
				<documentation>
					Constraint specification for a "Linked Data List" Attribute
				</documentation>
			</annotation>
		</attributeGroup>
		<attribute name="isExtension" type="boolean"/>
		<attribute name="isSystem" type="boolean"/>
		<attribute name="defaultValue" type="string"/>
		<attribute name="isVariableSubstitution" type="boolean"/>
		<attribute name="isPersistDefaultValue" type="boolean"/>
		<attribute name="refPhysicalRelTypeId" type="long">
			<annotation>
				<documentation>
				If this is a Relationship Attribute,specifies the Relation Type Id of how the objects are related
				</documentation>
			</annotation>
		</attribute>
		<attribute name="refPhysicalObjectTypeId" type="long" use="required">
			<annotation>
				<documentation>
				The Object Type to which this Attribute belongs
				</documentation>
			</annotation>
		</attribute>
		<attribute name="refPhysicalAttrTypeId" type="integer" use="required">
			<annotation>
				<documentation>
				The Attribute Type of this Attribute (such as String Long, Date Short etc.)
				</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="AttributeType">
		<annotation>
			<documentation>
				The Attribute Types supported by Metacenter (String Long, Pick List, Number etc.)
				This is a higher level construct than a "simple" type such as "string" or "date"
				</documentation>
		</annotation>
		<attribute name="physicalId" type="long" use="required"/>
		<attribute name="logicalId" type="long"/>
		<attribute ref="common:name" use="required"/>
		<attribute ref="common:description"/>
		<attribute name="simpletype" type="common:SimpleType">
			<annotation>
				<documentation>
					The "simple" type underlying the Metacenter Attribute Type (such as "string", "date" etc.)
				</documentation>
			</annotation>
		</attribute>
		<attribute name="maxLength" type="long"/>
		<attribute name="supportsHtml" type="boolean"/>
	</complexType>
	<complexType name="RelationshipType">
		<annotation>
			<documentation>
			A Relationship Type describing the semantics of how objects are related
			</documentation>
		</annotation>
		<attribute name="physicalId" type="long" use="required"/>
		<attribute name="logicalId" type="long"/>
		<attribute ref="common:name" use="required"/>
		<attribute ref="common:label"/>
		<attribute ref="common:description"/>
		<attribute name="isSystem" type="boolean"/>
		<attribute name="flowTypeId" type="long"/>
		<attribute name="refInversePhysicalRelTypeId" type="long">
			<annotation>
				<documentation>
					Relationship Types come in pairs. This attribute specifies the inverse of this Relationship Type, i.e the Relationship Type in the opposite direction
				</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="Application">
		<annotation>
			<documentation>
				Corresponds to a Metacenter Active Linx
			</documentation>
		</annotation>
		<sequence>
			<element name="objType" type="tns:ObjectType" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
						Objects Types in this Application (need not include all Object Types in this Application -- depends on the Context)
					</documentation>
				</annotation>
			</element>
			<element name="env" type="tns:Environment" minOccurs="0" maxOccurs="unbounded">
				<annotation>
					<documentation>
					A list of the environments within this Application (need not contain all the Environments -- depends on the Context)
					</documentation>
				</annotation>
			</element>
			<element name="appObjType" type="tns:ObjectType" minOccurs="0"/>
		</sequence>
		<attribute name="physicalId" type="integer" use="required"/>
		<attribute name="logicalId" type="integer"/>
		<attribute ref="common:name" use="required"/>
		<attribute ref="common:description"/>
	</complexType>
	<complexType name="Environment">
		<annotation>
			<documentation>
				Corresponds to a Metacenter Repository
			</documentation>
		</annotation>
		<sequence>
			<element name="envObj" type="tns:ObjectInstance" minOccurs="0">
				<annotation>
					<documentation>
					The Object Instance for this Environment (because environments are ALSO objects)
					</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="physicalId" type="long" use="required"/>
		<attribute name="logicalId" type="long"/>
		<attribute ref="common:name" use="required"/>
		<attribute ref="common:description"/>
		<attribute name="dbType" type="common:DbType"/>
		<attribute name="refPhysicalAppId" type="integer" use="required">
			<annotation>
				<documentation>
				The Application that this Environment is an instance of
				</documentation>
			</annotation>
		</attribute>
	</complexType>
	<complexType name="Scope">
		<annotation>
			<documentation>
			Specifies a Scope within which to look for Objects.
			The top level scope is an Application. Within an application, types and environments may be specified
			</documentation>
		</annotation>
		<sequence>
			<element name="app" type="tns:Application" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
	</complexType>
	<complexType name="Sort">
		<annotation>
			<documentation>
			Specifies a SortBy to sort search results
			</documentation>
		</annotation>
		<sequence>
			<element name="sortField" type="tns:SortField" minOccurs="1" maxOccurs="1"/>
		</sequence>		
	</complexType>
	<complexType name="SortField">
		<annotation>
			<documentation>
			Specifies sort criteria.
			</documentation>
		</annotation>
		<attribute name="sortBy" type="tns:SortBy"/>
		<attribute name="sortOrder" type="common:SortOrder"/>
	</complexType>
	<simpleType name="SortBy">
		<annotation>
			<documentation>
				Possible sort by options
			</documentation>
		</annotation>
		<restriction base="string">
		</restriction>
	</simpleType>
	<complexType name="SearchObject">
		<annotation>
			<documentation>
			A representation of the results of performing a Search against the Metacenter Search index
			</documentation>
		</annotation>
		<sequence>
			<element name="key" type="common:ObjectKeyType" maxOccurs="10"/>
			<element name="field" type="tns:SearchObjectField" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attribute ref="common:name" use="required"/>
		<attribute name="uid" type="string" use="required"/>
		<attribute name="physicalId" type="long"/>
		<attribute name="logicalId" type="long"/>
		<attribute name="objTypeName" type="string" use="required"/>
		<attribute name="objTypeId" type="long" use="required"/>
		<attribute name="appId" type="integer" use="required"/>
		<attribute name="appName" type="string" use="required"/>
		<attribute name="envId" type="long" use="required"/>
		<attribute name="envName" type="string" use="required"/>
		<attribute name="path" type="string" use="required"/>
	</complexType>
	<complexType name="SearchObjectFieldList">
		<sequence>
			<element name="field" type="tns:SearchObjectField" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attribute name="includeAllFields" type="boolean" default="false"/>
	</complexType>	
	<complexType name="SearchObjectField">
		<annotation>
			<documentation>
			Representation of the "metadata" stored in the Search index.
			These are associated with semantic alias names (such as table_name, data_type etc.)
			</documentation>
		</annotation>
		<sequence>
			<element name="val" type="string" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attribute name="name" type="string"/>
		<attribute name="label" type="string"/>
	</complexType>
	<complexType name="PickList">
		<sequence>
			<element name="listItem" type="tns:PickListItem" minOccurs="0" maxOccurs="unbounded"/>
		</sequence>
		<attribute name="physicalId" type="long"/>
		<attribute name="logicalId" type="long"/>
		<attribute name="isSystem" type="boolean"/>
		<attribute ref="common:description"/>
		<attribute ref="common:name"/>
		<attributeGroup ref="common:auditInfo"/>
		<attribute name="owner" type="string"/>
	</complexType>
	<complexType name="PickListItem">
		<attribute name="physicalId" type="long"/>
		<attribute name="logicalId" type="long"/>
		<attribute name="val" type="string"/>
		<attribute name="refPhysicalListId" type="long"/>
	</complexType>
	<complexType name="ObjectTypeCriteria">
		<annotation>
			<documentation>
				A list of Type Ids. Typically used when retrieving Type information
			</documentation>
		</annotation>
		<sequence>
			<element name="typeIdsChoice" type="tns:TypeIdsChoice"/>
		</sequence>
	</complexType>
	<complexType name="ObjectTypeAttributeCriteria">
		<annotation>
			<documentation>
				A per type Attribute Selection criteria. Used when retrieving Object metadata and fine-grained per type Attribute filtering is required
			</documentation>
		</annotation>
		<sequence>
			<element name="typeIdChoice" type="tns:TypeIdChoice"/>
			<element name="attrCriteria" type="tns:AttributeCriteria">
				<annotation>
					<documentation>
					Specifies any attribute criteria when attribute loading is enabled
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ObjectTypeRelCriteria">
		<annotation>
			<documentation>
				A per type Relationship Selection criteria. Used when retrieving Object metadata and fine-grained per type Relationship filtering is required
			</documentation>
		</annotation>
		<sequence>
			<element name="typeIdChoice" type="tns:TypeIdChoice"/>
			<element name="relCriteria" type="tns:RelationshipCriteria" maxOccurs="unbounded">
				<annotation>
					<documentation>
					Specifies any relationship criteria when relationship loading is enabled
					</documentation>
				</annotation>
			</element>
		</sequence>
	</complexType>
	<complexType name="ObjCriteria">
		<annotation>
			<documentation>
			A criteria for specifying which object to retrieve information for.
			An object may be identified by it's uid, physical id, or logical id
			</documentation>
		</annotation>
		<sequence>
			<element name="objIdChoice" type="tns:ObjIdChoice"/>
		</sequence>
	</complexType>
	<complexType name="RelationshipCriteria">
		<annotation>
			<documentation>
			To retrieve only a specific list of Relationships, specify the Criteria here
			You can specify (optionally) a Relationship Attribute Id which will load
			all the relationships on that attribute.
			Additionally, you may specify a filter by Relationship Type Id or Flow Type Id
			</documentation>
		</annotation>
		<choice>
			<element name="relAttrIdChoice" type="tns:RelAttrIdChoice"/>
			<element name="relTypesChoice" type="tns:RelTypesChoice" minOccurs="0" maxOccurs="unbounded"/>
		</choice>
	</complexType>
	<complexType name="AttributeCriteria">
		<annotation>
			<documentation>
			To retrieve only a specific list of attributes in a Metadata request, specify the Attribute Ids here
			By default, all attributes (i.e. the one ones holding values, not relationships) will be loaded
			</documentation>
		</annotation>
		<sequence>
			<element name="attrIdsChoice" type="tns:AttrIdsChoice"/>
		</sequence>
	</complexType>
	<complexType name="FormatCriteria">
		<annotation>
			<documentation>
			Any formatting criteria for the metadata in addition to what is implied in the Attribute Types.
			</documentation>
		</annotation>
		<attribute name="isStripHtml" type="boolean" default="false">
			<annotation>
				<documentation>
				Should the Html be stripped out from the metadata values?
				</documentation>
			</annotation>
		</attribute>
	</complexType>
</schema>
