org.eclipse.ocl.examples.pivot.manager
Class MetaModelManager

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.types.AbstractStandardLibrary
      extended by org.eclipse.ocl.examples.pivot.manager.PivotStandardLibrary
          extended by org.eclipse.ocl.examples.pivot.manager.MetaModelManager
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal, DomainStandardLibrary, MetaModelManageable
Direct Known Subclasses:
TypeManager

public class MetaModelManager
extends PivotStandardLibrary
implements org.eclipse.emf.common.notify.Adapter.Internal, MetaModelManageable


Nested Class Summary
 class MetaModelManager.CompleteClassPropertiesIterable
           
 class MetaModelManager.CompleteClassSuperClassesIterable
           
 class MetaModelManager.CompleteElementCommentsIterable
           
 class MetaModelManager.CompleteElementConstraintsIterable
           
 class MetaModelManager.CompletePackagePackagesIterable
           
 class MetaModelManager.CompletePackageTypesIterable
           
 class MetaModelManager.CompleteTypeOperationsIterable
           
static interface MetaModelManager.Factory
          An OrphanClient adapts an EObject with an eReference to an OrphanServer within the domina of a TypeCache.
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
protected  org.eclipse.emf.ecore.resource.impl.ResourceSetImpl externalResourceSet
           
protected  java.util.List<Library> pivotLibraries
          All Library packages imported into the current type managed domain.
protected  org.eclipse.emf.ecore.resource.Resource pivotLibraryResource
          The resource of the first of the pivotLibraries.
protected  Package pivotMetaModel
           
protected  org.eclipse.emf.ecore.resource.ResourceSet pivotResourceSet
           
 
Fields inherited from class org.eclipse.ocl.examples.pivot.manager.PivotStandardLibrary
DEFAULT_OCL_STDLIB_URI, defaultStandardLibraryURI
 
Constructor Summary
MetaModelManager()
           
MetaModelManager(org.eclipse.emf.ecore.resource.ResourceSet pivotResourceSet)
          Construct a MetaModelManager that will use pivotResourceSet to contain pivot copies of meta-models, and ProjectMap.getAdapter(ResourceSet) to assist in locating resources.
MetaModelManager(StandaloneProjectMap projectMap)
          Construct a MetaModelManager that will use projectMap to assist in locating resources.
 
Method Summary
 void addClassLoader(java.lang.ClassLoader classLoader)
           
 void addExternalResource(External2Pivot external2Pivot)
           
