4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor Class Referenceabstract

Abstract class provides a parser for the annotation of protocol version 2. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor:
Collaboration graph

Public Member Functions

Annotation processAnnotation (Element annotationEl, RequestInfo requestInfo)
 

Static Protected Member Functions

static String getUriType (String uri)
 

Package Functions

boolean isDocumentUri (String uri)
 

Private Member Functions

boolean processTarget (Element targetEl, Annotation annot, RequestInfo requestInfo)
 
ArrayList< FragmentprocessSRComposite (Element compositeEl, Annotation annot, RequestInfo requestInfo)
 
AnnotDocument processHasSource (Annotation annot, Element hasSourceEl, RequestInfo requestInfo)
 
Fragment processSpecificResource (Element specificResourceEl, Annotation annot, RequestInfo requestInfo)
 
boolean processXpointer (String xpointer, Fragment fragment, Annotation annot, RequestInfo requestInfo)
 
boolean processBodies (NodeList bodiesOfAnnot, Annotation annot, RequestInfo requestInfo)
 
boolean processAnnotContents (NodeList contentsOfAnnot, Annotation annot, RequestInfo requestInfo)
 
boolean processBody (Element bodyEl, Annotation annot, RequestInfo requestInfo)
 
User processAuthor (Element anotatedByEl, String annotUri, RequestInfo requestInfo)
 
Date processCreationDate (Element annotatedAtEl, String annotUri, RequestInfo requestInfo, boolean created)
 
boolean processAnnotType (Element annotTypeEl, Annotation annot, RequestInfo requestInfo)
 
AnnotDocument getDocumentFromUri (String uri, Annotation annot, RequestInfo requestInfo)
 
ArrayList< P2BaseTrixprocessTrixElements (NodeList trixList, RequestInfo requestInfo, Annotation annot)
 
void parseGeoPoint (P2SimpleTrix att, Element el)
 
String getGeoPointNodeValue (Node node)
 
boolean processAttributesNew (Element attributesEl, Annotation annot, RequestInfo requestInfo)
 

Static Private Member Functions

static boolean isUriOfBody (String uri)
 

Detailed Description

Abstract class provides a parser for the annotation of protocol version 2.

Abstract class provides a parser for the annotation of protocol version 2.

Author
Martin Petr (xpetrm05)

Definition at line 45 of file P2AnnotBaseProcessor.java.

Member Function Documentation

