org.eclipse.uml2.uml.util
Class UMLUtil.Ecore2UMLConverter

java.lang.Object
  extended byorg.eclipse.emf.ecore.util.EcoreSwitch
      extended byorg.eclipse.uml2.uml.util.UMLUtil.Ecore2UMLConverter
All Implemented Interfaces:
UML2Util.Converter
Enclosing class:
UMLUtil

public static class UMLUtil.Ecore2UMLConverter
extends EcoreSwitch
implements UML2Util.Converter

A converter that converts Ecore model elements to representative UML elements.


Field Summary
static int ANNOTATION_DETAILS
          The diagnostic code for cases where annotation details are encountered.
static int ECORE_TAGGED_VALUE
          The diagnostic code for cases where an Ecore tagged value is encountered.
protected  Map eModelElementToElementMap
           
protected  Collection ePackages
           
static String OPTION__ANNOTATION_DETAILS
          The option for handling cases where annotation details are encountered.
static String OPTION__ECORE_TAGGED_VALUES
          The option for handling cases where an Ecore tagged value is encountered.
static String OPTION__REDEFINES_ANNOTATIONS
          The option for handling cases where a redefines annotation is encountered.
static String OPTION__SUBSETS_ANNOTATIONS
          The option for handling cases where a subsets annotation is encountered.
static String OPTION__UNION_ANNOTATIONS
          The option for handling cases where a union annotation is encountered.
static int REDEFINES_ANNOTATION
          The diagnostic code for cases where a redefines annotation is encountered.
static int SUBSETS_ANNOTATION
          The diagnostic code for cases where a subsets annotation is encountered.
static int UNION_ANNOTATION
          The diagnostic code for cases where a union annotation is encountered.
 
Fields inherited from class org.eclipse.emf.ecore.util.EcoreSwitch
modelPackage
 
Constructor Summary
UMLUtil.Ecore2UMLConverter()
           
 
Method Summary
 Object caseEAttribute(EAttribute eAttribute)
           
 Object caseEClass(EClass eClass)
           
 Object caseEDataType(EDataType eDataType)
           
 Object caseEEnum(EEnum eEnum)
           
 Object caseEEnumLiteral(EEnumLiteral eEnumLiteral)
           
 Object caseEModelElement(EModelElement eModelElement)
           
 Object caseEOperation(EOperation eOperation)
           
 Object caseEPackage(EPackage ePackage)
           
 Object caseEParameter(EParameter eParameter)
           
 Object caseEReference(EReference eReference)
           
 Object caseETypedElement(ETypedElement eTypedElement)
           
 Collection convert(Collection eObjects, Map options, DiagnosticChain diagnostics, Map context)
          Converts the specified objects using the specified options, reporting problems to the specified diagnostics, within the specified context.
 Object defaultCase(EObject eObject)
           
 Object doSwitch(EObject eObject)
           
protected  PrimitiveType getEcorePrimitiveType(EModelElement eModelElement, String name)
           
protected  Model getEcorePrimitiveTypesLibrary(EModelElement eModelElement)
           
protected  Profile getEcoreProfile(EModelElement eModelElement)
           
protected  Stereotype getEcoreStereotype(EModelElement eModelElement, String name)
           
protected  Type getType(EModelElement eModelElement, EClassifier eType)
           
protected  Type getType(ETypedElement eTypedElement)
           
