| java.lang.Object org.apache.commons.jxpath.AbstractFactory
All known Subclasses: org.apache.commons.jxpath.ri.model.dom.TestDOMFactory, org.apache.commons.jxpath.ri.model.jdom.TestJDOMFactory, org.apache.commons.jxpath.ri.model.TestMixedModelFactory, org.apache.commons.jxpath.ri.model.beans.TestBeanFactory, org.apache.commons.jxpath.ri.compiler.VariableFactory, org.apache.commons.jxpath.ri.model.dynabeans.TestDynaBeanFactory, org.apache.commons.jxpath.ri.model.dynamic.TestDynamicPropertyFactory,
AbstractFactory | abstract public class AbstractFactory (Code) | | The
JXPathContext.createPath JXPathContext.createPath() method of
JXPathContext can create missing objects as it traverses an XPath; it
utilizes an AbstractFactory for that purpose. Install a factory on
JXPathContext by calling
JXPathContext.setFactory JXPathContext.setFactory() .
All methods of this class return false. Override any of them to return true
to indicate that the factory has successfully created the described object.
author: Dmitri Plotnikov version: $Revision: 1.8 $ $Date: 2004/02/29 14:17:42 $ |
createObject | public boolean createObject(JXPathContext context, Pointer pointer, Object parent, String name, int index)(Code) | | The parameters may describe a collection element or an individual
object. It is up to the factory to infer which one it is. If it is a
collection, the factory should check if the collection exists. If not,
it should create the collection. Then it should create the index'th
element of the collection and return true.
Parameters: context - can be used to evaluate other XPaths, get to variablesetc. Parameters: pointer - describes the location of the node to be created Parameters: parent - is the object that will server as a parent of the newobject Parameters: name - is the name of the child of the parent that needs to becreated. In the case of DOM may be qualified. Parameters: index - is used if the pointer represents a collection element. Youmay need to expand or even create the collection to accomodate the newelement. true if the object was successfully created |
declareVariable | public boolean declareVariable(JXPathContext context, String name)(Code) | | Declare the specified variable
Parameters: context - hosts variable pools. See JXPathContext.getVariables JXPathContext.getVariables() Parameters: name - is the name of the variable without the "$" sign true if the variable was successfully defined |
|
|