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

Class which process XML with messages in 4A protocol v 1.x. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor:
Collaboration graph

Public Member Functions

RequestInfo processXML (Element docEl, RequestInfo requestInfo)
 

Static Public Member Functions

static void breakdownType (AnnotType type, RequestInfo requestInfo)
 

Static Private Member Functions

static void processTextModificationMsg (NodeList tmMsg, RequestInfo requestInfo)
 
static void processReload (NodeList reloadMsg, RequestInfo requestInfo)
 
static void processJoin (NodeList joinMsgs, RequestInfo requestInfo)
 
static void processLeave (NodeList leaveMsgs, RequestInfo requestInfo)
 
static void processAnnotations (Element annotationsEl, RequestInfo requestInfo)
 
static Annotation processAddedAnnotEl (Element addedAnnotEl, RequestInfo requestInfo)
 
static Annotation processEditedAnnotEl (Element updatedAnnotEl, RequestInfo requestInfo)
 
static Annotation processRemAnnotEl (Element remAnnotEl, RequestInfo requestInfo)
 
static Annotation processAnnotationDescEl (Element annotationEl, RequestInfo requestInfo, Annotation nestedIn, Integer cMethod)
 
static void logAttributeError (String errAnnotInfo, String name, String type, RequestInfo requestInfo, int errorCode, String message)
 
static BaseAttribute processAttributeEl (Element attributeEl, Annotation annot, RequestInfo requestInfo, int order, Integer cMethod)
 
static Fragment processFragmentEl (Element fragmentEl, Annotation annot, RequestInfo requestInfo)
 
static void processResynchronize (Element resynchronizeEl, RequestInfo requestInfo)
 
static void processSynchronize (Element synchronizeEl, RequestInfo requestInfo)
 
static void processUnsubscribe (Element unsubscribeEl, EditorSession session, RequestInfo requestInfo)
 
static void processSubscribe (Element subscribeEl, EditorSession session, RequestInfo requestInfo)
 
static void processSettings (Element settingsEl, RequestInfo requestInfo)
 
static void processRefSuggestions (Element refSuggestEl, RequestInfo requestInfo)
 
static void processSuggestions (NodeList suggestMsg, RequestInfo requestInfo)
 
static User processLogin (Element loginEl, RequestInfo requestInfo)
 
static void processTypes (Element typesEl, RequestInfo requestInfo)
 
static void processEntityRequest (Element entityReqEl, RequestInfo requestInfo)
 
static AnnotType processTypeEl (Element typeEl, RequestInfo requestInfo, boolean update)
 

Detailed Description

Class which process XML with messages in 4A protocol v 1.x.

Class which process XML with messages in 4A protocol v 1.0 and 1.1

Definition at line 69 of file P1Processor.java.

Member Function Documentation

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.breakdownType ( AnnotType  type,
RequestInfo  requestInfo 
)
static

If ancestor of type of annotation is not exists, but should and name is probably composed of path in type tree, this method breakdowns path, sets name properly and generate ancestors. New names are generated from URI. Ancestors are stored into informations about client request.

Parameters
typeType of annotation to check and breakdown
requestInfoInformations about client request

Definition at line 2744 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.logAttributeError ( String  errAnnotInfo,
String  name,
String  type,
RequestInfo  requestInfo,
int  errorCode,
String  message 
)
staticprivate

Logs error details connected with processing attribute

Parameters
errAnnotInfoInformations about annotation to reload.
nameName of attribute
typeType of attribute
requestInfoInformations about client request
errorCodeNumber of error
messageMessage with additional informations

Definition at line 1393 of file P1Processor.java.

Here is the caller graph for this function:

static Annotation cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processAddedAnnotEl ( Element  addedAnnotEl,
RequestInfo  requestInfo 
)
staticprivate

Process element with added annotation. If error occurs, generates error message.

Parameters
addedAnnotElElement with added annotation to process
requestInfoInformations about client request
Returns
If element was successfully processed, returns annotation, if error occurred, returns null

Definition at line 748 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static Annotation cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processAnnotationDescEl ( Element  annotationEl,
RequestInfo  requestInfo,
Annotation  nestedIn,
Integer  cMethod 
)
staticprivate

