org.eclipse.uml2.uml.util
Class UMLUtil
java.lang.Object
org.eclipse.uml2.common.util.UML2Util
org.eclipse.uml2.uml.util.UMLUtil
-
public class UMLUtil
- extends
UML2Util
Utilities for working with UML elements and resources.
-
Since:
- 2.0
Nested Class Summary
|
static class
|
UMLUtil.Ecore2UMLConverter
A converter that converts Ecore model elements to representative UML
elements. |
static class
|
UMLUtil.PackageMerger
A copier that merges the contents of packages involved in package merge
relationships based on the rules defined in the UML specification. |
static class
|
UMLUtil.Profile2EPackageConverter
A converter that converts UML profiles to representative Ecore packages. |
static class
|
UMLUtil.ProfileApplicationHelper
The ProfileApplicationHelper can be overridden to change the way packages
are traversed when looking for profile applications relevant to an
element in a given package. |
static class
|
UMLUtil.QualifiedTextProvider
A qualified text provider that uses names of named elements as qualified
text segments and :: as a separator. |
static class
|
UMLUtil.StereotypeApplicationHelper
The StereotypeApplicationHelper can be overridden to change the default
location of applied stereotypes. |
static class
|
UMLUtil.UML2EcoreConverter
A converter that converts UML elements to representative Ecore model
elements. |
Method Summary
|
protected static org.eclipse.emf.ecore.EObject
|
applyStereotype
(
Element element,
org.eclipse.emf.ecore.EClass definition)
|
static java.util.Collection<
Package>
|
convertFromEcore
(org.eclipse.emf.ecore.EPackage ePackage,
java.util.Map<java.lang.String,java.lang.String> options)
Converts the specified Ecore package (and its contents) to UML using the
specified options. |
static java.util.Collection<
Package>
|
convertFromEcore
(org.eclipse.emf.ecore.EPackage ePackage,
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 Ecore package (and its contents) to UML using the
specified options, reporting problems to the specified diagnostics,
within the specified context. |
static java.util.Collection<org.eclipse.emf.ecore.EPackage>
|
convertToEcore
(
Package package_,
java.util.Map<java.lang.String,java.lang.String> options)
Converts the specified package (and its contents) to Ecore using the
specified options. |
static java.util.Collection<org.eclipse.emf.ecore.EPackage>
|
convertToEcore
(
Package package_,
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 package (and its contents) to Ecore using the
specified options, reporting problems to the specified diagnostics,
within the specified context. |
static java.util.Collection<org.eclipse.emf.ecore.EPackage>
|
convertToEcore
(
Profile profile,
java.util.Map<java.lang.String,java.lang.String> options)
Converts the specified profile (and its contents) to Ecore using the
specified options. |
static java.util.Collection<org.eclipse.emf.ecore.EPackage>
|
convertToEcore
(
Profile profile,
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 profile (and its contents) to Ecore using the
specified options, reporting problems to the specified diagnostics,
within the specified context. |
protected static
|
findNamedElements
(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> eObjects,
java.lang.String qualifiedName,
boolean ignoreCase,
org.eclipse.emf.ecore.EClass eClass,
java.util.Collection<NE> namedElements)
|
static
|
findNamedElements
(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String qualifiedName)
Retrieves the named element(s) with the specified qualified name from the
specified resource set. |
static
|
findNamedElements
(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String qualifiedName,
boolean ignoreCase)
Retrieves the named element(s) with the specified qualified name from the
specified resource set, optionally ignoring case when doing name
comparisons. |
static
|
findNamedElements
(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String qualifiedName,
boolean ignoreCase,
org.eclipse.emf.ecore.EClass eClass)
Retrieves the named element(s) of the specified type with the specified
qualified name from the specified resource set, optionally ignoring case
when doing name comparisons. |
static
|
findNamedElements
(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String qualifiedName)
Retrieves the named element(s) with the specified qualified name from the
specified resource. |
static
|
findNamedElements
(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String qualifiedName,
boolean ignoreCase)
Retrieves the named element(s) with the specified qualified name from the
specified resource, optionally ignoring case when doing name comparisons. |
static
|
findNamedElements
(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String qualifiedName,
boolean ignoreCase,
org.eclipse.emf.ecore.EClass eClass)
Retrieves the named element(s) of the specified type with the specified
qualified name from the specified resource, optionally ignoring case when
doing name comparisons. |
protected static
<F extends
Feature>
java.util.Collection<F>
|
|
findValidRedefinitions
(java.util.Collection<F> redefinedFeatures,
F redefiningFeature,
java.lang.String name,
Classifier redefinitionContext)
|
protected static
<F extends
Feature>
java.util.Collection<F>
|
|
findValidRedefinitions
(F redefiningFeature,
java.lang.String name)
|
protected static java.util.Collection<
Property>
|
findValidSubsets
(java.util.Collection<
Property> subsettedProperties,
Property subsettingProperty,
java.lang.String name,
Classifier subsettingContext)
|
protected static java.util.Collection<
Property>
|
findValidSubsets
(
Property subsettingProperty,
java.lang.String name)
|
static
Element
|
getBaseElement
(org.eclipse.emf.ecore.EObject stereotypeApplication)
Retrieves the base element for the specified stereotype application, i.e. |
protected static org.eclipse.emf.ecore.EClassifier
|
getEClassifier
(
Class metaclass)
|
protected static org.eclipse.emf.ecore.EClassifier
|
getEClassifier
(
Type type)
|
protected static org.eclipse.emf.ecore.EPackage
|
getEPackage
(
Package package_)
|
protected static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.ETypeParameter>
|
getETypeParameters
(org.eclipse.emf.ecore.EObject eObject)
|
protected static
NamedElement
|
getNamedElement
(org.eclipse.emf.ecore.ENamedElement definition)
|
protected static
NamedElement
|
getNamedElement
(org.eclipse.emf.ecore.ENamedElement definition,
org.eclipse.emf.ecore.EObject context)
|
protected static org.eclipse.emf.common.util.EList<
Property>
|
getOwnedAttributes
(
Type type)
|
protected static org.eclipse.emf.common.util.EList<
Operation>
|
getOwnedOperations
(
Type type)
|
protected static
Element
|
getOwningElement
(
Element element,
org.eclipse.emf.ecore.EClass eClass,
boolean resolve)
|
static
Profile
|
getProfile
(org.eclipse.emf.ecore.EPackage definition)
Retrieves the profile for which the specified package represents a
definition. |
static
Profile
|
getProfile
(org.eclipse.emf.ecore.EPackage definition,
org.eclipse.emf.ecore.EObject context)
|
protected static java.lang.String
|
getQualifiedName
(
NamedElement namedElement,
java.lang.String separator)
|
static java.lang.String
|
getQualifiedText
(org.eclipse.emf.ecore.EObject eObject)
Retrieves a qualified textual representation of the specified object
using the default qualified text provider. |
protected static org.eclipse.emf.common.util.EList<
Feature>
|
getRedefinedFeatures
(
Feature feature)
|
protected static
Stereotype
|
getStereotype
(org.eclipse.emf.ecore.EClass definition)
|
protected static
Stereotype
|
getStereotype
(org.eclipse.emf.ecore.EClass definition,
org.eclipse.emf.ecore.EObject stereotypeApplication)
|
static
Stereotype
|
getStereotype
(org.eclipse.emf.ecore.EObject stereotypeApplication)
Retrieves the stereotype for which the specified object represents an
application. |
protected static
Property
|
getTagDefinition
(
Stereotype stereotype,
java.lang.String propertyName)
|
static java.lang.Object
|
getTaggedValue
(
Element element,
java.lang.String qualifiedStereotypeName,
java.lang.String propertyName)
|
protected static boolean
|
isRedefinitionValid
(
Feature redefiningFeature,
Feature redefinedFeature)
|
protected static boolean
|
isSubsetValid
(
Property subsettingProperty,
Property subsettedProperty)
|
static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>>
|
merge
(
Package package_,
java.util.Map<java.lang.String,java.lang.String> options)
Merges the contents of (all of) the packages merged by the specified
package using the specified options. |
static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>>
|
merge
(
Package package_,
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)
Merges the contents of (all of) the packages merged by the specified
package using the specified options, reporting problems to the specified
diagnostics, within the specified context. |
static org.eclipse.emf.ecore.EObject
|
safeApplyStereotype
(
Element element,
Stereotype stereotype)
Safely applies the specified stereotype to the specified element, i.e. |
static void
|
setBaseElement
(org.eclipse.emf.ecore.EObject stereotypeApplication,
Element element)
Sets the base element for the specified stereotype application to the
specified element. |
static boolean
|
setTaggedValue
(
Element element,
Stereotype stereotype,
java.lang.String propertyName,
java.lang.Object value)
Sets the value of the specified property of the specified stereotype
application on the specified element. |
Methods inherited from class org.eclipse.uml2.common.util.
UML2Util
|
addConstraint,
addDocumentation,
createEAnnotation,
destroy,
destroyAll,
findEObject,
findEObject,
getAllContents,
getCommonEType,
getEAnnotation,
getGreaterUpperBound,
getInstanceCount,
getInverseReferences,
getLesserLowerBound,
getMessageSubstitution,
getMessageSubstitutions,
getMessageSubstitutions,
getMessageSubstitutions,
getNonNavigableInverseReferences,
getQualifiedText,
getQualifiedText,
getQualifiedTextSegment,
getResourceBundle,
getResourceBundle,
getResourceBundleURIs,
getResourceBundleURIs,
getRootContainers,
getString,
getValidJavaIdentifier,
getValidJavaIdentifier,
getValidNCName,
getValidNCName,
getXMIIdentifier,
getXMIIdentifier,
intersect,
isEmpty,
isNCNamePart,
isNCNameStart,
load,
loadClassFromSystemProperty,
removeReferences,
safeEquals
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
OPTION__DISCARD
public static final java.lang.String OPTION__DISCARD
- Represents an option choice of 'discard'.
-
See Also:
-
Constant Field Values
OPTION__IGNORE
public static final java.lang.String OPTION__IGNORE
- Represents an option choice of 'ignore'.
-
See Also:
-
Constant Field Values
OPTION__PROCESS
public static final java.lang.String OPTION__PROCESS
- Represents an option choice of 'process'.
-
See Also:
-
Constant Field Values
OPTION__REPORT
public static final java.lang.String OPTION__REPORT
- Represents an option choice of 'report'.
-
See Also:
-
Constant Field Values
ANNOTATION__DUPLICATES
protected static final java.lang.String ANNOTATION__DUPLICATES
-
See Also:
-
Constant Field Values
ANNOTATION__REDEFINES
protected static final java.lang.String ANNOTATION__REDEFINES
-
See Also:
-
Constant Field Values
ANNOTATION__SUBSETS
protected static final java.lang.String ANNOTATION__SUBSETS
-
See Also:
-
Constant Field Values
ANNOTATION__UNION
protected static final java.lang.String ANNOTATION__UNION
-
See Also:
-
Constant Field Values
ANNOTATION_DETAIL__BODY
protected static final java.lang.String ANNOTATION_DETAIL__BODY
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__ATTRIBUTE
public static final java.lang.String ENUMERATION_LITERAL__ATTRIBUTE
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__ATTRIBUTE_WILDCARD
protected static final java.lang.String ENUMERATION_LITERAL__ATTRIBUTE_WILDCARD
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__ELEMENT
public static final java.lang.String ENUMERATION_LITERAL__ELEMENT
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__ELEMENT_ONLY
protected static final java.lang.String ENUMERATION_LITERAL__ELEMENT_ONLY
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__ELEMENT_WILDCARD
protected static final java.lang.String ENUMERATION_LITERAL__ELEMENT_WILDCARD
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__EMPTY
protected static final java.lang.String ENUMERATION_LITERAL__EMPTY
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__GROUP
protected static final java.lang.String ENUMERATION_LITERAL__GROUP
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__MIXED
protected static final java.lang.String ENUMERATION_LITERAL__MIXED
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__NONE
protected static final java.lang.String ENUMERATION_LITERAL__NONE
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__SIMPLE
protected static final java.lang.String ENUMERATION_LITERAL__SIMPLE
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__READ_ONLY
protected static final java.lang.String ENUMERATION_LITERAL__READ_ONLY
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__READ_ONLY_UNSETTABLE
protected static final java.lang.String ENUMERATION_LITERAL__READ_ONLY_UNSETTABLE
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__READ_WRITE
protected static final java.lang.String ENUMERATION_LITERAL__READ_WRITE
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__READ_WRITE_UNSETTABLE
protected static final java.lang.String ENUMERATION_LITERAL__READ_WRITE_UNSETTABLE
-
See Also:
-
Constant Field Values
ENUMERATION_LITERAL__UNSPECIFIED
protected static final java.lang.String ENUMERATION_LITERAL__UNSPECIFIED
-
See Also:
-
Constant Field Values
ENUMERATION__CONTENT_KIND
protected static final java.lang.String ENUMERATION__CONTENT_KIND
-
See Also:
-
Constant Field Values
ENUMERATION__FEATURE_KIND
public static final java.lang.String ENUMERATION__FEATURE_KIND
-
See Also:
-
Constant Field Values
ENUMERATION__VISIBILITY_KIND
protected static final java.lang.String ENUMERATION__VISIBILITY_KIND
-
See Also:
-
Constant Field Values
EMF_GEN_MODEL_PACKAGE_NS_URI
protected static final java.lang.String EMF_GEN_MODEL_PACKAGE_NS_URI
-
See Also:
-
Constant Field Values
UML2_GEN_MODEL_PACKAGE_NS_URI
protected static final java.lang.String UML2_GEN_MODEL_PACKAGE_NS_URI
-
See Also:
-
Constant Field Values
UML2_GEN_MODEL_PACKAGE_1_1_NS_URI
protected static final java.lang.String UML2_GEN_MODEL_PACKAGE_1_1_NS_URI
-
See Also:
-
Constant Field Values
LANGUAGE__JAVA
protected static final java.lang.String LANGUAGE__JAVA
-
See Also:
-
Constant Field Values
LANGUAGE__OCL
protected static final java.lang.String LANGUAGE__OCL
-
See Also:
-
Constant Field Values
UML2_UML_PACKAGE_2_0_NS_URI
protected static final java.lang.String UML2_UML_PACKAGE_2_0_NS_URI
-
See Also:
-
Constant Field Values
UML2_UML_PACKAGE_2_0_NS_URI_COMPATIBILITY
public static final java.lang.String UML2_UML_PACKAGE_2_0_NS_URI_COMPATIBILITY
- An annotation tag that can be used for backward compatibility.
-
See Also:
-
Constant Field Values
PROFILE__ECORE
public static final java.lang.String PROFILE__ECORE
- The name of the 'Ecore' profile.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_ATTRIBUTE
public static final java.lang.String STEREOTYPE__E_ATTRIBUTE
- The name of the 'EAttribute' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_CLASS
public static final java.lang.String STEREOTYPE__E_CLASS
- The name of the 'EClass' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_GENERIC_TYPE
public static final java.lang.String STEREOTYPE__E_GENERIC_TYPE
- The name of the 'EGenericType' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_TYPE_PARAMETER
public static final java.lang.String STEREOTYPE__E_TYPE_PARAMETER
- The name of the 'ETypeParameter' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_DATA_TYPE
public static final java.lang.String STEREOTYPE__E_DATA_TYPE
- The name of the 'EDataType' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_ENUM
public static final java.lang.String STEREOTYPE__E_ENUM
- The name of the 'EEnum' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_ENUM_LITERAL
public static final java.lang.String STEREOTYPE__E_ENUM_LITERAL
- The name of the 'EEnumLiteral' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_OPERATION
public static final java.lang.String STEREOTYPE__E_OPERATION
- The name of the 'EOperation' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_PACKAGE
public static final java.lang.String STEREOTYPE__E_PACKAGE
- The name of the 'EPackage' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_PARAMETER
public static final java.lang.String STEREOTYPE__E_PARAMETER
- The name of the 'EParameter' stereotype.
-
See Also:
-
Constant Field Values
STEREOTYPE__E_REFERENCE
public static final java.lang.String STEREOTYPE__E_REFERENCE
- The name of the 'EReference' stereotype.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__ANNOTATIONS
public static final java.lang.String TAG_DEFINITION__ANNOTATIONS
- The name of the 'annotations' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__ATTRIBUTE_NAME
public static final java.lang.String TAG_DEFINITION__ATTRIBUTE_NAME
- The name of the 'attributeName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__BASE_PACKAGE
public static final java.lang.String TAG_DEFINITION__BASE_PACKAGE
- The name of the 'basePackage' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__BOUNDS
public static final java.lang.String TAG_DEFINITION__BOUNDS
- The name of the 'bounds' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__CLASS_NAME
public static final java.lang.String TAG_DEFINITION__CLASS_NAME
- The name of the 'className' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__DATA_TYPE_NAME
public static final java.lang.String TAG_DEFINITION__DATA_TYPE_NAME
- The name of the 'dataTypeName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__ENUM_NAME
public static final java.lang.String TAG_DEFINITION__ENUM_NAME
- The name of the 'enumName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__ENUM_LITERAL_NAME
public static final java.lang.String TAG_DEFINITION__ENUM_LITERAL_NAME
- The name of the 'enumLiteralName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__INSTANCE_CLASS_NAME
public static final java.lang.String TAG_DEFINITION__INSTANCE_CLASS_NAME
- The name of the 'instanceClassName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__IS_ID
public static final java.lang.String TAG_DEFINITION__IS_ID
- The name of the 'isID' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__IS_RESOLVE_PROXIES
public static final java.lang.String TAG_DEFINITION__IS_RESOLVE_PROXIES
- The name of the 'isResolveProxies' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__IS_TRANSIENT
public static final java.lang.String TAG_DEFINITION__IS_TRANSIENT
- The name of the 'isTransient' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__IS_UNSETTABLE
public static final java.lang.String TAG_DEFINITION__IS_UNSETTABLE
- The name of the 'isUnsettable' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__IS_VOLATILE
public static final java.lang.String TAG_DEFINITION__IS_VOLATILE
- The name of the 'isVolatile' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__KEYS
public static final java.lang.String TAG_DEFINITION__KEYS
- The name of the 'keys' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__LITERAL
public static final java.lang.String TAG_DEFINITION__LITERAL
- The name of the 'literal' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__LOWER_BOUND
public static final java.lang.String TAG_DEFINITION__LOWER_BOUND
- The name of the 'lowerBound' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__NS_PREFIX
public static final java.lang.String TAG_DEFINITION__NS_PREFIX
- The name of the 'nsPrefix' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__NS_URI
public static final java.lang.String TAG_DEFINITION__NS_URI
- The name of the 'nsURI' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__OPERATION_NAME
public static final java.lang.String TAG_DEFINITION__OPERATION_NAME
- The name of the 'operationName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__PACKAGE_NAME
public static final java.lang.String TAG_DEFINITION__PACKAGE_NAME
- The name of the 'packageName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__PARAMETER_NAME
public static final java.lang.String TAG_DEFINITION__PARAMETER_NAME
- The name of the 'parameterName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__PREFIX
public static final java.lang.String TAG_DEFINITION__PREFIX
- The name of the 'prefix' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__REFERENCE_NAME
public static final java.lang.String TAG_DEFINITION__REFERENCE_NAME
- The name of the 'referenceName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__UPPER_BOUND
public static final java.lang.String TAG_DEFINITION__UPPER_BOUND
- The name of the 'upperBound' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__VISIBILITY
public static final java.lang.String TAG_DEFINITION__VISIBILITY
- The name of the 'visibility' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__XML_CONTENT_KIND
public static final java.lang.String TAG_DEFINITION__XML_CONTENT_KIND
- The name of the 'xmlContentKind' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__XML_FEATURE_KIND
public static final java.lang.String TAG_DEFINITION__XML_FEATURE_KIND
- The name of the 'xmlFeatureKind' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__XML_NAME
public static final java.lang.String TAG_DEFINITION__XML_NAME
- The name of the 'xmlName' stereotype property.
-
See Also:
-
Constant Field Values
TAG_DEFINITION__XML_NAMESPACE
public static final java.lang.String TAG_DEFINITION__XML_NAMESPACE
- The name of the 'xmlNamespace' stereotype property.
-
See Also:
-
Constant Field Values
UMLUtil
public UMLUtil()
getQualifiedText
public static java.lang.String getQualifiedText(org.eclipse.emf.ecore.EObject eObject)
- Retrieves a qualified textual representation of the specified object
using the default qualified text provider.
-
-
Parameters:
-
eObject
- The object for which to retrieve qualified text.
-
Returns:
- A qualified textual representation of the object.
getQualifiedName
protected static java.lang.String getQualifiedName(
NamedElement namedElement,
java.lang.String separator)
-
findNamedElements
public static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String qualifiedName)
- Retrieves the named element(s) with the specified qualified name from the
specified resource set.
-
-
Parameters:
-
resourceSet
- The resource set in which to search. -
qualifiedName
- The qualified name of the element(s) to be found.
-
Returns:
- The named element(s).
findNamedElements
public static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String qualifiedName,
boolean ignoreCase)
- Retrieves the named element(s) with the specified qualified name from the
specified resource set, optionally ignoring case when doing name
comparisons.
-
-
Parameters:
-
resourceSet
- The resource set in which to search. -
qualifiedName
- The qualified name of the element(s) to be found. -
ignoreCase
- Whether to ignore case when doing name comparisons.
-
Returns:
- The named element(s).
findNamedElements
public static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
java.lang.String qualifiedName,
boolean ignoreCase,
org.eclipse.emf.ecore.EClass eClass)
- Retrieves the named element(s) of the specified type with the specified
qualified name from the specified resource set, optionally ignoring case
when doing name comparisons.
-
-
Parameters:
-
resourceSet
- The resource set in which to search. -
qualifiedName
- The qualified name of the element(s) to be found. -
ignoreCase
- Whether to ignore case when doing name comparisons. -
eClass
- The type of the element(s) to be found.
-
Returns:
- The named element(s).
findNamedElements
public static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String qualifiedName)
- Retrieves the named element(s) with the specified qualified name from the
specified resource.
-
-
Parameters:
-
resource
- The resource in which to search. -
qualifiedName
- The qualified name of the element(s) to be found.
-
Returns:
- The named element(s).
findNamedElements
public static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String qualifiedName,
boolean ignoreCase)
- Retrieves the named element(s) with the specified qualified name from the
specified resource, optionally ignoring case when doing name comparisons.
-
-
Parameters:
-
resource
- The resource in which to search. -
qualifiedName
- The qualified name of the element(s) to be found. -
ignoreCase
- Whether to ignore case when doing name comparisons.
-
Returns:
- The named element(s).
findNamedElements
public static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.Resource resource,
java.lang.String qualifiedName,
boolean ignoreCase,
org.eclipse.emf.ecore.EClass eClass)
- Retrieves the named element(s) of the specified type with the specified
qualified name from the specified resource, optionally ignoring case when
doing name comparisons.
-
-
Parameters:
-
resource
- The resource in which to search. -
qualifiedName
- The qualified name of the element(s) to be found. -
ignoreCase
- Whether to ignore case when doing name comparisons. -
eClass
- The type of the element(s) to be found.
-
Returns:
- The named element(s).
findNamedElements
protected static <NE extends
NamedElement> java.util.Collection<NE> findNamedElements(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> eObjects,
java.lang.String qualifiedName,
boolean ignoreCase,
org.eclipse.emf.ecore.EClass eClass,
java.util.Collection<NE> namedElements)
-
getEPackage
protected static org.eclipse.emf.ecore.EPackage getEPackage(
Package package_)
-
getEClassifier
protected static org.eclipse.emf.ecore.EClassifier getEClassifier(
Type type)
-
getEClassifier
protected static org.eclipse.emf.ecore.EClassifier getEClassifier(
Class metaclass)
-
getProfile
public static
Profile getProfile(org.eclipse.emf.ecore.EPackage definition)
- Retrieves the profile for which the specified package represents a
definition.
-
-
Parameters:
-
definition
- The package.
-
Returns:
- The profile.
getProfile
public static
Profile getProfile(org.eclipse.emf.ecore.EPackage definition,
org.eclipse.emf.ecore.EObject context)
-
getNamedElement
protected static
NamedElement getNamedElement(org.eclipse.emf.ecore.ENamedElement definition)
-
getNamedElement
protected static
NamedElement getNamedElement(org.eclipse.emf.ecore.ENamedElement definition,
org.eclipse.emf.ecore.EObject context)
-
getStereotype
protected static
Stereotype getStereotype(org.eclipse.emf.ecore.EClass definition)
-
getStereotype
protected static
Stereotype getStereotype(org.eclipse.emf.ecore.EClass definition,
org.eclipse.emf.ecore.EObject stereotypeApplication)
-
getStereotype
public static
Stereotype getStereotype(org.eclipse.emf.ecore.EObject stereotypeApplication)
- Retrieves the stereotype for which the specified object represents an
application.
-
-
Parameters:
-
stereotypeApplication
- The object.
-
Returns:
- The stereotype.
getBaseElement
public static
Element getBaseElement(org.eclipse.emf.ecore.EObject stereotypeApplication)
- Retrieves the base element for the specified stereotype application, i.e.
the element to which the stereotype is applied.
-
-
Parameters:
-
stereotypeApplication
- The stereotype application.
-
Returns:
- The base element.
setBaseElement
public static void setBaseElement(org.eclipse.emf.ecore.EObject stereotypeApplication,
Element element)
- Sets the base element for the specified stereotype application to the
specified element.
-
-
Parameters:
-
stereotypeApplication
- The stereotype application. -
element
- The new base element.
applyStereotype
protected static org.eclipse.emf.ecore.EObject applyStereotype(
Element element,
org.eclipse.emf.ecore.EClass definition)
-
safeApplyStereotype
public static org.eclipse.emf.ecore.EObject safeApplyStereotype(
Element element,
Stereotype stereotype)
- Safely applies the specified stereotype to the specified element, i.e.
applies the profile if not already applied.
-
-
Parameters:
-
element
- The element to which to apply the stereotype. -
stereotype
- The stereotype to apply.
-
Returns:
- The stereotype application.
getTagDefinition
protected static
Property getTagDefinition(
Stereotype stereotype,
java.lang.String propertyName)
-
getTaggedValue
public static java.lang.Object getTaggedValue(
Element element,
java.lang.String qualifiedStereotypeName,
java.lang.String propertyName)
-
setTaggedValue
public static boolean setTaggedValue(
Element element,
Stereotype stereotype,
java.lang.String propertyName,
java.lang.Object value)
- Sets the value of the specified property of the specified stereotype
application on the specified element.
-
-
Parameters:
-
element
- The element to which the stereotype is applied. -
stereotype
- The stereotype. -
propertyName
- The name of the stereotype property. -
value
- The new value.
-
Returns:
-
true
if the value was successfully set;
false
otherwise.
getOwningElement
protected static
Element getOwningElement(
Element element,
org.eclipse.emf.ecore.EClass eClass,
boolean resolve)
-
getOwnedAttributes
protected static org.eclipse.emf.common.util.EList<
Property> getOwnedAttributes(
Type type)
-
getOwnedOperations
protected static org.eclipse.emf.common.util.EList<
Operation> getOwnedOperations(
Type type)
-
getETypeParameters
protected static org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.ETypeParameter> getETypeParameters(org.eclipse.emf.ecore.EObject eObject)
-
getRedefinedFeatures
protected static org.eclipse.emf.common.util.EList<
Feature> getRedefinedFeatures(
Feature feature)
-
isRedefinitionValid
protected static boolean isRedefinitionValid(
Feature redefiningFeature,
Feature redefinedFeature)
-
findValidRedefinitions
protected static <F extends
Feature> java.util.Collection<F> findValidRedefinitions(F redefiningFeature,
java.lang.String name)
-
findValidRedefinitions
protected static <F extends
Feature> java.util.Collection<F> findValidRedefinitions(java.util.Collection<F> redefinedFeatures,
F redefiningFeature,
java.lang.String name,
Classifier redefinitionContext)
-
isSubsetValid
protected static boolean isSubsetValid(
Property subsettingProperty,
Property subsettedProperty)
-
findValidSubsets
protected static java.util.Collection<
Property> findValidSubsets(
Property subsettingProperty,
java.lang.String name)
-
findValidSubsets
protected static java.util.Collection<
Property> findValidSubsets(java.util.Collection<
Property> subsettedProperties,
Property subsettingProperty,
java.lang.String name,
Classifier subsettingContext)
-
merge
public static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> merge(
Package package_,
java.util.Map<java.lang.String,java.lang.String> options)
- Merges the contents of (all of) the packages merged by the specified
package using the specified options. If a supported option is not
specified, it will be defaulted to
OPTION__IGNORE
.
-
-
Parameters:
-
package_
- The receiving package. -
options
- The options to use.
-
Returns:
- A traceability map from resulting elements to merged elements.
merge
public static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> merge(
Package package_,
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)
- Merges the contents of (all of) the packages merged by the specified
package using the specified options, reporting problems to the specified
diagnostics, within the specified context. If a supported option is not
specified, it will be defaulted to
OPTION__REPORT
.
-
-
Parameters:
-
package_
- The receiving package. -
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:
- A traceability map from resulting elements to merged elements.
convertToEcore
public static java.util.Collection<org.eclipse.emf.ecore.EPackage> convertToEcore(
Package package_,
java.util.Map<java.lang.String,java.lang.String> options)
- Converts the specified package (and its contents) to Ecore using the
specified options. If a supported option is not specified, it will be
defaulted to
OPTION__IGNORE
.
-
-
Parameters:
-
package_
- The package to convert. -
options
- The options to use.
-
Returns:
- An Ecore representation of the package.
convertToEcore
public static java.util.Collection<org.eclipse.emf.ecore.EPackage> convertToEcore(
Package package_,
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 package (and its contents) to Ecore using the
specified options, reporting problems to the specified diagnostics,
within the specified context. If a supported option is not specified, it
will be defaulted to
OPTION__REPORT
.
-
-
Parameters:
-
package_
- The package to convert. -
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:
- An Ecore representation of the package.
convertToEcore
public static java.util.Collection<org.eclipse.emf.ecore.EPackage> convertToEcore(
Profile profile,
java.util.Map<java.lang.String,java.lang.String> options)
- Converts the specified profile (and its contents) to Ecore using the
specified options. If a supported option is not specified, it will be
defaulted to
OPTION__IGNORE
.
-
-
Parameters:
-
profile
- The profile to convert. -
options
- The options to use.
-
Returns:
- An Ecore representation of the profile.
convertToEcore
public static java.util.Collection<org.eclipse.emf.ecore.EPackage> convertToEcore(
Profile profile,
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 profile (and its contents) to Ecore using the
specified options, reporting problems to the specified diagnostics,
within the specified context. If a supported option is not specified, it
will be defaulted to
OPTION__REPORT
.
-
-
Parameters:
-
profile
- The profile to convert. -
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:
- An Ecore representation of the profile.
convertFromEcore
public static java.util.Collection<
Package> convertFromEcore(org.eclipse.emf.ecore.EPackage ePackage,
java.util.Map<java.lang.String,java.lang.String> options)
- Converts the specified Ecore package (and its contents) to UML using the
specified options.
-
-
Parameters:
-
ePackage
- The Ecore package to convert. -
options
- The options to use.
-
Returns:
- A UML representation of the Ecore package.
convertFromEcore
public static java.util.Collection<
Package> convertFromEcore(org.eclipse.emf.ecore.EPackage ePackage,
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 Ecore package (and its contents) to UML using the
specified options, reporting problems to the specified diagnostics,
within the specified context.
-
-
Parameters:
-
ePackage
- The Ecore package to convert. -
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:
- A UML representation of the Ecore package.