| <?xml version='1.0' encoding='UTF-8'?> |
| <!-- Schema file written by PDE --> |
| <schema targetNamespace="org.apache.uima.desceditor"> |
| <annotation> |
| <appInfo> |
| <meta.schema plugin="org.apache.uima.desceditor" id="externalEditor" name="UIMA External Editor"/> |
| </appInfo> |
| <documentation> |
| <p>This extension point is used to add a new editing capability to the UIMA CDE |
| for an additional kind of UIMA XML descriptor (Resource Specifer). |
| Developers can extend the editor to edit a new kind of Resource Specifier by |
| using this extension point to extend the CDE's editing capability. |
| </p> |
| |
| <p>The extension must implement two interfaces: |
| <ol><li><code>org.apache.uima.taeconfigurator.editors.point.IUimaEditorExtension</code> and</li> |
| <li><code>org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor</code>.</li> |
| </ol></p> |
| |
| <p>When the CDE is instantiated, it will load the information in the XML spec |
| for all contributors to the extension point. When an attempt is made to edit |
| a top-most element which the CDE doesn't know how to handle, this XML info is |
| scanned to see if some contributor can handle this. All this is done without |
| loading any classes. If it finds one, it loads the class and calls the |
| <code>init</code> method of the <code>IUimaEditorExtension</code> |
| interface; this allows all extensions to do whatever initialization they may need to do. |
| For instance, the extension could register a factory class for the new descriptor's type |
| (see below) with UIMA's general ResourceSpecifier support. |
| </p> |
| |
| <p>If the parser can't parse the descriptor, this same scan code is used to see |
| if some editor can possibly contribute a parser for the particular top-level |
| element. If so, the <code>init</code> method is called, as above, in the hopes that |
| the editor will cause some additional parser to get "registered", and then the parsing |
| is retried. </p> |
| <p> |
| The <code>IUimaMultiPageEditor</code> |
| interface is used by CDE to redirect the editing functions to the external editor. |
| </p> |
| |
| <p>Note: To add a new kind of Resource Specifier to UIMA, |
| you can register a new factory class for the new descriptor's type |
| (by using the <code>addMapping(String, String)</code> |
| method of the <code>org.apache.uima.ResourceSpecifierFactory</code> |
| factory class) |
| </p> |
| </documentation> |
| </annotation> |
| |
| <element name="extension"> |
| <complexType> |
| <sequence> |
| <element ref="editor" 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> |
| <appInfo> |
| <meta.attribute translatable="true"/> |
| </appInfo> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="editor"> |
| <complexType> |
| <sequence minOccurs="1" maxOccurs="unbounded"> |
| <element ref="handlesElement"/> |
| </sequence> |
| <attribute name="name" type="string"> |
| <annotation> |
| <documentation> |
| a translatable name that will be used in the UI for this editor |
| </documentation> |
| <appInfo> |
| <meta.attribute translatable="true"/> |
| </appInfo> |
| </annotation> |
| </attribute> |
| <attribute name="id" type="string"> |
| <annotation> |
| <documentation> |
| a unique name that will be used to identify this editor |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="class" type="string" use="required"> |
| <annotation> |
| <documentation> |
| the name of a class that implements <code>org.apache.uima.taeconfigurator.editors.point.IUimaEditorExtension</code> and <code>org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor</code>. The attributes |
| </documentation> |
| <appInfo> |
| <meta.attribute kind="java"/> |
| </appInfo> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <element name="handlesElement"> |
| <annotation> |
| <documentation> |
| One or more handlesElement elements name the kinds of XML top-level elements that a particular editor will edit. The CDE scans these to determine which editor to load. |
| </documentation> |
| </annotation> |
| <complexType> |
| <attribute name="elementName" type="string" use="required"> |
| <annotation> |
| <documentation> |
| The name of the top-level element; cannot be one of the elements the CDE already edits |
| </documentation> |
| </annotation> |
| </attribute> |
| <attribute name="internalParseClass" type="string" use="required"> |
| <annotation> |
| <documentation> |
| An interface that represents the result of parsing this element |
| </documentation> |
| <appInfo> |
| <meta.attribute kind="java" basedOn=":org.apache.uima.util.XMLizable"/> |
| </appInfo> |
| </annotation> |
| </attribute> |
| </complexType> |
| </element> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="since"/> |
| </appInfo> |
| <documentation> |
| 2.2.1 |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="examples"/> |
| </appInfo> |
| <documentation> |
| The following is an example of an external editor extension definition: |
| <p> |
| <pre> |
| <extension |
| point="org.apache.uima.desceditor.externalEditor"> |
| <editor |
| class="org.apache.uima.dde.internal.DeploymentDescriptorEditor" |
| id="org.apache.uima.dde" |
| name="Deployment Descriptor Editor"> |
| <handlesElement |
| class="org.apache.uima.aae.deployment.AEService" |
| elementName="analysisEngineDeploymentDescription" |
| internalParseClass="org.apache.uima.aae.deployment.impl.AEDeploymentDescription_Impl"/> |
| </editor> |
| </extension> |
| </pre> |
| </p> |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="apiInfo"/> |
| </appInfo> |
| <documentation> |
| The contributed class must implement |
| <code>org.apache.uima.taeconfigurator.editors.point.IUimaEditorExtension</code> |
| and |
| <code>org.apache.uima.taeconfigurator.editors.point.IUimaMultiPageEditor</code> |
| </documentation> |
| </annotation> |
| |
| <annotation> |
| <appInfo> |
| <meta.section type="copyright"/> |
| </appInfo> |
| <documentation> |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| </documentation> |
| </annotation> |
| |
| </schema> |