|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ecore.util.Switch<T> org.eclipse.uml2.uml.util.UMLSwitch<java.lang.Object> org.eclipse.uml2.uml.util.UMLUtil.UML2EcoreConverter
public static class UMLUtil.UML2EcoreConverter
A converter that converts UML elements to representative Ecore model elements.
Nested Class Summary | |
---|---|
protected class |
UMLUtil.UML2EcoreConverter.ETypeMatcher
|
protected class |
UMLUtil.UML2EcoreConverter.NameMatcher
|
protected class |
UMLUtil.UML2EcoreConverter.SignatureMatcher
|
Field Summary | |
---|---|
protected static java.lang.String |
ANNOTATION_DETAIL__ORIGINAL_NAME
|
protected static java.util.regex.Pattern |
ANNOTATION_DETAIL_PATTERN
|
static int |
ANNOTATION_DETAILS
The diagnostic code for cases where annotation details are encountered. |
protected static java.util.regex.Pattern |
ANNOTATION_PATTERN
|
static int |
CAMEL_CASE_NAME
The diagnostic code for cases where names are not camel case. |
static int |
COMMENT
The diagnostic code for cases where comments are encountered. |
protected java.util.Map<java.lang.Object,java.lang.Object> |
context
|
static int |
DERIVED_FEATURE
The diagnostic code for cases where a derived feature is encountered. |
protected org.eclipse.emf.common.util.DiagnosticChain |
diagnostics
|
static int |
DUPLICATE_FEATURE
The diagnostic code for cases where a duplicate feature is detected. |
static int |
DUPLICATE_FEATURE_INHERITANCE
The diagnostic code for cases where a feature is inherited more than once. |
static int |
DUPLICATE_OPERATION
The diagnostic code for cases where a duplicate operation is detected. |
static int |
DUPLICATE_OPERATION_INHERITANCE
The diagnostic code for cases where an operation is inherited more than once. |
static int |
ECORE_TAGGED_VALUE
The diagnostic code for cases where an Ecore tagged value is encountered. |
protected java.util.Map<Element,org.eclipse.emf.ecore.EModelElement> |
elementToEModelElementMap
|
static int |
INVARIANT_CONSTRAINT
The diagnostic code for cases where invariant constraints are encountered. |
protected static java.lang.String |
OCL_DELEGATE_URI
|
static int |
OPERATION_BODY
The diagnostic code for cases where operation body details are encountered. |
static int |
OPPOSITE_ROLE_NAME
The diagnostic code for notification of opposite role name annotations. |
static java.lang.String |
OPTION__ANNOTATION_DETAILS
The option for handling cases where annotation details are encountered. |
static java.lang.String |
OPTION__CAMEL_CASE_NAMES
The option for handling cases where names are not camel case. |
static java.lang.String |
OPTION__COMMENTS
The option for handling cases where comments are encountered. |
static java.lang.String |
OPTION__DERIVED_FEATURES
The option for handling cases where a derived feature is encountered. |
static java.lang.String |
OPTION__DUPLICATE_FEATURE_INHERITANCE
The option for handling cases where a feature is inherited more than once. |
static java.lang.String |
OPTION__DUPLICATE_FEATURES
The option for handling cases where a duplicate feature is detected. |
static java.lang.String |
OPTION__DUPLICATE_OPERATION_INHERITANCE
The option for handling cases where an operation is inherited more than once. |
static java.lang.String |
OPTION__DUPLICATE_OPERATIONS
The option for handling cases where a duplicate operation is detected. |
static java.lang.String |
OPTION__ECORE_TAGGED_VALUES
The option for handling cases where an Ecore tagged value is encountered. |
static java.lang.String |
OPTION__INVARIANT_CONSTRAINTS
The option for handling cases where invariant constraints are encountered. |
static java.lang.String |
OPTION__INVOCATION_DELEGATES
The option for handling cases where invocation delegates can be used to define the behavior of operation bodies. |
static java.lang.String |
OPTION__LINE_SEPARATOR
The option for specifying the line separator to use when processing text. |
static java.lang.String |
OPTION__NON_API_INVARIANTS
The option for generating invariant constraints in the non-API style in EClasses, rather than as API operations. |
static java.lang.String |
OPTION__OPERATION_BODIES
The option for handling cases where operation bodies are encountered. |
static java.lang.String |
OPTION__OPPOSITE_ROLE_NAMES
The option for handling opposite role names. |
static java.lang.String |
OPTION__PROPERTY_DEFAULT_EXPRESSIONS
The option for handling cases where property default value expressions are encountered. |
static java.lang.String |
OPTION__REDEFINING_OPERATIONS
The option for handling cases where a redefining operation is encountered. |
static java.lang.String |
OPTION__REDEFINING_PROPERTIES
The option for handling cases where a redefining property is encountered. |
static java.lang.String |
OPTION__SUBSETTING_PROPERTIES
The option for handling cases where a subsetting property is encountered. |
static java.lang.String |
OPTION__SUPER_CLASS_ORDER
The option for handling cases where superclasses are not ordered. |
static java.lang.String |
OPTION__UNION_PROPERTIES
The option for handling cases where a derived union property is encountered. |
static java.lang.String |
OPTION__UNTYPED_PROPERTIES
The option for handling untyped properties. |
static java.lang.String |
OPTION__VALIDATION_DELEGATES
The option for handling cases where validation delegates can be used to define the behavior of invariant constraints. |
protected java.util.Map<java.lang.String,java.lang.String> |
options
|
protected java.util.Collection<Package> |
packages
|
static int |
PROPERTY_DEFAULT_EXPRESSION
The diagnostic code for cases where property default expression details are encountered. |
static int |
REDEFINING_OPERATION
The diagnostic code for cases where a redefining operation is encountered. |
static int |
REDEFINING_PROPERTY
The diagnostic code for cases where a redefining property is encountered. |
static int |
SUBSETTING_PROPERTY
The diagnostic code for cases where a subsetting property is encountered. |
static int |
SUPER_CLASS_ORDER
The diagnostic code for cases where superclasses are not ordered. |
static int |
UNION_PROPERTY
The diagnostic code for cases where a derived union property is encountered. |
static int |
UNTYPED_PROPERTY
The diagnostic code for untyped properties. |
Fields inherited from class org.eclipse.uml2.uml.util.UMLSwitch |
---|
modelPackage |
Constructor Summary | |
---|---|
UMLUtil.UML2EcoreConverter()
|
Method Summary | |
---|---|
java.lang.Object |
caseClass(Class class_)
Returns the result of interpreting the object as an instance of 'Class' |
java.lang.Object |
caseComment(Comment comment)
Returns the result of interpreting the object as an instance of 'Comment' |
java.lang.Object |
caseConstraint(Constraint constraint)
Returns the result of interpreting the object as an instance of 'Constraint' |
java.lang.Object |
caseDataType(DataType dataType)
Returns the result of interpreting the object as an instance of 'Data Type' |
java.lang.Object |
caseEModelElement(org.eclipse.emf.ecore.EModelElement eModelElement)
Returns the result of interpreting the object as an instance of 'EModel Element' |
java.lang.Object |
caseEnumeration(Enumeration enumeration)
Returns the result of interpreting the object as an instance of 'Enumeration' |
java.lang.Object |
caseEnumerationLiteral(EnumerationLiteral enumerationLiteral)
Returns the result of interpreting the object as an instance of 'Enumeration Literal' |
java.lang.Object |
caseGeneralization(Generalization generalization)
Returns the result of interpreting the object as an instance of 'Generalization' |
java.lang.Object |
caseInterface(Interface interface_)
Returns the result of interpreting the object as an instance of 'Interface' |
java.lang.Object |
caseInterfaceRealization(InterfaceRealization interfaceRealization)
Returns the result of interpreting the object as an instance of 'Interface Realization' |
java.lang.Object |
caseMultiplicityElement(MultiplicityElement multiplicityElement)
Returns the result of interpreting the object as an instance of 'Multiplicity Element' |
java.lang.Object |
caseOperation(Operation operation)
Returns the result of interpreting the object as an instance of 'Operation' |
java.lang.Object |
casePackage(Package package_)
Returns the result of interpreting the object as an instance of 'Package' |
java.lang.Object |
caseParameter(Parameter parameter)
Returns the result of interpreting the object as an instance of 'Parameter' |
java.lang.Object |
caseParameterableElement(ParameterableElement parameterableElement)
Returns the result of interpreting the object as an instance of 'Parameterable Element' |
java.lang.Object |
casePrimitiveType(PrimitiveType primitiveType)
Returns the result of interpreting the object as an instance of 'Primitive Type' |
java.lang.Object |
caseProperty(Property property)
Returns the result of interpreting the object as an instance of 'Property' |
java.lang.Object |
caseTemplateParameter(TemplateParameter templateParameter)
Returns the result of interpreting the object as an instance of 'Template Parameter' |
java.lang.Object |
caseTemplateSignature(TemplateSignature templateSignature)
Returns the result of interpreting the object as an instance of 'Template Signature' |
java.lang.Object |
caseTypedElement(TypedElement typedElement)
Returns the result of interpreting the object as an instance of 'Typed Element' |
java.util.Collection<? extends org.eclipse.emf.ecore.EObject> |
convert(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> eObjects,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
Converts the specified objects using the specified options, reporting problems to the specified diagnostics, within the specified context. |
java.lang.Object |
defaultCase(org.eclipse.emf.ecore.EObject eObject)
Returns the result of interpreting the object as an instance of 'EObject' |
java.lang.Object |
doSwitch(org.eclipse.emf.ecore.EObject eObject)
|
protected void |
ensureConformity(org.eclipse.emf.ecore.ETypedElement eTypedElement,
org.eclipse.emf.ecore.ETypedElement otherETypedElement)
|
protected Stereotype |
getAppliedEcoreStereotype(Element element,
java.lang.String name)
|
protected org.eclipse.emf.ecore.EGenericType |
getEGenericType(Type type)
|
protected org.eclipse.emf.ecore.EClassifier |
getEType(Type type)
|
protected org.eclipse.emf.ecore.EClassifier |
getEType(TypedElement typedElement)
|
protected org.eclipse.emf.ecore.ETypeParameter |
getETypeParameter(Type type)
|
static java.lang.String |
getOriginalName(org.eclipse.emf.ecore.ENamedElement eNamedElement)
Queries the original name (as defined in the source UML model) of the given Ecore named element, in the case that the original name was not a valid Ecore/Java name and was transformed either via the OPTION__CAMEL_CASE_NAMES option or simply
validating the name. |
protected boolean |
isCompositeSubset(Property property)
|
protected boolean |
isEClass(Namespace namespace)
|
static boolean |
isEDataType(Namespace namespace)
|
protected boolean |
isEGenericType(Classifier classifier)
|
protected void |
processAnnotationDetails(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processCapabilityAnnotations(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
Processes the capability trace information (if any) in the root packages' UML annotations to generate trace statements in the generator documentation comments of Ecore API elements. |
protected void |
processComment(org.eclipse.emf.ecore.EModelElement eModelElement,
java.lang.String comment,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processConstraintBody(org.eclipse.emf.ecore.EClassifier eClassifier,
java.lang.String name,
org.eclipse.emf.common.util.EList<java.lang.String> languages,
org.eclipse.emf.common.util.EList<java.lang.String> bodies,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processDerivedFeatures(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processDuplicateFeatureInheritance(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processDuplicateFeatures(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processDuplicateOperationInheritance(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processDuplicateOperations(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValue(org.eclipse.emf.ecore.EModelElement eModelElement,
org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
Element element,
Stereotype stereotype,
java.lang.String propertyName,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EClassifier eClassifier,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EEnum eEnum,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EEnumLiteral eEnumLiteral,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EGenericType eGenericType,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EOperation eOperation,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EPackage ePackage,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EParameter eParameter,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(org.eclipse.emf.ecore.ETypeParameter eTypeParameter,
Element element,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processEcoreTaggedValues(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processInvariantBody(org.eclipse.emf.ecore.EOperation eOperation,
org.eclipse.emf.common.util.EList<java.lang.String> languages,
org.eclipse.emf.common.util.EList<java.lang.String> bodies,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected org.eclipse.emf.ecore.EModelElement |
processInvariantConstraint(org.eclipse.emf.ecore.EClassifier eClassifier,
Constraint constraint,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processOperationBodies(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processOperationBody(org.eclipse.emf.ecore.EOperation eOperation,
org.eclipse.emf.common.util.EList<java.lang.String> languages,
org.eclipse.emf.common.util.EList<java.lang.String> bodies,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processOptions(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processPropertyDefaultExpression(org.eclipse.emf.ecore.EStructuralFeature eFeature,
org.eclipse.emf.common.util.EList<java.lang.String> languages,
org.eclipse.emf.common.util.EList<java.lang.String> bodies,
java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
Reports or processes (as requested) the default-value opaque expression of a property to generate Ecore setting delegate annotations (or report that they should be generated). |
protected void |
processPropertyDefaultExpressions(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
Reports or processes (as requested) default-value opaque expressions of properties to generate Ecore setting delegate annotations (or report that they should be generated). |
protected void |
processRedefiningOperations(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processRedefiningProperties(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processSubsettingProperties(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processSuperClassOrder(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processUnionProperties(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
|
protected void |
processUntypedProperties(java.util.Map<java.lang.String,java.lang.String> options,
org.eclipse.emf.common.util.DiagnosticChain diagnostics,
java.util.Map<java.lang.Object,java.lang.Object> context)
Applies the conversion option to untyped properties in the source UML model. |
protected void |
qualifyName(org.eclipse.emf.ecore.ENamedElement eNamedElement)
|
protected void |
qualifyName(org.eclipse.emf.ecore.ENamedElement eNamedElement,
java.lang.String qualifier)
|
protected void |
setName(org.eclipse.emf.ecore.ENamedElement eNamedElement,
NamedElement namedElement)
|
protected void |
setName(org.eclipse.emf.ecore.ENamedElement eNamedElement,
java.lang.String name,
boolean validate)
Sets the name of a converted element. |
Methods inherited from class org.eclipse.emf.ecore.util.Switch |
---|
doSwitch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPTION__ECORE_TAGGED_VALUES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__REDEFINING_OPERATIONS
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__REDEFINING_PROPERTIES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__SUBSETTING_PROPERTIES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__UNION_PROPERTIES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__DERIVED_FEATURES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__DUPLICATE_OPERATIONS
OPTION__IGNORE
,
OPTION__REPORT
, OPTION__DISCARD
, and
OPTION__PROCESS
.
public static final java.lang.String OPTION__DUPLICATE_OPERATION_INHERITANCE
OPTION__IGNORE
,
OPTION__REPORT
, OPTION__DISCARD
, and
OPTION__PROCESS
.
public static final java.lang.String OPTION__DUPLICATE_FEATURES
OPTION__IGNORE
,
OPTION__REPORT
, OPTION__DISCARD
, and
OPTION__PROCESS
.
public static final java.lang.String OPTION__DUPLICATE_FEATURE_INHERITANCE
OPTION__IGNORE
,
OPTION__REPORT
, OPTION__DISCARD
, and
OPTION__PROCESS
.
public static final java.lang.String OPTION__SUPER_CLASS_ORDER
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__ANNOTATION_DETAILS
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__INVARIANT_CONSTRAINTS
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__OPERATION_BODIES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__COMMENTS
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__CAMEL_CASE_NAMES
OPTION__IGNORE
,
OPTION__REPORT
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__INVOCATION_DELEGATES
OPTION__IGNORE
and OPTION__PROCESS
.
public static final java.lang.String OPTION__VALIDATION_DELEGATES
OPTION__IGNORE
and OPTION__PROCESS
.
public static final java.lang.String OPTION__NON_API_INVARIANTS
OPTION__IGNORE
and OPTION__PROCESS
.
public static final java.lang.String OPTION__UNTYPED_PROPERTIES
OPTION__IGNORE
, OPTION__REPORT
,
OPTION__DISCARD
, and OPTION__PROCESS
.
public static final java.lang.String OPTION__OPPOSITE_ROLE_NAMES
OPTION__IGNORE
and OPTION__PROCESS
.
public static final java.lang.String OPTION__PROPERTY_DEFAULT_EXPRESSIONS
OPTION__IGNORE
, OPTION__REPORT
, and
OPTION__PROCESS
.
public static final java.lang.String OPTION__LINE_SEPARATOR
public static final int ECORE_TAGGED_VALUE
public static final int REDEFINING_OPERATION
public static final int REDEFINING_PROPERTY
public static final int SUBSETTING_PROPERTY
public static final int UNION_PROPERTY
public static final int DERIVED_FEATURE
public static final int DUPLICATE_OPERATION
public static final int DUPLICATE_OPERATION_INHERITANCE
public static final int DUPLICATE_FEATURE
public static final int DUPLICATE_FEATURE_INHERITANCE
public static final int SUPER_CLASS_ORDER
public static final int ANNOTATION_DETAILS
public static final int INVARIANT_CONSTRAINT
public static final int OPERATION_BODY
public static final int COMMENT
public static final int CAMEL_CASE_NAME
public static final int UNTYPED_PROPERTY
public static final int OPPOSITE_ROLE_NAME
public static final int PROPERTY_DEFAULT_EXPRESSION
protected static final java.util.regex.Pattern ANNOTATION_PATTERN
protected static final java.util.regex.Pattern ANNOTATION_DETAIL_PATTERN
protected static final java.lang.String ANNOTATION_DETAIL__ORIGINAL_NAME
protected static final java.lang.String OCL_DELEGATE_URI
protected final java.util.Map<Element,org.eclipse.emf.ecore.EModelElement> elementToEModelElementMap
protected java.util.Collection<Package> packages
protected java.util.Map<java.lang.String,java.lang.String> options
protected org.eclipse.emf.common.util.DiagnosticChain diagnostics
protected java.util.Map<java.lang.Object,java.lang.Object> context
Constructor Detail |
---|
public UMLUtil.UML2EcoreConverter()
Method Detail |
---|
protected void setName(org.eclipse.emf.ecore.ENamedElement eNamedElement, java.lang.String name, boolean validate)
name
of a converted element.
As of the 4.2 API version, if the Ecore name differs for any reason from the original UML name, it is recorded for later retrieval.
eNamedElement
- the converted Ecore element in which to set a namename
- the name to setvalidate
- whether to ensure that the name is a valid Java
identifier, munging it if necessaryUMLUtil#getOriginalName(ENamedElement)
,
UML2Util.getValidJavaIdentifier(String)
protected void setName(org.eclipse.emf.ecore.ENamedElement eNamedElement, NamedElement namedElement)
public static java.lang.String getOriginalName(org.eclipse.emf.ecore.ENamedElement eNamedElement)
OPTION__CAMEL_CASE_NAMES
option or simply
validating the name.
eNamedElement
- an Ecore named element
setName(ENamedElement, String, boolean)
protected org.eclipse.emf.ecore.EClassifier getEType(Type type)
protected org.eclipse.emf.ecore.ETypeParameter getETypeParameter(Type type)
protected org.eclipse.emf.ecore.EGenericType getEGenericType(Type type)
protected org.eclipse.emf.ecore.EClassifier getEType(TypedElement typedElement)
protected Stereotype getAppliedEcoreStereotype(Element element, java.lang.String name)
protected boolean isEGenericType(Classifier classifier)
public static boolean isEDataType(Namespace namespace)
protected boolean isEClass(Namespace namespace)
public java.lang.Object caseClass(Class class_)
UMLSwitch
caseClass
in class UMLSwitch<java.lang.Object>
class_
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseComment(Comment comment)
UMLSwitch
caseComment
in class UMLSwitch<java.lang.Object>
comment
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseConstraint(Constraint constraint)
UMLSwitch
caseConstraint
in class UMLSwitch<java.lang.Object>
constraint
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseDataType(DataType dataType)
UMLSwitch
caseDataType
in class UMLSwitch<java.lang.Object>
dataType
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseEModelElement(org.eclipse.emf.ecore.EModelElement eModelElement)
UMLSwitch
caseEModelElement
in class UMLSwitch<java.lang.Object>
eModelElement
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseEnumeration(Enumeration enumeration)
UMLSwitch
caseEnumeration
in class UMLSwitch<java.lang.Object>
enumeration
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseEnumerationLiteral(EnumerationLiteral enumerationLiteral)
UMLSwitch
caseEnumerationLiteral
in class UMLSwitch<java.lang.Object>
enumerationLiteral
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseGeneralization(Generalization generalization)
UMLSwitch
caseGeneralization
in class UMLSwitch<java.lang.Object>
generalization
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseInterfaceRealization(InterfaceRealization interfaceRealization)
UMLSwitch
caseInterfaceRealization
in class UMLSwitch<java.lang.Object>
interfaceRealization
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseInterface(Interface interface_)
UMLSwitch
caseInterface
in class UMLSwitch<java.lang.Object>
interface_
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseMultiplicityElement(MultiplicityElement multiplicityElement)
UMLSwitch
caseMultiplicityElement
in class UMLSwitch<java.lang.Object>
multiplicityElement
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseOperation(Operation operation)
UMLSwitch
caseOperation
in class UMLSwitch<java.lang.Object>
operation
- the target of the switch.
doSwitch(EObject)
public java.lang.Object casePackage(Package package_)
UMLSwitch
casePackage
in class UMLSwitch<java.lang.Object>
package_
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseParameter(Parameter parameter)
UMLSwitch
caseParameter
in class UMLSwitch<java.lang.Object>
parameter
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseParameterableElement(ParameterableElement parameterableElement)
UMLSwitch
caseParameterableElement
in class UMLSwitch<java.lang.Object>
parameterableElement
- the target of the switch.
doSwitch(EObject)
public java.lang.Object casePrimitiveType(PrimitiveType primitiveType)
UMLSwitch
casePrimitiveType
in class UMLSwitch<java.lang.Object>
primitiveType
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseProperty(Property property)
UMLSwitch
caseProperty
in class UMLSwitch<java.lang.Object>
property
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseTemplateParameter(TemplateParameter templateParameter)
UMLSwitch
caseTemplateParameter
in class UMLSwitch<java.lang.Object>
templateParameter
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseTemplateSignature(TemplateSignature templateSignature)
UMLSwitch
caseTemplateSignature
in class UMLSwitch<java.lang.Object>
templateSignature
- the target of the switch.
doSwitch(EObject)
public java.lang.Object caseTypedElement(TypedElement typedElement)
UMLSwitch
caseTypedElement
in class UMLSwitch<java.lang.Object>
typedElement
- the target of the switch.
doSwitch(EObject)
public java.lang.Object defaultCase(org.eclipse.emf.ecore.EObject eObject)
UMLSwitch
defaultCase
in class UMLSwitch<java.lang.Object>
eObject
- the target of the switch.
Switch.doSwitch(org.eclipse.emf.ecore.EObject)
public java.lang.Object doSwitch(org.eclipse.emf.ecore.EObject eObject)
doSwitch
in class org.eclipse.emf.ecore.util.Switch<java.lang.Object>
protected void processEcoreTaggedValue(org.eclipse.emf.ecore.EModelElement eModelElement, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, Element element, Stereotype stereotype, java.lang.String propertyName, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EClassifier eClassifier, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EEnum eEnum, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EEnumLiteral eEnumLiteral, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EGenericType eGenericType, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EOperation eOperation, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EPackage ePackage, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EParameter eParameter, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(org.eclipse.emf.ecore.ETypeParameter eTypeParameter, Element element, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processEcoreTaggedValues(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processRedefiningOperations(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processRedefiningProperties(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected boolean isCompositeSubset(Property property)
protected void processSubsettingProperties(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processUnionProperties(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processDerivedFeatures(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void ensureConformity(org.eclipse.emf.ecore.ETypedElement eTypedElement, org.eclipse.emf.ecore.ETypedElement otherETypedElement)
protected void qualifyName(org.eclipse.emf.ecore.ENamedElement eNamedElement)
protected void qualifyName(org.eclipse.emf.ecore.ENamedElement eNamedElement, java.lang.String qualifier)
protected void processDuplicateOperations(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processDuplicateOperationInheritance(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processDuplicateFeatures(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processDuplicateFeatureInheritance(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processSuperClassOrder(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processComment(org.eclipse.emf.ecore.EModelElement eModelElement, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processOperationBody(org.eclipse.emf.ecore.EOperation eOperation, org.eclipse.emf.common.util.EList<java.lang.String> languages, org.eclipse.emf.common.util.EList<java.lang.String> bodies, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processOperationBodies(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processInvariantBody(org.eclipse.emf.ecore.EOperation eOperation, org.eclipse.emf.common.util.EList<java.lang.String> languages, org.eclipse.emf.common.util.EList<java.lang.String> bodies, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processConstraintBody(org.eclipse.emf.ecore.EClassifier eClassifier, java.lang.String name, org.eclipse.emf.common.util.EList<java.lang.String> languages, org.eclipse.emf.common.util.EList<java.lang.String> bodies, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected org.eclipse.emf.ecore.EModelElement processInvariantConstraint(org.eclipse.emf.ecore.EClassifier eClassifier, Constraint constraint, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processPropertyDefaultExpressions(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processPropertyDefaultExpression(org.eclipse.emf.ecore.EStructuralFeature eFeature, org.eclipse.emf.common.util.EList<java.lang.String> languages, org.eclipse.emf.common.util.EList<java.lang.String> bodies, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processAnnotationDetails(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processCapabilityAnnotations(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
protected void processUntypedProperties(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
options
- the current conversion optionsdiagnostics
- collector of problem reportscontext
- validation context for problem reportingprotected void processOptions(java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
public java.util.Collection<? extends org.eclipse.emf.ecore.EObject> convert(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> eObjects, java.util.Map<java.lang.String,java.lang.String> options, org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
UML2Util.Converter
convert
in interface UML2Util.Converter
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.
|
Copyright 2003, 2014 IBM Corporation, CEA, and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |