public abstract class UML2AS extends AbstractExternal2AS
Modifier and Type | Class and Description |
---|---|
static class |
UML2AS.Inner
A UML2AS$Inner adapts an unconverted UML resource that has been imported during
the conversion of some other UML resource.
|
static class |
UML2AS.Outer
A UML2AS$Outer adapts an unconverted UML resource and hosts the additional conversions
necessary for imported UML resources.
|
AbstractConversion.Predicate<T extends org.eclipse.emf.ecore.EObject>
Modifier and Type | Field and Description |
---|---|
static TracingOption |
ADD_ELEMENT_EXTENSION |
static TracingOption |
ADD_IMPORTED_RESOURCE |
static TracingOption |
ADD_PROFILE_APPLICATION |
static TracingOption |
ADD_STEREOTYPE_APPLICATION |
static TracingOption |
ADD_TYPE_EXTENSION |
static TracingOption |
APPLICABLE_STEREOTYPES |
static TracingOption |
CONVERT_RESOURCE |
protected static java.lang.String |
OCLforUML |
protected static java.lang.String |
OCLforUML_COLLECTION |
protected static java.lang.String |
OCLforUML_COLLECTION_IS_NULL_FREE_NAME |
protected static java.lang.String |
OCLforUML_COLLECTIONS |
protected static java.lang.String |
OCLforUML_COLLECTIONS_IS_NULL_FREE_NAME |
protected Model |
pivotModel |
static java.lang.String |
STEREOTYPE_BASE_PREFIX |
static java.lang.String |
STEREOTYPE_EXTENSION_PREFIX |
static TracingOption |
TYPE_EXTENSIONS |
protected org.eclipse.emf.ecore.resource.Resource |
umlResource |
completeEnvironment, environmentFactory, metamodelManager, standardLibrary
ACCUMULATOR_SEPARATOR, ANNOTATED_IMPLICIT_OPPOSITE_LOWER_VALUE, ANNOTATED_IMPLICIT_OPPOSITE_ORDERED, ANNOTATED_IMPLICIT_OPPOSITE_UNIQUE, ANNOTATED_IMPLICIT_OPPOSITE_UPPER_VALUE, ANNOTATION_QUOTE, BINDINGS_PREFIX, BODY_EXPRESSION_ROLE, DEFAULT_EXPRESSION_ROLE, DEFAULT_IMPLICIT_OPPOSITE_LOWER_VALUE, DEFAULT_IMPLICIT_OPPOSITE_ORDERED, DEFAULT_IMPLICIT_OPPOSITE_UNIQUE, DEFAULT_IMPLICIT_OPPOSITE_UPPER_VALUE, DOCUMENTATION_ANNOTATION_KEY, DOCUMENTATION_ANNOTATION_SOURCE, DUPLICATES_ANNOTATION_SOURCE, GEN_MODEL_URI, ITERATOR_SEPARATOR, 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, OLD_ORPHANAGE_URI, OPERATION_ANNOTATION_SOURCE, OPERATION_IS_TRANSIENT, OVERFLOW_MARKER, OWNED_CONSTRAINT_ROLE, PARAMETER_PREFIX, PARAMETER_SEPARATOR, PARAMETER_SUFFIX, PIVOT_ECORE, PLUGIN_ID, POSTCONDITION_ROLE, PRECEDENCE_PREFIX, PRECONDITION_ROLE, REDEFINES_ANNOTATION_SOURCE, roleNames, 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_ROLE, UNKNOWN_TYPE_TEXT, UNRESOLVED_PROXY_MARKER, WILDCARD_INDICATOR, WILDCARD_NAME
Modifier | Constructor and Description |
---|---|
protected |
UML2AS(org.eclipse.emf.ecore.resource.Resource umlResource,
EnvironmentFactoryInternal environmentFactory) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addCreated(org.eclipse.emf.ecore.EObject umlElement,
Element pivotElement) |
void |
addImportedPackage(org.eclipse.uml2.uml.Package importedPackage) |
void |
addImportedPackages(java.util.List<? extends org.eclipse.uml2.uml.Package> importedPackages) |
abstract void |
addImportedResource(org.eclipse.emf.ecore.resource.Resource importedResource) |
abstract void |
addProfileApplication(ProfileApplication asProfileApplication) |
abstract void |
addProperty(Class asType,
Property asProperty) |
abstract void |
addStereotype(Stereotype asStereotype) |
abstract void |
addStereotypeApplication(org.eclipse.emf.ecore.EObject stereotypeApplication) |
abstract void |
addTypeExtension(StereotypeExtender asTypeExtension) |
protected Model |
basicGetPivotModel() |
void |
copyModelElement(Element pivotElement,
org.eclipse.uml2.uml.Element umlElement) |
void |
copyNamedElement(NamedElement pivotElement,
org.eclipse.uml2.uml.NamedElement umlNamedElement) |
protected org.eclipse.emf.common.util.URI |
createPivotURI() |
abstract void |
error(java.lang.String message) |
static UML2AS |
getAdapter(org.eclipse.emf.ecore.resource.Resource resource,
EnvironmentFactoryInternal environmentFactory) |
abstract Type |
getASType(org.eclipse.emf.ecore.EObject eObject) |
static java.lang.String |
getBody(org.eclipse.uml2.uml.OpaqueExpression opaqueExpression) |
abstract UML2ASDeclarationSwitch |
getDeclarationPass() |
org.eclipse.emf.ecore.resource.Resource |
getResource() |
abstract UML2AS.Outer |
getRoot() |
org.eclipse.emf.common.util.URI |
getURI() |
static Element |
importFromUML(EnvironmentFactoryInternal environmentFactory,
java.lang.String alias,
org.eclipse.emf.ecore.EObject eObject)
Convert a UML object to a pivot element.
|
static Model |
importFromUML(EnvironmentFactoryInternal environmentFactory,
java.lang.String alias,
org.eclipse.emf.ecore.resource.Resource umlResource)
Convert a UML resource to a Pivot Model.
|
static void |
initialize() |
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 Model |
installDeclarations(org.eclipse.emf.ecore.resource.Resource asResource) |
protected boolean |
isPivot(java.util.Collection<org.eclipse.emf.ecore.EObject> umlContents) |
static boolean |
isUML(org.eclipse.emf.ecore.resource.Resource resource) |
static UML2AS |
loadFromUML(ASResource umlASResource,
org.eclipse.emf.common.util.URI umlURI) |
abstract void |
queueUse(org.eclipse.emf.ecore.EObject eObject) |
protected <T extends Element> |
refreshElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
org.eclipse.emf.ecore.EObject umlElement) |
protected <T extends NamedElement> |
refreshNamedElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
org.eclipse.uml2.uml.NamedElement umlNamedElement) |
ExpressionInOCL |
refreshOpaqueExpression(org.eclipse.uml2.uml.OpaqueExpression umlExpression) |
abstract void |
resolveMultiplicity(TypedElement pivotElement,
org.eclipse.uml2.uml.TypedElement umlTypedElement) |
Stereotype |
resolveStereotype(org.eclipse.emf.ecore.EObject umlStereotypeApplication,
java.util.List<org.eclipse.uml2.uml.Element> umlStereotypedElements)
Return the UML Stereotype referenced by the UML stereotype application to some UML Stereotyped Elements.
|
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 |
setUMLURI(org.eclipse.emf.common.util.URI umlURI) |
java.lang.String |
toString() |
addGenericType, addMapping, cannotBeOptional, dispose, findAdapter, isInvariant, queueReference, refreshElement, refreshNamedElement
basicGet, getEnvironmentFactory, getEPackage, getMetamodelManager, getStandardLibrary, isId, refreshList, refreshSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getASModel, getCreated, getCreatedMap
@NonNull public static final TracingOption ADD_ELEMENT_EXTENSION
@NonNull public static final TracingOption ADD_IMPORTED_RESOURCE
@NonNull public static final TracingOption ADD_PROFILE_APPLICATION
@NonNull public static final TracingOption ADD_STEREOTYPE_APPLICATION
@NonNull public static final TracingOption ADD_TYPE_EXTENSION
@NonNull public static final TracingOption APPLICABLE_STEREOTYPES
@NonNull public static final TracingOption CONVERT_RESOURCE
@NonNull public static final TracingOption TYPE_EXTENSIONS
@NonNull protected static final java.lang.String OCLforUML
@NonNull protected static final java.lang.String OCLforUML_COLLECTION
@NonNull protected static final java.lang.String OCLforUML_COLLECTION_IS_NULL_FREE_NAME
@NonNull protected static final java.lang.String OCLforUML_COLLECTIONS
@NonNull protected static final java.lang.String OCLforUML_COLLECTIONS_IS_NULL_FREE_NAME
@NonNull public static final java.lang.String STEREOTYPE_BASE_PREFIX
@NonNull public static final java.lang.String STEREOTYPE_EXTENSION_PREFIX
@NonNull protected final org.eclipse.emf.ecore.resource.Resource umlResource
protected Model pivotModel
protected UML2AS(@NonNull org.eclipse.emf.ecore.resource.Resource umlResource, @NonNull EnvironmentFactoryInternal environmentFactory)
@NonNull public static UML2AS getAdapter(@NonNull org.eclipse.emf.ecore.resource.Resource resource, @NonNull EnvironmentFactoryInternal environmentFactory)
@Nullable public static java.lang.String getBody(@NonNull org.eclipse.uml2.uml.OpaqueExpression opaqueExpression)
public static Model importFromUML(@NonNull EnvironmentFactoryInternal environmentFactory, java.lang.String alias, org.eclipse.emf.ecore.resource.Resource umlResource) throws ParserException
alias
- umlResource
- the UML resourceParserException
public static Element importFromUML(@NonNull EnvironmentFactoryInternal environmentFactory, java.lang.String alias, org.eclipse.emf.ecore.EObject eObject) throws ParserException
eObject
- the UML objectParserException
public static void initialize()
public static java.lang.String initialize(@NonNull org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
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.
resourceSet
- to be initialized or null for global initializationpublic static java.lang.String initialize(@NonNull StandaloneProjectMap projectMap)
public static boolean isUML(@NonNull org.eclipse.emf.ecore.resource.Resource resource)
public static UML2AS loadFromUML(@NonNull ASResource umlASResource, @NonNull org.eclipse.emf.common.util.URI umlURI)
public abstract void addCreated(@NonNull org.eclipse.emf.ecore.EObject umlElement, @NonNull Element pivotElement)
public void addImportedPackage(org.eclipse.uml2.uml.Package importedPackage)
public void addImportedPackages(@NonNull java.util.List<? extends org.eclipse.uml2.uml.Package> importedPackages)
public abstract void addImportedResource(@NonNull org.eclipse.emf.ecore.resource.Resource importedResource)
public abstract void addProfileApplication(@NonNull ProfileApplication asProfileApplication)
public abstract void addStereotype(@NonNull Stereotype asStereotype)
public abstract void addStereotypeApplication(@NonNull org.eclipse.emf.ecore.EObject stereotypeApplication)
public abstract void addTypeExtension(@NonNull StereotypeExtender asTypeExtension)
protected Model basicGetPivotModel()
basicGetPivotModel
in class AbstractExternal2AS
public void copyModelElement(@NonNull Element pivotElement, org.eclipse.uml2.uml.Element umlElement)
public void copyNamedElement(@NonNull NamedElement pivotElement, org.eclipse.uml2.uml.NamedElement umlNamedElement)
@NonNull protected org.eclipse.emf.common.util.URI createPivotURI()
public abstract void error(@NonNull java.lang.String message)
error
in class AbstractExternal2AS
@Nullable public abstract Type getASType(@NonNull org.eclipse.emf.ecore.EObject eObject)
@NonNull public abstract UML2ASDeclarationSwitch getDeclarationPass()
@NonNull public org.eclipse.emf.ecore.resource.Resource getResource()
@NonNull public abstract UML2AS.Outer getRoot()
@NonNull public org.eclipse.emf.common.util.URI getURI()
@NonNull protected Model installDeclarations(@NonNull org.eclipse.emf.ecore.resource.Resource asResource)
protected boolean isPivot(@NonNull java.util.Collection<org.eclipse.emf.ecore.EObject> umlContents)
public abstract void queueUse(@NonNull org.eclipse.emf.ecore.EObject eObject)
@NonNull 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)
@NonNull protected <T extends NamedElement> T refreshNamedElement(@NonNull java.lang.Class<T> pivotClass, org.eclipse.emf.ecore.EClass pivotEClass, org.eclipse.uml2.uml.NamedElement umlNamedElement)
public ExpressionInOCL refreshOpaqueExpression(org.eclipse.uml2.uml.OpaqueExpression umlExpression)
public abstract void resolveMultiplicity(@NonNull TypedElement pivotElement, org.eclipse.uml2.uml.TypedElement umlTypedElement)
@Nullable public Stereotype resolveStereotype(@NonNull org.eclipse.emf.ecore.EObject umlStereotypeApplication, @NonNull java.util.List<org.eclipse.uml2.uml.Element> umlStereotypedElements)
Note that the reference in the UML Stereotype application is to a particular Ecore version of the Profile, rather than to the UML profile, so we have to locate the UML profile by URI and name.
@Nullable protected Type resolveType(org.eclipse.uml2.uml.Type umlType)
@Nullable protected Type resolveTypeParameter(@NonNull org.eclipse.emf.ecore.EGenericType eGenericType)
@Nullable protected Type resolveWildcardType(@NonNull org.eclipse.emf.ecore.EGenericType eGenericType)
protected void setOriginalMapping(@NonNull Element pivotElement, @NonNull org.eclipse.emf.ecore.EObject umlElement)
public void setUMLURI(org.eclipse.emf.common.util.URI umlURI)
public java.lang.String toString()
toString
in class java.lang.Object