public interface IModelDescriptor
extends org.eclipse.core.runtime.IAdaptable
One model is identified by a root project
and a meta-model descriptor
.
This descriptor also references the editing domain owning the resource set containing the resources from the
described model.
This model descriptor
provides a method indicating if a specified file
belongs
or not to the described model.
Model descriptors are used in registry of model descriptor
s (
ModelDescriptorRegistry) in order to keep references of loaded models.
org.eclipse.sphinx.emf.model.IDescriptor
,
ModelDescriptor
,
ModelDescriptorRegistry
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. |
org.eclipse.emf.transaction.TransactionalEditingDomain |
getEditingDomain() |
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() |
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. |
IMetaModelDescriptor getMetaModelDescriptor()
meta-model descriptor
.IMetaModelDescriptor getTargetMetaModelDescriptor()
target meta-model descriptor
.org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()
IResourceScope getScope()
resourceScope
of the model described here.org.eclipse.core.resources.IResource getRoot()
resource
of the model described here.java.util.Collection<org.eclipse.core.resources.IResource> getReferencedRoots()
resource
s constituting the model described here.java.util.Collection<org.eclipse.core.resources.IResource> getReferencingRoots()
resource
s referencing the model described here.java.util.Collection<org.eclipse.emf.ecore.resource.Resource> getLoadedResources(boolean includeReferencedScopes)
java.util.Collection<org.eclipse.core.resources.IFile> getPersistedFiles(boolean includeReferencedScopes)
file
(s) that belong to this model.boolean belongsTo(org.eclipse.core.resources.IFile file, boolean includeReferencedScopes)
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
).file
- The file
that may belongs to the model.file
belongs to the identified model;boolean belongsTo(org.eclipse.emf.ecore.resource.Resource resource, boolean includeReferencedScopes)
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
).resource
- The resource
that may belongs to the model.file
belongs to the identified model;boolean belongsTo(org.eclipse.emf.common.util.URI uri, boolean includeReferencedScopes)
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
).uri
- The uri
that may belongs to the model.uri
belongs to the identified model;boolean didBelongTo(org.eclipse.core.resources.IFile file, boolean includeReferencedScopes)
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.file
belongs to the identified model;boolean didBelongTo(org.eclipse.emf.ecore.resource.Resource resource, boolean includeReferencedScopes)
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
;uri
- The resource
that may belongs to the model.resource
belongs to the identified
model;boolean didBelongTo(org.eclipse.emf.common.util.URI uri, boolean includeReferencedScopes)
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
).file
- The file
that may belongs to the model.uri
point on an element that belongs to the
identified model;boolean isShared(org.eclipse.core.resources.IFile file)
file
is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not.file
- The file to be investigated.true
if given file is shared across multiple models, or false
otherwise.boolean isShared(org.eclipse.emf.ecore.resource.Resource resource)
resource
is shared among multiple models, i.e., can simultaneously belong to
multiple models, or not.file
- The resource to be investigated.true
if given resource is shared across multiple models, or false
otherwise.boolean isShared(org.eclipse.emf.common.util.URI uri)
URI
is shared among multiple models, i.e., can simultaneously belong to multiple
models, or not.file
- The URI to be investigated.true
if the resource behind given URI is shared across multiple models, or
false
otherwise.