<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	elementFormDefault="qualified">
	<xs:annotation>
		<xs:documentation xml:lang="en">
			Schema Specification for
			Module Descriptor XML files.
		</xs:documentation>
	</xs:annotation>

	<xs:element name="module">
		<xs:annotation>
			<xs:documentation>Main tag for module descriptor.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="comment" minOccurs="0"
					type="xs:string">
					<xs:annotation>
						<xs:documentation>
							This is a tag where to define a module
							comment.
						</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="initializer" maxOccurs="1"
					minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							Each module has a initializer, a class that
							implements the initializing of modules.
						</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="class-name"
							type="xs:NCName">
							<xs:annotation>
								<xs:documentation>
									The class name of the module
									initializer.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="database-schema" maxOccurs="1"
					minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							The database schema used by model generator,
							to generate the source code model for this
							metadata.
						</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="file" type="xs:string"
							use="required">
							<xs:annotation>
								<xs:documentation>
									The database schema file name.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="text-resources"
							type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation>
									The text resources for database
									schema.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="text-resource" maxOccurs="unbounded"
					minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							Additional resources of text.
						</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="file" type="xs:string"
							use="required">
							<xs:annotation>
								<xs:documentation>
									The file of additional text
									resource.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="group" maxOccurs="unbounded"
					minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							Grouping elements. Used to create
							sub-modules which will generate sub-menus
							within the module menu item.
						</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="id" type="xs:string"
							use="required">
							<xs:annotation>
								<xs:documentation>
									The group identifier. Used in tables
									or views in the XML database schema.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="title" type="xs:string"
							use="required">
							<xs:annotation>
								<xs:documentation>
									The title of group.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="description"
							type="xs:string" use="optional">
							<xs:annotation>
								<xs:documentation>
									The optional description of this
									group.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>

				<xs:element name="optimizer" maxOccurs="unbounded"
					minOccurs="0">
					<xs:annotation>
						<xs:documentation>
							Database optimizers elements. They allow to
							define optimized methods in terms of the
							database used.
						</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="db-engine" use="required">
							<xs:annotation>
								<xs:documentation>
									The database engine to be optimized.
								</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="Oracle"></xs:enumeration>
									<xs:enumeration value="AS400"></xs:enumeration>
									<xs:enumeration value="MySQL"></xs:enumeration>
									<xs:enumeration value="SQLServer"></xs:enumeration>
									<xs:enumeration value="ODBC"></xs:enumeration>
									<xs:enumeration
										value="DerbyEmbedded">
									</xs:enumeration>
									<xs:enumeration
										value="DerbyClient">
									</xs:enumeration>
									<xs:enumeration value="SAP"></xs:enumeration>
									<xs:enumeration value="DB2"></xs:enumeration>
									<xs:enumeration
										value="PostgreSQL">
									</xs:enumeration>
									<xs:enumeration value="Default"></xs:enumeration>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="class" type="xs:NCName"
							use="required">
							<xs:annotation>
								<xs:documentation>
									The optimizer class name.
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="info" minOccurs="0" maxOccurs="1">
					<xs:complexType>
						<xs:all>
							<xs:element name="copyright" minOccurs="0"
								maxOccurs="1">
								<xs:complexType>
									<xs:attribute name="text"
										type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation>
												The copyright
												information (year
												company).
											</xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
							<xs:element name="category" minOccurs="0"
								maxOccurs="1">
								<xs:complexType>
									<xs:attribute name="name"
										use="required">
										<xs:annotation>
											<xs:documentation>
												The category of this
												application.
											</xs:documentation>
										</xs:annotation>
										<xs:simpleType>
											<xs:restriction
												base="xs:string">
												<xs:enumeration
													value="Books">
												</xs:enumeration>
												<xs:enumeration
													value="Business">
												</xs:enumeration>
												<xs:enumeration
													value="Developer Tools">
												</xs:enumeration>
												<xs:enumeration
													value="Education">
												</xs:enumeration>
												<xs:enumeration
													value="Entertainment">
												</xs:enumeration>
												<xs:enumeration
													value="Finance">
												</xs:enumeration>
												<xs:enumeration
													value="Food &amp; Drink">
												</xs:enumeration>
												<xs:enumeration
													value="Games">
												</xs:enumeration>
												<xs:enumeration
													value="Graphics &amp; Design">
												</xs:enumeration>
												<xs:enumeration
													value="Health &amp; Fitness">
												</xs:enumeration>
												<xs:enumeration
													value="Lifestyle">
												</xs:enumeration>
												<xs:enumeration
													value="Kids">
												</xs:enumeration>
												<xs:enumeration
													value="Magazines &amp; Newspapers">
												</xs:enumeration>
												<xs:enumeration
													value="Medical">
												</xs:enumeration>
												<xs:enumeration
													value="Music">
												</xs:enumeration>
												<xs:enumeration
													value="Navigation">
												</xs:enumeration>
												<xs:enumeration
													value="News">
												</xs:enumeration>
												<xs:enumeration
													value="Photo &amp; Video">
												</xs:enumeration>
												<xs:enumeration
													value="Productivity">
												</xs:enumeration>
												<xs:enumeration
													value="Reference">
												</xs:enumeration>
												<xs:enumeration
													value="Shopping">
												</xs:enumeration>
												<xs:enumeration
													value="Social Networking">
												</xs:enumeration>
												<xs:enumeration
													value="Sports">
												</xs:enumeration>
												<xs:enumeration
													value="Travel">
												</xs:enumeration>
												<xs:enumeration
													value="Utilities">
												</xs:enumeration>
												<xs:enumeration
													value="Weather">
												</xs:enumeration>
											</xs:restriction>
										</xs:simpleType>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
							<xs:element name="compatibility"
								minOccurs="0" maxOccurs="1">
								<xs:complexType>
									<xs:attribute name="text"
										type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation>
												The compatibility of
												this application.
												<br />
												E.g. "Multiplatform -
												Java 1.8+"
											</xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
							<xs:element name="icon" minOccurs="0"
								maxOccurs="1">
								<xs:complexType>
									<xs:attribute name="href"
										type="xs:string" use="optional">
										<xs:annotation>
											<xs:documentation>
												Large icon (*.icns,
												*.png) used in the main
												frame of the
												application.
											</xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:all>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="name" type="xs:NCName" use="required">
				<xs:annotation>
					<xs:documentation>
						The module name.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="id" type="xs:NCName" use="required">
				<xs:annotation>
					<xs:documentation>
						The module identifier.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="description" type="xs:string"
				use="required">
				<xs:annotation>
					<xs:documentation>
						The module description.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="version" type="xs:string"
				use="optional">
				<xs:annotation>
					<xs:documentation>
						The module version.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="base-package" type="xs:string"
				use="required">
				<xs:annotation>
					<xs:documentation>
						The base package of the module source.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="text-resources" type="xs:string"
				use="required">
				<xs:annotation>
					<xs:documentation>
						The text resource file. Used by the resources
						generator to generate the resources of text of
						this module.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="build" type="xs:string"
				use="optional">
				<xs:annotation>
					<xs:documentation>
						The module build.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="sort-key" type="xs:string"
				use="optional">
				<xs:annotation>
					<xs:documentation>
						The sort key used in menus. By default the sort
						key is the name of the module.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="model" type="xs:string"></xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>
