ilog.views.appframe.settings
Class IlvSettingsQuery

java.lang.Object
  extended by ilog.views.appframe.settings.IlvSettingsQuery

public class IlvSettingsQuery
extends Object

Defines the query for access settings elements.


Constructor Summary
IlvSettingsQuery()
          Creates a new IlvSettingsQuery instance.
IlvSettingsQuery(IlvSettingsElement element)
          Creates a new query to search relative to the specified settings element.
IlvSettingsQuery(IlvSettingsElement[] elements)
          Creates a new query to search relative to the specified settings elements.
IlvSettingsQuery(String path)
          Creates a new IlvSettingsQuery instance from the specified XPATH expression string.
IlvSettingsQuery(String type, String attributeName, Object value)
          Creates a new IlvSettingsQuery instance that selects the first element that matches the specified type and with an attribute of name attributeName that has the same value as the specified value.
 
Method Summary
 void addNewStep(String axisName, String nodeName)
          Adds a new step to the node path.
 String getPath()
          Returns the XPATH expression corresponding to this query.
 IlvSettingsElement[] getRelativeElementList()
          Returns the settings elements that this query starts the selection from.
 ResourceBundle getResourceBundle()
          Returns the resource bundle used for translating the literal strings.
 boolean isRelativePath()
          Determines whether this query is relative to context nodes.
 boolean removeLastStep()
          Removes the last step of this path.
 void selectAttributeValue(String attributeName, String value)
          Specifies that the node selected by the current step must have an attribute with a given name that equals a given value.
 void selectChildren(String type)
          Adds a new step to the path that selects elements with the specified type.
 void selectElement(String type, String attributeName, Object value)
          Adds a new step to the path that selects the elements with the specified type and with an attribute of name attributeName equal to the specified value.
 void selectPosition(int position)
          Adds a predicate to the last step of the query that selects the nodes that have the specified position within the array of selected nodes.
 void setRelativeElementList(IlvSettingsElement[] contextElements)
          Sets the settings elements to start the selection from.
 void setResourceBundle(ResourceBundle bundle)
          Sets the resource bundle used for literal translations.
 void setTranslateLiterals(boolean translate)
          Activates or deactivates the translation mode for literals.
 boolean translateLiterals()
          Determines whether this evaluation context translates literals.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvSettingsQuery

public IlvSettingsQuery(String path)
Creates a new IlvSettingsQuery instance from the specified XPATH expression string.

Parameters:
path - The XPATH expression string.

IlvSettingsQuery

public IlvSettingsQuery(String type,
                        String attributeName,
                        Object value)
Creates a new IlvSettingsQuery instance that selects the first element that matches the specified type and with an attribute of name attributeName that has the same value as the specified value.
For example, the following construction selects the action of name OpenDocument:

new IlvSettingsQuery("action", "name", "CloseDocument");

Parameters:
type - The type of the element to select.
attributeName - The name of the attribute to test the value with.
value - The attribute value to match.

IlvSettingsQuery

public IlvSettingsQuery(IlvSettingsElement[] elements)
Creates a new query to search relative to the specified settings elements.

Parameters:
elements - The settings elements that are the root of this query search.

IlvSettingsQuery

public IlvSettingsQuery(IlvSettingsElement element)
Creates a new query to search relative to the specified settings element.

Parameters:
element - The settings element that is the root of this query search.

IlvSettingsQuery

public IlvSettingsQuery()
Creates a new IlvSettingsQuery instance.

Method Detail

getPath

public String getPath()
Returns the XPATH expression corresponding to this query.


addNewStep

public void addNewStep(String axisName,
                       String nodeName)
Adds a new step to the node path.

Parameters:
axisName - The name of the axis to match.
nodeName - The name of the node to match. This parameter can be equal to * to specify that every node name will be matched.
Internal method or field: do not use!

selectAttributeValue

public void selectAttributeValue(String attributeName,
                                 String value)
Specifies that the node selected by the current step must have an attribute with a given name that equals a given value.

Parameters:
attributeName - The name of the attribute to compare the given value with.
value - The value to compare with the value of the specified attribute.

selectChildren

public void selectChildren(String type)
Adds a new step to the path that selects elements with the specified type.

Parameters:
type - The type of the elements to select.

selectElement

public void selectElement(String type,
                          String attributeName,
                          Object value)
Adds a new step to the path that selects the elements with the specified type and with an attribute of name attributeName equal to the specified value.

Parameters:
type - The type of the elements to select.
attributeName - The name of the attribute to compare the value with.
value - The value to compare with.

isRelativePath

public boolean isRelativePath()
Determines whether this query is relative to context nodes.

Returns:
true if this query is relative to context nodes; false otherwise.
See Also:
setRelativeElementList(ilog.views.appframe.settings.IlvSettingsElement[])

removeLastStep

public boolean removeLastStep()
Removes the last step of this path.

Returns:
true if the last step of this path could be removed; false if this path does not contain steps.

selectPosition

public void selectPosition(int position)
Adds a predicate to the last step of the query that selects the nodes that have the specified position within the array of selected nodes.

Parameters:
position - The position of the nodes to select.

setRelativeElementList

public void setRelativeElementList(IlvSettingsElement[] contextElements)
Sets the settings elements to start the selection from.

Parameters:
contextElements - The array of settings elements to start the selection from.

getRelativeElementList

public IlvSettingsElement[] getRelativeElementList()
Returns the settings elements that this query starts the selection from.


translateLiterals

public boolean translateLiterals()
Determines whether this evaluation context translates literals.

Returns:
true if this evaluation context translates literals.
See Also:
setTranslateLiterals(boolean)

setTranslateLiterals

public void setTranslateLiterals(boolean translate)
Activates or deactivates the translation mode for literals.

Parameters:
translate - if true, the evaluation context will translate literals; otherwise, it will not.
See Also:
translateLiterals()

setResourceBundle

public void setResourceBundle(ResourceBundle bundle)
Sets the resource bundle used for literal translations.

Parameters:
bundle - The resource bundle used for literal translations.
See Also:
getResourceBundle()

getResourceBundle

public ResourceBundle getResourceBundle()
Returns the resource bundle used for translating the literal strings.

See Also:
setResourceBundle(java.util.ResourceBundle)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.