public interface IlrElement extends org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EModelElement, IlrElement
This is the base class of all objects in the Rule Designer model.
In its life cycle, an element can go through several states:
proxy: a proxy element represents an unresolved reference
to an element. See the method org.eclipse.emf.ecore.EObject#eIsProxy() to
know whether your instance of IlrElement is a proxy.deleted: you can reach a deleted element from another element that
has a reference towards this element now deleted. See the method isDeleted()
to know whether your instance of IlrElement is deleted.invalid: an invalid element is an element that is duplicated
(another element in the model has the UUID) or deleted. See the method
isValid() to know whether your instance of IlrElement is valid or not.
If your instance of IlrElement is neither proxy nor invalid,
you hold a valid Rule Designer element.
Note that all IlrElement(s) are kept in caches based
on weak-references. Consequently, you should not keep references to a deleted IlrElement
because in this case the caches of Rule Designer cannot be cleaned-up, and this can cause
unexpected behaviors in the Rule Model.
IlrModelPackage.getElement()| Modifier and Type | Method and Description |
|---|---|
IlrElement |
cloneElement()
Generates a clone of this element.
|
org.eclipse.emf.ecore.EAnnotation |
createAnnotation(java.lang.String typeURI,
java.util.Map<java.lang.String,java.lang.String> details)
Creates an annotation on this element.
|
void |
deleteElement()
Deletes this element.
|
void |
fillWith(IlrElement source)
Copies the values of the features (attributes and references) of this
source element into the features of this element.
|
java.lang.Object |
getAdapter(java.lang.Class<?> adapter)
Gets an adapter for this class.
|
java.lang.String |
getDisplayName()
Gets the display name of this element.
|
IlrRuleModel |
getModel()
Gets the
IlrRuleModel that contains this element. |
java.lang.String |
getName()
Gets the
name of this element. |
boolean |
isDeleted()
Returns
true if this element has been previously deleted. |
boolean |
isValid()
Returns
true if the element is neither deleted
nor duplicated (another element in the model has the same UUID). |
void |
setPropertyValue(org.eclipse.emf.ecore.EStructuralFeature feature,
java.lang.Object value)
Generic setter for setting the value of the property
feature. |
void |
setPropertyValue(java.lang.String propName,
java.lang.Object value)
Generic setter for setting the value of the property
propName. |
getEAnnotation, getEAnnotationseAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnseteAdapters, eDeliver, eNotify, eSetDelivereClass, getPropertyValue, getPropertyValue, isInstanceOfIlrRuleModel getModel()
IlrRuleModel that contains this element.
java.lang.String getName()
name of this element.
org.eclipse.emf.ecore.EAnnotation createAnnotation(java.lang.String typeURI,
java.util.Map<java.lang.String,java.lang.String> details)
IlrElement cloneElement()
In particular, this method is used to create working copies of elements. The elements referenced by this element are not cloned, and the resulting cloned object points to them.
void fillWith(IlrElement source) throws IlrModelException
The source element has to be of the same type as this element, otherwise
an IlrModelException is thrown.
IlrModelExceptionvoid deleteElement()
The method isDeleted() will now return true,
and isValid() will now return false.
The references towards this element are not deleted. The elements that referred to this element now refer to the same element, which is marked deleted.
boolean isValid()
true if the element is neither deleted
nor duplicated (another element in the model has the same UUID).
boolean isDeleted()
true if this element has been previously deleted.
The element is also marked as invalid.
isValid(),
java.lang.Object getAdapter(java.lang.Class<?> adapter)
The adapter pattern is widely used in Eclipse to determine whether an element is eligible for a service.
java.lang.String getDisplayName()
In the case of internationalized projects you can specify in Rule Designer a display name different from the name of the element. The display name will be used in the GUI of Rule Designer to represent the element, and the name is used internally by Rule Designer to designate the element.
If the element is in a rule project then this method will call the naming service on the rule project to find a display name for this element. If a display name is not found, it returns the name.
void setPropertyValue(java.lang.String propName,
java.lang.Object value)
propName.
© Copyright IBM Corp. 1987, 2017