<?xml version = "1.0" encoding = "UTF-8"?>
<!--
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	#
	# Copyright (C) 2003-2008 Open Microscopy Environment
	#       Massachusetts Institute of Technology,
	#       National Institutes of Health,
	#       University of Dundee,
	#       University of Wisconsin at Madison
	#
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<!--
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	# Written by:  Andrew J Patterson 
	#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<xsd:schema xmlns = "http://www.openmicroscopy.org/Schemas/OMERO/2008-09"
	targetNamespace = "http://www.openmicroscopy.org/Schemas/OMERO/2008-09"
	xmlns:OME = "http://www.openmicroscopy.org/Schemas/OME/2008-09"
	xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
	version = "1"
	elementFormDefault = "qualified">
	<xsd:import namespace = "http://www.openmicroscopy.org/Schemas/OME/2008-09" schemaLocation = "http://www.openmicroscopy.org/Schemas/OME/2008-09/ome.xsd"/>
	
	<xsd:element name="RoiDisplay"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:attribute name="fill" use="optional" type="xsd:string"/>
			<xsd:attribute name="fill-opacity" use="optional" type="xsd:string"/>
			<xsd:attribute name="fill-rule" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-opacity" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-width" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-dashoffset" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-dasharray" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-linecap" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-linejoin" use="optional" type="xsd:string"/>
			<xsd:attribute name="stroke-miterlimit" use="optional" type="xsd:string"/>
			<xsd:attribute name="color-interpolation" use="optional" type="xsd:string"/>
			<xsd:attribute name="color-rendering" use="optional" type="xsd:string"/>
			<xsd:attribute name="opacity" use="optional" type="xsd:string"/>
			<xsd:attribute name="marker-end" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-family" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-size" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-adjust" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-strech" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-style" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-variant" use="optional" type="xsd:string"/>
			<xsd:attribute name="font-weight" use="optional" type="xsd:string"/>
			<xsd:attribute name="alignment-baseline" use="optional" type="xsd:string"/>
			<xsd:attribute name="baseline-shift" use="optional" type="xsd:string"/>
			<xsd:attribute name="direction" use="optional" type="xsd:string"/>
			<xsd:attribute name="dominant-baseline" use="optional" type="xsd:string"/>
			<xsd:attribute name="glyph-orientation-horizontal" use="optional" type="xsd:string"/>
			<xsd:attribute name="glyph-orientation-vertical" use="optional" type="xsd:string"/>
			<xsd:attribute name="kerning" use="optional" type="xsd:string"/>
			<xsd:attribute name="letter-spacing" use="optional" type="xsd:string"/>
			<xsd:attribute name="text-anchor" use="optional" type="xsd:string"/>
			<xsd:attribute name="text-decoration" use="optional" type="xsd:string"/>
			<xsd:attribute name="unicode-bidi" use="optional" type="xsd:string"/>
			<xsd:attribute name="word-spacing" use="optional" type="xsd:string"/>
			<xsd:attribute name="rotate" use="optional" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>
	
	<xsd:element name="ProfileSet"> <!-- top level definition -->
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="ImageProfile" minOccurs="0" maxOccurs="2">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
							<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
							<!-- InstrumentRef is used instead of a reference to Microscope as 
								there is no ID in Microscope. There is a 1 to 1 mapping as each
								Instrument can contain only 1 Microscope.
							-->
							<xsd:element ref="OME:InstrumentRef" minOccurs="0" maxOccurs="1"/>
							<xsd:element ref="OME:ObjectiveRef" minOccurs="0" maxOccurs="1"/>
						</xsd:sequence>
						<xsd:attribute name="origin" use="optional" type="ProfileSource"/>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="ChannelProfile" minOccurs="0" maxOccurs="2">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
							<xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
							<xsd:element ref="OME:LightSourceRef" minOccurs="0" maxOccurs="1"/>
							<xsd:element ref="OME:OTFRef" minOccurs="0" maxOccurs="1"/>
							<xsd:element ref="OME:DetectorRef" minOccurs="0" maxOccurs="1"/>
							<xsd:element ref="OME:FilterSetRef" minOccurs="0" maxOccurs="1"/>
						</xsd:sequence>
						<xsd:attribute name="origin" use="optional" type="ProfileSource"/>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	
	<xsd:simpleType name="ProfileSource"> <!-- top level definition -->
		<xsd:annotation>
			<xsd:documentation>
				Where the profile data came from.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="User"/>
			<xsd:enumeration value="File"/>
		</xsd:restriction>
	</xsd:simpleType>	
	
	
</xsd:schema>