Process element with annotation data. If error occurs, generates error message. For nested annotations it's called recursively.

Parameters
annotationElElement with annotation data to process
requestInfoInformations about client request
nestedInIf this annotation is nested, then parent annotation, null otherwise
cMethodConfirmation method of parent annotation or null
Returns
If element was successfully processed, returns annotation, if error occurred, returns null

Definition at line 1057 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processAnnotations ( Element  annotationsEl,
RequestInfo  requestInfo 
)
staticprivate

Process annotations message (added, changed and removed annotations) Informations are stored into requestInfo.

Parameters
annotationsElElement with message to process
requestInfoInformations about client request

Definition at line 656 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static BaseAttribute cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processAttributeEl ( Element  attributeEl,
Annotation  annot,
RequestInfo  requestInfo,
int  order,
Integer  cMethod 
)
staticprivate

Process element with annotation data. If error occurs, generates error message.

Parameters
attributeElElement with attribute of annotation
annotAnnotation to which this attribute belongs
requestInfoInformations about client request
orderOrder of attribute
cMethodConfirmation method of parent annotation or null
Returns
If element was successfully processed, returns attribute, if error occurred, returns null

Definition at line 1416 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static Annotation cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processEditedAnnotEl ( Element  updatedAnnotEl,
RequestInfo  requestInfo 
)
staticprivate

Process element with changed annotation. If error occurs, generates error message.

Parameters
updatedAnnotElElement with changed annotation to process
requestInfoInformations about client request
Returns
If element was successfully processed, returns annotation, if error occurred, returns null

Definition at line 877 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processEntityRequest ( Element  entityReqEl,
RequestInfo  requestInfo 
)
staticprivate

Process element with request for entities

Parameters
entityReqElElement with informations about request
requestInfoInformations about client request

Definition at line 2817 of file P1Processor.java.

Here is the caller graph for this function:

static Fragment cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processFragmentEl ( Element  fragmentEl,
Annotation  annot,
RequestInfo  requestInfo 
)
staticprivate

Process element with annotated fragment.

Parameters
fragmentElElement with annotated fragment
annotAnnotation to which this fragment belongs
requestInfoInformations about client request
Returns
If element was successfully processed, returns fragment, if error occurred, returns null

Definition at line 1928 of file P1Processor.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processJoin ( NodeList  joinMsgs,
RequestInfo  requestInfo 
)
staticprivate

Process join messages (join to user group) Informations are stored into requestInfo and user is added into group (no additional operations needed).

Parameters
joinMsgsMessages to process
requestInfoInformations about client request

Definition at line 490 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processLeave ( NodeList  leaveMsgs,
RequestInfo  requestInfo 
)
staticprivate

Process leave messages (leave user group) Informations are stored into requestInfo and user is femoved from group (no additional operations needed).

Parameters
leaveMsgsMessages to process
requestInfoInformations about client request

Definition at line 569 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static User cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processLogin ( Element  loginEl,
RequestInfo  requestInfo 
)
staticprivate

Processes login message (user name or email and password) If error occurs, generates error message. If password was send in plain text, it will be hashed with MD5.

Parameters
loginElElement with login message
requestInfoInformations about client request
Returns
If message is successfully processed and user credentials are OK, returns user, else returns null

Definition at line 2441 of file P1Processor.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processRefSuggestions ( Element  refSuggestEl,
RequestInfo  requestInfo 
)
staticprivate

Process refusedSuggestions message (refused suggestions of annotations) Informations are stored into requestInfo.

Parameters
refSuggestElElement with refusedSuggestions message
requestInfoInformations about client request

Definition at line 2258 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processReload ( NodeList  reloadMsg,
RequestInfo  requestInfo 
)
staticprivate

Process reload messages (about query to annotations). Informations are stored to requestInfo.

Parameters
reloadMsgMessages to process
requestInfoInformations about client request

Definition at line 418 of file P1Processor.java.

Here is the caller graph for this function:

