public interface IMModelServices
TODO : to be split in metamodel independent and metamodel dependent parts.
Modifier and Type | Method and Description |
---|---|
java.util.Collection<? extends MObject> |
findByAtt(MClass metaclass,
java.lang.String att,
java.lang.Object value)
Get elements in the model from a metaclass, a meta attribute name and its value.
|
java.util.Collection<? extends MObject> |
findByClass(MClass metaclass)
Get all elements in the model from their metaclass.
|
MObject |
findById(MClass metaclass,
java.lang.String id)
Get an element in the model from its id and metaclass.
|
MObject |
findByRef(MRef ref)
Get an element in the model from an
MRef . |
java.util.List<NoteType> |
findNoteTypes(java.lang.String moduleName,
java.lang.String ownerName,
java.lang.String noteTypeName,
MClass metaclass)
Find note types by name and metaclass
|
java.util.List<ResourceType> |
findResourceTypes(java.lang.String moduleName,
java.lang.String ownerName,
java.lang.String externDocumentTypeName,
MClass metaclass)
Find resource types by name and metaclass
|
java.util.List<Stereotype> |
findStereotypes(java.lang.String moduleName,
java.lang.String stereotypeName,
MClass metaclass)
Find stereotypes by name and metaclass
|
java.util.List<Stereotype> |
findStereotypes(java.lang.String moduleName,
java.lang.String stereotypeName,
java.lang.String metaclass)
Deprecated.
|
java.util.List<TagType> |
findTagTypes(java.lang.String moduleName,
java.lang.String ownerName,
java.lang.String tagTypeName,
MClass metaclass)
Find tag types by name and metaclass
|
java.lang.String |
getCompositionPath(MObject mObject) |
IElementConfigurator |
getElementConfigurer() |
IElementNamer |
getElementNamer() |
MMetamodel |
getMetamodel() |
IModelFactoryService |
getModelFactory()
Get the model object creation factory.
|
NoteType |
getNoteType(java.lang.String moduleName,
java.lang.String ownerName,
java.lang.String noteTypeName,
MClass metaclass)
Find a note type by name and metaclass.
|
ResourceType |
getResourceType(java.lang.String moduleName,
java.lang.String ownerName,
java.lang.String resourceTypeName,
MClass metaclass)
Find a resource type by name and metaclass.
|
Stereotype |
getStereotype(java.lang.String moduleName,
java.lang.String stereotypeName,
MClass metaclass)
Find a stereotype by name and metaclass.
|
Stereotype |
getStereotype(java.lang.String moduleName,
java.lang.String stereotypeName,
java.lang.String metaclass)
Deprecated.
|
TagType |
getTagType(java.lang.String moduleName,
java.lang.String ownerName,
java.lang.String tagTypeName,
MClass metaclass)
Find a tag type by name and metaclass.
|
java.util.Collection<? extends MObject> findByAtt(MClass metaclass, java.lang.String att, java.lang.Object value)
If Element
is given, every elements in the model will be checked.
metaclass
- the metaclass to look for.att
- the name of the meta attribute to check the value in.value
- the value to look for in the attribute.null
.java.util.Collection<? extends MObject> findByClass(MClass metaclass)
metaclass
- the metaclass to look for.MObject findById(MClass metaclass, java.lang.String id)
metaclass
- the java interface of the metaclass to look for.id
- the id to look for.MObject findByRef(MRef ref) throws UnknownMetaclassException
MRef
.ref
- a model object reference.UnknownMetaclassException
- when the reference's metaclass can't be resolved as a MClass
java.lang.String getCompositionPath(MObject mObject)
IElementConfigurator getElementConfigurer()
IElementNamer getElementNamer()
MMetamodel getMetamodel()
IModelFactoryService getModelFactory()
NoteType getNoteType(java.lang.String moduleName, java.lang.String ownerName, java.lang.String noteTypeName, MClass metaclass) throws ElementNotUniqueException
moduleName
- the name of the module owing the note type, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.ownerName
- the name of the Stereotype
or MetaclassReference
owning the type. Cannot be null
.noteTypeName
- the note type name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any note type.metaclass
- a metaclass the note type must be applicable to.null
is no element matches the given parameters.ElementNotUniqueException
- when resolution is ambiguous and several note types match the given parametersjava.util.List<NoteType> findNoteTypes(java.lang.String moduleName, java.lang.String ownerName, java.lang.String noteTypeName, MClass metaclass)
moduleName
- the name of the module owing the note type, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.ownerName
- the name of the Stereotype
or MetaclassReference
owning the type. Cannot be null
.noteTypeName
- the note type name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any note type.metaclass
- the metaclass .ResourceType getResourceType(java.lang.String moduleName, java.lang.String ownerName, java.lang.String resourceTypeName, MClass metaclass) throws ElementNotUniqueException
moduleName
- the name of the module owing the resource type, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.ownerName
- the name of the Stereotype
or MetaclassReference
owning the type. Cannot be null
.resourceTypeName
- the resource type name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any resource type.metaclass
- a metaclass the resource type must be applicable to.null
is no element matches the given parameters.ElementNotUniqueException
- when resolution is ambiguous and several resource types match the given parametersjava.util.List<ResourceType> findResourceTypes(java.lang.String moduleName, java.lang.String ownerName, java.lang.String externDocumentTypeName, MClass metaclass)
moduleName
- the name of the module owing the resource type, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.ownerName
- the name of the Stereotype
or MetaclassReference
owning the type. Cannot be null
.externDocumentTypeName
- the resource type name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any resource type.metaclass
- the metaclass .Stereotype getStereotype(java.lang.String moduleName, java.lang.String stereotypeName, MClass metaclass) throws ElementNotUniqueException
moduleName
- the name of the module owing the stereotype, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.stereotypeName
- the stereotype name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any stereotype.metaclass
- a metaclass the stereotype must be applicable to.null
is no element matches the given parameters.ElementNotUniqueException
- when resolution is ambiguous and several stereotypes match the given parameters@Deprecated Stereotype getStereotype(java.lang.String moduleName, java.lang.String stereotypeName, java.lang.String metaclass) throws ElementNotUniqueException, UnknownMetaclassException
moduleName
- the name of the module owing the stereotype, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.stereotypeName
- the stereotype name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any stereotype.metaclass
- a metaclass the stereotype must be applicable to.null
is no element matches the given parameters.ElementNotUniqueException
- when resolution is ambiguous and several stereotypes match the given parametersUnknownMetaclassException
- when metaclass can't be resolved as a MClass
java.util.List<Stereotype> findStereotypes(java.lang.String moduleName, java.lang.String stereotypeName, MClass metaclass)
moduleName
- the name of the module owing the stereotype, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.stereotypeName
- the stereotype name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any stereotype.metaclass
- the metaclass .@Deprecated java.util.List<Stereotype> findStereotypes(java.lang.String moduleName, java.lang.String stereotypeName, java.lang.String metaclass) throws UnknownMetaclassException
moduleName
- the name of the module owing the stereotype, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.stereotypeName
- the stereotype name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any stereotype.metaclass
- the metaclass name. Using a qualified name is strongly recommended.UnknownMetaclassException
- if the metaclass name does not match an existing metaclass.TagType getTagType(java.lang.String moduleName, java.lang.String ownerName, java.lang.String tagTypeName, MClass metaclass) throws ElementNotUniqueException
moduleName
- the name of the module owing the tag type, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.ownerName
- the name of the Stereotype
or MetaclassReference
owning the type. Cannot be null
.tagTypeName
- the tag type name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any tag type.metaclass
- a metaclass the tag type must be applicable to.null
is no element matches the given parameters.ElementNotUniqueException
- when resolution is ambiguous and several tag types match the given parametersjava.util.List<TagType> findTagTypes(java.lang.String moduleName, java.lang.String ownerName, java.lang.String tagTypeName, MClass metaclass)
moduleName
- the name of the module owing the tag type, or a regular expression for module name matching. null
or ""
are interpreted as ".*"
, i.e. any module.ownerName
- the name of the Stereotype
or MetaclassReference
owning the type. Cannot be null
.tagTypeName
- the tag type name, or a regular expression. null
or ""
are interpreted as ".*"
, i.e. any tag type.metaclass
- the metaclass.