org.faktorips.runtime.modeltype
Interface IModelElement

All Known Subinterfaces:
IModelType, IModelTypeAssociation, IModelTypeAttribute
All Known Implementing Classes:
AbstractModelElement, ModelType, ModelTypeAssociation, ModelTypeAttribute

public interface IModelElement

Base Interface for all model elements.

Author:
Daniel Hohenberger

Field Summary
static String DESCRIPTIONS_PROPERTY_LOCALE
           
static String DESCRIPTIONS_XML_TAG
           
static String DESCRIPTIONS_XML_WRAPPER_TAG
           
static String EXTENSION_PROPERTIES_PROPERTY_ID
           
static String EXTENSION_PROPERTIES_PROPERTY_NULL
           
static String EXTENSION_PROPERTIES_XML_TAG
           
static String EXTENSION_PROPERTIES_XML_WRAPPER_TAG
           
static String LABELS_PROPERTY_LOCALE
           
static String LABELS_PROPERTY_PLURAL_VALUE
           
static String LABELS_PROPERTY_VALUE
           
static String LABELS_XML_TAG
           
static String LABELS_XML_WRAPPER_TAG
           
static String PROPERTY_NAME
           
 
Method Summary
 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.
 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.
 

Field Detail

PROPERTY_NAME

static final String PROPERTY_NAME
See Also:
Constant Field Values

DESCRIPTIONS_XML_TAG

static final String DESCRIPTIONS_XML_TAG
See Also:
Constant Field Values

DESCRIPTIONS_XML_WRAPPER_TAG

static final String DESCRIPTIONS_XML_WRAPPER_TAG
See Also:
Constant Field Values

DESCRIPTIONS_PROPERTY_LOCALE

static final String DESCRIPTIONS_PROPERTY_LOCALE
See Also:
Constant Field Values

LABELS_XML_TAG

static final String LABELS_XML_TAG
See Also:
Constant Field Values

LABELS_XML_WRAPPER_TAG

static final String LABELS_XML_WRAPPER_TAG
See Also:
Constant Field Values

LABELS_PROPERTY_LOCALE

static final String LABELS_PROPERTY_LOCALE
See Also:
Constant Field Values

LABELS_PROPERTY_VALUE

static final String LABELS_PROPERTY_VALUE
See Also:
Constant Field Values

LABELS_PROPERTY_PLURAL_VALUE

static final String LABELS_PROPERTY_PLURAL_VALUE
See Also:
Constant Field Values

EXTENSION_PROPERTIES_XML_TAG

static final String EXTENSION_PROPERTIES_XML_TAG
See Also:
Constant Field Values

EXTENSION_PROPERTIES_XML_WRAPPER_TAG

static final String EXTENSION_PROPERTIES_XML_WRAPPER_TAG
See Also:
Constant Field Values

EXTENSION_PROPERTIES_PROPERTY_ID

static final String EXTENSION_PROPERTIES_PROPERTY_ID
See Also:
Constant Field Values

EXTENSION_PROPERTIES_PROPERTY_NULL

static final String EXTENSION_PROPERTIES_PROPERTY_NULL
See Also:
Constant Field Values
Method Detail

getExtensionPropertyValue

Object getExtensionPropertyValue(String propertyId)
                                 throws IllegalArgumentException
Parameters:
propertyId - 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.
Throws:
IllegalArgumentException - if no such property exists.

getExtensionPropertyIds

Set<String> getExtensionPropertyIds()
Returns a set of the extension property ids defined for this element.


getName

String getName()
Returns the name of this model type.


initFromXml

void initFromXml(XMLStreamReader parser)
                 throws XMLStreamException
Initializes the model element's state with the data stored in the xml element at the parser's current position.

Throws:
XMLStreamException

initExtPropertiesFromXml

void initExtPropertiesFromXml(XMLStreamReader parser)
                              throws XMLStreamException
Initializes the model element's extension properties with the data stored in the xml element at the parser's current position. This method assumes that the element is <ExtensionProperties>.

Throws:
XMLStreamException

getRepository

IRuntimeRepository getRepository()
Returns the repository this model element belongs to. This method never returns null.


getLabel

String getLabel(Locale locale)
Returns the label for the given locale.

Returns the element's name if no label exists for the given locale.


getDescription

String getDescription(Locale locale)
Returns the description for the given locale.

Returns an empty string if no description exists for the given locale.



Copyright © 2015. All rights reserved.