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

Class representing suggested annotation fragment. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment:
Collaboration graph

Public Member Functions

 SuggestionFragment ()
 
 SuggestionFragment (String path, Integer offset, Integer length, String annotatedText, Suggestion refSuggestion)
 
 SuggestionFragment (String path, Integer offset, Integer length, String annotatedText, Suggestion refSuggestion, Boolean isGood)
 
 SuggestionFragment (String path, Integer offset, Integer length)
 
Integer getId ()
 
void setId (Integer id)
 
int getSuggestion ()
 
void setSuggestion (int suggestion)
 
String getPath ()
 
void setPath (String path)
 
Integer getOffset ()
 
void setOffset (Integer offset)
 
Integer getLength ()
 
void setLength (Integer length)
 
String getAnnotatedText ()
 
void setAnnotatedText (String annotatedText)
 
boolean getIsGood ()
 
void setIsGood (boolean isGood)
 
Suggestion getRefSuggestion ()
 
SecSuggestion getRefSecSuggestion ()
 
void setRefSuggestion (Suggestion refSuggestion)
 
void setRefSecSuggestion (SecSuggestion value)
 
UpdatableFragment toUpdatableFragment () throws XPathExpressionException
 
void updateWithUpdatableFragment (UpdatableFragment uf)
 
void updateFromFragment (Fragment fr)
 
void updateFromAlternativeFragment (AlternativeFragment fr)
 
boolean equals (Object object)
 
boolean contentEquals (Object obj)
 
boolean fragmentEqualsWUF (UpdatableFragment uf)
 
String toXMLString ()
 
String toXMLStringV2 ()
 
String getXpointer ()
 
String getXpointerV2 ()
 
int hashCode ()
 
String toString ()
 
int compareTo (Object object)
 

Private Attributes

Integer id
 
int suggestion
 
String path
 
Integer offset
 
Integer length
 
String annotatedText
 
boolean isGood
 
Suggestion refSuggestion
 

Static Private Attributes

static final long serialVersionUID = 1L
 

Detailed Description

Class representing suggested annotation fragment.

Class representing suggested annotation fragment

Author
Martin Petr (xpetrm05)

Definition at line 57 of file SuggestionFragment.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.SuggestionFragment ( )

Constructor

Definition at line 113 of file SuggestionFragment.java.

cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.SuggestionFragment ( String  path,
Integer  offset,
Integer  length,
String  annotatedText,
Suggestion  refSuggestion 
)

Constructor

Parameters
pathXPath of element with annotated fragment
offsetOffset of annotated fragment in given element
lengthLength of annotated fragment
annotatedTextTextual content of annotated fragment
refSuggestionSuggestion to which this fragment belongs

Definition at line 125 of file SuggestionFragment.java.

cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.SuggestionFragment ( String  path,
Integer  offset,
Integer  length,
String  annotatedText,
Suggestion  refSuggestion,
Boolean  isGood 
)

Constructor

Parameters
pathXPath of element with annotated fragment
offsetOffset of annotated fragment in given element
lengthLength of annotated fragment
annotatedTextTextual content of annotated fragment
refSuggestionSuggestion to which this fragment belongs
isGoodIndicator, whether fragment is good (not orphaned)

Definition at line 144 of file SuggestionFragment.java.

cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.SuggestionFragment ( String  path,
Integer  offset,
Integer  length 
)

Constructor

Parameters
pathXPath of element with annotated fragment
offsetOffset of annotated fragment in given element
lengthLength of annotated fragment

Definition at line 160 of file SuggestionFragment.java.

Member Function Documentation

int cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.compareTo ( Object  object)

Compares this fragment with another fragment according to offset and length

Parameters
objectFragment to compare
Returns
Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Definition at line 559 of file SuggestionFragment.java.

boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.contentEquals ( Object  obj)

Compares this with other object and returns, whether objects are same type and have same content (id is irrelevant).

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

Definition at line 428 of file SuggestionFragment.java.

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.equals ( Object  object)

Compares this with other object and returns, whether objects are same type and have same content (id is irrelevant).

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

Definition at line 398 of file SuggestionFragment.java.

boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.fragmentEqualsWUF ( UpdatableFragment  uf)

Compares this with instance of UpdatableFragment and returns, whether fragments have same location (XPath, offset and length) and textual content.

Parameters
ufInstance of UpdatableFragment to compare with
Returns
If fragments have same location and textual content, returns true, false otherwise

Definition at line 462 of file SuggestionFragment.java.

Here is the call graph for this function:

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getAnnotatedText ( )

Gets annotated text

Returns
annotated text

Implements cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.SecFragment.

Definition at line 265 of file SuggestionFragment.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getId ( )

Gets ID of this object

Returns
id

Definition at line 172 of file SuggestionFragment.java.

boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getIsGood ( )

Get information about fragment status (whether fragment is good or orphaned))

Returns
If fragment is good, returns true, if it's orphaned, returns false

Definition at line 284 of file SuggestionFragment.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getLength ( )

Gets length

Returns
length

Implements cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.SecFragment.

