dk.brics.xmlgraph.validator
Class ContentDescriptionBuilder

java.lang.Object
  extended by 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.
 
Constructor Summary
ContentDescriptionBuilder()
          Constructs a new converter.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

time

public static long time
Total number of millisecs used in this class.

Constructor Detail

ContentDescriptionBuilder

public ContentDescriptionBuilder()
Constructs a new converter.

Method Detail

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 - node
xg - XML graph
enable_automaton - if true, construct full content automaton, otherwise only represent text in the content automaton
include_text - if true, include all text including whitespace around elements
project_names - if non-null then project onto these names, otherwise include all element names
nodekind - node kinds for the XML graph, if null then search through all nodes
use_cache - enable caching if true
force_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.