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

Class providing access to available matchers. More...

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

Public Member Functions

 MatcherProvider ()
 
void add (Matcher matcher, int priority)
 
void add (MatcherWrapper mw)
 
void remove (MatcherWrapper mw)
 
void removeMatcher (Matcher matcher)
 
ArrayList< MatcherWrappergetMatcherWrappers ()
 
UpdatableFragment match (String text, UpdatableFragment queryFragment) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException
 
UpdatableFragment match (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
ArrayList< UpdatableFragmentmatchAll (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
ArrayList< UpdatableFragmentmatchAllIncrementally (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
UpdatableFragment matchInClosestNode (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
ArrayList< UpdatableFragmentmatchIn3ClosestNodes (Document document, UpdatableFragment queryFragment) throws XPathExpressionException
 
void sortMatchers ()
 
void removeAll ()
 
Document getDocumentFromString (String text, boolean setNamespaces, boolean setErrors) throws ParserConfigurationException, SAXException, IOException
 
DocumentFragment getFragmentFromString (String text) throws ParserConfigurationException, SAXException, IOException
 

Public Attributes

ArrayList< MatcherWrappermatcherWrappers
 

Static Protected Attributes

static final String _SET_NAMESPACES = "http://xml.org/sax/features/namespaces"
 
static final String _REPORT_ERRORS = "http://cyberneko.org/html/features/report-errors"
 

Private Member Functions

Node getFirstTextNode (Node firstNode)
 
UpdatableFragment selectBestSubFragment (UpdatableFragment origFragment, ArrayList< UpdatableFragment > BestSubParts) throws XPathExpressionException
 

Detailed Description

Class providing access to available matchers.

Class providing access to available matchers

Author
Peter Bartoš, Michael Angelov

Definition at line 44 of file MatcherProvider.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.MatcherProvider ( )

Constructor

Definition at line 54 of file MatcherProvider.java.

Member Function Documentation

void cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.add ( Matcher  matcher,
int  priority 
)

Method for adding matcher to list of provided matchers

Parameters
matchermatcher to be added
prioritypriority of matcher

Definition at line 64 of file MatcherProvider.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.add ( MatcherWrapper  mw)

Method for adding matcher wrapper

Parameters
mwmatcher wrapper to be added

Definition at line 74 of file MatcherProvider.java.

Here is the call graph for this function:

Document cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.getDocumentFromString ( String  text,
boolean  setNamespaces,
boolean  setErrors 
) throws ParserConfigurationException, SAXException, IOException

Converts given string into Document

Parameters
textString to convert
setNamespacesFlag for setting namespaces to parser
setErrorsFlag for setting errors report to parser
Returns
Document

Definition at line 375 of file MatcherProvider.java.

Here is the caller graph for this function:

Node cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.getFirstTextNode ( Node  firstNode)
private

Method finds the first text node of a document

Parameters
firstNodeDocument first node
Returns
Document first text node

Definition at line 329 of file MatcherProvider.java.

Here is the caller graph for this function:

DocumentFragment cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.getFragmentFromString ( String  text) throws ParserConfigurationException, SAXException, IOException

Converts given string into Document fragment

Parameters
textString to convert
Returns
Document fragment

Definition at line 398 of file MatcherProvider.java.

Here is the caller graph for this function:

ArrayList<MatcherWrapper> cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.getMatcherWrappers ( )

Getter for list of provided matchers

Returns
list of provided matchers

Definition at line 111 of file MatcherProvider.java.

UpdatableFragment cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.match ( String  text,
UpdatableFragment  queryFragment 
) throws ParserConfigurationException, SAXException, IOException, XPathExpressionException

Method for matching query fragment in document

Parameters
texttext in which fragment should be matched
queryFragmentfragment to be matched
Returns
result fragment that was matched in document

Definition at line 122 of file MatcherProvider.java.

Here is the call graph for this function:

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

Method for matching query fragment in document

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

Definition at line 141 of file MatcherProvider.java.

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

Method for matching query fragment in document

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

Definition at line 159 of file MatcherProvider.java.

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

Method for matching query fragment in document

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

Definition at line 182 of file MatcherProvider.java.

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

Method for matching query fragment in document This method should be used only with bidirectional iterator! Bidirectional iterator has a it's own mechanism for traversing the nodes.

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

Definition at line 251 of file MatcherProvider.java.

Here is the call graph for this function:

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

Method for matching query fragment in document This method should be used only with bidirectional iterator! Bidirectional iterator has a it's own mechanism for traversing the nodes.

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

Definition at line 212 of file MatcherProvider.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.remove ( MatcherWrapper  mw)

Method for removing matcher wrapper from list

Parameters
mwmatcher to be removed

Definition at line 84 of file MatcherProvider.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.removeAll ( )

Method for removing all matchers

Definition at line 363 of file MatcherProvider.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.removeMatcher ( Matcher  matcher)

Method for removing matcher from provided matcher list

Parameters
matchermatcher to be removed

Definition at line 94 of file MatcherProvider.java.

Here is the call graph for this function:

UpdatableFragment cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.selectBestSubFragment ( UpdatableFragment  origFragment,
ArrayList< UpdatableFragment BestSubParts 
) throws XPathExpressionException
private

Selects the best fragment from the best substrings

Parameters
origFragmentOriginal fragment
BestSubPartsBest substrings
Returns
New selected fragment
Exceptions
XPathExpressionException

Definition at line 419 of file MatcherProvider.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.sortMatchers ( )

Method for sorting matcher according to their priority

Definition at line 346 of file MatcherProvider.java.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

final String cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider._REPORT_ERRORS = "http://cyberneko.org/html/features/report-errors"
staticprotected

Definition at line 48 of file MatcherProvider.java.

final String cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider._SET_NAMESPACES = "http://xml.org/sax/features/namespaces"
staticprotected

Definition at line 47 of file MatcherProvider.java.

ArrayList<MatcherWrapper> cz.vutbr.fit.knot.annotations.fragmentUpdater.MatcherProvider.matcherWrappers

Definition at line 46 of file MatcherProvider.java.


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