org.cip4.jdflib.elementwalker
Class XPathWalker
java.lang.Object
org.cip4.jdflib.elementwalker.ElementWalker
org.cip4.jdflib.elementwalker.BaseElementWalker
org.cip4.jdflib.elementwalker.XPathWalker
public class XPathWalker
- extends BaseElementWalker
- Author:
- Rainer Prosi, Heidelberger Druckmaschinen
walker that writes XPaths of all elements to a file
attNames
public VString attNames
- the attribute names to set as [@att] rather than [n] if method=3
method
public int method
- the method to create xpaths
writer
protected final PrintWriter writer
pathsFound
protected Set<String> pathsFound
XPathWalker
public XPathWalker(File xpathOutput)
throws FileNotFoundException
- Parameters:
xpathOutput -
- Throws:
FileNotFoundException
XPathWalker
public XPathWalker(PrintWriter w)
- Parameters:
w -
walkAll
public int walkAll(KElement e)
- Parameters:
e -
- Returns:
- the number of xpaths
setAttribute
public void setAttribute(boolean attribute)
- if true, include attributes
- Parameters:
attribute -
setAttributeValue
public void setAttributeValue(boolean attribute)
- if true, include attribute values
- Parameters:
attribute -
getFactory
protected BaseWalkerFactory getFactory()
- Overrides:
getFactory in class BaseElementWalker
- Returns:
- the factory for this worker
setMethod
public void setMethod(int method)
- Parameters:
method - the method to set
setUnique
public void setUnique(boolean unique)
- Parameters:
unique - the method to set
setDatatype
public void setDatatype(boolean datatype)
- Parameters:
datatype - the bDatatype to set
setSeparator
public void setSeparator(String separator)
- Parameters:
separator - the separator to set
setBElement
public void setBElement(boolean element)
- Parameters:
element - the bElement to set
Copyright © 2013. All Rights Reserved.