com.orchestranetworks.ui
Interface UILabelRendererForHierarchyContext


public interface UILabelRendererForHierarchyContext

Provides a context for displaying a hierarchy node.

Warning: if node is a root, an orphans parent, or an enumeration node, it does not correspond to a table occurrence (that is, method getOccurrence() returns null).

See Also:
UILabelRendererForHierarchy

Method Summary
 UILabelRendererForHierarchyContext add_cr(String aString)
          Writes a String to the HTTP output stream and adds a carriage return to the HTML source at the end.
 UILabelRendererForHierarchyContext add(int integer)
          This writes an int to the HTTP output stream.
 UILabelRendererForHierarchyContext add(String aString)
          Writes a string to the HTTP output stream.
 String displayOccurrenceValue(Path aPath, boolean useLabels)
          Returns a user-friendly representation of the value specified, according the current locale.
 Object getEnumerationValue()
          Returns the current enumeration value if isEnumerationNode() is true.
 String getLabelFromDefaultPattern()
          Returns the localized label as specified by the element defaultLabel that defines a pattern in osd:table schema declaration.
 Locale getLocale()
          Returns the current locale of the user session.
 Adaptation getOccurrence()
          Returns the current occurrence that is being displayed.
 String getURLForResource(ResourceType aResourceType, String aResourceName)
          Returns the URL of the Web resource specified, in the current module and for the current session locale.
 String getURLForResource(ResourceType aResourceType, String aResourceName, Locale aLocale)
          Returns the URL of the Web resource specified, in the current module (that is, the module of the current adaptation).
 String getURLForResource(String aModuleAliasOrName, ResourceType aResourceType, String aResourceName, Locale aLocale)
          Returns the URL of the Web resource specified.
 boolean isEnumerationNode()
          Returns true if current node is an enumeration node.
 boolean isOrphansParent()
          Returns true if current node is an orphans parent.
 boolean isRoot()
          Returns true if current node is the root of the hierarchy.
 boolean isTarget()
          Returns true if current occurrence is a target table occurrence.
 boolean isTerminal()
          Returns true if current occurrence has no children in the hierarchy.
 

Method Detail

add

public UILabelRendererForHierarchyContext add(String aString)
Writes a string to the HTTP output stream.


add

public UILabelRendererForHierarchyContext add(int integer)
This writes an int to the HTTP output stream.


add_cr

public UILabelRendererForHierarchyContext add_cr(String aString)
Writes a String to the HTTP output stream and adds a carriage return to the HTML source at the end. It does not do any flush or any Carriage return to the HTML view.


getLocale

public Locale getLocale()
Returns the current locale of the user session.


getURLForResource

public String getURLForResource(ResourceType aResourceType,
                                String aResourceName)
Returns the URL of the Web resource specified, in the current module and for the current session locale.

See Also:
getURLForResource(ResourceType, String, Locale), getLocale()

getURLForResource

public String getURLForResource(ResourceType aResourceType,
                                String aResourceName,
                                Locale aLocale)
Returns the URL of the Web resource specified, in the current module (that is, the module of the current adaptation).

Throws:
UnsupportedOperationException - if the resource type is internal (not accessible from HTTP).

getURLForResource

public String getURLForResource(String aModuleAliasOrName,
                                ResourceType aResourceType,
                                String aResourceName,
                                Locale aLocale)
                         throws ModuleNotFoundException
Returns the URL of the Web resource specified.

Throws:
UnsupportedOperationException - if the resource type is internal (not accessible from HTTP).
ModuleNotFoundException - if the alias or name specified does not correspond to a module.

getOccurrence

public Adaptation getOccurrence()
Returns the current occurrence that is being displayed.

Warning: if current node is a root or an orphans parent, this method returns null.


getEnumerationValue

public Object getEnumerationValue()
Returns the current enumeration value if isEnumerationNode() is true. Otherwise this method returns null.


displayOccurrenceValue

public String displayOccurrenceValue(Path aPath,
                                     boolean useLabels)
Returns a user-friendly representation of the value specified, according the current locale.

Value display:

A value can have a display that is different from the standard XML formatted value since it can take into account locale-dependent format for numbers and dates and also, if useLabels is true, specific value labeling.

For more information, see value display section.

Parameters:
aPath - specifies the value to display in the occurrence (a relative path is interpreted telatively to the root node of this context).
useLabels - If true and labeling is enabled (see above), specifies that the label associated to the value must be returned. Otherwise the formatted value is returned.
Throws:
IllegalStateException - if this node is not on an occurrence (see getOccurrence()).
See Also:
SchemaNode.formatToXsString(Object), SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale)

getLabelFromDefaultPattern

public String getLabelFromDefaultPattern()
Returns the localized label as specified by the element defaultLabel that defines a pattern in osd:table schema declaration.


isEnumerationNode

public boolean isEnumerationNode()
Returns true if current node is an enumeration node. An enumeration corresponds in the schema to a xs:enumeration.

In this case, the method getOccurrence() returns null.

See Also:
getEnumerationValue()

isOrphansParent

public boolean isOrphansParent()
Returns true if current node is an orphans parent.

In this case, the method getOccurrence() returns null.


isRoot

public boolean isRoot()
Returns true if current node is the root of the hierarchy.

In this case, the method getOccurrence() returns null.


isTarget

public boolean isTarget()
Returns true if current occurrence is a target table occurrence.

The target table is the table from wich the hierarchy was built.


isTerminal

public boolean isTerminal()
Returns true if current occurrence has no children in the hierarchy.



(report a bug)
EBX.Platform 4.5.1 [0599]
Copyright Orchestra Networks 2000-2008. All rights reserved.