public class IlvSettingsQuery extends Object
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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.
|
public IlvSettingsQuery(String path)
IlvSettingsQuery
instance from the specified
XPATH expression string.path
- The XPATH expression string.public IlvSettingsQuery(String type, String attributeName, Object value)
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.
OpenDocument
:
new IlvSettingsQuery("action", "name", "CloseDocument");
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.public IlvSettingsQuery(IlvSettingsElement[] elements)
elements
- The settings elements that are the root of this query search.public IlvSettingsQuery(IlvSettingsElement element)
element
- The settings element that is the root of this query search.public IlvSettingsQuery()
IlvSettingsQuery
instance.public String getPath()
public void addNewStep(String axisName, String nodeName)
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.public void selectAttributeValue(String attributeName, String value)
attributeName
- The name of the attribute to compare the given value
with.value
- The value to compare with the value of the specified attribute.public void selectChildren(String type)
type
.type
- The type of the elements to select.public void selectElement(String type, String attributeName, Object value)
type
and with an attribute of name
attributeName
equal to the specified value
.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.public boolean isRelativePath()
true
if this query is relative to context nodes;
false
otherwise.setRelativeElementList(ilog.views.appframe.settings.IlvSettingsElement[])
public boolean removeLastStep()
true
if the last step of this path could be
removed; false
if this path does not contain steps.public void selectPosition(int position)
position
- The position of the nodes to select.public void setRelativeElementList(IlvSettingsElement[] contextElements)
contextElements
- The array of settings elements to start the
selection from.public IlvSettingsElement[] getRelativeElementList()
public boolean translateLiterals()
true
if this evaluation context translates literals.setTranslateLiterals(boolean)
public void setTranslateLiterals(boolean translate)
translate
- if true
, the evaluation context
will translate literals; otherwise, it will not.translateLiterals()
public void setResourceBundle(ResourceBundle bundle)
bundle
- The resource bundle used for literal translations.getResourceBundle()
public ResourceBundle getResourceBundle()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.