<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cc="http://www.eclipse.org/hyades/schema/ComponentConfiguration.xsd" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:ex="http://www.eclipse.org/hyades/schema/Extractor.xsd" xmlns:fmt="http://www.eclipse.org/hyades/schema/Formatter.xsd" xmlns:op="http://www.eclipse.org/hyades/schema/Outputter.xsd" xmlns:parser="http://www.eclipse.org/hyades/schema/Parser.xsd" xmlns:pu="http://www.eclipse.org/hyades/schema/ProcessUnit.xsd" xmlns:s="http://www.eclipse.org/hyades/schema/Sensor.xsd" ecore:nsPrefix="cc" ecore:package="configuration" elementFormDefault="qualified" targetNamespace="http://www.eclipse.org/hyades/schema/ComponentConfiguration.xsd">
	<annotation>
	  <documentation xml:lang="en">
	    Copyright (c) 2003 Hyades project.
		All rights reserved.   This program and the accompanying materials
		are made available under the terms of the Common Public License v1.0
		which accompanies this distribution, and is available at
		http://www.eclipse.org/legal/cpl-v10.html
	  </documentation>
	</annotation>
	<import namespace="http://www.eclipse.org/hyades/schema/Sensor.xsd" schemaLocation="Sensor.xsd"/>
	<import namespace="http://www.eclipse.org/hyades/schema/ProcessUnit.xsd" schemaLocation="ProcessUnit.xsd"/>
	<import namespace="http://www.eclipse.org/hyades/schema/Extractor.xsd" schemaLocation="Extractor.xsd"/>
	<!--import namespace="http://www.eclipse.org/hyades/schema/Parser.xsd" schemaLocation="Parser.xsd" -->
	<import namespace="http://www.eclipse.org/hyades/schema/Formatter.xsd" schemaLocation="Formatter.xsd"/>
	<import namespace="http://www.eclipse.org/hyades/schema/Outputter.xsd" schemaLocation="Outputter.xsd"/>
	<import namespace="http://www.eclipse.org/hyades/schema/Parser.xsd" schemaLocation="Parser.xsd"/>
	<!--import namespace="http://www.eclipse.org/hyades/schema/SimpleFiltering.xsd" schemaLocation="SimpleFiltering.xsd" -->
	<!--import namespace="http://www.eclipse.org/hyades/schema/Context.xsd" schemaLocation="Context.xsd" -->
	<annotation>
		<documentation/>
	</annotation>
	<element name="Configuration" type="cc:ConfigurationType"/>
	<complexType name="ConfigurationType">
		<sequence>
			<element maxOccurs="unbounded" minOccurs="0" name="ContextInstance" type="cc:ContextInstanceType"/>
		</sequence>
		<attributeGroup ref="pu:ProcessUnitAttributes"/>
	</complexType>
	<complexType name="ContextInstanceType">
		<annotation>
			<documentation>
				A context instance has a set of properties that are
				common to every context when it is running. It also
				contains a variety of components or "processing units"
				including at least 1 sensor which is always needed to
				start the sequence. The components are executed in the
				order they are declared, and this order has to match the
				context configuration file.
			</documentation>
		</annotation>
		<sequence>
			<element maxOccurs="1" minOccurs="1" name="Sensor" type="s:SensorConfigType"/>
<!--			<element maxOccurs="1" minOccurs="0" name="Extractor" type="ex:ExtractorType"/> -->
			<element maxOccurs="1" minOccurs="0" ref="ex:Extractor"/>
			<element maxOccurs="1" minOccurs="0" name="Parser" type="parser:ParserConfigType"/>
<!--			<element maxOccurs="unbounded" minOccurs="0" name="ProcessUnit" type="pu:ProcessUnitType"/>-->
			<element maxOccurs="unbounded" minOccurs="0" ref="pu:ProcessUnit"/>
<!--			<element maxOccurs="unbounded" minOccurs="0" name="Formatter" type="fmt:FormatterType"/>-->
			<element maxOccurs="unbounded" minOccurs="0" ref="fmt:Formatter"/>
			<element maxOccurs="unbounded" minOccurs="0" name="Outputter" type="op:OutputterConfigType"/>
			<!-- the following are to be removed -->
			<!--element ref="com.ibm.acad.parser:ParserConfig" minOccurs="0" maxOccurs="1" -->
			<!--element ref="com.ibm.acad.formatter:FormatterConfig" minOccurs="0" maxOccurs="unbounded" -->
		</sequence>
		<attribute name="continuousOperation" type="boolean" use="required">
			<annotation>
				<documentation>
					A context has the sole purpose of running it's
					components. These components are typically used to
					process input. This processing occurs either only
					once when started, for a specific length of time, or
					until an amount of time has passed with no
					processing to do. To support this a boolean option
					of continuous operation is provided. True indicates
					as implied. False indicates how long the context
					will run with no input, hence idle. A maximum idle
					time of zero implies a run once symantic. Any other
					time is a maximum amount of time the context will
					wait for activity. Once no input has been detected
					the context will pause before attempting activity
					again this is determined by the pauseInterval.
				</documentation>
			</annotation>
		</attribute>
		<attribute name="maximumIdleTime" type="string" use="required"/>
		<attribute name="pauseInterval" type="string" use="required"/>
		<attribute default="en" name="isoLanguageCode" type="string" use="optional"/>
		<attribute default="US" name="isoCountryCode" type="string" use="optional"/>
		<attribute default="UTF-8" name="charset" type="string" use="optional"/>
		<attributeGroup ref="pu:ProcessUnitAttributes"/>
	</complexType>
</schema>
