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

Class representing modification of annotated document text. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.app.TextModification:
Collaboration graph

Classes

class  TextModificationException
 Class for throwing exceptions which are directly related to some text modification. More...
 

Public Member Functions

 TextModification (String path, Integer offset, Integer length, String newContent)
 
 TextModification (String path, Integer offset, Integer length, String newContent, Integer mode)
 
 TextModification (String path, String newContent, Integer mode)
 
Integer getLength ()
 
void setLength (Integer length)
 
String getNewContent ()
 
void setNewContent (String newContent)
 
Integer getOffset ()
 
void setOffset (Integer offset)
 
String getPath ()
 
void setPath (String path)
 
Integer getMode ()
 
void setMode (Integer mode)
 
String toString ()
 
String toXMLString ()
 
String toXMLStringV2 ()
 

Private Attributes

String path
 
Integer offset
 
Integer length
 
String newContent
 
Integer mode
 

Detailed Description

Class representing modification of annotated document text.

Class representing modification of annotated document text

Author
idytrych

Definition at line 22 of file TextModification.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.app.TextModification.TextModification ( String  path,
Integer  offset,
Integer  length,
String  newContent 
)

Constructor with default mode (replace) If offset is null, whole content of element was replaced.

Parameters
pathXPath of element in which modification was occurred
offsetOffset of replaced text fragment in given element
lengthLength of replaced text fragment
newContentNew content of fragment

Definition at line 86 of file TextModification.java.

cz.vutbr.fit.knot.annotations.app.TextModification.TextModification ( String  path,
Integer  offset,
Integer  length,
String  newContent,
Integer  mode 
)

Constructor If offset is null, whole content of element was replaced.

Parameters
pathXPath of element in which modification was occurred
offsetOffset of replaced text fragment in given element
lengthLength of replaced text fragment
newContentNew content of fragment
modeMode of text modification

Definition at line 104 of file TextModification.java.

cz.vutbr.fit.knot.annotations.app.TextModification.TextModification ( String  path,
String  newContent,
Integer  mode 
)

Constructor

Parameters
pathXPath of element in which modification was occurred
newContentNew content of fragment
modeMode of text modification

Definition at line 119 of file TextModification.java.

Member Function Documentation

Integer cz.vutbr.fit.knot.annotations.app.TextModification.getLength ( )

Gets length of replaced text fragment

Returns
Returns length of replaced text fragment

Definition at line 130 of file TextModification.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.app.TextModification.getMode ( )

Gets mode of text modification

Returns
Returns mode of text modification replace/insertBefore/insertAfter

Definition at line 202 of file TextModification.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.app.TextModification.getNewContent ( )

Gets new content of document fragment

Returns
Returns length of replaced text fragment

Definition at line 148 of file TextModification.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.app.TextModification.getOffset ( )

Gets offset of replaced text fragment

Returns
Returns offset of replaced text fragment

Definition at line 166 of file TextModification.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.app.TextModification.getPath ( )

Gets XPath of element in which modification was occurred

Returns
Returns XPath of element in which modification was occurred

Definition at line 184 of file TextModification.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.app.TextModification.setLength ( Integer  length)

Sets length of replaced text fragment

Parameters
lengthLength of replaced text fragment

Definition at line 139 of file TextModification.java.

void cz.vutbr.fit.knot.annotations.app.TextModification.setMode ( Integer  mode)

Sets mode of text modification

Returns
Returns mode of text modification replace/insertBefore/insertAfter

Definition at line 211 of file TextModification.java.

void cz.vutbr.fit.knot.annotations.app.TextModification.setNewContent ( String  newContent)

Sets new content of document fragment

Parameters
newContentNew content of document fragment

Definition at line 157 of file TextModification.java.

void cz.vutbr.fit.knot.annotations.app.TextModification.setOffset ( Integer  offset)

Sets offset of replaced text fragment

Parameters
offsetOffset of replaced text fragment

Definition at line 175 of file TextModification.java.

void cz.vutbr.fit.knot.annotations.app.TextModification.setPath ( String  path)

Sets XPath of element in which modification was occurred

Parameters
pathXPath of element in which modification was occurred

Definition at line 193 of file TextModification.java.

String cz.vutbr.fit.knot.annotations.app.TextModification.toString ( )

Definition at line 216 of file TextModification.java.

String cz.vutbr.fit.knot.annotations.app.TextModification.toXMLString ( )

Returns serialized informations about text modification in XML for protocol 1.x

Returns
Returns serialized informations about text modification in XML

Definition at line 225 of file TextModification.java.

String cz.vutbr.fit.knot.annotations.app.TextModification.toXMLStringV2 ( )

Returns serialized informations about text modification in XML for protocol V2

Returns
Returns serialized informations about text modification in XML for protocol V2

Definition at line 259 of file TextModification.java.

Member Data Documentation

Integer cz.vutbr.fit.knot.annotations.app.TextModification.length
private

Length of replaced text fragment

Definition at line 71 of file TextModification.java.

Integer cz.vutbr.fit.knot.annotations.app.TextModification.mode
private

Mode of text modification

Definition at line 75 of file TextModification.java.

String cz.vutbr.fit.knot.annotations.app.TextModification.newContent
private

New content of fragment

Definition at line 73 of file TextModification.java.

Integer cz.vutbr.fit.knot.annotations.app.TextModification.offset
private

Offset of replaced text fragment

Definition at line 69 of file TextModification.java.

String cz.vutbr.fit.knot.annotations.app.TextModification.path
private

XPath of element in which modification was occurred

Definition at line 64 of file TextModification.java.


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