public interface IMetaModelDescriptor
Descriptors of concrete meta-model versions from the same family are expected to be derived from the same IMetaModelDescriptor implementation describing the meta-model family.
Implementations of this interface shall be immutable.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LABEL_PATTERN
The string pattern used to create the label of this meta-model descriptor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAssociatedContentTypeId(java.lang.String contentTypeId)
Adds associated content type to the meta-model described by this
meta-model
descriptor . |
IMetaModelDescriptor |
getBaseDescriptor()
Returns the
descriptor of the base meta-model behind the described meta-model. |
java.util.List<java.lang.String> |
getCompatibleContentTypeIds()
Returns a collection of content type ids which are supported by older but all the same compatible versions of the
meta-model described by this
meta-model descriptor . |
java.util.List<java.net.URI> |
getCompatibleNamespaceURIs()
Returns a collection of namespace
URI s which refer to older but all the same compatible versions of the
meta-model described by this meta-model descriptor . |
java.util.Collection<IMetaModelDescriptor> |
getCompatibleResourceVersionDescriptors()
Returns a collection of
meta-model descriptor s identifying resource versions which
are older but all the same compatible with the meta-model described by this meta-model descriptor . |
java.util.List<java.lang.String> |
getContentTypeIds()
Returns the identifiers of all
content type s which are
associated with the described meta-model. |
java.lang.String |
getCustomURIScheme()
Returns the scheme of the custom URIs that the described meta-model uses in cross-document references and as
proxy URIs.
|
java.lang.String |
getDefaultContentTypeId()
Returns the identifier of the default
content type for the
described meta-model. |
org.eclipse.emf.ecore.EFactory |
getEFactory()
Deprecated.
Use #getRootEFactory() instead. Rationale: This method has been renamed to the aforementioned name so
as to indicate its purpose more clearly.
|
org.eclipse.emf.ecore.EPackage |
getEPackage()
Deprecated.
Use #getRootEPackage() instead. Rationale: This method has been renamed to the aforementioned name so
as to indicate its purpose more clearly.
|
java.lang.String |
getEPackageNsURIPattern()
Deprecated.
use
matchesEPackageNsURIPattern(String) instead |
java.util.Collection<org.eclipse.emf.ecore.EPackage> |
getEPackages()
Returns the set of
EPackage s which are associated with the described
meta-model . |
java.lang.String |
getIdentifier()
Returns the identifier of the described meta-model.
|
java.lang.String |
getName()
Returns the name of the described meta-model.
|
java.lang.String |
getNamespace()
Returns the namespace (as a string) of the described meta-model.
|
java.net.URI |
getNamespaceURI()
Returns the namespace
URI of the described meta-model. |
int |
getOrdinal()
Deprecated.
|
org.eclipse.emf.ecore.EFactory |
getRootEFactory()
Returns the root
EFactory which is associated with the described
meta-model . |
org.eclipse.emf.ecore.EPackage |
getRootEPackage()
Returns the root
EPackage which is associated with the described
meta-model . |
boolean |
isEPackageRegistered()
Deprecated.
Use #getERootPackage() and test if result is not
null instead. Rationale: the added
value of this method is not that significant. Furthermore, the current implementation seems not to be
in sync with the behavior that is put forward in the JavaDoc. Clients should no longer make use of
this method and directly implement the required behavior. |
boolean |
matchesEPackageNsURIPattern(java.lang.String uri)
Returns true if the passed in URI matches the namespace pattern for the EPackages associated of with the
described meta-model.
|
static final java.lang.String LABEL_PATTERN
java.lang.String getIdentifier()
getName()
). The identifier can also be used to reference the
described meta-model from within an extension point.
Uses a specific identifier instead of namespace URI in order to distinguish available meta-model descriptors.
Namespace URI is revision dependent since when the minor version of a release changes, the namespace URI changes. As a consequence, it is more safe to refer a meta-model descriptor with its identifier (e.g. in a project's preferences).
java.net.URI getNamespaceURI()
URI
of the described meta-model. The namespace URI
is a unique identifier
used to link the meta-model description to registered EMF artifacts like the root
EPackage
and the EFactory
.URI
of the described meta-model.java.lang.String getNamespace()
EPackage
and the EFactory
.java.lang.String getName()
IMetaModelDescriptor getBaseDescriptor()
descriptor
of the base meta-model behind the described meta-model. When
multiple implementations of different versions of the same meta-model exist each of them is described by a
version-specific meta-model descriptor. In this case, the base meta-model encompasses the common aspects of all
meta-model versions and the descriptor of it, if there is any, is what is returned by this method.null
if the described
meta-model has no base meta-model.java.lang.String getCustomURIScheme()
null
if it uses standard
URIs (e.g., platform:/resource, file:, etc.) instead.@Deprecated int getOrdinal()
MetaModelVersionData.getOrdinal()
null
is
returned.null
if the described meta-model is not a
concrete meta-model version.@Deprecated java.lang.String getEPackageNsURIPattern()
matchesEPackageNsURIPattern(String)
insteadboolean matchesEPackageNsURIPattern(java.lang.String uri)
java.util.Collection<org.eclipse.emf.ecore.EPackage> getEPackages()
EPackage
s which are associated with the described
meta-model
.org.eclipse.emf.ecore.EPackage getRootEPackage()
EPackage
which is associated with the described
meta-model
. An EPackage is considered to be a meta-model's root EPackage if it has
the same namespace as the latter.@Deprecated org.eclipse.emf.ecore.EPackage getEPackage()
@Deprecated boolean isEPackageRegistered()
null
instead. Rationale: the added
value of this method is not that significant. Furthermore, the current implementation seems not to be
in sync with the behavior that is put forward in the JavaDoc. Clients should no longer make use of
this method and directly implement the required behavior.EPackage
associated with the described meta-model is
registered. The EPackage.Registry
is to be consolidated if the
top-level package is actually registered (see also getRootEPackage()
).true if the associated top-level EPackage is registered else false
;
org.eclipse.emf.ecore.EFactory getRootEFactory()
EFactory
which is associated with the described
meta-model
. An EFactory is considered to be a meta-model's root EFactory if the
EPackage
it belongs to is the meta-model's root EPackage
.getRootEPackage()
@Deprecated org.eclipse.emf.ecore.EFactory getEFactory()
java.util.List<java.lang.String> getContentTypeIds()
content type
s which are
associated with the described meta-model.java.lang.String getDefaultContentTypeId()
content type
for the
described meta-model.
The default content type identifier typically is the content type identifier which has been specified in the
generator model options for the root package
of the described meta-model and is
available on the root package
's static #eCONTENT_TYPE field.
#getERootPackage()
java.util.List<java.net.URI> getCompatibleNamespaceURIs()
URI
s which refer to older but all the same compatible versions of the
meta-model described by this meta-model descriptor
.URI
s.getNamespaceURI()
java.util.List<java.lang.String> getCompatibleContentTypeIds()
meta-model descriptor
.getContentTypeIds()
void addAssociatedContentTypeId(java.lang.String contentTypeId)
meta-model
descriptor
.contentTypeId
- java.util.Collection<IMetaModelDescriptor> getCompatibleResourceVersionDescriptors()
meta-model descriptor
s identifying resource versions which
are older but all the same compatible with the meta-model described by this meta-model descriptor
.descriptor
s.