Class which process XML with messages in 4A protocol v 1.x.
More...
|
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) |
|
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.
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
-
type | Type of annotation to check and breakdown |
requestInfo | Informations about client request |
Definition at line 2744 of file P1Processor.java.
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
-
errAnnotInfo | Informations about annotation to reload. |
name | Name of attribute |
type | Type of attribute |
requestInfo | Informations about client request |
errorCode | Number of error |
message | Message with additional informations |
Definition at line 1393 of file P1Processor.java.
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
-
addedAnnotEl | Element with added annotation to process |
requestInfo | Informations about client request |
- Returns
- If element was successfully processed, returns annotation, if error occurred, returns null
Definition at line 748 of file P1Processor.java.
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
-
annotationEl | Element with annotation data to process |
requestInfo | Informations about client request |
nestedIn | If this annotation is nested, then parent annotation, null otherwise |
cMethod | Confirmation 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.
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
-
annotationsEl | Element with message to process |
requestInfo | Informations about client request |
Definition at line 656 of file P1Processor.java.
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
-
attributeEl | Element with attribute of annotation |
annot | Annotation to which this attribute belongs |
requestInfo | Informations about client request |
order | Order of attribute |
cMethod | Confirmation 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.
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
-
updatedAnnotEl | Element with changed annotation to process |
requestInfo | Informations about client request |
- Returns
- If element was successfully processed, returns annotation, if error occurred, returns null
Definition at line 877 of file P1Processor.java.
static void cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processEntityRequest |
( |
Element |
entityReqEl, |
|
|
RequestInfo |
requestInfo |
|
) |
| |
|
staticprivate |
Process element with request for entities
- Parameters
-
entityReqEl | Element with informations about request |
requestInfo | Informations about client request |
Definition at line 2817 of file P1Processor.java.
static Fragment cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processFragmentEl |
( |
Element |
fragmentEl, |
|
|
Annotation |
annot, |
|
|
RequestInfo |
requestInfo |
|
) |
| |
|
staticprivate |
Process element with annotated fragment.
- Parameters
-
fragmentEl | Element with annotated fragment |
annot | Annotation to which this fragment belongs |
requestInfo | Informations about client request |
- Returns
- If element was successfully processed, returns fragment, if error occurred, returns null
Definition at line 1928 of file P1Processor.java.
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
-
joinMsgs | Messages to process |
requestInfo | Informations about client request |
Definition at line 490 of file P1Processor.java.
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
-
leaveMsgs | Messages to process |
requestInfo | Informations about client request |
Definition at line 569 of file P1Processor.java.
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
-
loginEl | Element with login message |
requestInfo | Informations 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.
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
-
refSuggestEl | Element with refusedSuggestions message |
requestInfo | Informations about client request |
Definition at line 2258 of file P1Processor.java.
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
-
reloadMsg | Messages to process |
requestInfo | Informations about client request |
Definition at line 418 of file P1Processor.java.
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
-
remAnnotEl | Element with removed annotation to process |
requestInfo | Informations about client request |
- Returns
- If element was successfully processed, returns annotation, if error occurred, returns null
Definition at line 972 of file P1Processor.java.
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
-
resynchronizeEl | Element with resynchronize message |
requestInfo | Informations about client request |
Definition at line 2038 of file P1Processor.java.
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
-
settingsEl | Element with settings message |
requestInfo | Informations about client request |
Definition at line 2216 of file P1Processor.java.
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
-
subscribeEl | Element with subscribe message |
session | Client session |
requestInfo | Informations about client request |
Definition at line 2167 of file P1Processor.java.
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
-
suggestMsg | List of elements with |
requestInfo | Informations about client request |
Definition at line 2323 of file P1Processor.java.
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
-
synchronizeEl | Element with synchronize message |
requestInfo | Informations about client request |
Definition at line 2074 of file P1Processor.java.
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
-
tmMsg | Messages to process |
requestInfo | Informations about client request |
Definition at line 345 of file P1Processor.java.
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
-
typeEl | Element with informations about type of annotation |
requestInfo | Informations about client request |
update | If 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.
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
-
typesEl | Element with types message |
requestInfo | Informations about client request |
Definition at line 2585 of file P1Processor.java.
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
-
unsubscribeEl | Element with unsubscribe message |
session | Client session |
requestInfo | Informations about client request |
Definition at line 2137 of file P1Processor.java.
RequestInfo cz.vutbr.fit.knot.annotations.comet.protocolV1.P1Processor.processXML |
( |
Element |
docEl, |
|
|
RequestInfo |
requestInfo |
|
) |
| |
Processes XML with messages from client
- Parameters
-
docEl | Document element of parsed XML with messages from client |
requestInfo | Informations about client's request |
- Returns
- Object with informations about client request
Definition at line 77 of file P1Processor.java.
The documentation for this class was generated from the following file: