|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.uml2.common.util.UML2Util org.eclipse.uml2.uml.util.UMLUtil
public class UMLUtil
Utilities for working with UML elements and resources.
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.TemplateExpander
A specialized copier that "expands" the bindings of templates modeled by TemplateableElement s to apply
the bindings' parameter substitutions within a bound element. |
static class |
UMLUtil.UML2EcoreConverter
A converter that converts UML elements to representative Ecore model elements. |
Nested classes/interfaces inherited from class org.eclipse.uml2.common.util.UML2Util |
---|
UML2Util.Converter, UML2Util.EClassMatcher, UML2Util.EObjectMatcher, UML2Util.EStructuralFeatureMatcher |
Field Summary | |
---|---|
protected static java.lang.String |
ANNOTATION__DUPLICATES
|
protected static java.lang.String |
ANNOTATION__REDEFINES
|
protected static java.lang.String |
ANNOTATION__SUBSETS
|
protected static java.lang.String |
ANNOTATION__UNION
|
protected static java.lang.String |
ANNOTATION_DETAIL__BODY
|
protected static java.lang.String |
ANNOTATION_DETAIL__DERIVATION
|
protected static java.lang.String |
ANNOTATION_DETAIL__INITIAL
|
protected static java.lang.String |
ANNOTATION_DETAIL__URI
|
protected static java.lang.String |
EMF_GEN_MODEL_PACKAGE_NS_URI
|
static java.lang.String |
ENUMERATION__CONTENT_KIND
|
static java.lang.String |
ENUMERATION__FEATURE_KIND
|
protected static java.lang.String |
ENUMERATION__VISIBILITY_KIND
|
static java.lang.String |
ENUMERATION_LITERAL__ATTRIBUTE
|
protected static java.lang.String |
ENUMERATION_LITERAL__ATTRIBUTE_WILDCARD
|
static java.lang.String |
ENUMERATION_LITERAL__ELEMENT
|
static java.lang.String |
ENUMERATION_LITERAL__ELEMENT_ONLY
|
protected static java.lang.String |
ENUMERATION_LITERAL__ELEMENT_WILDCARD
|
static java.lang.String |
ENUMERATION_LITERAL__EMPTY
|
protected static java.lang.String |
ENUMERATION_LITERAL__GROUP
|
static java.lang.String |
ENUMERATION_LITERAL__MIXED
|
protected static java.lang.String |
ENUMERATION_LITERAL__NONE
|
protected static java.lang.String |
ENUMERATION_LITERAL__READ_ONLY
|
protected static java.lang.String |
ENUMERATION_LITERAL__READ_ONLY_UNSETTABLE
|
protected static java.lang.String |
ENUMERATION_LITERAL__READ_WRITE
|
protected static java.lang.String |
ENUMERATION_LITERAL__READ_WRITE_UNSETTABLE
|
static java.lang.String |
ENUMERATION_LITERAL__SIMPLE
|
static java.lang.String |
ENUMERATION_LITERAL__UNSPECIFIED
|
static java.lang.String |
LANGUAGE__JAVA
|
static java.lang.String |
LANGUAGE__OCL
|
static java.lang.String |
OPTION__DISCARD
Represents an option choice of 'discard'. |
static java.lang.String |
OPTION__IGNORE
Represents an option choice of 'ignore'. |
static java.lang.String |
OPTION__PROCESS
Represents an option choice of 'process'. |
static java.lang.String |
OPTION__REPORT
Represents an option choice of 'report'. |
static java.lang.String |
PROFILE__ECORE
The name of the 'Ecore' profile. |
static java.lang.String |
STEREOTYPE__E_ATTRIBUTE
The name of the 'EAttribute' stereotype. |
static java.lang.String |
STEREOTYPE__E_CLASS
The name of the 'EClass' stereotype. |
static java.lang.String |
STEREOTYPE__E_DATA_TYPE
The name of the 'EDataType' stereotype. |
static java.lang.String |
STEREOTYPE__E_ENUM
The name of the 'EEnum' stereotype. |
static java.lang.String |
STEREOTYPE__E_ENUM_LITERAL
The name of the 'EEnumLiteral' stereotype. |
static java.lang.String |
STEREOTYPE__E_GENERIC_TYPE
The name of the 'EGenericType' stereotype. |
static java.lang.String |
STEREOTYPE__E_OPERATION
The name of the 'EOperation' stereotype. |
static java.lang.String |
STEREOTYPE__E_PACKAGE
The name of the 'EPackage' stereotype. |
static java.lang.String |
STEREOTYPE__E_PARAMETER
The name of the 'EParameter' stereotype. |
static java.lang.String |
STEREOTYPE__E_REFERENCE
The name of the 'EReference' stereotype. |
static java.lang.String |
STEREOTYPE__E_TYPE_PARAMETER
The name of the 'ETypeParameter' stereotype. |
static java.lang.String |
TAG_DEFINITION__ANNOTATIONS
The name of the 'annotations' stereotype property. |
static java.lang.String |
TAG_DEFINITION__ATTRIBUTE_NAME
The name of the 'attributeName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__BASE_PACKAGE
The name of the 'basePackage' stereotype property. |
static java.lang.String |
TAG_DEFINITION__BOUNDS
The name of the 'bounds' stereotype property. |
static java.lang.String |
TAG_DEFINITION__CLASS_NAME
The name of the 'className' stereotype property. |
static java.lang.String |
TAG_DEFINITION__DATA_TYPE_NAME
The name of the 'dataTypeName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__ENUM_LITERAL_NAME
The name of the 'enumLiteralName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__ENUM_NAME
The name of the 'enumName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__INSTANCE_CLASS_NAME
The name of the 'instanceClassName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__IS_ID
The name of the 'isID' stereotype property. |
static java.lang.String |
TAG_DEFINITION__IS_RESOLVE_PROXIES
The name of the 'isResolveProxies' stereotype property. |
static java.lang.String |
TAG_DEFINITION__IS_TRANSIENT
The name of the 'isTransient' stereotype property. |
static java.lang.String |
TAG_DEFINITION__IS_UNSETTABLE
The name of the 'isUnsettable' stereotype property. |
static java.lang.String |
TAG_DEFINITION__IS_VOLATILE
The name of the 'isVolatile' stereotype property. |
static java.lang.String |
TAG_DEFINITION__KEYS
The name of the 'keys' stereotype property. |
static java.lang.String |
TAG_DEFINITION__LITERAL
The name of the 'literal' stereotype property. |
static java.lang.String |
TAG_DEFINITION__LOWER_BOUND
The name of the 'lowerBound' stereotype property. |
static java.lang.String |
TAG_DEFINITION__NS_PREFIX
The name of the 'nsPrefix' stereotype property. |
static java.lang.String |
TAG_DEFINITION__NS_URI
The name of the 'nsURI' stereotype property. |
static java.lang.String |
TAG_DEFINITION__OPERATION_NAME
The name of the 'operationName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__PACKAGE_NAME
The name of the 'packageName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__PARAMETER_NAME
The name of the 'parameterName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__PREFIX
The name of the 'prefix' stereotype property. |
static java.lang.String |
TAG_DEFINITION__REFERENCE_NAME
The name of the 'referenceName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__UPPER_BOUND
The name of the 'upperBound' stereotype property. |
static java.lang.String |
TAG_DEFINITION__VISIBILITY
The name of the 'visibility' stereotype property. |
static java.lang.String |
TAG_DEFINITION__XML_CONTENT_KIND
The name of the 'xmlContentKind' stereotype property. |
static java.lang.String |
TAG_DEFINITION__XML_FEATURE_KIND
The name of the 'xmlFeatureKind' stereotype property. |
static java.lang.String |
TAG_DEFINITION__XML_NAME
The name of the 'xmlName' stereotype property. |
static java.lang.String |
TAG_DEFINITION__XML_NAMESPACE
The name of the 'xmlNamespace' stereotype property. |
protected static java.lang.String |
UML2_GEN_MODEL_PACKAGE_1_1_NS_URI
|
protected static java.lang.String |
UML2_GEN_MODEL_PACKAGE_NS_URI
|
static java.lang.String |
UML2_TYPES_PACKAGE_4_0_NS_URI
|
static java.lang.String |
UML2_UML_PACKAGE_2_0_NS_URI
|
static java.lang.String |
UML2_UML_PACKAGE_2_0_NS_URI_COMPATIBILITY
An annotation tag that can be used for backward compatibility. |
static java.lang.String |
UML2_UML_PACKAGE_4_0_NS_URI
|
static java.lang.String |
UML2_UML_PACKAGE_4_1_NS_URI
|
Fields inherited from class org.eclipse.uml2.common.util.UML2Util |
---|
DEFAULT_URI_CONVERTER, EMPTY_STRING, LINE_SEPARATOR, PROPERTIES_FILE_EXTENSION, RESOURCE_BUNDLES, URI_SCHEME_PLATFORM, URI_SEGMENT_PLUGIN, URI_SEGMENT_RESOURCE |
Constructor Summary | |
---|---|
UMLUtil()
|
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. |
|
static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> |
expand(TemplateableElement templateableElement,
java.util.Map<java.lang.String,java.lang.String> options)
Applies all of the template bindings of an element, copying the structure of the templates that it binds to and applying parameter substitutions. |
|
static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> |
expand(TemplateableElement boundElement,
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 all of the template bindings of an element, copying the structure of the templates that it binds to and applying parameter substitutions. |
|
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
|
findValidRedefinitions(java.util.Collection<F> redefinedFeatures,
F redefiningFeature,
java.lang.String name,
Classifier redefinitionContext)
|
|
protected static
|
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)
|
|
protected static Element |
getBaseElement(org.eclipse.emf.ecore.EClass definition,
org.eclipse.emf.ecore.EObject stereotypeApplication)
|
|
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 java.lang.String |
getEcoreName(NamedElement namedElement)
|
|
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 Element |
getNearestBaseElement(org.eclipse.emf.ecore.EObject eObject,
boolean resolve)
|
|
static java.lang.String |
getOCLBody(java.lang.String body)
Retrieves an OCL compliant version of the specified UML body expression. |
|
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. |
|
static
|
getStereotypeApplication(Element element,
java.lang.Class<T> clazz)
Retrieves the stereotype application of the specified class for the specified element, or null if no such stereotype application exists. |
|
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)
|
|
static org.eclipse.emf.ecore.resource.ResourceSet |
init(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Initializes the registries for the specified resource set with the content type and extended metadata registrations needed to work with the various supported versions of UML, XMI, and CMOF. |
|
static boolean |
isBoolean(Type type)
Determines whether the specified type is a primitive type that classifies Boolean values. |
|
static boolean |
isInteger(Type type)
Determines whether the specified type is a primitive type that classifies integer values. |
|
static boolean |
isReal(Type type)
Determines whether the specified type is a primitive type that classifies real values. |
|
protected static boolean |
isRedefinitionValid(Feature redefiningFeature,
Feature redefinedFeature)
|
|
static boolean |
isString(Type type)
Determines whether the specified type is a primitive type that classifies string values. |
|
protected static boolean |
isSubsetValid(Property subsettingProperty,
Property subsettedProperty)
|
|
static boolean |
isUnlimitedNatural(Type type)
Determines whether the specified type is a primitive type that classifies unlimited natural values. |
|
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPTION__DISCARD
public static final java.lang.String OPTION__IGNORE
public static final java.lang.String OPTION__PROCESS
public static final java.lang.String OPTION__REPORT
protected static final java.lang.String ANNOTATION__DUPLICATES
protected static final java.lang.String ANNOTATION__REDEFINES
protected static final java.lang.String ANNOTATION__SUBSETS
protected static final java.lang.String ANNOTATION__UNION
protected static final java.lang.String ANNOTATION_DETAIL__BODY
protected static final java.lang.String ANNOTATION_DETAIL__DERIVATION
protected static final java.lang.String ANNOTATION_DETAIL__INITIAL
protected static final java.lang.String ANNOTATION_DETAIL__URI
public static final java.lang.String ENUMERATION_LITERAL__ATTRIBUTE
protected static final java.lang.String ENUMERATION_LITERAL__ATTRIBUTE_WILDCARD
public static final java.lang.String ENUMERATION_LITERAL__ELEMENT
public static final java.lang.String ENUMERATION_LITERAL__ELEMENT_ONLY
protected static final java.lang.String ENUMERATION_LITERAL__ELEMENT_WILDCARD
public static final java.lang.String ENUMERATION_LITERAL__EMPTY
protected static final java.lang.String ENUMERATION_LITERAL__GROUP
public static final java.lang.String ENUMERATION_LITERAL__MIXED
protected static final java.lang.String ENUMERATION_LITERAL__NONE
public static final java.lang.String ENUMERATION_LITERAL__SIMPLE
protected static final java.lang.String ENUMERATION_LITERAL__READ_ONLY
protected static final java.lang.String ENUMERATION_LITERAL__READ_ONLY_UNSETTABLE
protected static final java.lang.String ENUMERATION_LITERAL__READ_WRITE
protected static final java.lang.String ENUMERATION_LITERAL__READ_WRITE_UNSETTABLE
public static final java.lang.String ENUMERATION_LITERAL__UNSPECIFIED
public static final java.lang.String ENUMERATION__CONTENT_KIND
public static final java.lang.String ENUMERATION__FEATURE_KIND
protected static final java.lang.String ENUMERATION__VISIBILITY_KIND
protected static final java.lang.String EMF_GEN_MODEL_PACKAGE_NS_URI
protected static final java.lang.String UML2_GEN_MODEL_PACKAGE_NS_URI
protected static final java.lang.String UML2_GEN_MODEL_PACKAGE_1_1_NS_URI
public static final java.lang.String LANGUAGE__JAVA
public static final java.lang.String LANGUAGE__OCL
public static final java.lang.String UML2_UML_PACKAGE_2_0_NS_URI
public static final java.lang.String UML2_UML_PACKAGE_4_0_NS_URI
public static final java.lang.String UML2_UML_PACKAGE_4_1_NS_URI
public static final java.lang.String UML2_TYPES_PACKAGE_4_0_NS_URI
public static final java.lang.String UML2_UML_PACKAGE_2_0_NS_URI_COMPATIBILITY
public static final java.lang.String PROFILE__ECORE
public static final java.lang.String STEREOTYPE__E_ATTRIBUTE
public static final java.lang.String STEREOTYPE__E_CLASS
public static final java.lang.String STEREOTYPE__E_GENERIC_TYPE
public static final java.lang.String STEREOTYPE__E_TYPE_PARAMETER
public static final java.lang.String STEREOTYPE__E_DATA_TYPE
public static final java.lang.String STEREOTYPE__E_ENUM
public static final java.lang.String STEREOTYPE__E_ENUM_LITERAL
public static final java.lang.String STEREOTYPE__E_OPERATION
public static final java.lang.String STEREOTYPE__E_PACKAGE
public static final java.lang.String STEREOTYPE__E_PARAMETER
public static final java.lang.String STEREOTYPE__E_REFERENCE
public static final java.lang.String TAG_DEFINITION__ANNOTATIONS
public static final java.lang.String TAG_DEFINITION__ATTRIBUTE_NAME
public static final java.lang.String TAG_DEFINITION__BASE_PACKAGE
public static final java.lang.String TAG_DEFINITION__BOUNDS
public static final java.lang.String TAG_DEFINITION__CLASS_NAME
public static final java.lang.String TAG_DEFINITION__DATA_TYPE_NAME
public static final java.lang.String TAG_DEFINITION__ENUM_NAME
public static final java.lang.String TAG_DEFINITION__ENUM_LITERAL_NAME
public static final java.lang.String TAG_DEFINITION__INSTANCE_CLASS_NAME
public static final java.lang.String TAG_DEFINITION__IS_ID
public static final java.lang.String TAG_DEFINITION__IS_RESOLVE_PROXIES
public static final java.lang.String TAG_DEFINITION__IS_TRANSIENT
public static final java.lang.String TAG_DEFINITION__IS_UNSETTABLE
public static final java.lang.String TAG_DEFINITION__IS_VOLATILE
public static final java.lang.String TAG_DEFINITION__KEYS
public static final java.lang.String TAG_DEFINITION__LITERAL
public static final java.lang.String TAG_DEFINITION__LOWER_BOUND
public static final java.lang.String TAG_DEFINITION__NS_PREFIX
public static final java.lang.String TAG_DEFINITION__NS_URI
public static final java.lang.String TAG_DEFINITION__OPERATION_NAME
public static final java.lang.String TAG_DEFINITION__PACKAGE_NAME
public static final java.lang.String TAG_DEFINITION__PARAMETER_NAME
public static final java.lang.String TAG_DEFINITION__PREFIX
public static final java.lang.String TAG_DEFINITION__REFERENCE_NAME
public static final java.lang.String TAG_DEFINITION__UPPER_BOUND
public static final java.lang.String TAG_DEFINITION__VISIBILITY
public static final java.lang.String TAG_DEFINITION__XML_CONTENT_KIND
public static final java.lang.String TAG_DEFINITION__XML_FEATURE_KIND
public static final java.lang.String TAG_DEFINITION__XML_NAME
public static final java.lang.String TAG_DEFINITION__XML_NAMESPACE
Constructor Detail |
---|
public UMLUtil()
Method Detail |
---|
public static java.lang.String getQualifiedText(org.eclipse.emf.ecore.EObject eObject)
eObject
- The object for which to retrieve qualified text.
protected static java.lang.String getQualifiedName(NamedElement namedElement, java.lang.String separator)
public static <NE extends NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.lang.String qualifiedName)
resourceSet
- The resource set in which to search.qualifiedName
- The qualified name of the element(s) to be found.
public static <NE extends NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, java.lang.String qualifiedName, boolean ignoreCase)
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.
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)
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.
public static <NE extends NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.Resource resource, java.lang.String qualifiedName)
resource
- The resource in which to search.qualifiedName
- The qualified name of the element(s) to be found.
public static <NE extends NamedElement> java.util.Collection<NE> findNamedElements(org.eclipse.emf.ecore.resource.Resource resource, java.lang.String qualifiedName, boolean ignoreCase)
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.
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)
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.
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)
protected static org.eclipse.emf.ecore.EPackage getEPackage(Package package_)
protected static org.eclipse.emf.ecore.EClassifier getEClassifier(Type type)
protected static org.eclipse.emf.ecore.EClassifier getEClassifier(Class metaclass)
public static Profile getProfile(org.eclipse.emf.ecore.EPackage definition)
definition
- The package.
public static Profile getProfile(org.eclipse.emf.ecore.EPackage definition, org.eclipse.emf.ecore.EObject context)
protected static java.lang.String getEcoreName(NamedElement namedElement)
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 Stereotype getStereotype(org.eclipse.emf.ecore.EClass definition)
protected static Stereotype getStereotype(org.eclipse.emf.ecore.EClass definition, org.eclipse.emf.ecore.EObject stereotypeApplication)
public static Stereotype getStereotype(org.eclipse.emf.ecore.EObject stereotypeApplication)
stereotypeApplication
- The object.
public static <T extends org.eclipse.emf.ecore.EObject> T getStereotypeApplication(Element element, java.lang.Class<T> clazz)
element
- The element to which the stereotype is applied.clazz
- The class of the stereotype application to retrieve.
protected static Element getNearestBaseElement(org.eclipse.emf.ecore.EObject eObject, boolean resolve)
protected static Element getBaseElement(org.eclipse.emf.ecore.EClass definition, org.eclipse.emf.ecore.EObject stereotypeApplication)
public static Element getBaseElement(org.eclipse.emf.ecore.EObject stereotypeApplication)
stereotypeApplication
- The stereotype application.
public static void setBaseElement(org.eclipse.emf.ecore.EObject stereotypeApplication, Element element)
stereotypeApplication
- The stereotype application.element
- The new base element.protected static org.eclipse.emf.ecore.EObject applyStereotype(Element element, org.eclipse.emf.ecore.EClass definition)
public static org.eclipse.emf.ecore.EObject safeApplyStereotype(Element element, Stereotype stereotype)
element
- The element to which to apply the stereotype.stereotype
- The stereotype to apply.
protected static Property getTagDefinition(Stereotype stereotype, java.lang.String propertyName)
public static java.lang.Object getTaggedValue(Element element, java.lang.String qualifiedStereotypeName, java.lang.String propertyName)
public static boolean setTaggedValue(Element element, Stereotype stereotype, java.lang.String propertyName, java.lang.Object value)
element
- The element to which the stereotype is applied.stereotype
- The stereotype.propertyName
- The name of the stereotype property.value
- The new value.
true
if the value was successfully set;
false
otherwise.protected static Element getOwningElement(Element element, org.eclipse.emf.ecore.EClass eClass, boolean resolve)
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 org.eclipse.emf.common.util.EList<org.eclipse.emf.ecore.ETypeParameter> getETypeParameters(org.eclipse.emf.ecore.EObject eObject)
protected static org.eclipse.emf.common.util.EList<Feature> getRedefinedFeatures(Feature feature)
protected static boolean isRedefinitionValid(Feature redefiningFeature, Feature redefinedFeature)
protected static <F extends Feature> java.util.Collection<F> findValidRedefinitions(F redefiningFeature, java.lang.String name)
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 boolean isSubsetValid(Property subsettingProperty, Property subsettedProperty)
protected static java.util.Collection<Property> findValidSubsets(Property subsettingProperty, java.lang.String name)
protected static java.util.Collection<Property> findValidSubsets(java.util.Collection<Property> subsettedProperties, Property subsettingProperty, java.lang.String name, Classifier subsettingContext)
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)
OPTION__IGNORE
.
package_
- The receiving package.options
- The options to use.
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)
OPTION__REPORT
.
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.
public static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> expand(TemplateableElement templateableElement, java.util.Map<java.lang.String,java.lang.String> options)
OPTION__IGNORE
.
templateableElement
- The templateable element to expand by applying its bound
templatesoptions
- The options to use.
public static java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> expand(TemplateableElement boundElement, 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)
OPTION__REPORT
.
boundElement
- The bound element to expand by applying its templatesoptions
- The options to use.diagnostics
- The chain of diagnostics to which problems are to be appended.context
- The cache of context-specific information.
public static java.util.Collection<org.eclipse.emf.ecore.EPackage> convertToEcore(Package package_, java.util.Map<java.lang.String,java.lang.String> options)
OPTION__IGNORE
.
package_
- The package to convert.options
- The options to use.
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)
OPTION__REPORT
.
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.
public static java.util.Collection<org.eclipse.emf.ecore.EPackage> convertToEcore(Profile profile, java.util.Map<java.lang.String,java.lang.String> options)
OPTION__IGNORE
.
profile
- The profile to convert.options
- The options to use.
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)
OPTION__REPORT
.
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.
public static java.util.Collection<Package> convertFromEcore(org.eclipse.emf.ecore.EPackage ePackage, java.util.Map<java.lang.String,java.lang.String> options)
ePackage
- The Ecore package to convert.options
- The options to use.
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)
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.
public static org.eclipse.emf.ecore.resource.ResourceSet init(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
resourceSet
- The resource set whose registries to initialize.
public static boolean isBoolean(Type type)
type
- The type in question.
true
if the type is a Boolean primitive type;
false
otherwise.public static boolean isInteger(Type type)
type
- The type in question.
true
if the type is an integer primitive type;
false
otherwise.public static boolean isReal(Type type)
type
- The type in question.
true
if the type is a real primitive type;
false
otherwise.public static boolean isString(Type type)
type
- The type in question.
true
if the type is a string primitive type;
false
otherwise.public static boolean isUnlimitedNatural(Type type)
type
- The type in question.
true
if the type is an unlimited natural primitive
type; false
otherwise.public static java.lang.String getOCLBody(java.lang.String body)
body
- A UML body expression.
|
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 |