org.eclipse.uml2.uml.resources.util
Class UMLResourcesUtil

java.lang.Object
  extended by org.eclipse.uml2.common.util.UML2Util
      extended by org.eclipse.uml2.uml.util.UMLUtil
          extended by org.eclipse.uml2.uml.resources.util.UMLResourcesUtil

public class UMLResourcesUtil
extends UMLUtil

Since:
4.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.uml2.uml.util.UMLUtil
UMLUtil.Ecore2UMLConverter, UMLUtil.PackageMerger, UMLUtil.Profile2EPackageConverter, UMLUtil.ProfileApplicationHelper, UMLUtil.QualifiedTextProvider, UMLUtil.StereotypeApplicationHelper, UMLUtil.TemplateExpander, UMLUtil.UML2EcoreConverter
 
Nested classes/interfaces inherited from class org.eclipse.uml2.common.util.UML2Util
UML2Util.Converter, UML2Util.EClassMatcher, UML2Util.EObjectMatcher, UML2Util.EStructuralFeatureMatcher
 
Field Summary
 
Fields inherited from class org.eclipse.uml2.uml.util.UMLUtil
ANNOTATION__DUPLICATES, ANNOTATION__REDEFINES, ANNOTATION__SUBSETS, ANNOTATION__UNION, ANNOTATION_DETAIL__BODY, ANNOTATION_DETAIL__DERIVATION, ANNOTATION_DETAIL__INITIAL, ANNOTATION_DETAIL__URI, EMF_GEN_MODEL_PACKAGE_NS_URI, ENUMERATION__CONTENT_KIND, ENUMERATION__FEATURE_KIND, ENUMERATION__VISIBILITY_KIND, ENUMERATION_LITERAL__ATTRIBUTE, ENUMERATION_LITERAL__ATTRIBUTE_WILDCARD, ENUMERATION_LITERAL__ELEMENT, ENUMERATION_LITERAL__ELEMENT_ONLY, ENUMERATION_LITERAL__ELEMENT_WILDCARD, ENUMERATION_LITERAL__EMPTY, ENUMERATION_LITERAL__GROUP, ENUMERATION_LITERAL__MIXED, ENUMERATION_LITERAL__NONE, ENUMERATION_LITERAL__READ_ONLY, ENUMERATION_LITERAL__READ_ONLY_UNSETTABLE, ENUMERATION_LITERAL__READ_WRITE, ENUMERATION_LITERAL__READ_WRITE_UNSETTABLE, ENUMERATION_LITERAL__SIMPLE, ENUMERATION_LITERAL__UNSPECIFIED, LANGUAGE__JAVA, LANGUAGE__OCL, OPTION__DISCARD, OPTION__IGNORE, OPTION__PROCESS, OPTION__REPORT, PROFILE__ECORE, STEREOTYPE__E_ATTRIBUTE, STEREOTYPE__E_CLASS, STEREOTYPE__E_DATA_TYPE, STEREOTYPE__E_ENUM, STEREOTYPE__E_ENUM_LITERAL, STEREOTYPE__E_GENERIC_TYPE, STEREOTYPE__E_OPERATION, STEREOTYPE__E_PACKAGE, STEREOTYPE__E_PARAMETER, STEREOTYPE__E_REFERENCE, STEREOTYPE__E_TYPE_PARAMETER, TAG_DEFINITION__ANNOTATIONS, TAG_DEFINITION__ATTRIBUTE_NAME, TAG_DEFINITION__BASE_PACKAGE, TAG_DEFINITION__BOUNDS, TAG_DEFINITION__CLASS_NAME, TAG_DEFINITION__DATA_TYPE_NAME, TAG_DEFINITION__ENUM_LITERAL_NAME, TAG_DEFINITION__ENUM_NAME, TAG_DEFINITION__INSTANCE_CLASS_NAME, TAG_DEFINITION__IS_ID, TAG_DEFINITION__IS_RESOLVE_PROXIES, TAG_DEFINITION__IS_TRANSIENT, TAG_DEFINITION__IS_UNSETTABLE, TAG_DEFINITION__IS_VOLATILE, TAG_DEFINITION__KEYS, TAG_DEFINITION__LITERAL, TAG_DEFINITION__LOWER_BOUND, TAG_DEFINITION__NS_PREFIX, TAG_DEFINITION__NS_URI, TAG_DEFINITION__OPERATION_NAME, TAG_DEFINITION__PACKAGE_NAME, TAG_DEFINITION__PARAMETER_NAME, TAG_DEFINITION__PREFIX, TAG_DEFINITION__REFERENCE_NAME, TAG_DEFINITION__UPPER_BOUND, TAG_DEFINITION__VISIBILITY, TAG_DEFINITION__XML_CONTENT_KIND, TAG_DEFINITION__XML_FEATURE_KIND, TAG_DEFINITION__XML_NAME, TAG_DEFINITION__XML_NAMESPACE, UML2_GEN_MODEL_PACKAGE_1_1_NS_URI, UML2_GEN_MODEL_PACKAGE_NS_URI, UML2_TYPES_PACKAGE_4_0_NS_URI, UML2_UML_PACKAGE_2_0_NS_URI, UML2_UML_PACKAGE_2_0_NS_URI_COMPATIBILITY, UML2_UML_PACKAGE_4_0_NS_URI, 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
UMLResourcesUtil()
           
 
Method Summary
static org.eclipse.emf.ecore.resource.ResourceSet init(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           Initializes the registries for the specified resource set (and/or the global registries) with the registrations needed to work with UML2 resources in stand-alone mode (i.e., without Eclipse).
static org.eclipse.emf.ecore.resource.ContentHandler.Registry initContentHandlerRegistry(org.eclipse.emf.ecore.resource.ContentHandler.Registry contentHandlerRegistry)
          Adds content-type handlers required for working with UML models to the specified registry.
static java.util.Map<java.lang.String,org.eclipse.emf.common.util.URI> initEPackageNsURIToProfileLocationMap(java.util.Map<java.lang.String,org.eclipse.emf.common.util.URI> ePackageNsURIToProfileLocationMap)
          Adds profile namespace URI mappings required for working with UML models to the specified map.
static void initGlobalRegistries()
          Adds registrations to EMF's and UML2's global registries that enable working with UML models.
static void initLocalRegistries(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Adds registrations to a resource set's local registries that enable working with UML models in that resource set.
static org.eclipse.emf.ecore.EPackage.Registry initPackageRegistry(org.eclipse.emf.ecore.EPackage.Registry packageRegistry)
          Adds packages required for working with UML models to the specified registry.
static org.eclipse.emf.ecore.resource.Resource.Factory.Registry initResourceFactoryRegistry(org.eclipse.emf.ecore.resource.Resource.Factory.Registry resourceFactoryRegistry)
          Adds resource factories required for working with UML models to the specified registry.
static java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> initURIConverterURIMap(java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> uriMap)
          Adds resource URI mappings required for working with UML models to the specified map.
 
Methods inherited from class org.eclipse.uml2.uml.util.UMLUtil
applyStereotype, convertFromEcore, convertFromEcore, convertToEcore, convertToEcore, convertToEcore, convertToEcore, expand, expand, findNamedElements, findNamedElements, findNamedElements, findNamedElements, findNamedElements, findNamedElements, findNamedElements, findValidRedefinitions, findValidRedefinitions, findValidSubsets, findValidSubsets, getBaseElement, getBaseElement, getEClassifier, getEClassifier, getEcoreName, getEPackage, getETypeParameters, getNamedElement, getNamedElement, getNearestBaseElement, getOCLBody, getOwnedAttributes, getOwnedOperations, getOwningElement, getProfile, getProfile, getQualifiedName, getQualifiedText, getRedefinedFeatures, getStereotype, getStereotype, getStereotype, getStereotypeApplication, getTagDefinition, getTaggedValue, isBoolean, isInteger, isReal, isRedefinitionValid, isString, isSubsetValid, isUnlimitedNatural, merge, merge, safeApplyStereotype, setBaseElement, setTaggedValue
 
Methods inherited from class org.eclipse.uml2.common.util.UML2Util
addConstraint, addDocumentation, addDocumentation, addInvocationDelegate, addSettingDelegate, addValidationDelegate, createEAnnotation, destroy, destroyAll, findENamedElements, findENamedElements, findEObject, findEObject, getAllContents, getCommonEType, getContainingEObject, getEAnnotation, getGreaterUpperBound, getInstanceCount, getInverseReferences, getLesserLowerBound, getMessageSubstitution, getMessageSubstitutions, getMessageSubstitutions, getMessageSubstitutions, getNonNavigableInverseReferences, getQualifiedName, getQualifiedText, getQualifiedText, getQualifiedTextSegment, getResourceBundle, getResourceBundle, getResourceBundleURIs, getResourceBundleURIs, getResourceSet, 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
 

Constructor Detail

UMLResourcesUtil

public UMLResourcesUtil()
Method Detail

initGlobalRegistries

public static void initGlobalRegistries()
Adds registrations to EMF's and UML2's global registries that enable working with UML models. To apply the same registrations only locally on a resource set (e.g., for isolation from other EMF-based code in the same class loader), use the initLocalRegistries(ResourceSet) method, instead.

Since:
5.0
See Also:
initLocalRegistries(ResourceSet)

initLocalRegistries

public static void initLocalRegistries(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Adds registrations to a resource set's local registries that enable working with UML models in that resource set.

Since:
5.0
See Also:
initPackageRegistry(org.eclipse.emf.ecore.EPackage.Registry), initResourceFactoryRegistry(org.eclipse.emf.ecore.resource.Resource.Factory.Registry), initContentHandlerRegistry(org.eclipse.emf.ecore.resource.ContentHandler.Registry), initURIConverterURIMap(Map), initEPackageNsURIToProfileLocationMap(Map)

init

public static org.eclipse.emf.ecore.resource.ResourceSet init(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)

Initializes the registries for the specified resource set (and/or the global registries) with the registrations needed to work with UML2 resources in stand-alone mode (i.e., without Eclipse).

Note that as of the 4.2 release, clients now have more fine-grained control of which registries (local or global) are initialized. Clients are encouraged to use these new APIs to ensure optimal behaviour and, where necessary, isolation from other code in the same class loader using the global registries.

Parameters:
resourceSet - The resource set whose registries to initialize, or null to perform only global registrations.
Returns:
The resource set (or null).
Since:
4.0
See Also:
initLocalRegistries(ResourceSet), initGlobalRegistries()

initPackageRegistry

public static org.eclipse.emf.ecore.EPackage.Registry initPackageRegistry(org.eclipse.emf.ecore.EPackage.Registry packageRegistry)
Adds packages required for working with UML models to the specified registry.

Parameters:
packageRegistry - a package registry, perhaps local to a resource set or perhaps the global registry
Returns:
the same packageRegistry
Since:
5.0

initResourceFactoryRegistry

public static org.eclipse.emf.ecore.resource.Resource.Factory.Registry initResourceFactoryRegistry(org.eclipse.emf.ecore.resource.Resource.Factory.Registry resourceFactoryRegistry)
Adds resource factories required for working with UML models to the specified registry.

Parameters:
resourceFactoryRegistry - a resource-factory registry, perhaps local to a resource set or perhaps the global registry
Returns:
the same resourceFactoryRegistry
Since:
5.0

initContentHandlerRegistry

public static org.eclipse.emf.ecore.resource.ContentHandler.Registry initContentHandlerRegistry(org.eclipse.emf.ecore.resource.ContentHandler.Registry contentHandlerRegistry)
Adds content-type handlers required for working with UML models to the specified registry.

Parameters:
contentHandlerRegistry - a content-type handler registry, perhaps local to a resource set or perhaps the global registry
Returns:
the same contentHandlerRegistry
Since:
5.0

initURIConverterURIMap

public static java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> initURIConverterURIMap(java.util.Map<org.eclipse.emf.common.util.URI,org.eclipse.emf.common.util.URI> uriMap)
Adds resource URI mappings required for working with UML models to the specified map. These include at least mappings for the UML2-provided model libraries, metamodels, and profiles.

Parameters:
uriMap - a URI map, perhaps local to a resource set or perhaps the global URI map
Returns:
the same uriMap
Since:
5.0

initEPackageNsURIToProfileLocationMap

public static java.util.Map<java.lang.String,org.eclipse.emf.common.util.URI> initEPackageNsURIToProfileLocationMap(java.util.Map<java.lang.String,org.eclipse.emf.common.util.URI> ePackageNsURIToProfileLocationMap)
Adds profile namespace URI mappings required for working with UML models to the specified map. These include at least mappings for the UML2-provided profiles.

Parameters:
ePackageNsURIToProfileLocationMap - a profile location map, perhaps local to a resource set or perhaps the global location map
Returns:
the same ePackageNsURIToProfileLocationMap
Since:
5.0

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.