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

Class representing annotated fragment. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.entity.Fragment:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.entity.Fragment:
Collaboration graph

Public Member Functions

 Fragment ()
 
 Fragment (Integer id)
 
 Fragment (String path, Integer offset, Integer length, String annotatedText, Annotation refAnnotation)
 
 Fragment (String path, Integer offset, Integer length, String annotatedText, Annotation refAnnotation, Boolean isGood)
 
 Fragment (String path, Integer offset, Integer length)
 
Integer getId ()
 
void setId (Integer id)
 
int getAnnotation ()
 
void setAnnotation (int annotation)
 
String getPath ()
 
void setPath (String path)
 
Integer getOffset ()
 
void setOffset (Integer offset)
 
Integer getLength ()
 
void setLength (Integer length)
 
String getAnnotatedText ()
 
void setAnnotatedText (String annotatedText)
 
Annotation getRefAnnotation ()
 
void setRefAnnotation (Annotation refAnnotation)
 
boolean getIsGood ()
 
void setIsGood (boolean isGood)
 
int hashCode ()
 
boolean equals (Object object)
 
boolean contentEquals (Object obj)
 
boolean fragmentEqualsWUF (UpdatableFragment uf)
 
UpdatableFragment toUpdatableFragment () throws XPathExpressionException
 
void updateWithUpdatableFragment (UpdatableFragment uf)
 
String toString ()
 
String toXMLString ()
 
String toXMLStringV2 ()
 
String getXpointer ()
 
String getXpointerV2 ()
 
int compareTo (Object object)
 

Private Attributes

Integer id
 
int annotation
 
String path
 
Integer offset
 
Integer length
 
String annotatedText
 
boolean isGood
 
Annotation refAnnotation
 

Static Private Attributes

static final long serialVersionUID = 1L
 

Detailed Description

Class representing annotated fragment.

Class representing annotated fragment

Author
idytrych

Definition at line 48 of file Fragment.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.entity.Fragment.Fragment ( )

Constructor

Definition at line 104 of file Fragment.java.

cz.vutbr.fit.knot.annotations.entity.Fragment.Fragment ( Integer  id)

Constructor

Parameters
idsets id of the object

Definition at line 112 of file Fragment.java.

cz.vutbr.fit.knot.annotations.entity.Fragment.Fragment ( String  path,
Integer  offset,
Integer  length,
String  annotatedText,
Annotation  refAnnotation 
)

Constructor

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

Definition at line 126 of file Fragment.java.

