java.lang.Object
org.websody.GenericFunction
org.websody.corefunc.XMLCollector
- All Implemented Interfaces:
- org.websody.Function, javax.xml.transform.URIResolver
- public class XMLCollector
- extends org.websody.GenericFunction
- implements javax.xml.transform.URIResolver
Walks through a directory tree and collects xml files. If a file matches a
certain criteria (specified by a set of regexps), one or more xpath
expressions are applied and a wrapper document containing the results is
build. Afterwards a xsl transformation is performed.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
path
private java.lang.String path
xpath
private java.lang.String[] xpath
stylesheet
private java.lang.String stylesheet
include
private java.lang.String[] include
exclude
private java.lang.String[] exclude
depth
private int depth
XMLCollector
public XMLCollector()
init
public void init()
- Specified by:
init in interface org.websody.Function
setPath
public void setPath(java.lang.String path)
setXPath
public void setXPath(java.lang.String[] xpath)
setStylesheet
public void setStylesheet(java.lang.String stylesheet)
setInclude
public void setInclude(java.lang.String[] include)
setExclude
public void setExclude(java.lang.String[] exclude)
setDepth
public void setDepth(java.lang.String depth)
lastModified
public long lastModified()
- Specified by:
lastModified in interface org.websody.Function
execute
public java.lang.Object execute()
throws java.lang.Exception
- Specified by:
execute in interface org.websody.Function
getLink
protected java.lang.String getLink(java.io.File f)
getFiles
protected java.util.Iterator getFiles(boolean ommitDirs)
throws java.lang.Exception
resolve
public javax.xml.transform.Source resolve(java.lang.String href,
java.lang.String base)
- Description copied from interface:
javax.xml.transform.URIResolver
- Resolves an
xsl:include, xsl:import, or
XPath document() function.
- Specified by:
resolve in interface javax.xml.transform.URIResolver