org.eclipse.birt.report.model.api
Class GroupHandle

java.lang.Object
  extended byorg.eclipse.birt.report.model.api.DesignElementHandle
      extended byorg.eclipse.birt.report.model.api.ReportElementHandle
          extended byorg.eclipse.birt.report.model.api.GroupHandle
All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IGroupElementModel
Direct Known Subclasses:
ListGroupHandle, TableGroupHandle

public abstract class GroupHandle
extends ReportElementHandle
implements org.eclipse.birt.report.model.elements.interfaces.IGroupElementModel

Represents both list and table groups in the design. Groups provide a way of showing common headings for a group of related rows.

A group is defined by a group key. The key is a column from the query. If the group key is a time field then user often want to group on an interval such as month or quarter.

See Also:
GroupElement, SlotHandle

Field Summary
 
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
element
 
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
 
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IGroupElementModel
FILTER_PROP, FOOTER_SLOT, GROUP_NAME_PROP, GROUP_START_PROP, HEADER_SLOT, INTERVAL_BASE_PROP, INTERVAL_PROP, INTERVAL_RANGE_PROP, KEY_EXPR_PROP, ON_PREPARE_METHOD, SLOT_COUNT, SORT_DIRECTION_PROP, SORT_PROP, SORT_TYPE_PROP, TOC_PROP
 
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP
 
Constructor Summary
GroupHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
          Constructs a group handle with the given design and the design element.
 
Method Summary
 java.util.Iterator filtersIterator()
          Returns an iterator for the filter list defined on the group.
 SlotHandle getFooter()
          Returns the footer slot.
 java.lang.String getGroupStart()
          Deprecated. by getIntervalBase()
 SlotHandle getHeader()
          Returns the header slot in the group.
 java.lang.String getInterval()
          Returns the interval of this group.
 java.lang.String getIntervalBase()
          Return the interval base property value of this group.
 double getIntervalRange()
          Returns the interval range of this group.
 java.lang.String getKeyExpr()
          Gets the expression that defines the group.
 java.lang.String getName()
          Gets the name of the group.
 java.lang.String getOnPrepare()
          Gets the on-prepare script of the group.
 java.lang.String getSortDirection()
          Returns the sort direction of this group.
 java.lang.String getSortType()
          Return the sort type.
 java.lang.String getTocExpression()
          Returns the expression evalueated as a table of contents entry for this item.
 boolean hasFooter()
          Checks whether the group footer slot is empty.
 boolean hasHeader()
          Checks whether the group header slot is empty.
 void setGroupStart(java.lang.String groupStart)
          Deprecated. by setIntervalBase(String)
 void setInterval(java.lang.String interval)
          Returns the interval of this group.
 void setIntervalBase(java.lang.String intervalBase)
          Sets the base of the interval property of this group.IntervalBase, in conjunction with Interval and IntervalRange, determines how data is divided into groups.
 void setIntervalRange(double intervalRange)
          Returns the interval range of this group.
 void setKeyExpr(java.lang.String expr)
          Sets the group expression.
 void setName(java.lang.String theName)
          Sets the group name.
 void setOnPrepare(java.lang.String script)
          Sets the on-prepare script of the group element.
 void setSortDirection(java.lang.String direction)
          Sets the sort direction of this group.
 void setSortType(java.lang.String sortType)
          Sets the sort type, which indicates the way of sorting
 void setTocExpression(java.lang.String expression)
          Sets a table of contents entry for this item.
 java.util.Iterator sortsIterator()
          Returns the iterator for Sort list defined on the group.
 
Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask
 
Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
addElement, addElement, addListener, addUserPropertyDefn, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerSlotHandle, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExtends, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getID, getIntProperty, getListProperty, getMethods, getModule, getModuleHandle, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, isTemplateParameterValue, isValid, localize, moveTo, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setEventHandlerClass, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setNumberProperty, setProperties, setProperty, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, showError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupHandle

public GroupHandle(org.eclipse.birt.report.model.core.Module module,
                   org.eclipse.birt.report.model.core.DesignElement element)
Constructs a group handle with the given design and the design element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.

Parameters:
module - the module
element - the model representation of the element
Method Detail

getHeader

public SlotHandle getHeader()
Returns the header slot in the group. The header slot represents subsections that print at the start of the group.

Returns:
a slot handle to the header

getFooter

public SlotHandle getFooter()
Returns the footer slot. The footer slot represents subsections that print at the end of the group.

Returns:
a slot handle to the footer

getKeyExpr

public java.lang.String getKeyExpr()
Gets the expression that defines the group. This is normally simply a reference to a data set column.

Returns:
the expression as a string
See Also:
setKeyExpr(String)

getName

public java.lang.String getName()
Gets the name of the group.

