4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher Class Reference

Class for matcher consisting of comparator and node iterator. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher:
Collaboration graph

Public Member Functions

NodeIterator getNodeIterator ()
 
Comparator getComparator ()
 
void setNodeIterator (NodeIterator nodeIterator)
 
void setComparator (Comparator comparator)
 
 Matcher (NodeIterator nodeIterator, Comparator comparator)
 
UpdatableFragment match (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
ArrayList< UpdatableFragmentmatchAll (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
void InitIterator (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
UpdatableFragment matchInNextNode (UpdatableFragment queryFragment) throws XPathExpressionException
 
boolean hasBidirectionalIterator ()
 
boolean canMatchNext ()
 
String toString ()
 

Public Attributes

NodeIterator nodeIterator
 
Comparator comparator
 

Protected Attributes

boolean iteratorInitialized = false
 

Detailed Description

Class for matcher consisting of comparator and node iterator.

Class for matcher consisting of comparator and node iterator

Author
Peter Bartoš, Michael Angelov

Definition at line 32 of file Matcher.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.Matcher ( NodeIterator  nodeIterator,
Comparator  comparator 
)

Constructor

Parameters
nodeIteratornode iterator to be used
comparatorstring comparator to be used

Definition at line 80 of file Matcher.java.

Member Function Documentation

boolean cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.canMatchNext ( )

Can we match things in another node? Can be used only with the bidirectional node iterator!!! Otherwise it always returns false...

Returns
True if yes, False if not.

Definition at line 201 of file Matcher.java.

Here is the call graph for this function:

Comparator cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.getComparator ( )

Getter for comparator used in matcher

Returns
comparator used in matcher

Definition at line 52 of file Matcher.java.

NodeIterator cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.getNodeIterator ( )

Getter for node iterator used in matcher

Returns
node iterator used in matcher

Definition at line 43 of file Matcher.java.

boolean cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.hasBidirectionalIterator ( )

Is there bidirectional iterator initialized?

Returns
True if yes, False if not.

Definition at line 188 of file Matcher.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.InitIterator ( Document  document,
UpdatableFragment  queryFragment 
) throws XPathExpressionException

Inits the Iterator for incremental node matching

Parameters
documentDocument in which given fragment should be matched
queryFragmentfragment to be matched
Exceptions
XPathExpressionException

Definition at line 152 of file Matcher.java.

UpdatableFragment cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.match ( Document  document,
UpdatableFragment  queryFragment 
) throws XPathExpressionException

Method for matching fragment in document

Parameters
documentDocument in which given fragment should be matched
queryFragmentfragment to be matched
Returns
result fragment that was matched

Definition at line 92 of file Matcher.java.

ArrayList<UpdatableFragment> cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.matchAll ( Document  document,
UpdatableFragment  queryFragment 
) throws XPathExpressionException

Method for matching fragments in document

Parameters
documentDocument in which given fragment should be matched
queryFragmentfragment to be matched
Returns
result fragments that was matched

Definition at line 121 of file Matcher.java.

UpdatableFragment cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.matchInNextNode ( UpdatableFragment  queryFragment) throws XPathExpressionException

Method for matching fragment in next node of the document

Parameters
queryFragmentfragment to be matched
Returns
result fragment that was matched

Definition at line 163 of file Matcher.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.setComparator ( Comparator  comparator)

Setter for comparator used in matcher

Parameters
comparatorcomparator used in matcher

Definition at line 70 of file Matcher.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.setNodeIterator ( NodeIterator  nodeIterator)

Setter for node iterator used in matcher

Parameters
nodeIteratornode iterator used in matcher

Definition at line 61 of file Matcher.java.

String cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.toString ( )

Overriden toString() method

Returns
string representation of class

Definition at line 215 of file Matcher.java.

Member Data Documentation

Comparator cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.comparator

Definition at line 35 of file Matcher.java.

boolean cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.iteratorInitialized = false
protected

Definition at line 36 of file Matcher.java.

NodeIterator cz.vutbr.fit.knot.annotations.fragmentUpdater.Matcher.nodeIterator

Definition at line 34 of file Matcher.java.


The documentation for this class was generated from the following file: