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

Class for XML document fragment. More...

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

Public Member Functions

XPathExpression getXPathExpression ()
 
void setXPathExpression (XPathExpression XPathExpression)
 
String getXPathString ()
 
void setXPathString (String XPathString)
 
int getLength ()
 
void setLength (int length)
 
int getOffset ()
 
void setOffset (int offset)
 
String getText ()
 
void setText (String text)
 
int getWordCount ()
 
 UpdatableFragment (String XPathString, int offset, int length, String text) throws XPathExpressionException
 
boolean equals (Object obj)
 
int hashCode ()
 
String toString ()
 

Static Public Member Functions

static String improveXPath (String path)
 

Private Attributes

String XPathString
 
XPathExpression XPathExpression
 
int offset
 
int length
 
String text
 
int wordCount
 

Detailed Description

Class for XML document fragment.

Class for XML document fragment

Author
Michael Angelov

Definition at line 30 of file UpdatableFragment.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.UpdatableFragment ( String  XPathString,
int  offset,
int  length,
String  text 
) throws XPathExpressionException

Constructor

Parameters
XPathStringstring representation of XPath
offsetoffset of fragment's string
lengthlength of fragment's string
textstring content of fragment

Definition at line 149 of file UpdatableFragment.java.

Here is the caller graph for this function:

Member Function Documentation

boolean cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.equals ( Object  obj)

Compares this with other object and returns, whether objects are same type and have same content.

Parameters
objObject to compare with
Returns
If object is same type and have same content, returns true, false otherwise

Definition at line 172 of file UpdatableFragment.java.

Here is the call graph for this function:

Here is the caller graph for this function:

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.getLength ( )

Getter for length of fragment's string

Returns
length of fragment's string

Definition at line 80 of file UpdatableFragment.java.

Here is the caller graph for this function:

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.getOffset ( )

Getter for offset of fragment's string

Returns
offset of fragment's string

Definition at line 98 of file UpdatableFragment.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.getText ( )

Getter for fragment's string content

Returns
fragment's string content

Definition at line 116 of file UpdatableFragment.java.

Here is the caller graph for this function:

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.getWordCount ( )

Getter for fragment's string word count

Returns
number of words in string with following delimiter:
* \s+
* 

Definition at line 137 of file UpdatableFragment.java.

XPathExpression cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.getXPathExpression ( )

Getter for XPath expression

Returns
fragment's XPath expression

Definition at line 44 of file UpdatableFragment.java.

String cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.getXPathString ( )

Getter for string representation of XPath expression

Returns
string representation of XPath expression

Definition at line 62 of file UpdatableFragment.java.

Here is the caller graph for this function:

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.hashCode ( )

Gets hash code of this fragment

Returns
Hash code

Definition at line 201 of file UpdatableFragment.java.

static String cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.improveXPath ( String  path)
static

Uppercase XPath up to /text() (necessary for finding fragment) and complete fragments of path (e.g. "/DIV/" -> "/DIV[1]/")

Parameters
pathXPath to improve
Returns
Returns modified XPath

Definition at line 230 of file UpdatableFragment.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.setLength ( int  length)

Setter for length of fragment's string

Parameters
lengthlength of fragment's string

Definition at line 89 of file UpdatableFragment.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.setOffset ( int  offset)

Setter for offset of fragment's string

Parameters
offsetoffset of fragment's string

Definition at line 107 of file UpdatableFragment.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.setText ( String  text)

Setter for fragment's string content

Parameters
textfragment's string content

Definition at line 125 of file UpdatableFragment.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.setXPathExpression ( XPathExpression  XPathExpression)

Setter for XPath expression

Parameters
XPathExpressionset fragment's XPath expression

Definition at line 53 of file UpdatableFragment.java.

void cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.setXPathString ( String  XPathString)

Setter for string representation of XPath expression

Parameters
XPathStringstring representation of XPath expression

Definition at line 71 of file UpdatableFragment.java.

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

Overriden toString() method

Returns
string representation of class

Definition at line 216 of file UpdatableFragment.java.

Member Data Documentation

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.length
private

Definition at line 35 of file UpdatableFragment.java.

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.offset
private

Definition at line 34 of file UpdatableFragment.java.

String cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.text
private

Definition at line 36 of file UpdatableFragment.java.

int cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.wordCount
private

Definition at line 37 of file UpdatableFragment.java.

XPathExpression cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.XPathExpression
private

Definition at line 33 of file UpdatableFragment.java.

String cz.vutbr.fit.knot.annotations.fragmentUpdater.UpdatableFragment.XPathString
private

Definition at line 32 of file UpdatableFragment.java.


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