org.eclipse.ocl.examples.pivot.ecore
Class Ecore2Pivot
java.lang.Object
org.eclipse.emf.ecore.util.EcoreUtil
org.eclipse.ocl.examples.pivot.utilities.AbstractConversion
org.eclipse.ocl.examples.pivot.ecore.Ecore2Pivot
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Adapter, External2Pivot, PivotConstants
- Direct Known Subclasses:
- UML2Ecore2Pivot
public class Ecore2Pivot
- extends AbstractConversion
- implements External2Pivot, PivotConstants
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.util.EcoreUtil |
org.eclipse.emf.ecore.util.EcoreUtil.AbstractFilteredSettingsIterator<E>, org.eclipse.emf.ecore.util.EcoreUtil.ContentTreeIterator<E>, org.eclipse.emf.ecore.util.EcoreUtil.Copier, org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.EGenericTypeConverter, org.eclipse.emf.ecore.util.EcoreUtil.EqualityHelper, org.eclipse.emf.ecore.util.EcoreUtil.ExternalCrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.FilteredSettingsIterator, org.eclipse.emf.ecore.util.EcoreUtil.ProperContentIterator<E>, org.eclipse.emf.ecore.util.EcoreUtil.ProxyCrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.UnresolvedProxyCrossReferencer, org.eclipse.emf.ecore.util.EcoreUtil.UsageCrossReferencer |
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Fields inherited from class org.eclipse.emf.ecore.util.EcoreUtil |
GEN_MODEL_PACKAGE_NS_URI, GET, IS_SET, SET, UNSET |
Fields inherited from interface org.eclipse.ocl.examples.pivot.utilities.PivotConstants |
ACCUMULATOR_SEPARATOR, ANNOTATION_QUOTE, BINDINGS_PREFIX, COLLECTION_NAVIGATION_OPERATOR, GREATER_THAN_OPERATOR, GREATER_THAN_OR_EQUAL_OPERATOR, ITERATOR_SEPARATOR, LESS_THAN_OPERATOR, LESS_THAN_OR_EQUAL_OPERATOR, LIBRARY_MONIKER_PREFIX, 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_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, OCL_SELF_NAME, ORPHANAGE_NAME, ORPHANAGE_PREFIX, ORPHANAGE_URI, OVERFLOW_MARKER, PARAMETER_PREFIX, PARAMETER_SEPARATOR, PARAMETER_SUFFIX, PRECEDENCE_PREFIX, 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_TYPE_TEXT, UNRESOLVED_PROXY_MARKER, WILDCARD_INDICATOR, WILDCARD_NAME |
Constructor Summary |
Ecore2Pivot(org.eclipse.emf.ecore.resource.Resource ecoreResource,
TypeManager typeManager)
|
Method Summary |
void |
addCreated(org.eclipse.emf.ecore.EObject eObject,
Element pivotElement)
|
void |
addGenericType(org.eclipse.emf.ecore.EGenericType eObject)
|
java.util.Map<java.lang.String,MonikeredElement> |
computeMoniker2PivotMap()
|
protected void |
error(java.lang.String message)
|
static Ecore2Pivot |
findAdapter(org.eclipse.emf.ecore.resource.Resource resource,
TypeManager typeManager)
|
static Ecore2Pivot |
getAdapter(org.eclipse.emf.ecore.resource.Resource resource,
TypeManager typeManager)
|
|
getCreated(java.lang.Class<T> requiredClass,
org.eclipse.emf.ecore.EObject eObject)
|
java.util.Map<org.eclipse.emf.ecore.EClassifier,Type> |
getEcore2PivotMap()
|
org.eclipse.emf.ecore.resource.Resource |
getEcoreResource()
|
|
getPivotOfEcore(java.lang.Class<T> requiredClass,
org.eclipse.emf.ecore.EObject eObject)
|
Package |
getPivotRoot()
|
Type |
getPivotType(org.eclipse.emf.ecore.EObject eObject)
|
org.eclipse.emf.ecore.resource.Resource |
getResource()
|
org.eclipse.emf.common.notify.Notifier |
getTarget()
|
TypeManager |
getTypeManager()
|
org.eclipse.emf.common.util.URI |
getURI()
|
static Element |
importFromEcore(TypeManager typeManager,
java.lang.String alias,
org.eclipse.emf.ecore.EObject eObject)
Convert an (annotated) Ecore object to a pivot element. |
static Package |
importFromEcore(TypeManager typeManager,
java.lang.String alias,
org.eclipse.emf.ecore.resource.Resource ecoreResource)
Convert an (annotated) Ecore resource to a Pivot Model. |
org.eclipse.emf.ecore.resource.Resource |
importObjects(java.util.Collection<org.eclipse.emf.ecore.EObject> ecoreContents,
org.eclipse.emf.common.util.URI ecoreURI)
|
void |
initializeEcore2PivotMap()
|
boolean |
isAdapterForType(java.lang.Object type)
|
static boolean |
isEcore(org.eclipse.emf.ecore.resource.Resource resource)
|
void |
notifyChanged(org.eclipse.emf.common.notify.Notification notification)
|
void |
queueReference(org.eclipse.emf.ecore.EModelElement eObject)
|
protected
|
refreshNamedElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
org.eclipse.emf.ecore.ENamedElement eNamedElement)
|
protected Type |
resolveDataType(org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected Type |
resolveGenericType(java.util.Map<java.lang.String,Type> resolvedSpecializations,
org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected Type |
resolveSimpleType(org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected Type |
resolveType(java.util.Map<java.lang.String,Type> resolvedSpecializations,
org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected Type |
resolveTypeParameter(org.eclipse.emf.ecore.EGenericType eGenericType)
|
protected Type |
resolveWildcardType(org.eclipse.emf.ecore.EGenericType eGenericType)
|
void |
setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
|
Methods inherited from class org.eclipse.emf.ecore.util.EcoreUtil |
computeDiagnostic, convertToString, copy, copyAll, create, createFromString, delete, delete, equals, filterDescendants, freeze, generateUUID, generateUUID, getAdapter, getAdapterFactory, getAllContents, getAllContents, getAllContents, getAllContents, getAllContents, getAllProperContents, getAllProperContents, getAllProperContents, getAllProperContents, getAnnotation, getConstraints, getDocumentation, getExistingAdapter, getID, getIdentification, getInvocationDelegateFactory, getInvocationDelegates, getObjectByType, getObjectsByType, getRegisteredAdapter, getRegisteredAdapter, getRootContainer, getRootContainer, getSettingDelegateFactory, getSettingDelegates, getURI, getValidationDelegates, indexOf, isAncestor, isAncestor, isAncestor, isAncestor, isInvariant, isSuppressedVisibility, isSuppressedVisibility, remove, remove, remove, replace, replace, replace, resolve, resolve, resolve, resolveAll, resolveAll, resolveAll, setAnnotation, setConstraints, setDocumentation, setEList, setEList, setID, setInvocationDelegates, setSettingDelegates, setSuppressedVisibility, setSuppressedVisibility, setValidationDelegates, toJavaInstanceTypeName, wrapperClassFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FACTORY
public static TypeManager.Factory FACTORY
typeManager
protected final TypeManager typeManager
ecoreResource
protected final org.eclipse.emf.ecore.resource.Resource ecoreResource
pivotRoot
protected Package pivotRoot
declarationPass
protected final Ecore2PivotDeclarationSwitch declarationPass
referencePass
protected final Ecore2PivotReferenceSwitch referencePass
Ecore2Pivot
public Ecore2Pivot(org.eclipse.emf.ecore.resource.Resource ecoreResource,
TypeManager typeManager)
findAdapter
public static Ecore2Pivot findAdapter(org.eclipse.emf.ecore.resource.Resource resource,
TypeManager typeManager)
getAdapter
public static Ecore2Pivot getAdapter(org.eclipse.emf.ecore.resource.Resource resource,
TypeManager typeManager)
importFromEcore
public static Package importFromEcore(TypeManager typeManager,
java.lang.String alias,
org.eclipse.emf.ecore.resource.Resource ecoreResource)
- Convert an (annotated) Ecore resource to a Pivot Model.
- Parameters:
alias
- ecoreResource
- the annotated Ecore resource
- Returns:
- the Pivot root package
isEcore
public static boolean isEcore(org.eclipse.emf.ecore.resource.Resource resource)
importFromEcore
public static Element importFromEcore(TypeManager typeManager,
java.lang.String alias,
org.eclipse.emf.ecore.EObject eObject)
- Convert an (annotated) Ecore object to a pivot element.
- Parameters:
eObject
- the annotated Ecore object
- Returns:
- the pivot element
addCreated
public void addCreated(org.eclipse.emf.ecore.EObject eObject,
Element pivotElement)
addGenericType
public void addGenericType(org.eclipse.emf.ecore.EGenericType eObject)
computeMoniker2PivotMap
public java.util.Map<java.lang.String,MonikeredElement> computeMoniker2PivotMap()
error
protected void error(java.lang.String message)
getCreated
public <T extends Element> T getCreated(java.lang.Class<T> requiredClass,
org.eclipse.emf.ecore.EObject eObject)
getEcore2PivotMap
public java.util.Map<org.eclipse.emf.ecore.EClassifier,Type> getEcore2PivotMap()
getEcoreResource
public org.eclipse.emf.ecore.resource.Resource getEcoreResource()
getPivotOfEcore
public <T extends Element> T getPivotOfEcore(java.lang.Class<T> requiredClass,
org.eclipse.emf.ecore.EObject eObject)
getPivotType
public Type getPivotType(org.eclipse.emf.ecore.EObject eObject)
getPivotRoot
public Package getPivotRoot()
getResource
public org.eclipse.emf.ecore.resource.Resource getResource()
- Specified by:
getResource
in interface External2Pivot
getTarget
public org.eclipse.emf.common.notify.Notifier getTarget()
- Specified by:
getTarget
in interface org.eclipse.emf.common.notify.Adapter
getTypeManager
public TypeManager getTypeManager()
getURI
public org.eclipse.emf.common.util.URI getURI()
- Specified by:
getURI
in interface External2Pivot
importObjects
public org.eclipse.emf.ecore.resource.Resource importObjects(java.util.Collection<org.eclipse.emf.ecore.EObject> ecoreContents,
org.eclipse.emf.common.util.URI ecoreURI)
initializeEcore2PivotMap
public void initializeEcore2PivotMap()
isAdapterForType
public boolean isAdapterForType(java.lang.Object type)
- Specified by:
isAdapterForType
in interface org.eclipse.emf.common.notify.Adapter
notifyChanged
public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
notifyChanged
in interface org.eclipse.emf.common.notify.Adapter
queueReference
public void queueReference(org.eclipse.emf.ecore.EModelElement eObject)
refreshNamedElement
protected <T extends NamedElement> T refreshNamedElement(java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EClass pivotEClass,
org.eclipse.emf.ecore.ENamedElement eNamedElement)
resolveDataType
protected Type resolveDataType(org.eclipse.emf.ecore.EGenericType eGenericType)
resolveGenericType
protected Type resolveGenericType(java.util.Map<java.lang.String,Type> resolvedSpecializations,
org.eclipse.emf.ecore.EGenericType eGenericType)
resolveSimpleType
protected Type resolveSimpleType(org.eclipse.emf.ecore.EGenericType eGenericType)
resolveType
protected Type resolveType(java.util.Map<java.lang.String,Type> resolvedSpecializations,
org.eclipse.emf.ecore.EGenericType eGenericType)
resolveTypeParameter
protected Type resolveTypeParameter(org.eclipse.emf.ecore.EGenericType eGenericType)
resolveWildcardType
protected Type resolveWildcardType(org.eclipse.emf.ecore.EGenericType eGenericType)
setTarget
public void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
- Specified by:
setTarget
in interface org.eclipse.emf.common.notify.Adapter