com.vhosting.netconf
Class SubtreeFilter.Filter

java.lang.Object
  extended by com.vhosting.netconf.SubtreeFilter.Filter
Enclosing class:
SubtreeFilter

public final class SubtreeFilter.Filter
extends java.lang.Object

This class identifies a filter contained within a SubtreeFilter.

Author:
Giuseppe Palmeri

Method Summary
 void addFilterString(java.lang.String filter, java.lang.String... values)
          Add a filter string.
 Capability getCapability()
          Get the capability they belong to the filtered data.
 java.lang.String[] getFilterElements()
          Get the filter elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCapability

public final Capability getCapability()
Get the capability they belong to the filtered data.

Returns:
The capability they belong to the filtered data.

getFilterElements

public final java.lang.String[] getFilterElements()
Get the filter elements.

Returns:
The filer elements.

addFilterString

public void addFilterString(java.lang.String filter,
                            java.lang.String... values)
Add a filter string. A filter string is a special string with the following format:
 < _nodes > [ '|' _nodes ]*
 
 Where:
 
 _nodes = < _node > [ ';' _node ]*
 
 Where:
 
 _node = node-name [ '=' value ]
 
 
 Legend:
 <> = mandatory;
 [] = optional;
 * = 0 or more times;
 
 You can use variables inside and will be replaced by 
 the sight of the values passed as the second argument.
 This ensures the integrity of information entered into the filter.
 The variables are identified as:
 $n where n = 1 to the number of values passed.
 
 
 Examples:
 
 f.addFilterString("interfaces|interface|name=$1;description", "eth0");
 
 Result: interfaces|interface|name=eth0;description
 
 This filter requests that the outcome of the request, 
 including the interfaces, is taken only description 
 of the interface eth0.
 

Parameters:
filter - The filter string.
values - A set of values that are encoded and introduced into the filter through the corresponding variables.