public class AbstractModelElement extends Object implements IModelElement
DESCRIPTIONS_PROPERTY_LOCALE, DESCRIPTIONS_XML_TAG, DESCRIPTIONS_XML_WRAPPER_TAG, EXTENSION_PROPERTIES_PROPERTY_ID, EXTENSION_PROPERTIES_PROPERTY_NULL, EXTENSION_PROPERTIES_XML_TAG, EXTENSION_PROPERTIES_XML_WRAPPER_TAG, LABELS_PROPERTY_LOCALE, LABELS_PROPERTY_PLURAL_VALUE, LABELS_PROPERTY_VALUE, LABELS_XML_TAG, LABELS_XML_WRAPPER_TAG, PROPERTY_NAME| Constructor and Description |
|---|
AbstractModelElement(IRuntimeRepository repository) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription(Locale locale)
Returns the description for the given locale.
|
Set<String> |
getExtensionPropertyIds()
Returns a set of the extension property ids defined for this element.
|
Object |
getExtensionPropertyValue(String propertyId) |
String |
getLabel(Locale locale)
Returns the label for the given locale.
|
String |
getName()
Returns the name of this model type.
|
IRuntimeRepository |
getRepository()
Returns the repository this model element belongs to.
|
protected void |
initDescriptionsFromXml(XMLStreamReader parser) |
void |
initExtPropertiesFromXml(XMLStreamReader parser)
Initializes the model element's extension properties with the data stored in the xml element
at the parser's current position.
|
void |
initFromXml(XMLStreamReader parser)
Initializes the model element's state with the data stored in the xml element at the parser's
current position.
|
protected void |
initLabelFromXml(XMLStreamReader parser) |
protected void |
initLabelsFromXml(XMLStreamReader parser) |
void |
setExtensionPropertyValue(String propertyId,
Object value)
Sets the value of the extension property
propertyId. |
public AbstractModelElement(IRuntimeRepository repository)
public String getLabel(Locale locale)
IModelElementReturns the element's name if no label exists for the given locale.
getLabel in interface IModelElementpublic String getDescription(Locale locale)
IModelElementReturns an empty string if no description exists for the given locale.
getDescription in interface IModelElementpublic Object getExtensionPropertyValue(String propertyId)
getExtensionPropertyValue in interface IModelElementpropertyId - the id of the desired extension property. Returns the value of the
extension property defined by the given propertyId or
null if the extension property's isNull attribute is
true.public void setExtensionPropertyValue(String propertyId, Object value)
propertyId.public String getName()
IModelElementgetName in interface IModelElementpublic void initFromXml(XMLStreamReader parser) throws XMLStreamException
IModelElementinitFromXml in interface IModelElementXMLStreamExceptionprotected final void initDescriptionsFromXml(XMLStreamReader parser) throws XMLStreamException
XMLStreamExceptionprotected final void initLabelsFromXml(XMLStreamReader parser) throws XMLStreamException
XMLStreamExceptionprotected void initLabelFromXml(XMLStreamReader parser)
public Set<String> getExtensionPropertyIds()
IModelElementgetExtensionPropertyIds in interface IModelElementpublic void initExtPropertiesFromXml(XMLStreamReader parser) throws XMLStreamException
IModelElement<ExtensionProperties>.initExtPropertiesFromXml in interface IModelElementXMLStreamExceptionpublic IRuntimeRepository getRepository()
IModelElementnull.getRepository in interface IModelElementCopyright © 2014. All rights reserved.