static void addFactory(MetaModelManager.Factory factory)
           
 Namespace addGlobalNamespace(java.lang.String name, Namespace namespace)
           
 boolean addGlobalTypes(java.util.Collection<Type> types)
           
 void addListener(MetaModelManagerListener listener)
           
 void addLockedElement(java.lang.Object lockedElement)
           
 void addOrphanClass(Type pivotElement)
           
 void addPackage(Package pivotPackage)
           
 int compareOperationMatches(Operation reference, java.util.Map<TemplateParameter,ParameterableElement> referenceBindings, Operation candidate, java.util.Map<TemplateParameter,ParameterableElement> candidateBindings)
          Return -ve if match1 is inferior to match2, +ve if match2 is inferior to match1, or zero if both matches are of equal validity.
 java.util.Collection<Package> computePivotRootPackages()
           
 boolean conformsTo(Type firstType, Type secondType)
          Deprecated. 
 boolean conformsTo(Type firstType, Type secondType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
protected  boolean conformsToClassifierType(ClassifierType firstType, ClassifierType secondType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
protected  boolean conformsToCollectionType(CollectionType firstType, CollectionType secondType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
 boolean conformsToCollectionType(DomainCollectionType firstCollectionType, DomainCollectionType secondCollectionType)
           
protected  boolean conformsToLambdaType(LambdaType actualType, LambdaType requiredType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
protected  boolean conformsToTupleType(TupleType actualType, TupleType requiredType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
protected  ImplementationManager createImplementationManager()
           
 InvalidLiteralExp createInvalidExpression()
           
protected  LambdaTypeManager createLambdaManager()
           
 Model createModel(java.lang.String string, java.lang.String nsURI)
           
protected  org.eclipse.emf.ecore.resource.Resource createOrphanage()
           
<T extends Package>
T
createPackage(java.lang.Class<T> pivotClass, org.eclipse.emf.ecore.EClass pivotEClass, java.lang.String name, java.lang.String nsURI)
           
protected  PackageManager createPackageManager()
           
protected  PrecedenceManager createPrecedenceManager()
           
 org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri, java.lang.String contentType)
           
protected  TupleTypeManager createTupleManager()
           
 UnspecifiedType createUnspecifiedType()
           
protected  ValueFactory createValueFactory()
           
 void dispose()
           
static MetaModelManager findAdapter(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 PackageTracker findPackageTracker(Package pivotPackage)
           
 TypeTracker findTypeTracker(Type pivotType)
           
static MetaModelManager getAdapter(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 java.lang.Iterable<Constraint> getAllConstraints(Type pivotType)
          Return all constraints applicable to a type and its superclasses.
protected  java.util.Set<Constraint> getAllConstraints(Type type, java.util.Set<Constraint> knownConstraints)
           
 java.lang.Iterable<Operation> getAllOperations(Operation pivotOperation)
           
 java.lang.Iterable<Package> getAllPackages()
           
 java.lang.Iterable<Package> getAllPackages(Package pkg, boolean loadPivotMetaModelFirst)
           
 java.lang.Iterable<Property> getAllProperties(Property pivotProperty)
           
 java.lang.Iterable<Type> getAllTypes(Type pivotType)
           
 CollectionType getBagType(DomainType elementType)
          Return the instance of the Bag metatype whose elements are of elementType.
 CollectionType getBagType(Type elementType)
           
 ClassifierType getClassifierType(DomainType instanceType)
          Return the instance of the Classifier metatype whose class is classType.
 ClassifierType getClassifierType(Type instanceType)
           
 CollectionType getCollectionType(boolean isOrdered, boolean isUnique)
           
 CollectionType getCollectionType(boolean isOrdered, boolean isUnique, Type elementType)
           
 CollectionType getCollectionType(DomainType genericType, DomainType elementType)
           
 Type getCollectionType(java.lang.String collectionTypeName, Type elementType)
           
 java.util.List<Type> getCommonClasses(Type leftClass, Type rightClass)
           
 Type getCommonType(Type leftType, Type rightType, java.util.Map<TemplateParameter,ParameterableElement> templateParameterSubstitutions)
           
 java.lang.String getDefaultStandardLibraryURI()
           
 org.eclipse.emf.ecore.resource.ResourceSet getExternalResourceSet()
           
 java.util.Set<java.util.Map.Entry<java.lang.String,Namespace>> getGlobalNamespaces()
           
 java.lang.Iterable<Type> getGlobalTypes()
           
 LibraryFeature getImplementation(Feature feature)
           
 LibraryFeature getImplementation(Operation operation)
           
 LibraryFeature getImplementation(Property property)
           
 ImplementationManager getImplementationManager()
           
 Precedence getInfixPrecedence(java.lang.String operatorName)
           
 ReflectiveType getInheritance(DomainType type)
          Return the Inheritance dispatch table for a given type.
 LambdaTypeManager getLambdaManager()
           
 LambdaType getLambdaType(java.lang.String typeName, Type contextType, java.util.List<? extends Type> parameterTypes, Type resultType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
 java.util.List<Library> getLibraries()
           
 org.eclipse.emf.ecore.resource.Resource getLibraryResource()
           
 Type getLibraryType(java.lang.String string, java.util.List<? extends ParameterableElement> templateArguments)
           
<T extends Type>
T
getLibraryType(T libraryType, java.util.List<? extends ParameterableElement> templateArguments)
           
 java.lang.Iterable<Type> getLocalClasses(Package pkg)
           
 java.lang.Iterable<Comment> getLocalComments(Operation operation)
           
 java.lang.Iterable<Comment> getLocalComments(Property property)
           
 java.lang.Iterable<Comment> getLocalComments(Type type)
           
 java.lang.Iterable<Constraint> getLocalConstraints(Operation operation)
           
 java.lang.Iterable<Constraint> getLocalConstraints(Property property)
           
 java.lang.Iterable<Constraint> getLocalConstraints(Type type)
           
 java.lang.Iterable<Operation> getLocalOperations(Type type, java.lang.Boolean selectStatic)
           
 java.lang.Iterable<Package> getLocalPackages(Package pkg)
           
 java.lang.Iterable<Property> getLocalProperties(Type type, java.lang.Boolean selectStatic)
           
 org.eclipse.emf.ecore.EObject getLockingObject()
           
 MetaModelManager getMetaModelManager()
           
 DomainType getMetaType(DomainType instanceType)
          Returns the meta-type of a given type.
 DomainType getOclType(java.lang.String typeName)
           
 CollectionType getOrderedSetType(DomainType elementType)
          Return the instance of the OrderedSet metatype whose elements are of elementType.
 CollectionType getOrderedSetType(Type elementType)
           
 PackageManager getPackageManager()
           
 PackageTracker getPackageTracker(Package pivotPackage)
           
 Package getPivotMetaModel()
           
<T extends NamedElement>
T
getPivotOfEcore(java.lang.Class<T> pivotClass, org.eclipse.emf.ecore.EObject eObject)
           
 org.eclipse.emf.ecore.resource.ResourceSet getPivotResourceSet()
           
 Type getPivotType(java.lang.String className)
          Return the pivot model class for className with the Pivot Model.
protected  PrecedenceManager getPrecedenceManager()
           
 java.lang.Iterable<? extends Nameable> getPrecedences(Package pivotPackage)
           
 Precedence getPrefixPrecedence(java.lang.String operatorName)
           
<T extends org.eclipse.emf.ecore.EObject>
T
getPrimaryElement(T element)
           
 Operation getPrimaryOperation(Operation pivotOperation)
           
 Package getPrimaryPackage(Package pivotPackage)
           
 Package getPrimaryPackage(Package parentPackage, java.lang.String subPackageName)
          Lookup a primary sub-package.
 Package getPrimaryPackage(java.lang.String nsURI, java.lang.String... subPackagePath)
          Lookup a primary package by its URI and optionally a sub-package path.
 Property getPrimaryProperty(Property pivotProperty)
           
 Type getPrimaryType(Package parentPackage, java.lang.String typeName)
          Lookup a primary type.
 Type getPrimaryType(java.lang.String nsURI, java.lang.String path, java.lang.String... extraPath)
           
 Type getPrimaryType(Type pivotType)
           
 org.eclipse.emf.common.util.URI getResourceIdentifier(java.lang.Object uniqueContext, java.lang.String subContext)
          Return the URI to be used for a concrete syntax resource for an expression associated with a uniqueContext.
 CollectionType getSequenceType(DomainType elementType)
          Return the instance of the Sequence metatype whose elements are of elementType.
 CollectionType getSequenceType(Type elementType)
           
 CollectionType getSetType(DomainType elementType)
          Return the instance of the Set metatype whose elements are of elementType.
 CollectionType getSetType(Type elementType)
           
protected  Type getSpecializedLambdaType(LambdaType type, java.util.Map<TemplateParameter,ParameterableElement> usageBindings)
           
 Type getSpecializedType(Type type, java.util.Map<TemplateParameter,ParameterableElement> usageBindings)
           
protected
<T extends Type>
T
getSpecializedTypeServer(T unspecializedType, java.util.List<? extends ParameterableElement> templateArguments)
           
 java.lang.Iterable<Type> getSuperClasses(Type pivotType)
           
 org.eclipse.emf.ecore.resource.ResourceSet getTarget()
           
 TupleTypeManager getTupleManager()
           
 DomainTupleType getTupleType(java.util.List<? extends DomainTypedElement> parts)
          Obtains the instance of the TupleType metatype for the given list of parts, which must be alphabetical order by name.
 TupleType getTupleType(java.lang.String typeName, java.util.Collection<? extends DomainTypedElement> parts, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
 TupleType getTupleType(TupleType tupleType, java.util.Map<TemplateParameter,ParameterableElement> bindings)
           
 DomainType getType(DomainElement element)
           
 Type getType(DomainType dType)
           
 DomainType getType(org.eclipse.emf.ecore.EClassifier eClassifier)
           
 TypeServer getTypeServer(Type pivotType)
           
 TypeTracker getTypeTracker(Type pivotType)
           
 Type getTypeWithMultiplicity(TypedMultiplicityElement element)
           
 ValueFactory getValueFactory()
           
static void initializePivotResourceSet(org.eclipse.emf.ecore.resource.ResourceSet pivotResourceSet)
           
protected  void installLibrary(Library pivotLibrary)
           
 void installPackage(Package pivotPackage)
           
 void installPropertyDeclaration(Property thisProperty)
          Create implicit an opposite property if there is no explicit opposite.
 void installResource(org.eclipse.emf.ecore.resource.Resource pivotResource)
           
 boolean isAdapterFor(MetaModelManager metaModelManager)
           
 boolean isAdapterForType(java.lang.Object type)
           
 boolean isSuperClassOf(Type unspecializedFirstType, Type secondType)
           
 boolean isUnderspecified(ParameterableElement type)
          Retyurn true if this type involves an UnspecifiedType.
protected  boolean isUnspecialized(java.util.List<TemplateParameter> templateParameters, java.util.List<? extends ParameterableElement> templateArguments)
           
protected  void lazyLoadPivotMetaModel()
           
protected  org.eclipse.emf.ecore.resource.Resource loadDefaultLibrary(java.lang.String uri)
           
 void loadLibrary(org.eclipse.emf.ecore.resource.Resource pivotResource)
           
protected  void loadLibraryPackage(Package pivotPackage)
           
protected  void loadPivotMetaModel(Library pivotLibrary)
           
 Element loadResource(org.eclipse.emf.ecore.resource.Resource resource, java.lang.String fragmentURI)
           
 Element loadResource(org.eclipse.emf.common.util.URI uri, java.lang.String alias, org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
           
 LibraryFeature lookupImplementation(DomainOperation dynamicOperation)
           
 void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
           
 void removeExternalResource(External2Pivot external2Pivot)
           
 void removeListener(MetaModelManagerListener listener)
           
protected  void resolveAllOperations(java.util.Set<Operation> allOperations, Type forType, java.lang.Boolean selectStatic, java.lang.String operationName, java.util.List<Parameter> parameters, java.util.Set<Type> alreadyVisited)
          Return all matching operations.
 Operation resolveBaseOperation(Operation operation)
          Return the un-overloaded operation.
 java.util.Set<Operation> resolveLocalOperation(Type pivotClass, java.lang.String operationName, Type... pivotArguments)
           
 Operation resolveOperation(Type leftType, java.lang.String operationName, Type... rightTypes)
           
 java.util.Set<Operation> resolveOperations(Type pivotClass, java.lang.String operationName, Type... pivotArguments)
           
 void setDefaultStandardLibraryURI(java.lang.String defaultStandardLibraryURI)
           
 void setLibraryLoadInProgress(boolean libraryLoadInProgress)
           
 void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
           
 void unsetTarget(org.eclipse.emf.common.notify.Notifier oldTarget)
           
 
Methods inherited from class org.eclipse.ocl.examples.pivot.manager.PivotStandardLibrary
defineLibraryType, getAnyClassifierType, getBagType, getBooleanType, getClassClassifierType, getClassType, getCollectionClassifierType, getCollectionType, getEnumerationClassifierType, getEnumerationType, getIntegerType, getLibraryType, getOclAnyType, getOclComparableType, getOclElementType, getOclInvalidType, getOclLambdaType, getOclMessageType, getOclSelfType, getOclSummableType, getOclTupleType, getOclVoidType, getOrderedSetType, getRealType, getRequiredLibraryType, getSequenceType, getSetType, getStringType, getUnlimitedNaturalType, isOrdered, isUnique, resetLibrary
 
Methods inherited from class org.eclipse.ocl.examples.domain.types.AbstractStandardLibrary
conformsToLambdaType, conformsToTupleType, getCollectionType, getEnumeration, getTuplePart, getTupleType, isEqualToCollectionType, isEqualToTupleType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pivotMetaModel

protected Package pivotMetaModel

pivotResourceSet

protected final org.eclipse.emf.ecore.resource.ResourceSet pivotResourceSet

pivotLibraries

protected final java.util.List<Library> pivotLibraries
All Library packages imported into the current type managed domain. All libraries share the same URI, which for supplementary libraries may be null.


pivotLibraryResource

protected org.eclipse.emf.ecore.resource.Resource pivotLibraryResource
The resource of the first of the pivotLibraries. Set once actually loaded.


externalResourceSet

protected org.eclipse.emf.ecore.resource.impl.ResourceSetImpl externalResourceSet
Constructor Detail

MetaModelManager

public MetaModelManager()

MetaModelManager

public MetaModelManager(StandaloneProjectMap projectMap)
Construct a MetaModelManager that will use projectMap to assist in locating resources.


MetaModelManager

public MetaModelManager(org.eclipse.emf.ecore.resource.ResourceSet pivotResourceSet)
Construct a MetaModelManager that will use pivotResourceSet to contain pivot copies of meta-models, and ProjectMap.getAdapter(ResourceSet) to assist in locating resources.

Method Detail

addFactory

public static void addFactory(MetaModelManager.Factory factory)

findAdapter

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

getAdapter

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

initializePivotResourceSet

public static void initializePivotResourceSet(org.eclipse.emf.ecore.resource.ResourceSet pivotResourceSet)

addClassLoader

public void addClassLoader(java.lang.ClassLoader classLoader)

addExternalResource

public void addExternalResource(External2Pivot external2Pivot)

addGlobalNamespace

public Namespace addGlobalNamespace(java.lang.String name,
                                    Namespace namespace)

addGlobalTypes

public boolean addGlobalTypes(java.util.Collection<Type> types)

addListener

public void addListener(MetaModelManagerListener listener)

addLockedElement

public void addLockedElement(java.lang.Object lockedElement)

addOrphanClass

public void addOrphanClass(Type pivotElement)

addPackage

public void addPackage(Package pivotPackage)

compareOperationMatches

public int compareOperationMatches(Operation reference,
                                   java.util.Map<TemplateParameter,ParameterableElement> referenceBindings,
                                   Operation candidate,
                                   java.util.Map<TemplateParameter,ParameterableElement> candidateBindings)
Return -ve if match1 is inferior to match2, +ve if match2 is inferior to match1, or zero if both matches are of equal validity.


conformsTo

@Deprecated
public boolean conformsTo(Type firstType,
                                     Type secondType)
Deprecated. 


conformsTo

public boolean conformsTo(Type firstType,
                          Type secondType,
                          java.util.Map<TemplateParameter,ParameterableElement> bindings)

conformsToClassifierType

protected boolean conformsToClassifierType(ClassifierType firstType,
                                           ClassifierType secondType,
                                           java.util.Map<TemplateParameter,ParameterableElement> bindings)

computePivotRootPackages

public java.util.Collection<Package> computePivotRootPackages()

conformsToCollectionType

public boolean conformsToCollectionType(DomainCollectionType firstCollectionType,
                                        DomainCollectionType secondCollectionType)
Specified by:
conformsToCollectionType in interface DomainStandardLibrary
Overrides:
conformsToCollectionType in class AbstractStandardLibrary

conformsToCollectionType

protected boolean conformsToCollectionType(CollectionType firstType,
                                           CollectionType secondType,
                                           java.util.Map<TemplateParameter,ParameterableElement> bindings)

conformsToLambdaType

protected boolean conformsToLambdaType(LambdaType actualType,
                                       LambdaType requiredType,
                                       java.util.Map<TemplateParameter,ParameterableElement> bindings)

conformsToTupleType

protected boolean conformsToTupleType(TupleType actualType,
                                      TupleType requiredType,
                                      java.util.Map<TemplateParameter,ParameterableElement> bindings)

createImplementationManager

protected ImplementationManager createImplementationManager()

createInvalidExpression

public InvalidLiteralExp createInvalidExpression()

createLambdaManager

protected LambdaTypeManager createLambdaManager()

createModel

public Model createModel(java.lang.String string,
                         java.lang.String nsURI)

createOrphanage

protected org.eclipse.emf.ecore.resource.Resource createOrphanage()

createPackage

public <T extends Package> T createPackage(java.lang.Class<T> pivotClass,
                                           org.eclipse.emf.ecore.EClass pivotEClass,
                                           java.lang.String name,
                                           java.lang.String nsURI)

createPackageManager

protected PackageManager createPackageManager()

createPrecedenceManager

protected PrecedenceManager createPrecedenceManager()

createResource

public org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri,
                                                              java.lang.String contentType)

createTupleManager

protected TupleTypeManager createTupleManager()

createUnspecifiedType

public UnspecifiedType createUnspecifiedType()

createValueFactory

protected ValueFactory createValueFactory()

dispose

public void dispose()
Overrides:
dispose in class PivotStandardLibrary

findPackageTracker

public PackageTracker findPackageTracker(Package pivotPackage)

findTypeTracker

public TypeTracker findTypeTracker(Type pivotType)

getAllConstraints

public java.lang.Iterable<Constraint> getAllConstraints(Type pivotType)
Return all constraints applicable to a type and its superclasses.


getAllConstraints

protected java.util.Set<Constraint> getAllConstraints(Type type,
                                                      java.util.Set<Constraint> knownConstraints)

getAllOperations

public java.lang.Iterable<Operation> getAllOperations(Operation pivotOperation)

getAllPackages

public java.lang.Iterable<Package> getAllPackages()

getAllPackages

public java.lang.Iterable<Package> getAllPackages(Package pkg,
                                                  boolean loadPivotMetaModelFirst)

getAllProperties

public java.lang.Iterable<Property> getAllProperties(Property pivotProperty)

getAllTypes

public java.lang.Iterable<Type> getAllTypes(Type pivotType)

getBagType

public CollectionType getBagType(DomainType elementType)
Description copied from interface: DomainStandardLibrary
Return the instance of the Bag metatype whose elements are of elementType.

Specified by:
getBagType in interface DomainStandardLibrary

getBagType

public CollectionType getBagType(Type elementType)

getClassifierType

public ClassifierType getClassifierType(DomainType instanceType)
Description copied from interface: DomainStandardLibrary
Return the instance of the Classifier metatype whose class is classType.

Specified by:
getClassifierType in interface DomainStandardLibrary

getClassifierType

public ClassifierType getClassifierType(Type instanceType)

getCollectionType

public CollectionType getCollectionType(boolean isOrdered,
                                        boolean isUnique)

getCollectionType

public CollectionType getCollectionType(boolean isOrdered,
                                        boolean isUnique,
                                        Type elementType)

getCollectionType

public Type getCollectionType(java.lang.String collectionTypeName,
                              Type elementType)

getCollectionType

public CollectionType getCollectionType(DomainType genericType,
                                        DomainType elementType)

getCommonClasses

public java.util.List<Type> getCommonClasses(Type leftClass,
                                             Type rightClass)

getCommonType

public Type getCommonType(Type leftType,
                          Type rightType,
                          java.util.Map<TemplateParameter,ParameterableElement> templateParameterSubstitutions)

getDefaultStandardLibraryURI

public java.lang.String getDefaultStandardLibraryURI()

getExternalResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getExternalResourceSet()

getGlobalNamespaces

public java.util.Set<java.util.Map.Entry<java.lang.String,Namespace>> getGlobalNamespaces()

getGlobalTypes

public java.lang.Iterable<Type> getGlobalTypes()

getImplementation

public LibraryFeature getImplementation(Feature feature)
                                 throws java.lang.ClassNotFoundException,
                                        java.lang.SecurityException,
                                        java.lang.NoSuchFieldException,
                                        java.lang.IllegalArgumentException,
                                        java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchFieldException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException

getImplementation

public LibraryFeature getImplementation(Operation operation)
                                 throws java.lang.ClassNotFoundException,
                                        java.lang.SecurityException,
                                        java.lang.NoSuchFieldException,
                                        java.lang.IllegalArgumentException,
                                        java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchFieldException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException

getImplementation

public LibraryFeature getImplementation(Property property)
                                 throws java.lang.ClassNotFoundException,
                                        java.lang.SecurityException,
                                        java.lang.NoSuchFieldException,
                                        java.lang.IllegalArgumentException,
                                        java.lang.IllegalAccessException
Throws:
java.lang.ClassNotFoundException
java.lang.SecurityException
java.lang.NoSuchFieldException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException

getImplementationManager

public ImplementationManager getImplementationManager()

getInfixPrecedence

public Precedence getInfixPrecedence(java.lang.String operatorName)

getInheritance

public ReflectiveType getInheritance(DomainType type)
Description copied from interface: DomainStandardLibrary
Return the Inheritance dispatch table for a given type.

Specified by:
getInheritance in interface DomainStandardLibrary

getLambdaManager

public LambdaTypeManager getLambdaManager()

getLambdaType

public LambdaType getLambdaType(java.lang.String typeName,
                                Type contextType,
                                java.util.List<? extends Type> parameterTypes,
                                Type resultType,
                                java.util.Map<TemplateParameter,ParameterableElement> bindings)

getLibraries

public java.util.List<Library> getLibraries()

getLibraryResource

public org.eclipse.emf.ecore.resource.Resource getLibraryResource()

getLibraryType

public Type getLibraryType(java.lang.String string,
                           java.util.List<? extends ParameterableElement> templateArguments)

getLibraryType

public <T extends Type> T getLibraryType(T libraryType,
                                         java.util.List<? extends ParameterableElement> templateArguments)

getLocalClasses

public java.lang.Iterable<Type> getLocalClasses(Package pkg)

getLocalComments

public java.lang.Iterable<Comment> getLocalComments(Operation operation)

getLocalComments

public java.lang.Iterable<Comment> getLocalComments(Property property)

getLocalComments

public java.lang.Iterable<Comment> getLocalComments(Type type)

getLocalConstraints

public java.lang.Iterable<Constraint> getLocalConstraints(Operation operation)

getLocalConstraints

public java.lang.Iterable<Constraint> getLocalConstraints(Property property)

getLocalConstraints

public java.lang.Iterable<Constraint> getLocalConstraints(Type type)

getLocalOperations

public java.lang.Iterable<Operation> getLocalOperations(Type type,
                                                        java.lang.Boolean selectStatic)

getLocalPackages

public java.lang.Iterable<Package> getLocalPackages(Package pkg)

getLocalProperties

public java.lang.Iterable<Property> getLocalProperties(Type type,
                                                       java.lang.Boolean selectStatic)

getLockingObject

public org.eclipse.emf.ecore.EObject getLockingObject()

getMetaModelManager

public MetaModelManager getMetaModelManager()
Specified by:
getMetaModelManager in interface MetaModelManageable

getMetaType

public DomainType getMetaType(DomainType instanceType)
Description copied from interface: DomainStandardLibrary
Returns the meta-type of a given type.

Specified by:
getMetaType in interface DomainStandardLibrary
Overrides:
getMetaType in class AbstractStandardLibrary

getOclType

public DomainType getOclType(java.lang.String typeName)
Specified by:
getOclType in interface DomainStandardLibrary

getOrderedSetType

public CollectionType getOrderedSetType(DomainType elementType)
Description copied from interface: DomainStandardLibrary
Return the instance of the OrderedSet metatype whose elements are of elementType.

Specified by:
getOrderedSetType in interface DomainStandardLibrary

getOrderedSetType

public CollectionType getOrderedSetType(Type elementType)

getPackageManager

public PackageManager getPackageManager()

getPackageTracker

public PackageTracker getPackageTracker(Package pivotPackage)

getPivotMetaModel

public Package getPivotMetaModel()

getPivotOfEcore

public <T extends NamedElement> T getPivotOfEcore(java.lang.Class<T> pivotClass,
                                                  org.eclipse.emf.ecore.EObject eObject)

getPivotResourceSet

public org.eclipse.emf.ecore.resource.ResourceSet getPivotResourceSet()

getPivotType

public Type getPivotType(java.lang.String className)
Return the pivot model class for className with the Pivot Model.


getPrecedenceManager

protected PrecedenceManager getPrecedenceManager()

getPrecedences

public java.lang.Iterable<? extends Nameable> getPrecedences(Package pivotPackage)

getPrefixPrecedence

public Precedence getPrefixPrecedence(java.lang.String operatorName)

getPrimaryElement

public <T extends org.eclipse.emf.ecore.EObject> T getPrimaryElement(T element)

getPrimaryOperation

public Operation getPrimaryOperation(Operation pivotOperation)

getPrimaryPackage

public Package getPrimaryPackage(java.lang.String nsURI,
                                 java.lang.String... subPackagePath)
Lookup a primary package by its URI and optionally a sub-package path.


getPrimaryPackage

public Package getPrimaryPackage(Package parentPackage,
                                 java.lang.String subPackageName)
Lookup a primary sub-package.


getPrimaryPackage

public Package getPrimaryPackage(Package pivotPackage)

getPrimaryProperty

public Property getPrimaryProperty(Property pivotProperty)

getPrimaryType

public Type getPrimaryType(Type pivotType)

getPrimaryType

public Type getPrimaryType(java.lang.String nsURI,
                           java.lang.String path,
                           java.lang.String... extraPath)

getPrimaryType

public Type getPrimaryType(Package parentPackage,
                           java.lang.String typeName)
Lookup a primary type.


getResourceIdentifier

public org.eclipse.emf.common.util.URI getResourceIdentifier(java.lang.Object uniqueContext,
                                                             java.lang.String subContext)
Return the URI to be used for a concrete syntax resource for an expression associated with a uniqueContext. If uniqueContext is an Element the moniker is used as part of the URI, otherwise a unique value is created and cached for reuse.


getSequenceType

public CollectionType getSequenceType(DomainType elementType)
Description copied from interface: DomainStandardLibrary
Return the instance of the Sequence metatype whose elements are of elementType.

Specified by:
getSequenceType in interface DomainStandardLibrary

getSequenceType

public CollectionType getSequenceType(Type elementType)

getSetType

public CollectionType getSetType(DomainType elementType)
Description copied from interface: DomainStandardLibrary
Return the instance of the Set metatype whose elements are of elementType.

Specified by:
getSetType in interface DomainStandardLibrary

getSetType

public CollectionType getSetType(Type elementType)

getSpecializedLambdaType

protected Type getSpecializedLambdaType(LambdaType type,
                                        java.util.Map<TemplateParameter,ParameterableElement> usageBindings)

getSpecializedType

public Type getSpecializedType(Type type,
                               java.util.Map<TemplateParameter,ParameterableElement> usageBindings)

getSpecializedTypeServer

protected <T extends Type> T getSpecializedTypeServer(T unspecializedType,
                                                      java.util.List<? extends ParameterableElement> templateArguments)

getSuperClasses

public java.lang.Iterable<Type> getSuperClasses(Type pivotType)

getTarget

public org.eclipse.emf.ecore.resource.ResourceSet getTarget()
Specified by:
getTarget in interface org.eclipse.emf.common.notify.Adapter

getTupleManager

public TupleTypeManager getTupleManager()

getTupleType

public DomainTupleType getTupleType(java.util.List<? extends DomainTypedElement> parts)
Description copied from interface: DomainStandardLibrary
Obtains the instance of the TupleType metatype for the given list of parts, which must be alphabetical order by name.

Specified by:
getTupleType in interface DomainStandardLibrary

getTupleType

public TupleType getTupleType(java.lang.String typeName,
                              java.util.Collection<? extends DomainTypedElement> parts,
                              java.util.Map<TemplateParameter,ParameterableElement> bindings)

getTupleType

public TupleType getTupleType(TupleType tupleType,
                              java.util.Map<TemplateParameter,ParameterableElement> bindings)

getType

public DomainType getType(DomainElement element)
Specified by:
getType in interface DomainStandardLibrary
Overrides:
getType in class AbstractStandardLibrary

getType

public Type getType(DomainType dType)

getType

public DomainType getType(org.eclipse.emf.ecore.EClassifier eClassifier)
Specified by:
getType in interface DomainStandardLibrary

getTypeServer

public TypeServer getTypeServer(Type pivotType)

getTypeTracker

public TypeTracker getTypeTracker(Type pivotType)

getTypeWithMultiplicity

public Type getTypeWithMultiplicity(TypedMultiplicityElement element)

getValueFactory

public ValueFactory getValueFactory()

installLibrary

protected void installLibrary(Library pivotLibrary)

installPackage

public void installPackage(Package pivotPackage)

installPropertyDeclaration

public void installPropertyDeclaration(Property thisProperty)
Create implicit an opposite property if there is no explicit opposite.


installResource

public void installResource(org.eclipse.emf.ecore.resource.Resource pivotResource)

isAdapterFor

public boolean isAdapterFor(MetaModelManager metaModelManager)

isUnspecialized

protected boolean isUnspecialized(java.util.List<TemplateParameter> templateParameters,
                                  java.util.List<? extends ParameterableElement> templateArguments)

lazyLoadPivotMetaModel

protected void lazyLoadPivotMetaModel()

isAdapterForType

public boolean isAdapterForType(java.lang.Object type)
Specified by:
isAdapterForType in interface org.eclipse.emf.common.notify.Adapter

isSuperClassOf

public boolean isSuperClassOf(Type unspecializedFirstType,
                              Type secondType)

isUnderspecified

public boolean isUnderspecified(ParameterableElement type)
Retyurn true if this type involves an UnspecifiedType.


loadDefaultLibrary

protected org.eclipse.emf.ecore.resource.Resource loadDefaultLibrary(java.lang.String uri)
Specified by:
loadDefaultLibrary in class PivotStandardLibrary

loadLibrary

public void loadLibrary(org.eclipse.emf.ecore.resource.Resource pivotResource)

loadLibraryPackage

protected void loadLibraryPackage(Package pivotPackage)

loadPivotMetaModel

protected void loadPivotMetaModel(Library pivotLibrary)

loadResource

public Element loadResource(org.eclipse.emf.common.util.URI uri,
                            java.lang.String alias,
                            org.eclipse.emf.ecore.resource.ResourceSet resourceSet)

loadResource

public Element loadResource(org.eclipse.emf.ecore.resource.Resource resource,
                            java.lang.String fragmentURI)

lookupImplementation

public LibraryFeature lookupImplementation(DomainOperation dynamicOperation)
                                    throws java.lang.SecurityException,
                                           java.lang.IllegalArgumentException,
                                           java.lang.ClassNotFoundException,
                                           java.lang.NoSuchFieldException,
                                           java.lang.IllegalAccessException
Throws:
java.lang.SecurityException
java.lang.IllegalArgumentException
java.lang.ClassNotFoundException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException

notifyChanged

public void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
Specified by:
notifyChanged in interface org.eclipse.emf.common.notify.Adapter

removeExternalResource

public void removeExternalResource(External2Pivot external2Pivot)

removeListener

public void removeListener(MetaModelManagerListener listener)

resolveAllOperations

protected void resolveAllOperations(java.util.Set<Operation> allOperations,
                                    Type forType,
                                    java.lang.Boolean selectStatic,
                                    java.lang.String operationName,
                                    java.util.List<Parameter> parameters,
                                    java.util.Set<Type> alreadyVisited)
Return all matching operations.


resolveBaseOperation

public Operation resolveBaseOperation(Operation operation)
Return the un-overloaded operation.


resolveLocalOperation

public java.util.Set<Operation> resolveLocalOperation(Type pivotClass,
                                                      java.lang.String operationName,
                                                      Type... pivotArguments)

resolveOperation

public Operation resolveOperation(Type leftType,
                                  java.lang.String operationName,
                                  Type... rightTypes)

resolveOperations

public java.util.Set<Operation> resolveOperations(Type pivotClass,
                                                  java.lang.String operationName,
                                                  Type... pivotArguments)

setDefaultStandardLibraryURI

public void setDefaultStandardLibraryURI(java.lang.String defaultStandardLibraryURI)

setLibraryLoadInProgress

public void setLibraryLoadInProgress(boolean libraryLoadInProgress)

setTarget

public void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
Specified by:
setTarget in interface org.eclipse.emf.common.notify.Adapter

unsetTarget

public void unsetTarget(org.eclipse.emf.common.notify.Notifier oldTarget)
Specified by:
unsetTarget in interface org.eclipse.emf.common.notify.Adapter.Internal