org.eclipse.birt.report.model.elements.package.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.eclipse.birt.runtime Show documentation
Show all versions of org.eclipse.birt.runtime Show documentation
A component of the BIRT runtime
Internal representation of the BIRT report elements and items.
Package Specification
This package contains the implementation of each element defined in the
Report Object Model (ROM). Each element is represented by a subclass of
DesignElement
. Most properties are represented generically
as items on a property list. Most element classes need implement only
a few methods.
The process for adding a new element to the system is the following:
- Define the element in the report design XML schema file.
- Add property entries in rom.def for each property defined in
the element.
- Define the display name key of the element and all the properties in
the message file in the
org.eclipse.birt.report.model.i18n
package.
- If the element has a style, then list in rom.def the style properties that
should be visible on the element.
- Define the implementation of the element in the rom.def file
- If the element has choice properties, and those choices have not yet
been defined, add them to rom.def.
- If the element has a property that consists of a list of objects,
define the objects as structures in rom.def.
- Create the element class in this package as subclass of
DesignElement
, ReportItem
or some other
element base class.
- Define a default constructor and one that takes the name..
- Add a member variable to represent slots, if any.
- Implement
getElementName
to return the name of the element
as defined in the meta-data dictionary.
- Implement the
apply
method and the corresponding
visitMumble
method in the ElementVisitor
class.
- Implement the
getHandle
method to create a handle to the
element.
- Define the handle class in the
org.eclipse.birt.report.model.api
package.
- Review the properties of the element. Decide which to implement as
methods on the handle class. Implement that set.
- Implement parser support for the element in the
org.eclipse.birt.report.model.parser
package.
- Implement design writer support for the element in the
org.eclipse.birt.report.model.writer
package.
- Create unit tests and test all aspect of the element: parser,
properties, slots, handle, etc.
The best way to proceed is to look at an example. Good examples are
{@link org.eclipse.birt.report.model.elements.DataItem},
{@link org.eclipse.birt.report.model.elements.DataSet}, and
{@link org.eclipse.birt.report.model.elements.ListItem}.
Related Documentation
The reader should be familiar with the BIRT Reporting Object Model (ROM) as
defined in the following documents. The comments in classes here don't
explain the ROM itself; only how the classes here implement the ROM.
The reference documents explain, for example, what a List element does,
what a List Group is, and so on. This is essential background information
for working with this package.
- BIRT design file schema.
- BIRT Report Elements specification.
- BIRT Design File Schema specification.
- The Reporting Object Model definition file,
rom.def, contains the meta-data definitions of
the report elements. Use this to determine property names, types
and characteristics. It also defines the choices for choice properties,
the set of elements, the inheritance relationships between elements,
and so on.
@see org.eclipse.birt.report.model.core.DesignElement
@see org.eclipse.birt.report.model.elements.ReportItem