dk.brics.xmlgraph.validator
Class ContentDescriptionBuilder
java.lang.Object
dk.brics.xmlgraph.validator.ContentDescriptionBuilder
public class ContentDescriptionBuilder
- extends Object
Converter from element node to description of its contents.
|
Field Summary |
static long |
time
Total number of millisecs used in this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
time
public static long time
- Total number of millisecs used in this class.
ContentDescriptionBuilder
public ContentDescriptionBuilder()
- Constructs a new converter.
build
public ContentDescription build(Node n,
XMLGraph xg,
boolean enable_automaton,
boolean include_text,
Automaton project_names,
NodeKind[] nodekind,
boolean use_cache,
boolean force_approx)
- Converts the given node.
Results are cached by the converter when
use_cache is true.
- Parameters:
n - nodexg - XML graphenable_automaton - if true, construct full content automaton, otherwise only represent text in the content automatoninclude_text - if true, include all text including whitespace around elementsproject_names - if non-null then project onto these names, otherwise include all element namesnodekind - node kinds for the XML graph, if null then search through all nodesuse_cache - enable caching if trueforce_approx - force into approximation mode
- Returns:
- content description where content automaton is constructed if
enable_automaton is true,
element names is non-null if project_names is null,
text is set if a text node is encountered (ignoring ws flag on element nodes), and
non-ws-text is set if any non whitespace text node is encountered (and project_names is non-null
or enable_automaton is false)
Copyright © 2005-2010 Anders Møller.