org.eclipse.ocl.examples.xtext.oclinecore.utilities
Class OCLinEcoreASResourceFactory

java.lang.Object
  extended by org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl
      extended by org.eclipse.ocl.examples.pivot.resource.AbstractASResourceFactory
          extended by org.eclipse.ocl.examples.xtext.oclinecore.utilities.OCLinEcoreASResourceFactory
All Implemented Interfaces:
org.eclipse.emf.ecore.resource.Resource.Factory, ASResourceFactory

public final class OCLinEcoreASResourceFactory
extends AbstractASResourceFactory


Nested Class Summary
 
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
 
Field Summary
static OCLinEcoreASResourceFactory INSTANCE
           
 
Fields inherited from class org.eclipse.ocl.examples.pivot.resource.AbstractASResourceFactory
contentType, fileExtension
 
Fields inherited from interface org.eclipse.ocl.examples.pivot.resource.ASResourceFactory
CAN_HANDLE, CANNOT_HANDLE, MAY_HANDLE
 
Constructor Summary
protected OCLinEcoreASResourceFactory()
           
 
Method Summary
 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.
 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 resource, org.eclipse.emf.common.util.URI uri)
          Return the root element in the Pivot resource resulting from import of the available resource.
 boolean isCompatibleResource(org.eclipse.emf.ecore.resource.Resource newResource, org.eclipse.emf.ecore.resource.Resource oldResource)
          Return true if newResource can be ignored in favour of an already loaded oldResource.
 
Methods inherited from class org.eclipse.ocl.examples.pivot.resource.AbstractASResourceFactory
configure, configureResource, createAS2MonikerVisitor, createAS2XMIidVisitor, createASSaverLocateVisitor, createASSaverNormalizeVisitor, createASSaverResolveVisitor, createPrettyPrintVisitor, createResource, createToStringVisitor, getASElement, getContentType, getEOperation, getEReference, getHandlerPriority, getHandlerPriority, getMetamodelNsURI, installContentHandler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

@NonNull
public static final OCLinEcoreASResourceFactory INSTANCE
Constructor Detail

OCLinEcoreASResourceFactory

protected OCLinEcoreASResourceFactory()
Method Detail

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

getPackageURI

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 resource,
                                           @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

isCompatibleResource

public boolean isCompatibleResource(@NonNull
                                    org.eclipse.emf.ecore.resource.Resource newResource,
                                    @NonNull
                                    org.eclipse.emf.ecore.resource.Resource oldResource)
Description copied from interface: ASResourceFactory
Return true if newResource can be ignored in favour of an already loaded oldResource. Return false if an error message is required

Specified by:
isCompatibleResource in interface ASResourceFactory
Overrides:
isCompatibleResource in class AbstractASResourceFactory