Overrides:
getName in class DesignElementHandle
Returns:
the name of the group

setName

public void setName(java.lang.String theName)
Sets the group name.

Overrides:
setName in class DesignElementHandle
Parameters:
theName - the group name to set

setKeyExpr

public void setKeyExpr(java.lang.String expr)
                throws SemanticException
Sets the group expression.

Parameters:
expr - the expression to set
Throws:
SemanticException - If the expression is invalid.
See Also:
getKeyExpr()

sortsIterator

public java.util.Iterator sortsIterator()
Returns the iterator for Sort list defined on the group. The element in the iterator is the corresponding StructureHandle.

Returns:
the iterator for SortKey structure list defined on the group.

filtersIterator

public java.util.Iterator filtersIterator()
Returns an iterator for the filter list defined on the group. Each object returned is of type StructureHandle.

Returns:
the iterator for FilterCond structure list defined on the group.

setGroupStart

public void setGroupStart(java.lang.String groupStart)
                   throws SemanticException
Deprecated. by setIntervalBase(String)

Sets group start property of this group. Group start, in conjunction with Interval and IntervalRange, determines how data is divided into groups.

Parameters:
groupStart - group start property value.
Throws:
SemanticException - if the property is locked.

getGroupStart

public java.lang.String getGroupStart()
Deprecated. by getIntervalBase()

Return the group start property value of this group.

Returns:
group start property value of this group.

setIntervalBase

public void setIntervalBase(java.lang.String intervalBase)
                     throws SemanticException
Sets the base of the interval property of this group.IntervalBase, in conjunction with Interval and IntervalRange, determines how data is divided into groups.

Parameters:
intervalBase - interval base property value.
Throws:
SemanticException - if the property is locked.

getIntervalBase

public java.lang.String getIntervalBase()
Return the interval base property value of this group.

Returns:
interval baseF property value of this group.

getInterval

public java.lang.String getInterval()
Returns the interval of this group. The return value is defined in DesignChoiceConstants and can be one of:

Returns:
the interval value as a string

setInterval

public void setInterval(java.lang.String interval)
                 throws SemanticException
Returns the interval of this group. The input value is defined in DesignChoiceConstants and can be one of:

Parameters:
interval - the interval value as a string
Throws:
SemanticException - if the property is locked or the input value is not one of the above.

getIntervalRange

public double getIntervalRange()
Returns the interval range of this group.

Returns:
the interval range value as a double

setIntervalRange

public void setIntervalRange(double intervalRange)
                      throws SemanticException
Returns the interval range of this group.

Parameters:
intervalRange - the interval range value as a double
Throws:
SemanticException - if the property is locked.

getSortDirection

public java.lang.String getSortDirection()
Returns the sort direction of this group. The return value is defined in DesignChoiceConstants and can be one of:

Returns:
the sort direction of this group

setSortDirection

public void setSortDirection(java.lang.String direction)
                      throws SemanticException
Sets the sort direction of this group. The return value is defined in DesignChoiceConstants and can be one of:

Parameters:
direction - the sort direction of this group
Throws:
SemanticException - if the property is locked or the input value is not one of the above.

hasHeader

public boolean hasHeader()
Checks whether the group header slot is empty.

Returns:
true is the header slot is not empty, otherwise, return false.

hasFooter

public boolean hasFooter()
Checks whether the group footer slot is empty.

Returns:
true is the footer slot is not empty, otherwise, return false.

setTocExpression

public void setTocExpression(java.lang.String expression)
                      throws SemanticException
Sets a table of contents entry for this item. The TOC property defines an expression that returns a string that is to appear in the Table of Contents for this item or its container.

Parameters:
expression - the expression that returns a string
Throws:
SemanticException - if the TOC property is locked by the property mask.
See Also:
getTocExpression()

getTocExpression

public java.lang.String getTocExpression()
Returns the expression evalueated as a table of contents entry for this item.

Returns:
the expression evaluated as a table of contents entry for this item
See Also:
setTocExpression(String)

setSortType

public void setSortType(java.lang.String sortType)
                 throws SemanticException
Sets the sort type, which indicates the way of sorting

Parameters:
sortType - sort type.
Throws:
SemanticException - if the property is locked.

getSortType

public java.lang.String getSortType()
Return the sort type.

Returns:
the sort type.

getOnPrepare

public java.lang.String getOnPrepare()
Gets the on-prepare script of the group. Startup phase. No data binding yet. The design of an element can be changed here.

Returns:
the on-prepare script of the group

setOnPrepare

public void setOnPrepare(java.lang.String script)
                  throws SemanticException
Sets the on-prepare script of the group element.

Parameters:
script - the script to set
Throws:
SemanticException - if the method is locked.
See Also:
getOnPrepare()


Copyright © 2005 Actuate Corp. All rights reserved.