org.jcrom.util
Class NodeFilter

java.lang.Object
  extended by org.jcrom.util.NodeFilter
All Implemented Interfaces:
java.io.Serializable

public class NodeFilter
extends java.lang.Object
implements java.io.Serializable

Author:
Olafur Gauti Gudmundsson
See Also:
Serialized Form

Field Summary
static int DEPTH_INFINITE
           
static java.lang.String EXCLUDE_ALL
           
protected  int filterDepth
           
static java.lang.String INCLUDE_ALL
           
protected  int maxDepth
           
protected  NameFilter nameFilter
           
 
Constructor Summary
NodeFilter(int maxDepth)
           
NodeFilter(java.lang.String fieldNameFilter)
           
NodeFilter(java.lang.String fieldNameFilter, int maxDepth)
           
NodeFilter(java.lang.String fieldNameFilter, int maxDepth, int filterDepth)
           
 
Method Summary
 int getFilterDepth()
           
 int getMaxDepth()
           
 NameFilter getNameFilter()
           
 boolean isDepthIncluded(int depth)
           
 boolean isIncluded(java.lang.String name, int depth)
           
 boolean isNameIncluded(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEPTH_INFINITE

public static final int DEPTH_INFINITE
See Also:
Constant Field Values

INCLUDE_ALL

public static final java.lang.String INCLUDE_ALL
See Also:
Constant Field Values

EXCLUDE_ALL

public static final java.lang.String EXCLUDE_ALL
See Also:
Constant Field Values

nameFilter

protected final NameFilter nameFilter

maxDepth

protected final int maxDepth

filterDepth

protected final int filterDepth
Constructor Detail

NodeFilter

public NodeFilter(java.lang.String fieldNameFilter,
                  int maxDepth,
                  int filterDepth)
Parameters:
fieldNameFilter - comma separated list of names of child nodes / references to load ("*" loads all, while "none" loads none, and a prefix of "-" excludes the named nodes)
maxDepth - the maximum depth of loaded child nodes (0 means no child nodes are loaded, while a negative value means that no restrictions are set on the depth).
filterDepth -

NodeFilter

public NodeFilter(java.lang.String fieldNameFilter,
                  int maxDepth)

NodeFilter

public NodeFilter(java.lang.String fieldNameFilter)

NodeFilter

public NodeFilter(int maxDepth)
Method Detail

isIncluded

public boolean isIncluded(java.lang.String name,
                          int depth)

isDepthIncluded

public boolean isDepthIncluded(int depth)

isNameIncluded

public boolean isNameIncluded(java.lang.String name)

getFilterDepth

public int getFilterDepth()

getMaxDepth

public int getMaxDepth()

getNameFilter

public NameFilter getNameFilter()


Copyright © 2009. All Rights Reserved.