org.eclipse.birt.report.model.api.metadata
Interface IElementDefn

All Superinterfaces:
IObjectDefn

public interface IElementDefn
extends IObjectDefn

Interface for a report element definition. This interface defines some methods to get "meta-data" about an element.


Method Summary
 boolean allowsUserProperties()
          Determines if this element allows user properties.
 boolean canContain(int slot, IElementDefn type)
          Reports whether the given slot can contain elements of the given type.
 boolean canExtend()
          Returns whether elements of this class can be extended.
 java.util.List getContents()
          Returns the property definitions for this element that can hold other elements.
 java.util.List getExpressions()
          Returns the expression property definition list of this element definition and parent definition.
 java.util.List getGroupNames()
          Returns a list of the localized property group names defined by this element and its parents.
 java.util.List getLocalExpressions()
          Returns the expression property definition list of this element definition.
 java.util.List getLocalMethods()
          Returns the method definition list of this element definition.
 java.util.List getLocalProperties()
          Returns properties definitions as a list.
 java.util.List getMethods()
          Returns the method definition list of this element definition and parent definition.
 int getNameOption()
          Gets the name option that says how the element type handles names.
 java.util.List getProperties()
          Returns the properties defined on this element.
 IElementPropertyDefn getProperty(java.lang.String propName)
          Gets a property definition given a property name.
 ISlotDefn getSlot(int slotID)
          Returns the meta-data definition for a slot given its numeric slot identifier.
 int getSlotCount()
          Returns the number of slots in this container.
 boolean hasSlot(int slotID)
          Returns whether this element has the requested slot given the numeric identifier of the slot.
 boolean hasStyle()
          Indicates if this element has a style.
 boolean isContainer()
          Determines if this element acts as a container.
 boolean isExtendedElement()
          Justifies whether this definition is extension element.
 boolean isKindOf(IElementDefn type)
          Determines if the given element type is a kind of this type.
 boolean isPropertyReadOnly(java.lang.String propName)
          Checks whether the property value is read-only in the property sheet.
 boolean isPropertyVisible(java.lang.String propName)
          Checks whether the property is visible to the property sheet.
 
Methods inherited from interface org.eclipse.birt.report.model.api.metadata.IObjectDefn
findProperty, getDisplayName, getDisplayNameKey, getName, getPropertyIterator, propertiesIterator
 

Method Detail

hasStyle

boolean hasStyle()
Indicates if this element has a style.

Returns:
Returns whether the element has a style.

getProperties

java.util.List getProperties()
Returns the properties defined on this element. Each object in the list is instance of IElementPropertyDefn.

Returns:
list of properties defined in this element and and all its parent elements.

getLocalProperties

java.util.List getLocalProperties()
Returns properties definitions as a list. Each object in the list is instance of IElementPropertyDefn.

Returns:
list of locally-defined properties.

getProperty

IElementPropertyDefn getProperty(java.lang.String propName)
Gets a property definition given a property name.

Parameters:
propName - The name of the property to get.
Returns:
The property with that name, or null if the property cannot be found.

getMethods

java.util.List getMethods()
Returns the method definition list of this element definition and parent definition. Each object in the list is instance of IElementPropertyDefn.

Returns:
the method definition list.

getLocalMethods

java.util.List getLocalMethods()
Returns the method definition list of this element definition. Each object in the list is instance of IElementPropertyDefn.

Returns:
the method definition list.

getExpressions

java.util.List getExpressions()
Returns the expression property definition list of this element definition and parent definition. Each object in the list is instance of IElementPropertyDefn.

Returns:
the expression property definition list.

getLocalExpressions

java.util.List getLocalExpressions()
Returns the expression property definition list of this element definition. Each object in the list is instance of IElementPropertyDefn.

Returns:
the expression property definition list.

getGroupNames

java.util.List getGroupNames()
Returns a list of the localized property group names defined by this element and its parents.

The UI uses property groups to organize properties within the generic property sheet.

Returns:
The list of group names. If there is no groups defined on the element, the list will has no content.

allowsUserProperties

boolean allowsUserProperties()
Determines if this element allows user properties.

Returns:
Returns true if the element supports user-defined properties, false if not.

isContainer

boolean isContainer()
Determines if this element acts as a container.

Returns:
True if this element is a container, false otherwise.

getSlotCount

int getSlotCount()
Returns the number of slots in this container.

Returns:
The number of slots. Returns 0 if this element is not a container.

hasSlot

boolean hasSlot(int slotID)
Returns whether this element has the requested slot given the numeric identifier of the slot.

Parameters:
slotID - The slotID to check.
Returns:
True if the slotID exists, false otherwise.

getSlot

ISlotDefn getSlot(int slotID)
Returns the meta-data definition for a slot given its numeric slot identifier.

Parameters:
slotID - The slot identifier.
Returns:
The slot information. Returns null if this element is not a container, or if the ID is not valid for this container.

getContents

java.util.List getContents()
Returns the property definitions for this element that can hold other elements. Each one in the list is instance of IPropertyDefn.

Returns:

canContain

boolean canContain(int slot,
                   IElementDefn type)
Reports whether the given slot can contain elements of the given type.

Parameters:
slot - The slot to check.
type - The element type to check.
Returns:
True if the slot can contain that element type, false if the element is not a container, if the slot does not exist, or if the slot can't contain that type of element.

canExtend

boolean canExtend()
Returns whether elements of this class can be extended.

Returns:
True if the element can be extended, false if not.

getNameOption

int getNameOption()
Gets the name option that says how the element type handles names. One of the following defined in MetaDataConstants:

Returns:
the name option

isPropertyVisible

boolean isPropertyVisible(java.lang.String propName)
Checks whether the property is visible to the property sheet.

Parameters:
propName - the property name
Returns:
true if the element definition has the property definition and it is visible, false otherwise.

isPropertyReadOnly

boolean isPropertyReadOnly(java.lang.String propName)
Checks whether the property value is read-only in the property sheet.

Parameters:
propName - the property name
Returns:
true if the element definition has the property definition and it is readonly, false otherwise.

isKindOf

boolean isKindOf(IElementDefn type)
Determines if the given element type is a kind of this type. It is if either the given type is the same as this one, or if the given type derives from this type.

Parameters:
type - The element type to check.
Returns:
True if it is a kind of this element, false otherwise.

isExtendedElement

boolean isExtendedElement()
Justifies whether this definition is extension element.

Returns:
true if it is extension element


Copyright © 2008 Actuate Corp. All rights reserved.