org.eclipse.ocl.examples.library.ecore
Class EcoreIdResolver

java.lang.Object
  extended by org.eclipse.ocl.examples.library.executor.AbstractIdResolver
      extended by org.eclipse.ocl.examples.library.ecore.EcoreIdResolver
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, IdVisitor<DomainElement>, IdResolver

public class EcoreIdResolver
extends AbstractIdResolver
implements org.eclipse.emf.common.notify.Adapter

EcoreIdResolver provides a package discovery capability so that package identifiers can be resolved.

Given an initial seed of a standard library and one or more root EObjects, packages are discovered by locating all packages and nested packages directly contained by the seed roots or by the roots of any object referenced by any contained by the seed roots.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.ocl.examples.library.executor.AbstractIdResolver
AbstractIdResolver.Id2InstanceVisitor
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
protected  java.util.Collection<? extends org.eclipse.emf.ecore.EObject> directRoots
           
 
Fields inherited from class org.eclipse.ocl.examples.library.executor.AbstractIdResolver
standardLibrary
 
Constructor Summary
EcoreIdResolver(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> roots, ExecutorStandardLibrary standardLibrary)
           
 
Method Summary
 void dispose()
           
 org.eclipse.emf.common.notify.Notifier getTarget()
           
 DomainTupleType getTupleType(DomainTypedElement... parts)
           
 DomainTupleType getTupleType(TupleTypeId typeId)
           
 DomainInheritance getType(org.eclipse.emf.ecore.EClassifier eClassifier)
           
 boolean isAdapterForType(java.lang.Object type)
           
 void notifyChanged(org.eclipse.emf.common.notify.Notification notification)
           
protected  void processCrossReferencedRoots()
           
protected  void processDirectRoots()
           
 void setTarget(org.eclipse.emf.common.notify.Notifier newTarget)
           
 DomainPackage visitNsURIPackageId(NsURIPackageId id)
           
 DomainPackage visitRootPackageId(RootPackageId id)
           
 
Methods inherited from class org.eclipse.ocl.examples.library.executor.AbstractIdResolver
boxedValueOf, boxedValueOf, boxedValueOf, boxedValueOfEnumerator, createBagOfAll, createBagOfEach, createCollectionOfAll, createCollectionOfAll, createInstance, createOrderedSetOfAll, createOrderedSetOfEach, createSequenceOfAll, createSequenceOfEach, createSetOfAll, createSetOfEach, getCollectionType, getCollectionType, getDynamicTypeOf, getDynamicTypeOf, getDynamicTypeOf, getJavaType, getMetaclass, getOperation, getProperty, getStandardLibrary, getStaticTypeOf, getStaticTypeOf, getStaticTypeOf, getTuplePart, getTuplePart, getType, oclEquals, unboxedValueOf, unboxedValueOf, unboxedValuesOfAll, unboxedValuesOfEach, visitClassId, visitCollectedId, visitCollectionTypeId, visitDataTypeId, visitEnumerationId, visitEnumerationLiteralId, visitInvalidId, visitLambdaTypeId, visitMetaclassId, visitNestedPackageId, visitNullId, visitOperationId, visitPrimitiveTypeId, visitPropertyId, visitTemplateableTypeId, visitTemplateBinding, visitTemplateParameterId, visitTuplePartId, visitTupleTypeId, visitUnspecifiedId, weakGet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directRoots

@NonNull
protected final java.util.Collection<? extends org.eclipse.emf.ecore.EObject> directRoots
Constructor Detail

EcoreIdResolver

public EcoreIdResolver(@NonNull
                       java.util.Collection<? extends org.eclipse.emf.ecore.EObject> roots,
                       @NonNull
                       ExecutorStandardLibrary standardLibrary)
Method Detail

dispose

public void dispose()
Specified by:
dispose in interface IdResolver
Overrides:
dispose in class AbstractIdResolver

getTarget

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

getTupleType

@NonNull
public DomainTupleType getTupleType(@NonNull
                                            TupleTypeId typeId)
Specified by:
getTupleType in interface IdResolver
Specified by:
getTupleType in class AbstractIdResolver

getTupleType

@NonNull
public DomainTupleType getTupleType(DomainTypedElement... parts)

getType

@NonNull
public DomainInheritance getType(@NonNull
                                         org.eclipse.emf.ecore.EClassifier eClassifier)
Specified by:
getType in interface IdResolver
Specified by:
getType in class AbstractIdResolver

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

processCrossReferencedRoots

protected void processCrossReferencedRoots()

processDirectRoots

protected void processDirectRoots()

setTarget

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

visitNsURIPackageId

@NonNull
public DomainPackage visitNsURIPackageId(@NonNull
                                                 NsURIPackageId id)
Specified by:
visitNsURIPackageId in interface IdVisitor<DomainElement>
Overrides:
visitNsURIPackageId in class AbstractIdResolver

visitRootPackageId

@NonNull
public DomainPackage visitRootPackageId(@NonNull
                                                RootPackageId id)
Specified by:
visitRootPackageId in interface IdVisitor<DomainElement>
Overrides:
visitRootPackageId in class AbstractIdResolver