<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.hyades.ui">
<annotation>
      <appInfo>
         <meta.schema plugin="org.eclipse.hyades.ui" id="typeValidators" name="Type Validator"/>
      </appInfo>
      <documentation>
         A type validator allows implementors to define which types are valid for a specific context.  The context is described by the &quot;extension&quot; and &quot;type&quot; attributes of this extension point.

The recommend implemention is that is there is more than one validator for a given context, them a type is considered valid if any validator accepts it.  In the other hand, if a context requires a validator analysis and there isn&apos;t any validator registered then no changes should be performed on the context.
      </documentation>
   </annotation>

   <element name="extension">
      <complexType>
         <sequence>
            <element ref="typeValidator" minOccurs="1" maxOccurs="unbounded"/>
         </sequence>
         <attribute name="point" type="string" use="required">
            <annotation>
               <documentation>
                  a fully qualified identifier of the target extension point
               </documentation>
            </annotation>
         </attribute>
         <attribute name="id" type="string">
            <annotation>
               <documentation>
                  an optional identifier of the extension instance
               </documentation>
            </annotation>
         </attribute>
         <attribute name="name" type="string">
            <annotation>
               <documentation>
                  an optional name of the extension instance
               </documentation>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <element name="typeValidator">
      <complexType>
         <attribute name="id" type="string" use="required">
            <annotation>
               <documentation>
                  a unique name that can be used to identify this validator
               </documentation>
            </annotation>
         </attribute>
         <attribute name="extension" type="string" use="required">
            <annotation>
               <documentation>
                  the validator&apos;s context extension.  The extension identifies a category of objects, such as Test Suites or Traces.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="type" type="string">
            <annotation>
               <documentation>
                  the type of the extension for which the validator applies.
               </documentation>
            </annotation>
         </attribute>
         <attribute name="class" type="string" use="required">
            <annotation>
               <documentation>
                  the name of the fully qualified validator class that implements &lt;samp&gt;org.eclipse.hyades.ui.extension.ITypeValidator&lt;samp&gt;.
               </documentation>
               <appInfo>
                  <meta.attribute kind="java" basedOn="org.eclipse.hyades.ui.extension.ITypeValidator"/>
               </appInfo>
            </annotation>
         </attribute>
      </complexType>
   </element>

   <annotation>
      <appInfo>
         <meta.section type="since"/>
      </appInfo>
      <documentation>
         0.2.0
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="examples"/>
      </appInfo>
      <documentation>
         Let&apos;s say that an implementor is defining a new type of Test Suite.  Due to implementation issues, it would be important to limit the types of Test Cases that are allowed to be added to this new type of test suite.  In Hyades this can be done by registering a Type Validator.  The extension point would be:

&lt;pre&gt;
   &lt;extension point=&quot;org.eclipse.hyades.ui.typeVvalidators&quot;&gt; 
      &lt;typeValidator
         id=&quot;com.xyz.testSuite.HTTP.typeValidator&quot; 
         extension=&quot;testsuite&quot;
         type=&quot;com.xyz.testSuite.HTTP&quot;
         class=&quot;com.xyz.HTTPTypeValidator&quot;/&gt;
    &lt;/extension&gt;
&lt;/pre&gt;

and the implementation of the ITypeValidator:

&lt;pre&gt;
 public class HTTPTypeValidator implements ITypeValidator {
  public boolean isValidType(String type) {
   return (&quot;com.xyz.testCase.HTTP&quot;.equals(type));
  }
 }
&lt;/pre&gt;
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="apiInfo"/>
      </appInfo>
      <documentation>
         All Hyades type validators&apos; classes are instances of &lt;samp&gt;org.eclipse.hyades.ui.extension.ITypeValidator&lt;/samp&gt;.
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="implementation"/>
      </appInfo>
      <documentation>
         
      </documentation>
   </annotation>

   <annotation>
      <appInfo>
         <meta.section type="copyright"/>
      </appInfo>
      <documentation>
         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 &lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt;http://www.eclipse.org/legal/cpl-v10.html&lt;/a&gt;
      </documentation>
   </annotation>

</schema>