static Annotation cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processRemAnnotEl ( Element  remAnnotEl,
RequestInfo  requestInfo 
)
staticprivate

Process element with removed annotation. If error occurs, generates error message.

Parameters
remAnnotElElement with removed annotation to process
requestInfoInformations about client request
Returns
If element was successfully processed, returns annotation, if error occurred, returns null

Definition at line 972 of file P1Processor.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processResynchronize ( Element  resynchronizeEl,
RequestInfo  requestInfo 
)
staticprivate

Process element with resynchronize message. Informations are stored into requestInfo. If error occurs, generates error message.

Parameters
resynchronizeElElement with resynchronize message
requestInfoInformations about client request

Definition at line 2038 of file P1Processor.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processSettings ( Element  settingsEl,
RequestInfo  requestInfo 
)
staticprivate

Process settings message. Informations are stored into requestInfo. If error occurs, generates error message.

Parameters
settingsElElement with settings message
requestInfoInformations about client request

Definition at line 2216 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processSubscribe ( Element  subscribeEl,
EditorSession  session,
RequestInfo  requestInfo 
)
staticprivate

Process subscribe message (subscribe client to sources). Client is subscribed to sources (no additional operations needed). If error occurs, generates error message.

Parameters
subscribeElElement with subscribe message
sessionClient session
requestInfoInformations about client request

Definition at line 2167 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processSuggestions ( NodeList  suggestMsg,
RequestInfo  requestInfo 
)
staticprivate

Process suggestAnnotations messages (fragments to which are to be suggested annotations). Informations are stored into session. If error occurs, generates error message and turn off suggestions. If one message with empty fragment at document beginning is sent, all fragments will be discarded and suggestions will be turned off. If set of messages is sent, all fragments will be used, but type of annotations will be get from first message (fragment) and other attributes with type will be discarded. New set of fragments (messages) replaces old set of them.

Parameters
suggestMsgList of elements with
requestInfoInformations about client request

Definition at line 2323 of file P1Processor.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processSynchronize ( Element  synchronizeEl,
RequestInfo  requestInfo 
)
staticprivate

Process synchronize message. Informations are stored into requestInfo. If error occurs, generates error message.

Parameters
synchronizeElElement with synchronize message
requestInfoInformations about client request

Definition at line 2074 of file P1Processor.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processTextModificationMsg ( NodeList  tmMsg,
RequestInfo  requestInfo 
)
staticprivate

Process textModification messages (about modifications of annotated copy of document). Informations are stored to requestInfo.

Parameters
tmMsgMessages to process
requestInfoInformations about client request

Definition at line 345 of file P1Processor.java.

Here is the caller graph for this function:

static AnnotType cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processTypeEl ( Element  typeEl,
RequestInfo  requestInfo,
boolean  update 
)
staticprivate

Process element with informations about type of annotation If error occurs, generates error message.

Parameters
typeElElement with informations about type of annotation
requestInfoInformations about client request
updateIf this is updated type (may be found in database), then true, if it's new type, then false
Returns
If element was successfully processed, returns type of annotation, if error occurred, returns null

Definition at line 2847 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processTypes ( Element  typesEl,
RequestInfo  requestInfo 
)
staticprivate

Process types message (added, changed and removed types of annotations) If error occurs, generates error message. Informations are stored into requestInfo.

Parameters
typesElElement with types message
requestInfoInformations about client request

Definition at line 2585 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processUnsubscribe ( Element  unsubscribeEl,
EditorSession  session,
RequestInfo  requestInfo 
)
staticprivate

Process unsubscribe message (unsubscribe client from sources). Client is unsubscribed from sources (no additional operations needed). If error occurs, generates error message.

Parameters
unsubscribeElElement with unsubscribe message
sessionClient session
requestInfoInformations about client request

Definition at line 2137 of file P1Processor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

RequestInfo cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processXML ( Element  docEl,
RequestInfo  requestInfo 
)

Processes XML with messages from client

Parameters
docElDocument element of parsed XML with messages from client
requestInfoInformations about client's request
Returns
Object with informations about client request

Definition at line 77 of file P1Processor.java.

Here is the call graph for this function:


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