org.inria.ns.reflex.xml.filter
Class FilterContextFactory

java.lang.Object
  extended by org.inria.ns.reflex.xml.filter.FilterContextFactory

public abstract class FilterContextFactory
extends Object

A factory that can create a context for a filter.

Author:
Philippe Poulard
See Also:
AbstractFilter, FilterContext

Field Summary
static FilterContextFactory DEFAULT_FILTER_CONTEXT_FACTORY
          A default factory that return an instance of FilterContext.
 
Method Summary
abstract  FilterContext newFilterContext(RunnableRuleBasedFilter filter, Object matchedNode, FilterContext previous)
          Create a new context on a node for a filter.
 boolean processDTD()
          Return an indicator for this class of filters that tells whether the DTD must be processed or ignored.
 void setImportStrategy(DOMContext domContext)
          Set the import strategy for a DOM context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILTER_CONTEXT_FACTORY

public static final FilterContextFactory DEFAULT_FILTER_CONTEXT_FACTORY
A default factory that return an instance of FilterContext.

Method Detail

newFilterContext

public abstract FilterContext newFilterContext(RunnableRuleBasedFilter filter,
                                               Object matchedNode,
                                               FilterContext previous)
Create a new context on a node for a filter.

Parameters:
filter - The filter that own the context.
matchedNode - The node that matched a rule.
previous - The previous filter context, may be null ; usefull when filters are chained together.
Returns:
A new context filter for the given node.

processDTD

public boolean processDTD()
Return an indicator for this class of filters that tells whether the DTD must be processed or ignored.

Returns:
By default, return true.

setImportStrategy

public void setImportStrategy(DOMContext domContext)
Set the import strategy for a DOM context. This implementation doesn't change the current import strategy.

Parameters:
domContext - The DOM context to setup.
See Also:
ImportStrategy