cz.vutbr.fit.knot.annotations.entity.Fragment.Fragment ( String  path,
Integer  offset,
Integer  length,
String  annotatedText,
Annotation  refAnnotation,
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
refAnnotationAnnotation to which this fragment belongs
isGoodIndicator, whether fragment is good (not orphaned)

Definition at line 145 of file Fragment.java.

cz.vutbr.fit.knot.annotations.entity.Fragment.Fragment ( 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 161 of file Fragment.java.

Member Function Documentation

int cz.vutbr.fit.knot.annotations.entity.Fragment.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 509 of file Fragment.java.

boolean cz.vutbr.fit.knot.annotations.entity.Fragment.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 362 of file Fragment.java.

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.entity.Fragment.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 id, returns true, false otherwise

Definition at line 332 of file Fragment.java.

boolean cz.vutbr.fit.knot.annotations.entity.Fragment.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 396 of file Fragment.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.entity.Fragment.getAnnotatedText ( )

Gets textual content of annotated fragment

Returns
Returns textual content of annotated fragment

Definition at line 263 of file Fragment.java.

Here is the caller graph for this function:

int cz.vutbr.fit.knot.annotations.entity.Fragment.getAnnotation ( )

Gets annotation to which this fragment belongs

Returns
Returns annotation to which this fragment belongs

Definition at line 191 of file Fragment.java.

Integer cz.vutbr.fit.knot.annotations.entity.Fragment.getId ( )

Gets id of fragment

Returns
Returns id of fragment

Definition at line 173 of file Fragment.java.

boolean cz.vutbr.fit.knot.annotations.entity.Fragment.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 300 of file Fragment.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.entity.Fragment.getLength ( )

Gets length of annotated fragment

Returns
Returns length of annotated fragment

Definition at line 245 of file Fragment.java.

Here is the caller graph for this function:

Integer cz.vutbr.fit.knot.annotations.entity.Fragment.getOffset ( )

Gets offset of annotated fragment in given element

Returns
Returns offset of annotated fragment in given element

Definition at line 227 of file Fragment.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.entity.Fragment.getPath ( )

Gets XPath of element with this annotated fragment

Returns
Returns XPath of element with this annotated fragment

Definition at line 209 of file Fragment.java.

Here is the caller graph for this function:

Annotation cz.vutbr.fit.knot.annotations.entity.Fragment.getRefAnnotation ( )

Gets annotation to which this fragment belongs

Returns
Returns annotation to which this fragment belongs

Definition at line 281 of file Fragment.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.entity.Fragment.getXpointer ( )

Returns Xpointer of annotated fragment

Returns
Returns Xpointer of annotated fragment

Definition at line 487 of file Fragment.java.

String cz.vutbr.fit.knot.annotations.entity.Fragment.getXpointerV2 ( )

Returns Xpointer of annotated fragment for protocol version 2

Returns
Returns Xpointer of annotated fragment

Definition at line 496 of file Fragment.java.

int cz.vutbr.fit.knot.annotations.entity.Fragment.hashCode ( )

Definition at line 314 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setAnnotatedText ( String  annotatedText)

Sets textual content of annotated fragment

Parameters
annotatedTextTextual content of annotated fragment

Definition at line 272 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setAnnotation ( int  annotation)

Sets annotation to which this fragment belongs

Parameters
annotationAnnotation to which this fragment belongs

Definition at line 200 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setId ( Integer  id)

Sets id of fragment

Parameters
idId of fragment

Definition at line 182 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setIsGood ( boolean  isGood)

Sets fragment status

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

Definition at line 309 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setLength ( Integer  length)

Sets length of annotated fragment

Parameters
lengthLength of annotated fragment

Definition at line 254 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setOffset ( Integer  offset)

Sets offset of annotated fragment in given element

Parameters
offsetOffset of annotated fragment in given element

Definition at line 236 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setPath ( String  path)

Sets XPath of element with this annotated fragment

Parameters
pathXPath of element with this annotated fragment

Definition at line 218 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.setRefAnnotation ( Annotation  refAnnotation)

Sets annotation to which this fragment belongs

Parameters
refAnnotationAnnotation to which this fragment belongs

Definition at line 290 of file Fragment.java.

String cz.vutbr.fit.knot.annotations.entity.Fragment.toString ( )

Definition at line 442 of file Fragment.java.

UpdatableFragment cz.vutbr.fit.knot.annotations.entity.Fragment.toUpdatableFragment ( ) throws XPathExpressionException

Creates UpdatableFragment from this fragment and returns it

Returns
UpdatableFragment created from this fragment

Definition at line 420 of file Fragment.java.

String cz.vutbr.fit.knot.annotations.entity.Fragment.toXMLString ( )

Returns serialized informations about annotated fragment in XML

Returns
Returns serialized informations about annotated fragment in XML

Definition at line 451 of file Fragment.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.entity.Fragment.toXMLStringV2 ( )

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

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

Definition at line 469 of file Fragment.java.

void cz.vutbr.fit.knot.annotations.entity.Fragment.updateWithUpdatableFragment ( UpdatableFragment  uf)

Updates data in this fragment with data from UpdatableFragment

Parameters
ufUpdatableFragment with new (updated) data

Definition at line 430 of file Fragment.java.

Here is the call graph for this function:

Member Data Documentation

String cz.vutbr.fit.knot.annotations.entity.Fragment.annotatedText
private

Textual content of annotated fragment

Definition at line 87 of file Fragment.java.

int cz.vutbr.fit.knot.annotations.entity.Fragment.annotation
private

Id of annotation to which this fragment belongs

Definition at line 64 of file Fragment.java.

Integer cz.vutbr.fit.knot.annotations.entity.Fragment.id
private

Id of fragment

Definition at line 58 of file Fragment.java.

boolean cz.vutbr.fit.knot.annotations.entity.Fragment.isGood
private

Indicator, whether fragment is good (not orphaned)

Definition at line 93 of file Fragment.java.

Integer cz.vutbr.fit.knot.annotations.entity.Fragment.length
private

Length of annotated fragment

Definition at line 80 of file Fragment.java.

Integer cz.vutbr.fit.knot.annotations.entity.Fragment.offset
private

Offset of annotated fragment in given element

Definition at line 75 of file Fragment.java.

String cz.vutbr.fit.knot.annotations.entity.Fragment.path
private

XPath of element with annotated fragment

Definition at line 70 of file Fragment.java.

Annotation cz.vutbr.fit.knot.annotations.entity.Fragment.refAnnotation
private

Annotation to which this fragment belongs

Definition at line 99 of file Fragment.java.

final long cz.vutbr.fit.knot.annotations.entity.Fragment.serialVersionUID = 1L
staticprivate

Definition at line 50 of file Fragment.java.


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