protected  void processAnnotationDetails(Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processEcoreTaggedValue(Element element, Stereotype stereotype, String propertyName, EModelElement eModelElement, EStructuralFeature eStructuralFeature, Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processEcoreTaggedValues(Element element, EClassifier eClassifier, Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processEcoreTaggedValues(Element element, EPackage ePackage, Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processEcoreTaggedValues(Element element, EStructuralFeature eStructuralFeature, Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processEcoreTaggedValues(Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processOptions(Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processRedefinesAnnotations(Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processSubsetsAnnotations(Map options, DiagnosticChain diagnostics, Map context)
           
protected  void processUnionAnnotations(Map options, DiagnosticChain diagnostics, Map context)
           
 
Methods inherited from class org.eclipse.emf.ecore.util.EcoreSwitch
caseEAnnotation, caseEClassifier, caseEFactory, caseENamedElement, caseEStringToStringMapEntry, caseEStructuralFeature, doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION__ECORE_TAGGED_VALUES

public static final String OPTION__ECORE_TAGGED_VALUES
The option for handling cases where an Ecore tagged value is encountered. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__REDEFINES_ANNOTATIONS

public static final String OPTION__REDEFINES_ANNOTATIONS
The option for handling cases where a redefines annotation is encountered. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__SUBSETS_ANNOTATIONS

public static final String OPTION__SUBSETS_ANNOTATIONS
The option for handling cases where a subsets annotation is encountered. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__UNION_ANNOTATIONS

public static final String OPTION__UNION_ANNOTATIONS
The option for handling cases where a union annotation is encountered. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

OPTION__ANNOTATION_DETAILS

public static final String OPTION__ANNOTATION_DETAILS
The option for handling cases where annotation details are encountered. Supported choices are OPTION__IGNORE, OPTION__REPORT, and OPTION__PROCESS.

See Also:
Constant Field Values

ECORE_TAGGED_VALUE

public static final int ECORE_TAGGED_VALUE
The diagnostic code for cases where an Ecore tagged value is encountered.

See Also:
Constant Field Values

REDEFINES_ANNOTATION

public static final int REDEFINES_ANNOTATION
The diagnostic code for cases where a redefines annotation is encountered.

See Also:
Constant Field Values

SUBSETS_ANNOTATION

public static final int SUBSETS_ANNOTATION
The diagnostic code for cases where a subsets annotation is encountered.

See Also:
Constant Field Values

UNION_ANNOTATION

public static final int UNION_ANNOTATION
The diagnostic code for cases where a union annotation is encountered.

See Also:
Constant Field Values

ANNOTATION_DETAILS

public static final int ANNOTATION_DETAILS
The diagnostic code for cases where annotation details are encountered.

See Also:
Constant Field Values

eModelElementToElementMap

protected final Map eModelElementToElementMap

ePackages

protected Collection ePackages
Constructor Detail

UMLUtil.Ecore2UMLConverter

public UMLUtil.Ecore2UMLConverter()
Method Detail

getEcorePrimitiveTypesLibrary

protected Model getEcorePrimitiveTypesLibrary(EModelElement eModelElement)

getEcorePrimitiveType

protected PrimitiveType getEcorePrimitiveType(EModelElement eModelElement,
                                              String name)

getType

protected Type getType(EModelElement eModelElement,
                       EClassifier eType)

getType

protected Type getType(ETypedElement eTypedElement)

caseEAttribute

public Object caseEAttribute(EAttribute eAttribute)

caseEClass

public Object caseEClass(EClass eClass)

caseEDataType

public Object caseEDataType(EDataType eDataType)

caseEEnum

public Object caseEEnum(EEnum eEnum)

caseEEnumLiteral

public Object caseEEnumLiteral(EEnumLiteral eEnumLiteral)

caseEModelElement

public Object caseEModelElement(EModelElement eModelElement)

caseEOperation

public Object caseEOperation(EOperation eOperation)

caseEPackage

public Object caseEPackage(EPackage ePackage)

caseEParameter

public Object caseEParameter(EParameter eParameter)

caseEReference

public Object caseEReference(EReference eReference)

caseETypedElement

public Object caseETypedElement(ETypedElement eTypedElement)

defaultCase

public Object defaultCase(EObject eObject)

doSwitch

public Object doSwitch(EObject eObject)

getEcoreProfile

protected Profile getEcoreProfile(EModelElement eModelElement)

getEcoreStereotype

protected Stereotype getEcoreStereotype(EModelElement eModelElement,
                                        String name)

processEcoreTaggedValue

protected void processEcoreTaggedValue(Element element,
                                       Stereotype stereotype,
                                       String propertyName,
                                       EModelElement eModelElement,
                                       EStructuralFeature eStructuralFeature,
                                       Map options,
                                       DiagnosticChain diagnostics,
                                       Map context)

processEcoreTaggedValues

protected void processEcoreTaggedValues(Element element,
                                        EPackage ePackage,
                                        Map options,
                                        DiagnosticChain diagnostics,
                                        Map context)

processEcoreTaggedValues

protected void processEcoreTaggedValues(Element element,
                                        EClassifier eClassifier,
                                        Map options,
                                        DiagnosticChain diagnostics,
                                        Map context)

processEcoreTaggedValues

protected void processEcoreTaggedValues(Element element,
                                        EStructuralFeature eStructuralFeature,
                                        Map options,
                                        DiagnosticChain diagnostics,
                                        Map context)

processEcoreTaggedValues

protected void processEcoreTaggedValues(Map options,
                                        DiagnosticChain diagnostics,
                                        Map context)

processRedefinesAnnotations

protected void processRedefinesAnnotations(Map options,
                                           DiagnosticChain diagnostics,
                                           Map context)

processSubsetsAnnotations

protected void processSubsetsAnnotations(Map options,
                                         DiagnosticChain diagnostics,
                                         Map context)

processUnionAnnotations

protected void processUnionAnnotations(Map options,
                                       DiagnosticChain diagnostics,
                                       Map context)

processAnnotationDetails

protected void processAnnotationDetails(Map options,
                                        DiagnosticChain diagnostics,
                                        Map context)

processOptions

protected void processOptions(Map options,
                              DiagnosticChain diagnostics,
                              Map context)

convert

public Collection convert(Collection eObjects,
                          Map options,
                          DiagnosticChain diagnostics,
                          Map context)
Description copied from interface: UML2Util.Converter
Converts the specified objects using the specified options, reporting problems to the specified diagnostics, within the specified context.

Specified by:
convert in interface UML2Util.Converter
Parameters:
eObjects - The objects to be converted.
options - The options to use.
diagnostics - The chain of diagnostics to which problems are to be appended.
context - The cache of context-specific information.
Returns:
Another representation of the objects.

Copyright 2003, 2006 IBM Corporation and others.
All Rights Reserved.