public class ModelDescriptor extends org.eclipse.core.runtime.PlatformObject implements IModelDescriptor
IModelDescriptor
Modifier and Type | Field and Description |
---|---|
protected IMetaModelDescriptor |
mmDescriptor
The meta-model descriptor.
|
protected IResourceScope |
resourceScope
The
resource scope of the model described here. |
protected IMetaModelDescriptor |
targetMMDescriptor
The target meta-model descriptor.
|
Constructor and Description |
---|
ModelDescriptor(IMetaModelDescriptor mmDescriptor,
IMetaModelDescriptor targetMMDescriptor,
IResourceScope resourceScope)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
belongsTo(org.eclipse.core.resources.IFile file,
boolean includeReferencedScopes)
Indicates if the given
file is part of the model identified by this model
descriptor . |
boolean |
belongsTo(org.eclipse.emf.ecore.resource.Resource resource,
boolean includeReferencedScopes)
Indicates if the given
resource is part of the model identified by this model descriptor . |
boolean |
belongsTo(org.eclipse.emf.common.util.URI uri,
boolean includeReferencedScopes)
Indicates if the given
uri is part of the model identified by this model
descriptor . |
boolean |
didBelongTo(org.eclipse.core.resources.IFile file,
boolean includeReferencedScopes)
Indicates if the given
file has been part of the model identified by this model descriptor before it was changed or deleted. |
boolean |
didBelongTo(org.eclipse.emf.ecore.resource.Resource resource,
boolean includeReferencedScopes)
Indicates if the given
resource has been part of the model identified by this
model descriptor before it was changed or deleted. |
boolean |
didBelongTo(org.eclipse.emf.common.util.URI uri,
boolean includeReferencedScopes)
if the given
uri has been part of the model identified by this model
descriptor before relative file it was changed or deleted. |
boolean |
equals(java.lang.Object object) |
org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain() |
protected IMetaModelDescriptor |
getEffectiveMetaModelDescriptor() |
java.util.Collection<org.eclipse.emf.ecore.resource.Resource> |
getLoadedResources(boolean includeReferencedScopes) |
IMetaModelDescriptor |
getMetaModelDescriptor() |
java.util.Collection<org.eclipse.core.resources.IFile> |
getPersistedFiles(boolean includeReferencedScopes) |
java.util.Collection<org.eclipse.core.resources.IResource> |
getReferencedRoots() |
java.util.Collection<org.eclipse.core.resources.IResource> |
getReferencingRoots() |
org.eclipse.core.resources.IResource |
getRoot() |
IResourceScope |
getScope() |
IMetaModelDescriptor |
getTargetMetaModelDescriptor() |
int |
hashCode() |
boolean |
isShared(org.eclipse.core.resources.IFile file)
Determines if given
file is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not. |
boolean |
isShared(org.eclipse.emf.ecore.resource.Resource resource)
Determines if given
resource is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not. |
boolean |
isShared(org.eclipse.emf.common.util.URI uri)
Determines if given
URI is shared among multiple models, i.e., can simultaneously belong to multiple
models, or not. |
java.lang.String |
toString() |
protected IMetaModelDescriptor mmDescriptor
protected IMetaModelDescriptor targetMMDescriptor
protected IResourceScope resourceScope
resource scope
of the model described here.public ModelDescriptor(IMetaModelDescriptor mmDescriptor, IMetaModelDescriptor targetMMDescriptor, IResourceScope resourceScope)
mmDescriptor
- The meta-model descriptor.rootProject
- The root project of the described model.public IMetaModelDescriptor getMetaModelDescriptor()
getMetaModelDescriptor
in interface IModelDescriptor
meta-model descriptor
.public IMetaModelDescriptor getTargetMetaModelDescriptor()
getTargetMetaModelDescriptor
in interface IModelDescriptor
target meta-model descriptor
.protected IMetaModelDescriptor getEffectiveMetaModelDescriptor()
public IResourceScope getScope()
getScope
in interface IModelDescriptor
resourceScope
of the model described here.public org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
getEditingDomain
in interface IModelDescriptor
public org.eclipse.core.resources.IResource getRoot()
getRoot
in interface IModelDescriptor
resource
of the model described here.public java.util.Collection<org.eclipse.core.resources.IResource> getReferencedRoots()
getReferencedRoots
in interface IModelDescriptor
resource
s constituting the model described here.public java.util.Collection<org.eclipse.core.resources.IResource> getReferencingRoots()
getReferencingRoots
in interface IModelDescriptor
resource
s referencing the model described here.public java.util.Collection<org.eclipse.core.resources.IFile> getPersistedFiles(boolean includeReferencedScopes)
getPersistedFiles
in interface IModelDescriptor
file
(s) that belong to this model.public java.util.Collection<org.eclipse.emf.ecore.resource.Resource> getLoadedResources(boolean includeReferencedScopes)
getLoadedResources
in interface IModelDescriptor
public boolean belongsTo(org.eclipse.core.resources.IFile file, boolean includeReferencedScopes)
IModelDescriptor
file
is part of the model identified by this model
descriptor
. Criteria applied in order to know that are the following ones:
meta-model descriptor
must be equal to file
's one;file
must be a member of the encapsulated project
project
).belongsTo
in interface IModelDescriptor
file
- The file
that may belongs to the model.file
belongs to the identified model;public boolean belongsTo(org.eclipse.emf.ecore.resource.Resource resource, boolean includeReferencedScopes)
IModelDescriptor
resource
is part of the model identified by this model descriptor
. Criteria applied in order to know that are the following ones:
meta-model descriptor
must be equal to file
's one;file
must be a member of the encapsulated project
project
).belongsTo
in interface IModelDescriptor
resource
- The resource
that may belongs to the model.file
belongs to the identified model;public boolean belongsTo(org.eclipse.emf.common.util.URI uri, boolean includeReferencedScopes)
IModelDescriptor
uri
is part of the model identified by this model
descriptor
. Criteria applied in order to know that are the following ones:
meta-model descriptor
must be equal to file
's one;file
must be a member of the encapsulated project
project
).belongsTo
in interface IModelDescriptor
uri
- The uri
that may belongs to the model.uri
belongs to the identified model;public boolean didBelongTo(org.eclipse.core.resources.IFile file, boolean includeReferencedScopes)
IModelDescriptor
file
has been part of the model identified by this model descriptor
before it was changed or deleted. Criteria applied in order to know that are the following
ones:
meta-model descriptor
must be equal to file
's old
meta-model descriptor
;file
must be a member of the encapsulated project
project
).file
that may belongs to the model.didBelongTo
in interface IModelDescriptor
file
belongs to the identified model;public boolean didBelongTo(org.eclipse.emf.ecore.resource.Resource resource, boolean includeReferencedScopes)
IModelDescriptor
resource
has been part of the model identified by this
model descriptor
before it was changed or deleted. Criteria applied in order to know
that are the following ones:
meta-model descriptor
must be equal to resource
's
old meta-model descriptor
;didBelongTo
in interface IModelDescriptor
resource
belongs to the identified
model;public boolean didBelongTo(org.eclipse.emf.common.util.URI uri, boolean includeReferencedScopes)
IModelDescriptor
uri
has been part of the model identified by this model
descriptor
before relative file it was changed or deleted. Criteria applied in order to know that are the
following ones:
meta-model descriptor
must be equal to uri
's old
meta-model descriptor
;uri
must point on a member of the encapsulated project
project
).didBelongTo
in interface IModelDescriptor
uri
point on an element that belongs to the
identified model;public boolean isShared(org.eclipse.core.resources.IFile file)
IModelDescriptor
file
is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not.isShared
in interface IModelDescriptor
file
- The file to be investigated.true
if given file is shared across multiple models, or false
otherwise.public boolean isShared(org.eclipse.emf.ecore.resource.Resource resource)
IModelDescriptor
resource
is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not.isShared
in interface IModelDescriptor
true
if given resource is shared across multiple models, or false
otherwise.public boolean isShared(org.eclipse.emf.common.util.URI uri)
IModelDescriptor
URI
is shared among multiple models, i.e., can simultaneously belong to multiple
models, or not.isShared
in interface IModelDescriptor
true
if the resource behind given URI is shared across multiple models, or
false
otherwise.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object