org.apache.uima.examples.xmi
Class UimaTypeSystem2Ecore

java.lang.Object
  extended by org.apache.uima.examples.xmi.UimaTypeSystem2Ecore

public class UimaTypeSystem2Ecore
extends java.lang.Object

Converts a UIMA TypeSystemDescription to an Ecore model.


Constructor Summary
UimaTypeSystem2Ecore()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main program.
static void uimaTypeSystem2Ecore(java.lang.String aUimaTypeSystemFilePath, Resource aOutputResource, java.util.Map aOptions)
          Converts a UIMA TypeSystem descriptor to an Ecore model
static void uimaTypeSystem2Ecore(TypeSystemDescription aTypeSystem, Resource aOutputResource, java.util.Map aOptions)
          Converts a UIMA TypeSystemDescription to an Ecore model
static void uimaTypeSystem2Ecore(TypeSystemDescription aTypeSystem, Resource aOutputResource, java.util.Map aOptions, java.util.Map aSchemaLocationMap)
          Converts a UIMA TypeSystemDescription to an Ecore model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UimaTypeSystem2Ecore

public UimaTypeSystem2Ecore()
Method Detail

uimaTypeSystem2Ecore

public static void uimaTypeSystem2Ecore(java.lang.String aUimaTypeSystemFilePath,
                                        Resource aOutputResource,
                                        java.util.Map aOptions)
                                 throws InvalidXMLException,
                                        java.io.IOException
Converts a UIMA TypeSystem descriptor to an Ecore model

Parameters:
aUimaTypeSystemFilePath - file path to UIMA TypeSystem descritpor
aOutputResource - An EMF Resource to be populated with the Ecore model
aOptions - a Map defining options for the conversion. Valid keys for this map are defined as constants on this class.
Throws:
InvalidXMLException - if the TypeSystem descriptor, or one of its imports, is not valid or if there are duplicate, inconsistent definitions of the same type.
java.io.IOException - if an failure occur while reading the descriptor file

uimaTypeSystem2Ecore

public static void uimaTypeSystem2Ecore(TypeSystemDescription aTypeSystem,
                                        Resource aOutputResource,
                                        java.util.Map aOptions)
                                 throws InvalidXMLException
Converts a UIMA TypeSystemDescription to an Ecore model

Parameters:
aTypeSystem - UIMA TypeSystemDescription object to convert
aOutputResource - An EMF Resource to be populated with the Ecore model
aOptions - a Map defining options for the conversion. Valid keys for this map are defined as constants on this class.
Throws:
InvalidXMLException - if the TypeSystem descriptor imports another descriptor that could not be successfully parsed, or if there are duplicate, inconsistent definitions of the same type.

uimaTypeSystem2Ecore

public static void uimaTypeSystem2Ecore(TypeSystemDescription aTypeSystem,
                                        Resource aOutputResource,
                                        java.util.Map aOptions,
                                        java.util.Map aSchemaLocationMap)
                                 throws InvalidXMLException
Converts a UIMA TypeSystemDescription to an Ecore model

Parameters:
aTypeSystem - UIMA TypeSystemDescription object to convert
aOutputResource - An EMF Resource to be populated with the Ecore model
aOptions - a Map defining options for the conversion. Valid keys for this map are defined as constants on this class.
aSchemaLocationMap - optional parameter - if non-null, this map will be populated with (Namespace URI, Schema Location) pairs, suitable for inclusion in the "schemaLocation" attribute of XMI instance documents.
Throws:
InvalidXMLException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Main program. Takes two arguments: the filename of an input TypeSystem descriptor file and the filename of the Ecore/XMI file to generate.

Throws:
java.lang.Exception


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.