Definition at line 246 of file SuggestionFragment.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getOffset ( )

Gets offset

Returns
offset

Implements cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.SecFragment.

Definition at line 227 of file SuggestionFragment.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getPath ( )

Gets path

Returns
path

Definition at line 208 of file SuggestionFragment.java.

Here is the caller graph for this function:

SecSuggestion cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getRefSecSuggestion ( )

Gets sugestion to which this fragment belongs

Returns
Returns suggestion or alternative to which this fragment belongs

Implements cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.SecFragment.

Definition at line 312 of file SuggestionFragment.java.

Suggestion cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getRefSuggestion ( )

Gets suggestion to which this fragment belongs

Returns
Returns suggestion to which this fragment belongs

Definition at line 302 of file SuggestionFragment.java.

Here is the caller graph for this function:

int cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getSuggestion ( )

Gets ID of suggestion

Returns
ID

Definition at line 190 of file SuggestionFragment.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getXpointer ( )

Returns Xpointer of suggested fragment

Returns
Returns Xpointer of annotated fragment

Definition at line 522 of file SuggestionFragment.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.getXpointerV2 ( )

Returns Xpointer of suggested fragment for protocol version 2

Returns
Returns Xpointer of annotated fragment

Definition at line 531 of file SuggestionFragment.java.

int cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.hashCode ( )

Definition at line 537 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setAnnotatedText ( String  annotatedText)

Sets annotated text

Parameters
annotatedTextnew annotated text

Definition at line 274 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setId ( Integer  id)

Sets ID of this object

Parameters
idnew ID

Definition at line 181 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setIsGood ( boolean  isGood)

Sets fragment status

Parameters
isGoodIf fragment is good then true, if it's orphaned then false

Definition at line 293 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setLength ( Integer  length)

Sets length

Parameters
lengthnew length

Definition at line 255 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setOffset ( Integer  offset)

Sets offset

Parameters
offsetnew offset

Definition at line 236 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setPath ( String  path)

Sets path

Parameters
pathnew path

Definition at line 217 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setRefSecSuggestion ( SecSuggestion  value)

Sets suggestion to which this fragment belongs

Parameters
valueSuggestion to which this fragment belongs

Implements cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.SecFragment.

Definition at line 331 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setRefSuggestion ( Suggestion  refSuggestion)

Sets suggestion to which this fragment belongs

Parameters
refSuggestionSuggestion to which this fragment belongs

Definition at line 321 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.setSuggestion ( int  suggestion)

Sets ID of suggestion

Parameters
suggestionnew id

Definition at line 199 of file SuggestionFragment.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.toString ( )

Definition at line 547 of file SuggestionFragment.java.

UpdatableFragment cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.toUpdatableFragment ( ) throws XPathExpressionException

Creates UpdatableFragment from this fragment and returns it

Returns
UpdatableFragment created from this fragment

Definition at line 342 of file SuggestionFragment.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.toXMLString ( )

Returns serialized informations about suggested fragment in XML

Returns
Returns serialized informations about annotated fragment in XML

Definition at line 486 of file SuggestionFragment.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.toXMLStringV2 ( )

Returns serialized informations about suggested fragment in XML for protocol version 2

Returns
Returns serialized informations about suggested fragment in XML for protocol version 2

Definition at line 504 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.updateFromAlternativeFragment ( AlternativeFragment  fr)

Copies all values of the alternative fragment into the suggestion fragment

Parameters
frfragment of the alternative

Definition at line 381 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.updateFromFragment ( Fragment  fr)

Copies all values of the annotation fragment into the suggestion fragment

Parameters
frfragment of the annotation

Definition at line 368 of file SuggestionFragment.java.

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.updateWithUpdatableFragment ( UpdatableFragment  uf)

Updates data in this fragment with data from UpdatableFragment

Parameters
ufUpdatableFragment with new (updated) data

Definition at line 352 of file SuggestionFragment.java.

Here is the call graph for this function:

Member Data Documentation

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.annotatedText
private

Textual content of suggested annotation fragment

Definition at line 93 of file SuggestionFragment.java.

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.id
private

Id of fragment

Definition at line 65 of file SuggestionFragment.java.

boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.isGood
private

Indicator, whether fragment is good (not orphaned)

Definition at line 101 of file SuggestionFragment.java.

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.length
private

Length of suggested annotation fragment

Definition at line 85 of file SuggestionFragment.java.

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.offset
private

Offset of suggested annotation fragment in given element

Definition at line 81 of file SuggestionFragment.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.path
private

XPath of element with suggested annotation fragment

Definition at line 77 of file SuggestionFragment.java.

Suggestion cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.refSuggestion
private

Suggestion to which this fragment belongs

Definition at line 108 of file SuggestionFragment.java.

final long cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.serialVersionUID = 1L
staticprivate

Definition at line 58 of file SuggestionFragment.java.

int cz.vutbr.fit.knot.annotations.modules.suggestionManager.SuggestionFragment.suggestion
private

Id of suggested annotation to which this fragment belongs

Definition at line 71 of file SuggestionFragment.java.


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