AnnotDocument cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.getDocumentFromUri ( String  uri,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method finds document in server database by uri of document.

Parameters
uriuri of document
annotAnnotation for which we are searching target
requestInfoinformations about client request
Returns
annotated document or null if document is not found

Definition at line 897 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.getGeoPointNodeValue ( Node  node)
private

Gets value of passed node

Parameters
nodenode whose value is going to be returned
Returns
Node value in string form

Definition at line 1382 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

static String cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.getUriType ( String  uri)
staticprotected

Method detects the type of annotation uri. (temp/serv/sugg)

Parameters
uriuri from which method will determine type of uri
Returns
string with type of uri

Definition at line 961 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.isDocumentUri ( String  uri)
package

Check if given uri is uri of document.

Parameters
uriuri to check
Returns
returns true if given uri is uri of document

Definition at line 1498 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.isUriOfBody ( String  uri)
staticprivate

Method determine if given uri is uri of document.

Parameters
uriuri that will be tested
Returns
true if uri is uri of document

Definition at line 947 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.parseGeoPoint ( P2SimpleTrix  att,
Element  el 
)
private

Process GeoPoint attribute and assign it's value into appropriate object

Parameters
attTrix attribute object, into which processed value should be assigned
elElement which contains GeoPoint value

Definition at line 1350 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

Annotation cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processAnnotation ( Element  annotationEl,
RequestInfo  requestInfo 
)

Method process annotation from given element.

Parameters
annotationElelement with annotation for process
requestInfoinformations about client request
Returns
annotation or null if any error occurs

Definition at line 54 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processAnnotContents ( NodeList  contentsOfAnnot,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process annotation contents element.

Parameters
contentsOfAnnotelement with contents of annotation for process
annotannotation which information from contents will be set
requestInfoinformations about client request
Returns
false if any error occurs

Definition at line 581 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processAnnotType ( Element  annotTypeEl,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process type of annotation and add them into annotation.

Parameters
annotTypeElelement with type of annotation for process
annotannotation which type will be set
requestInfoinformations about client request
Returns
false if any error occurs

Definition at line 836 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processAttributesNew ( Element  attributesEl,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process attributes of annotation and add them into annotation.

Parameters
attributesElelement with attributes of annotations for process
annotannotation that given attributes belongs
requestInfoinformations about client request
Returns
false if any error occurs

Search for rdf:type and trix:TriX elements as they has to be present within content element

Definition at line 1401 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

User cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processAuthor ( Element  anotatedByEl,
String  annotUri,
RequestInfo  requestInfo 
)
private

Method process author of annotation.

Parameters
anotatedByElelement with author of annotation for process
annotUriURI of annotation to which element belongs
requestInfoinformations about client request
Returns
user or null if any error occurs

Definition at line 695 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processBodies ( NodeList  bodiesOfAnnot,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process element with bodies of annotation.

Parameters
bodiesOfAnnotelement with bodies of annotation for process
annotannotation which bodies (as fragments) belongs
requestInfoinformations about client request
Returns
false if any error occurs

Definition at line 526 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processBody ( Element  bodyEl,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process body element of annotation.

Parameters
bodyElelement with body of annotation for process
annotannotation which information from body will be set
requestInfoinformations about client request
Returns
false if any error occurs

Check if type, format and chars elements are within this body

Definition at line 632 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

Date cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processCreationDate ( Element  annotatedAtEl,
String  annotUri,
RequestInfo  requestInfo,
boolean  created 
)
private

Method process creation and serialization date of annotation.

Parameters
annotatedAtElelement with creation date of annotation for process
annotUriURI of annotation to which element belongs
requestInfoinformations about client request
createdtag if its date of creation element
Returns
creation date or null if any error occurs

Definition at line 778 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:

AnnotDocument cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processHasSource ( Annotation  annot,
Element  hasSourceEl,
RequestInfo  requestInfo 
)
private

Method process source element (element with inforamtions about document) of annotation.

Parameters
annotAnnotation to which element belongs
hasSourceElElement with source of annotation for process
requestInfoInformations about client request
Returns
Returns annotated docuemnt or null if any error occurs

Definition at line 336 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

Fragment cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processSpecificResource ( Element  specificResourceEl,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process specific resources of annotations and save them as fragments.

Parameters
specificResourceElelement with specific resources of annotation for process
annotannotation which specific resources (fragment) belongs
requestInfoinformations about client request
Returns
fragment or null if any error occurs

Definition at line 396 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

ArrayList<Fragment> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processSRComposite ( Element  compositeEl,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process element with multiple annotated fragments of document.

Parameters
compositeElelement with multiple annotated fragments for process
annotannotation which multiple fragments belongs
requestInfoinformations about client request
Returns
list of fragments or null if any error occurs

Definition at line 291 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processTarget ( Element  targetEl,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process target element of annotation.

Parameters
targetElelement with target of annotation for process
annotannotation which information from target element will be set
requestInfoinformations about client request
Returns
false if any error occurs

Definition at line 185 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

ArrayList<P2BaseTrix> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processTrixElements ( NodeList  trixList,
RequestInfo  requestInfo,
Annotation  annot 
)
private

Method that process each of triple element from user message

Parameters
trixListList of trixes
requestInfoInfo about clients request
annotRef annotation

Definition at line 975 of file P2AnnotBaseProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor.processXpointer ( String  xpointer,
Fragment  fragment,
Annotation  annot,
RequestInfo  requestInfo 
)
private

Method process xpointer from given string and set informations into given fragment object.

Parameters
xpointerxpointer string that will be parsed
fragmentfragment that will be set
annotAnnotation to which fragment belongs
requestInfoinformations about client request
Returns
false if any error occurs

Definition at line 476 of file P2AnnotBaseProcessor.java.

Here is the caller graph for this function:


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