org.eclipse.ocl.examples.pivot.uml
Class UML2Pivot
java.lang.Object
org.eclipse.ocl.examples.pivot.utilities.AbstractConversion
org.eclipse.ocl.examples.pivot.ecore.AbstractEcore2Pivot
org.eclipse.ocl.examples.pivot.uml.UML2Pivot
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal, MetaModelManagedAdapter, MetaModelManagerListener, PivotConstants, External2Pivot
- Direct Known Subclasses:
- UML2Pivot.Inner, UML2Pivot.Outer
public abstract class UML2Pivot
- extends AbstractEcore2Pivot
Nested Class Summary |
static class |
UML2Pivot.Inner
A UML2Pivot$Inner adapts an unconverted UML resource that has been imported during
the conversion of some other UML resource. |
static class |
UML2Pivot.Outer
A UML2Pivot$Outer adapts an unconverted UML resource and hosts the additional conversions
necessary for imported UML resources. |
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Fields inherited from interface org.eclipse.ocl.examples.pivot.PivotConstants |
ACCUMULATOR_SEPARATOR, ANNOTATION_QUOTE, BINDINGS_PREFIX, COLLECTION_NAVIGATION_OPERATOR, DOCUMENTATION_ANNOTATION_KEY, DOCUMENTATION_ANNOTATION_SOURCE, GEN_MODEL_URI, GREATER_THAN_OPERATOR, GREATER_THAN_OR_EQUAL_OPERATOR, IMPORT_ANNOTATION_SOURCE, ITERATOR_SEPARATOR, LESS_THAN_OPERATOR, LESS_THAN_OR_EQUAL_OPERATOR, LIBRARY_MONIKER_PREFIX, MESSAGE_ANNOTATION_DETAIL_SUFFIX, MONIKER_EXP_CHILD_PREFIX, MONIKER_IF_EXP, MONIKER_INVALID_LITERAL_EXP, MONIKER_LET_EXP, MONIKER_NULL_LITERAL_EXP, MONIKER_OPERATOR_SEPARATOR, MONIKER_OVERFLOW_LIMIT, MONIKER_PART_SEPARATOR, MONIKER_ROOT, MONIKER_ROOT_EXP, MONIKER_SCOPE_SEPARATOR, MONIKER_STRING_LITERAL_EXP, MONIKER_TUPLE_LITERAL_EXP, MONIKER_UNLIMITED_NATURAL_LITERAL_EXP, NULL_MARKER, NULL_ROOT, OBJECT_NAVIGATION_OPERATOR, OCL_LANGUAGE, OCL_NAME, ORPHANAGE_NAME, ORPHANAGE_PREFIX, ORPHANAGE_URI, OVERFLOW_MARKER, PARAMETER_PREFIX, PARAMETER_SEPARATOR, PARAMETER_SUFFIX, PIVOT_ECORE, PLUGIN_ID, PRECEDENCE_PREFIX, PRIMITIVE_TYPES_URI_PREFIX, roleNames, SYSML_ANNOTATION_SOURCE, TEMPLATE_BINDING_PREFIX, TEMPLATE_BINDING_SEPARATOR, TEMPLATE_BINDING_SUFFIX, TEMPLATE_PARAMETER_PREFIX, TEMPLATE_SIGNATURE_PREFIX, TEMPLATE_SIGNATURE_SEPARATOR, TEMPLATE_SIGNATURE_SUFFIX, TUPLE_SIGNATURE_PART_SEPARATOR, TUPLE_SIGNATURE_PREFIX, TUPLE_SIGNATURE_SUFFIX, TUPLE_SIGNATURE_TYPE_SEPARATOR, UNKNOWN_TYPE_TEXT, UNRESOLVED_PROXY_MARKER, WILDCARD_INDICATOR, WILDCARD_NAME |
Constructor Summary |
protected |
UML2Pivot(org.eclipse.emf.ecore.resource.Resource umlResource,
MetaModelManager metaModelManager)
|
Method Summary |
abstract void |
addCreated(org.eclipse.emf.ecore.EObject umlElement,
Element pivotElement)
|
void |
addImportedPackages(java.util.List<? extends org.eclipse.uml2.uml.Package> importedPackages)
|
abstract void |
addImportedResource(org.eclipse.emf.ecore.resource.Resource importedResource)
|
abstract void |
addProperties(java.util.List<org.eclipse.uml2.uml.Property> properties,
AbstractConversion.Predicate<org.eclipse.uml2.uml.Property> predicate)
|
abstract void |
addStereotypeApplication(org.eclipse.emf.ecore.EObject stereotypeApplication)
|
protected org.eclipse.emf.common.util.URI |
createPivotURI()
|
void |
dispose()
|
abstract void |
error(java.lang.String message)
|
static UML2Pivot |
findAdapter(org.eclipse.emf.ecore.resource.Resource resource,
MetaModelManager metaModelManager)
|
static UML2Pivot |
getAdapter(org.eclipse.emf.ecore.resource.Resource resource,
MetaModelManager metaModelManager)
|
abstract
|
getCreated(java.lang.Class<T> requiredClass,
org.eclipse.emf.ecore.EObject eObject)
|
abstract UML2PivotDeclarationSwitch |
getDeclarationPass()
|
abstract Root |
getPivotRoot()
|
abstract Type |
getPivotType(org.eclipse.emf.ecore.EObject eObject)
|
org.eclipse.emf.ecore.resource.Resource |
getResource()
|
abstract UML2Pivot.Outer |
getRoot()
|
org.eclipse.emf.common.notify.Notifier |
getTarget()
|
org.eclipse.emf.common.util.URI |
getURI()
|
static Element |
importFromUML(MetaModelManager metaModelManager,
java.lang.String alias,
org.eclipse.emf.ecore.EObject eObject)
Convert a UML object to a pivot element. |
static Root |
importFromUML(MetaModelManager metaModelManager,
java.lang.String alias,
org.eclipse.emf.ecore.resource.Resource umlResource)
Convert a UML resource to a Pivot Model. |
static java.lang.String |
initialize(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Initialize registries to support OCL and UML usage. |
static java.lang.String |
initialize(StandaloneProjectMap projectMap)
|
protected Root |
installDeclarations(org.eclipse.emf.ecore.resource.Resource pivotResource)
|
boolean |
isAdapterFor(MetaModelManager metaModelManager)
|
boolean |
isAdapterForType(java.lang.Object type)
|
protected boolean |
isPivot(java.util.Collection<org.eclipse.emf.ecore.EObject> umlContents)
|
static boolean |
isUML(org.eclipse.emf.ecore.resource.Resource resource)
|
void |
metaModelManagerDisposed(MetaModelManager metaModelManager)
Respond to disposal of the MetaModelManager by eliminating all further usage. |
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification)
|
protected
|
refreshElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
org.eclipse.emf.ecore.EObject umlElement)
|
protected
|
refreshNamedElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
org.eclipse.uml2.uml.NamedElement umlNamedElement)
|
protected Type |
resolveType(org.eclipse.uml2.uml.Type umlType)
|
protected Type |
resolveTypeParameter(org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected Type |
resolveWildcardType(org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected void |
setOriginalMapping(Element pivotElement,
org.eclipse.emf.ecore.EObject umlElement)
|
void |
setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
|
void |
setUMLURI(org.eclipse.emf.common.util.URI umlURI)
|
void |
unsetTarget(org.eclipse.emf.common.notify.Notifier oldTarget)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STEREOTYPE_BASE_PREFIX
@NonNull
public static final java.lang.String STEREOTYPE_BASE_PREFIX
- See Also:
- Constant Field Values
STEREOTYPE_EXTENSION_PREFIX
@NonNull
public static final java.lang.String STEREOTYPE_EXTENSION_PREFIX
- See Also:
- Constant Field Values
FACTORY
public static MetaModelManager.Factory FACTORY
umlResource
@NonNull
protected final org.eclipse.emf.ecore.resource.Resource umlResource
pivotRoot
protected Root pivotRoot
UML2Pivot
protected UML2Pivot(@NonNull
org.eclipse.emf.ecore.resource.Resource umlResource,
@NonNull
MetaModelManager metaModelManager)
findAdapter
@Nullable
public static UML2Pivot findAdapter(@NonNull
org.eclipse.emf.ecore.resource.Resource resource,
@NonNull
MetaModelManager metaModelManager)
getAdapter
@NonNull
public static UML2Pivot getAdapter(@NonNull
org.eclipse.emf.ecore.resource.Resource resource,
@Nullable
MetaModelManager metaModelManager)
importFromUML
public static Root importFromUML(@NonNull
MetaModelManager metaModelManager,
java.lang.String alias,
org.eclipse.emf.ecore.resource.Resource umlResource)
throws ParserException
- Convert a UML resource to a Pivot Model.
- Parameters:
alias
- umlResource
- the UML resource
- Returns:
- the Pivot root package
- Throws:
ParserException
importFromUML
public static Element importFromUML(@NonNull
MetaModelManager metaModelManager,
java.lang.String alias,
org.eclipse.emf.ecore.EObject eObject)
throws ParserException
- Convert a UML object to a pivot element.
- Parameters:
eObject
- the UML object
- Returns:
- the pivot element
- Throws:
ParserException
initialize
public static java.lang.String initialize(@NonNull
org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
- Initialize registries to support OCL and UML usage. This method is
intended for initialization of standalone behaviors for which plugin extension
registrations have not been applied.
A null resourceSet may be provided to initialize the global package registry
and global URI mapping registry.
A non-null resourceSet may be provided to identify specific package
and global URI mapping registries.
This method is used to configure the ResourceSet used to load the OCL Standard Library.
- Parameters:
resourceSet
- to be initialized or null for global initialization
- Returns:
- a failure reason, null if successful
initialize
public static java.lang.String initialize(@NonNull
StandaloneProjectMap projectMap)
isUML
public static boolean isUML(@NonNull
org.eclipse.emf.ecore.resource.Resource resource)
addCreated
public abstract void addCreated(@NonNull
org.eclipse.emf.ecore.EObject umlElement,
@NonNull
Element pivotElement)
addImportedPackages
public void addImportedPackages(@NonNull
java.util.List<? extends org.eclipse.uml2.uml.Package> importedPackages)
addImportedResource
public abstract void addImportedResource(@NonNull
org.eclipse.emf.ecore.resource.Resource importedResource)
addProperties
public abstract void addProperties(@NonNull
java.util.List<org.eclipse.uml2.uml.Property> properties,
@Nullable
AbstractConversion.Predicate<org.eclipse.uml2.uml.Property> predicate)
addStereotypeApplication
public abstract void addStereotypeApplication(@NonNull
org.eclipse.emf.ecore.EObject stereotypeApplication)
createPivotURI
@NonNull
protected org.eclipse.emf.common.util.URI createPivotURI()
dispose
public void dispose()
error
public abstract void error(@NonNull
java.lang.String message)
- Specified by:
error
in class AbstractEcore2Pivot
getCreated
@Nullable
public abstract <T extends Element> T getCreated(@NonNull
java.lang.Class<T> requiredClass,
@NonNull
org.eclipse.emf.ecore.EObject eObject)
getDeclarationPass
@NonNull
public abstract UML2PivotDeclarationSwitch getDeclarationPass()
getPivotRoot
@NonNull
public abstract Root getPivotRoot()
throws ParserException
- Throws:
ParserException
getPivotType
@Nullable
public abstract Type getPivotType(@NonNull
org.eclipse.emf.ecore.EObject eObject)
getResource
@NonNull
public org.eclipse.emf.ecore.resource.Resource getResource()
getRoot
@NonNull
public abstract UML2Pivot.Outer getRoot()
getTarget
@NonNull
public org.eclipse.emf.common.notify.Notifier getTarget()
getURI
@NonNull
public org.eclipse.emf.common.util.URI getURI()
installDeclarations
@NonNull
protected Root installDeclarations(@NonNull
org.eclipse.emf.ecore.resource.Resource pivotResource)
isAdapterFor
public boolean isAdapterFor(@NonNull
MetaModelManager metaModelManager)
isAdapterForType
public boolean isAdapterForType(java.lang.Object type)
isPivot
protected boolean isPivot(@NonNull
java.util.Collection<org.eclipse.emf.ecore.EObject> umlContents)
metaModelManagerDisposed
public void metaModelManagerDisposed(@NonNull
MetaModelManager metaModelManager)
- Description copied from interface:
MetaModelManagerListener
- Respond to disposal of the MetaModelManager by eliminating all further usage.
notifyChanged
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
refreshElement
protected <T extends Element> T refreshElement(@NonNull
java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
@NonNull
org.eclipse.emf.ecore.EObject umlElement)
refreshNamedElement
@NonNull
protected <T extends NamedElement> T refreshNamedElement(@NonNull
java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
@NonNull
org.eclipse.uml2.uml.NamedElement umlNamedElement)
resolveType
@Nullable
protected Type resolveType(@NonNull
org.eclipse.uml2.uml.Type umlType)
resolveTypeParameter
@Nullable
protected Type resolveTypeParameter(@NonNull
org.eclipse.emf.ecore.EGenericType eGenericType)
resolveWildcardType
@Nullable
protected Type resolveWildcardType(@NonNull
org.eclipse.emf.ecore.EGenericType eGenericType)
setOriginalMapping
protected void setOriginalMapping(@NonNull
Element pivotElement,
@NonNull
org.eclipse.emf.ecore.EObject umlElement)
setTarget
public void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
setUMLURI
public void setUMLURI(org.eclipse.emf.common.util.URI umlURI)
unsetTarget
public void unsetTarget(org.eclipse.emf.common.notify.Notifier oldTarget)