org.eclipse.ocl.examples.pivot.ecore
Class EcoreASResourceFactory
java.lang.Object
org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl
org.eclipse.ocl.examples.pivot.resource.AbstractASResourceFactory
org.eclipse.ocl.examples.pivot.ecore.EcoreASResourceFactory
- All Implemented Interfaces:
- org.eclipse.emf.ecore.resource.Resource.Factory, ASResourceFactory
public final class EcoreASResourceFactory
- extends AbstractASResourceFactory
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource.Factory |
org.eclipse.emf.ecore.resource.Resource.Factory.Descriptor, org.eclipse.emf.ecore.resource.Resource.Factory.Registry |
Method Summary |
org.eclipse.emf.ecore.resource.Resource |
createResource(org.eclipse.emf.common.util.URI uri)
Creates an instance of the resource. |
|
getASElement(MetaModelManager metaModelManager,
java.lang.Class<T> pivotClass,
org.eclipse.emf.ecore.EObject eObject)
Return the OCL AS element corresponding to eObject using metaModelManager to supervise
the correspondence and ensuring that the result is of asClass. |
int |
getHandlerPriority(org.eclipse.emf.ecore.EObject eObject)
Return a positive handler priority if this factory can handle creation of an OCL AS type from the
available object, negative if it cannot. |
int |
getHandlerPriority(org.eclipse.emf.ecore.resource.Resource resource)
Return a positive handler priority if this factory can handle creation of an OCL AS resource from the
available resource, negative if it cannot. |
int |
getHandlerPriority(org.eclipse.emf.common.util.URI uri)
Return a positive handler priority if this factory can handle creation of an OCL AS resource from the
available URI, negative if it cannot. |
org.eclipse.emf.common.util.URI |
getPackageURI(org.eclipse.emf.ecore.EObject eObject)
Return the URI of an eObject if it can be treated as a Package. |
Element |
importFromResource(MetaModelManager metaModelManager,
org.eclipse.emf.ecore.resource.Resource ecoreResource,
org.eclipse.emf.common.util.URI uri)
Return the root element in the Pivot resource resulting from import of the available
resource. |
Methods inherited from class org.eclipse.ocl.examples.pivot.resource.AbstractASResourceFactory |
configure, configureResource, createAS2MonikerVisitor, createAS2XMIidVisitor, createASSaverLocateVisitor, createASSaverNormalizeVisitor, createASSaverResolveVisitor, createPrettyPrintVisitor, createToStringVisitor, getContentType, getEOperation, getEReference, getMetamodelNsURI, installContentHandler, isCompatibleResource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INSTANCE
@NonNull
public static final EcoreASResourceFactory INSTANCE
EcoreASResourceFactory
public EcoreASResourceFactory()
createResource
@NonNull
public org.eclipse.emf.ecore.resource.Resource createResource(org.eclipse.emf.common.util.URI uri)
- Description copied from class:
AbstractASResourceFactory
- Creates an instance of the resource.
- Specified by:
createResource
in interface org.eclipse.emf.ecore.resource.Resource.Factory
- Overrides:
createResource
in class AbstractASResourceFactory
getASElement
@Nullable
public <T extends Element> T getASElement(@NonNull
MetaModelManager metaModelManager,
@NonNull
java.lang.Class<T> pivotClass,
@NonNull
org.eclipse.emf.ecore.EObject eObject)
- Description copied from interface:
ASResourceFactory
- Return the OCL AS element corresponding to eObject using metaModelManager to supervise
the correspondence and ensuring that the result is of asClass.
- Specified by:
getASElement
in interface ASResourceFactory
- Overrides:
getASElement
in class AbstractASResourceFactory
getHandlerPriority
public int getHandlerPriority(@NonNull
org.eclipse.emf.ecore.EObject eObject)
- Description copied from interface:
ASResourceFactory
- Return a positive handler priority if this factory can handle creation of an OCL AS type from the
available object, negative if it cannot. Generic handlers such as Ecore return a low priority.
- Specified by:
getHandlerPriority
in interface ASResourceFactory
- Overrides:
getHandlerPriority
in class AbstractASResourceFactory
getHandlerPriority
public int getHandlerPriority(@NonNull
org.eclipse.emf.ecore.resource.Resource resource)
- Description copied from interface:
ASResourceFactory
- Return a positive handler priority if this factory can handle creation of an OCL AS resource from the
available resource, negative if it cannot. Generic handlers such as Ecore return a low priority.
- Specified by:
getHandlerPriority
in interface ASResourceFactory
- Overrides:
getHandlerPriority
in class AbstractASResourceFactory
getHandlerPriority
public int getHandlerPriority(@NonNull
org.eclipse.emf.common.util.URI uri)
- Description copied from interface:
ASResourceFactory
- Return a positive handler priority if this factory can handle creation of an OCL AS resource from the
available URI, negative if it cannot. Generic handlers such as Ecore return a low priority.
- Specified by:
getHandlerPriority
in interface ASResourceFactory
- Overrides:
getHandlerPriority
in class AbstractASResourceFactory
getPackageURI
@Nullable
public org.eclipse.emf.common.util.URI getPackageURI(@NonNull
org.eclipse.emf.ecore.EObject eObject)
- Description copied from interface:
ASResourceFactory
- Return the URI of an eObject if it can be treated as a Package.
- Specified by:
getPackageURI
in interface ASResourceFactory
- Overrides:
getPackageURI
in class AbstractASResourceFactory
importFromResource
@Nullable
public Element importFromResource(@NonNull
MetaModelManager metaModelManager,
@NonNull
org.eclipse.emf.ecore.resource.Resource ecoreResource,
@Nullable
org.eclipse.emf.common.util.URI uri)
- Description copied from interface:
ASResourceFactory
- Return the root element in the Pivot resource resulting from import of the available
resource.
- Specified by:
importFromResource
in interface ASResourceFactory
- Overrides:
importFromResource
in class AbstractASResourceFactory