4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
RequestInfo.java
Go to the documentation of this file.
1 /*
2  * Project: Server for annotations sharing
3  * Author: Ing. Jaroslav Dytrych idytrych@fit.vutbr.cz
4  * File: RequestInfo.java
5  * Description: Class for representing processed informations about client request
6  */
7 
8 /**
9  * @file RequestInfo.java
10  *
11  * @brief Processed informations about client request
12  */
13 
14 package cz.vutbr.fit.knot.annotations.comet;
15 
26 import java.util.ArrayList;
27 import org.w3c.dom.Document;
28 
29 /**
30  * Class for representing processed informations about client request
31  *
32  * @brief Processed informations about client request
33  * @author idytrych
34  */
35 public class RequestInfo {
36  /**
37  * Informations for comet handlers
38  * - All informations, which can be relevant for comet handlers are here.
39  */
40  private Flier flier = null;
41  /**
42  * Indicator whether flier can be sent to comet handlers (no serious error ocurred)
43  */
44  private boolean canNotify = true;
45  /** String with request from client (raw POST data) */
46  private String requestString = "";
47  /** Parsed XML document with client request */
48  private Document requestDocument;
49  /** String with error messages for client */
50  private String errors = "";
51  /** List of numbers of occurred errors */
52  private ArrayList<Integer> errorList;
53  /** String with warning messages for client */
54  private String warnings = "";
55  /** Session to which this request pertains */
56  private EditorSession session = null;
57  /** Sessions to which this comet request pertains */
58  private ArrayList<EditorSession> cometSessionList = null;
59  /** String with replies for the client */
60  private String ReplyText = "";
61  /** User, which is logging in */
62  private User loggedIn = null;
63  /** Logout indicator */
64  private boolean logout = false;
65  /** Version of protocol which will be used in this connection */
66  private String connectWPV = null;
67  /** Disconnect indicator */
68  private boolean disconnect = false;
69  /** Indicator of change in requested suggestions */
70  private Boolean suggFragmentChanged = false;
71  /** Array of refused suggestions */
72  private ArrayList<SuggestionLogEntry> refusedSuggestions;
73  /** Original array of refused suggestions */
74  private ArrayList<SuggestionLogEntry> origRefusedSuggestions;
75  /** Array of confirmed suggestions */
76  private ArrayList<SuggestionLogEntry> confirmedSuggestions;
77  /** Array of suggestions for which alternatives was requested */
78  private ArrayList<Suggestion> alternativesRequestedFor;
79  /** Array with parameters of settings */
80  private ArrayList<Settings> settings;
81  /** Informations about synchronized document */
83  /** In case of successful synchronization, here will be synchronized document */
84  private AnnotDocument syncDocument = null;
85  /** Indicator of synchronization new (yet unknown) document */
86  private boolean newDocument = false;
87  /** Indicator of synchronization with linearization */
88  private boolean syncLinearized = false;
89  /** Indicator of forced synchronization (overwriting of document) */
90  private boolean syncWithOverwrite = false;
91  /** Informations about resynchronized document */
92  private String resyncDocContent = null;
93  /** Array of annotations to be reloaded */
94  private ArrayList<Annotation> reloadAnnotations;
95  /** Indicator of reloading all annotations */
96  private boolean reloadAll = false;
97  /** Queried annotation types (list of strings with filters) */
98  private ArrayList<String> queryTypes;
99  /** Queried persons (list of strings with filters) */
100  private ArrayList<String> queryPersons;
101  /** Queried user groups (list of strings with filters) */
102  private ArrayList<String> queryUserGroups;
103  /** Queried persons with user groups (list of strings with filters) */
104  private ArrayList<String> queryPersonsWG;
105  /** Queried user groups with persons (list of strings with filters) */
106  private ArrayList<String> queryUserGroupsWP;
107  /** Indicator of change in document */
108  private boolean documentChanged = false;
109  /** List of groups to which is user trying to join */
110  private ArrayList<UserGroup> joinedGroups;
111  /** List of groups to be leaved */
112  private ArrayList<UserGroup> leavedGroups;
113  /** Indicator whether is only one message sent that was session */
114  private boolean sessionOnly = false;
115  /** URI of user group in which are queried attributes from ontology */
116  private String queryTypeAttOnto = null;
117  /** New text modifications to be applied to synschronized document */
118  private ArrayList<TextModification> textModifications;
119  /** Number of last modification stands for ID of last applied modification */
121  /** Set to true if user wnats all entity types */
122  private boolean getEntityTypes;
123  /** Request for controlled dictionary entity */
125  /** Version of document before changes */
126  private String oldDocumentVersion;
127  /** Queried persons attribues for protocol version 2.0 */
128  private ArrayList<String> usersQueryV2;
129  /** Queried persons restrictions for protocol version 2.0 */
130  private boolean[] usersRestrictionsV2;
131  /** Queried users groups attribues for protocol version 2.0 */
132  private ArrayList<String> groupsQueryV2;
133  /** Queried user group persons (if parameter withUsers = true) restrictions for protocol version 2.0 */
134  private boolean[] usersGroupRestrictionsV2;
135  /** List of just subscribed subscriptions */
136  private ArrayList<Subscription> subscribeList = null;
137  /** List of just unsubscribed subscriptions */
138  private ArrayList<Subscription> unsubscribeList = null;
139  /** Array of updated user subscriptions */
140  private ArrayList<Subscription> updatedSubscriptions;
141  /** Array of subscriptions before update */
142  private ArrayList<Subscription> beforeUpdatedSubscriptions;
143  /** Array of deleted user subscriptions */
144  private ArrayList<Subscription> deletedSubscriptions;
145  /** Array of added user subscriptions */
146  private ArrayList<Subscription> newSubscriptions;
147  /** Array with parameters of subscription query */
148  private ArrayList<String> subscriptionQuery;
149  /** Minimal confidence used to filtrate suggestions */
150  private Integer minConfidence;
151  /** Information about request for autoconfirm suggestions */
152  private boolean autoconfirmRequested;
153  /** List of automatically confirmed suggestions */
154  private ArrayList<SuggestionLogEntry> autoconfirmedSuggestions;
155 
156  /**
157  * Constructor which initializes variables
158  */
159  public RequestInfo() {
160  refusedSuggestions = new ArrayList<SuggestionLogEntry>();
161  origRefusedSuggestions = new ArrayList<SuggestionLogEntry>();
162  confirmedSuggestions = new ArrayList<SuggestionLogEntry>();
163  alternativesRequestedFor = new ArrayList<Suggestion>();
164  reloadAnnotations = new ArrayList<Annotation>();
165  queryTypes = new ArrayList<String>();
166  queryPersons = new ArrayList<String>();
167  queryUserGroups = new ArrayList<String>();
168  queryPersonsWG = new ArrayList<String>();
169  queryUserGroupsWP = new ArrayList<String>();
170  errorList = new ArrayList<Integer>();
171  joinedGroups = new ArrayList<UserGroup>();
172  leavedGroups = new ArrayList<UserGroup>();
173  textModifications = new ArrayList<TextModification>();
174  this.subscribeList = new ArrayList<Subscription>();
175  this.unsubscribeList = new ArrayList<Subscription>();
176  updatedSubscriptions = new ArrayList<Subscription>();
177  deletedSubscriptions = new ArrayList<Subscription>();
178  newSubscriptions = new ArrayList<Subscription>();
179  beforeUpdatedSubscriptions = new ArrayList<Subscription>();
180  settings = null;
181  entityRequest = null;
182  usersQueryV2 = null;
183  usersRestrictionsV2 = null;
184  groupsQueryV2 = null;
186  subscriptionQuery = null;
187  autoconfirmedSuggestions = new ArrayList<SuggestionLogEntry>();
188  }
189 
190  /**
191  * Gets string with error messages for client
192  *
193  * @return Returns string with error messages for client
194  */
195  public String getErrors() {
196  return errors;
197  }
198 
199  /**
200  * Sets string with error messages for client
201  *
202  * @param errors String with error messages for client
203  */
204  public void setErrors(String errors) {
205  this.errors = errors;
206  }
207 
208  /**
209  * Gets list of numbers of occurred errors
210  *
211  * @return Returns list of numbers of occurred errors
212  */
213  public ArrayList<Integer> getErrorList() {
214  return errorList;
215  }
216 
217  /**
218  * Method for adding custom errors to string which is sent to client.
219  * Error message must be in XML.
220  *
221  * @param error String with error for client (in XML)
222  */
223  public void addError(String error) {
224  this.errors = this.errors + error;
225  }
226 
227  /**
228  * Method for adding error to string which is sent to client.
229  * Numbers of errors are specified in class Constants.
230  *
231  * @param version Version of protocol used (LOD)
232  * @param lNum Number (id) of language
233  * @param error Number of error
234  */
235  public void addError(int version, int lNum, int error) {
236  addError(version, lNum, error,"");
237  }
238 
239  /**
240  * Method for adding error to string which is sent to client.
241  * Numbers of errors are specified in class Constants.
242  *
243  * @param version Version of protocol used (LOD)
244  * @param lNum Number (id) of language
245  * @param error Number of error
246  * @param info Additional informations in XML
247  */
248  public void addError(int version, int lNum, int error, String info) {
249  addError(version, lNum, error, info, "");
250  }
251 
252  /**
253  * Method for adding error to string which is sent to client.
254  * This variant of function is intended for use in case of error, which is
255  * not specified in Constants, or in case of customized (more detailed) error
256  * message.
257  *
258  * @param version Version of protocol used (LOD)
259  * @param lNum Number (id) of language
260  * @param error Number of error
261  * @param info Additional informations in XML
262  * @param text Custom error message
263  */
264  public void addError(int version, int lNum, int error, String info, String text) {
265  this.errorList.add(error);
266  this.errors = this.errors + createErrorMsg(version, lNum, error, info, text);
267  }
268 
269  /**
270  * Function for creating error message to be sent to client. Numbers
271  * of errors and strings with error messages are specified in class Constants.
272  *
273  * @param version Version of protocol used (LOD)
274  * @param lNum Number (id) of language
275  * @param error Number of error
276  * @return Returns error message in XML
277  */
278  public static String createErrorMsg(int version, int lNum, int error) {
279  return createErrorMsg(version, lNum, error, "");
280  }
281 
282  /**
283  * Function for creating error message to be sent to client. Numbers
284  * of errors and strings with error messages are specified in class Constants.
285  *
286  * @param version Version of protocol used (LOD)
287  * @param lNum Number (id) of language
288  * @param error Number of error
289  * @param info Additional informations in XML
290  * @return Returns error message in XML
291  */
292  public static String createErrorMsg(int version, int lNum, int error, String info) {
293  return createErrorMsg(version, lNum, error, info, "");
294  }
295 
296  /**
297  * Function for creating error message to be sent to client. Numbers
298  * of errors and strings with error messages are specified in class Constants.
299  *
300  * @param version Version of protocol used (LOD)
301  * @param lNum Number (id) of language
302  * @param error Number of error
303  * @param info Additional informations in XML
304  * @param text Custom error message
305  * @return Returns error message in XML
306  */
307  public static String createErrorMsg(int version, int lNum, int error, String info, String text) {
308  if (version < Constants.PROTOCOL_LOD_V2) {
309  return createErrorMsg1(lNum, error, info, text);
310  } else {
311  return createErrorMsg2(lNum, error, info, text);
312  }
313  }
314 
315  /**
316  * Function for creating error message to be sent to client. Numbers
317  * of errors and strings with error messages are specified in class Constants.
318  * This method is for protocol version 1.x
319  *
320  * @param lNum Number (id) of language
321  * @param error Number of error
322  * @param info Additional informations in XML
323  * @param text Custom error message
324  * @return Returns error message in XML
325  */
326  public static String createErrorMsg1(int lNum, int error, String info, String text) {
327  String errText;
328  int errNum = error;
329  if (error >= 0 && error < Localisation.getNumOfErrors()) {
330  errText = Localisation.getErrMessage(lNum, errNum);
331  } else {
332  errText = Localisation.getUnknownErrMessage(lNum);
334  }
335 
336  if (text.length() > 0) {
337  errText = text;
338  }
339 
340  return "<error number=\"" + errNum + "\">"
341  + "<message><![CDATA[\n"
342  + errText + "\n"
343  + "]]></message>\n"
344  + info
345  + "</error>\n";
346  }
347 
348  /**
349  * Function for creating error message to be sent to client. Numbers
350  * of errors and strings with error messages are specified in class Constants.
351  * This method is for protocol version 2.x
352  *
353  * @param lNum Number (id) of language
354  * @param error Number of error
355  * @param info Additional informations in XML
356  * @param text Custom error message
357  * @return Returns error message in XML
358  */
359  public static String createErrorMsg2(int lNum, int error, String info, String text) {
360  String errText;
361  int errNum = error;
362  if (error >= 0 && error < Localisation.getNumOfErrors()) {
363  errText = Localisation.getErrMessage2(lNum, errNum);
364  } else {
365  errText = Localisation.getUnknownErrMessage2(lNum);
367  }
368 
369  if (text.length() > 0) {
370  errText = text;
371  }
372 
373  String errCode = Localisation.getErrCode(errNum);
374 
375  return "<error code=\"" + errCode + "\">"
376  + "<message><![CDATA[\n"
377  + errText + "\n"
378  + "]]></message>\n"
379  + info
380  + "</error>\n";
381  } // createErrorMsg2()
382 
383  /**
384  * Geting of string with warning messages for client
385  *
386  * @return Returns string with warning messages for client
387  */
388  public String getWarnings() {
389  return warnings;
390  }
391 
392  /**
393  * Sets string with warning messages for client
394  *
395  * @param warnings String with warning messages for client
396  */
397  public void setWarnings(String warnings) {
398  this.warnings = warnings;
399  }
400 
401  /**
402  * Method for adding warning to string which is sent to client.
403  *
404  * @param warning String with warning for client (in XML)
405  */
406  public void addWarning(String warning) {
407  this.warnings = this.warnings + warning;
408  }
409 
410  /**
411  * Method for adding warning to string which is sent to client.
412  * Numbers of warnings are specified in class Constants.
413  *
414  * @param version Version of protocol used (LOD)
415  * @param lNum Number (id) of language
416  * @param warning Number of error
417  */
418  public void addWarning(int version, int lNum, int warning) {
419  addWarning(version, lNum, warning, "");
420  }
421 
422  /**
423  * Method for adding warning to string which is sent to client.
424  * Numbers of warnings are specified in class Constants.
425  *
426  * @param version Version of protocol used (LOD)
427  * @param lNum Number (id) of language
428  * @param warning Number of error
429  * @param annotation URI of affected annotation
430  */
431  public void addWarning(int version, int lNum, int warning, String annotation) {
432  if (version < Constants.PROTOCOL_LOD_V2) {
433  addWarning(lNum, warning, annotation, "");
434  } else {
435  String context = "";
436  if (!annotation.isEmpty()) {
437  context = "<annotation uri=\"" + annotation + "\"/>";
438  }
439  addWarning2(lNum, warning, context, "");
440  }
441  }
442 
443  /**
444  * Method for adding warning to string which is sent to client.
445  * This variant of function is intended for use in case of warning, which
446  * is not specified in Constants, or in case of customized (more detailed)
447  * warning message.
448  *
449  * @param lNum Number (id) of language
450  * @param warning Number of error
451  * @param annotation URI of affected annotation
452  * @param text Custom warning message
453  */
454  public void addWarning(int lNum, int warning, String annotation, String text) {
455  String wText;
456  int wNum = warning;
457  if (warning > 0 && warning < Localisation.getNumOfWarnings()) {
458  wText = Localisation.getWarningMessage(lNum, warning);
459  } else {
460  wText = Localisation.getUnknownWarningMessage(lNum);
461  wNum = 100;
462  }
463 
464  if (text.length() > 0)
465  wText = text;
466 
467  String anAt = "";
468  if (annotation.length() > 0) {
469  anAt = " annotation=\"" + annotation + "\"";
470  }
471 
472  this.errors = this.errors + "<warning number=\"" + wNum + "\"" + anAt + ">"
473  + "<![CDATA["
474  + wText + "\n"
475  + "]]>"
476  + "</warning>";
477  }
478 
479  /**
480  * Geting of flier
481  * Flier contains all informations, which can be relevant for comet handlers.
482  *
483  * @return Returns flier (informations for comet handlers)
484  */
485  public Flier getFlier() {
486  return flier;
487  }
488 
489  /**
490  * Method for adding warning to string which is sent to client.
491  * This variant of function is intended for use in case of warning, which
492  * is not specified in Constants, or in case of customized (more detailed)
493  * warning message.
494  * It is intended for protocol version 2.0
495  *
496  * @param lNum Number (id) of language
497  * @param warning Number of error
498  * @param info Additional informations in XML
499  * @param text Custom warning message
500  */
501  public void addWarning2(int lNum, int warning, String info, String text) {
502  String wText;
503  int wNum = warning;
504  if (warning > 0 && warning < Localisation.getNumOfWarnings()) {
505  wText = Localisation.getWarningMessage2(lNum, warning);
506  } else {
507  wText = Localisation.getUnknownWarningMessage2(lNum);
509  }
510 
511  if (text.length() > 0) {
512  wText = text;
513  }
514 
515  String wCode = Localisation.getWarningCode(wNum);
516 
517  this.errors = this.errors + "<warning code=\"" + wCode + "\">"
518  + "<message><![CDATA["
519  + wText + "\n"
520  + "]]></message>\n"
521  + info
522  + "</warning>";
523  } // addWarning2
524 
525  /**
526  * Setting of flier
527  * Flier contains all informations, which can be relevant for comet handlers.
528  *
529  * @param flier Flier with informations for comet handlers
530  */
531  public void setFlier(Flier flier) {
532  this.flier = flier;
533  }
534 
535  /**
536  * Geting of session in which this request originated
537  *
538  * @return Returns Session in which this request originated
539  */
541  return session;
542  }
543 
544  /**
545  * Sets the session in which this request originated
546  *
547  * @param session Session in which this request originated
548  */
550  this.session = session;
551  if(session != null && session.getSyncDocument() != null){
552  this.oldDocumentVersion = session.getSyncDocument().getContent();
553  }
554  }
555 
556  /**
557  * Geting list of sessions in which this comet request originated
558  *
559  * @return Returns list of sessions in which this comet request originated
560  */
561  public ArrayList<EditorSession> getCometSessionList() {
562  return cometSessionList;
563  }
564 
565  /**
566  * Sets the list of sessions in which this comet request originated
567  *
568  * @param sessionList List of sessions in which this comet request originated
569  */
570  public void setCometSessionList(ArrayList<EditorSession> sessionList) {
571  this.cometSessionList = sessionList;
572  }
573 
574  /**
575  * Gets of replies for the client
576  * Reply text contains replies to messages from client (errors and warnings
577  * are in separate strings).
578  *
579  * @return Returns string with replies for the client
580  */
581  public String getReplyText() {
582  return ReplyText;
583  }
584 
585  /**
586  * Sets the string with replies for the client
587  *
588  * @param ReplyText string with replies for the client
589  */
590  public void setReplyText(String ReplyText) {
591  this.ReplyText = ReplyText;
592  }
593 
594  /**
595  * Appends new response message to responses for client.
596  *
597  * @param text Response message in XML.
598  */
599  public void appendToReply(String text) {
600  this.ReplyText = this.ReplyText.concat(text);
601  }
602 
603  /**
604  * Returns whether fragment to which is annotations suggesting is changed
605  *
606  * @return If fragment is changed, returns true, false otherwise
607  */
608  public Boolean isSuggFragmentChanged() {
609  return suggFragmentChanged;
610  }
611 
612  /**
613  * Sets whether fragment to which is annotations suggesting is changed
614  *
615  * @param suggFragmentChanged If fragment is changed, true, false otherwise
616  */
618  this.suggFragmentChanged = suggFragmentChanged;
619  }
620 
621  /**
622  * Gets list of refused annotation suggestions
623  *
624  * @return Returns list of refused annotation suggestions
625  */
626  public ArrayList<SuggestionLogEntry> getRefusedSuggestions() {
627  return refusedSuggestions;
628  }
629 
630  /**
631  * Sets list of refused annotation suggestions
632  *
633  * @param refusedSuggestions List of refused annotation suggestions
634  */
635  public void setRefusedSuggestions(ArrayList<SuggestionLogEntry> refusedSuggestions) {
636  this.refusedSuggestions = refusedSuggestions;
637  }
638 
639  /**
640  * Adds refused annotation suggestion to the list
641  *
642  * @param refusedSuggestion Refused annotation suggestion
643  */
644  public void addRefusedSuggestion(SuggestionLogEntry refusedSuggestion) {
645  this.refusedSuggestions.add(refusedSuggestion);
646  }
647 
648  /**
649  * Gets original list of refused annotation suggestions
650  *
651  * @return Returns original list of refused annotation suggestions
652  */
653  public ArrayList<SuggestionLogEntry> getOrigRefusedSuggestions() {
654  return origRefusedSuggestions;
655  }
656 
657  /**
658  * Sets original list of refused annotation suggestions
659  *
660  * @param origRefusedSuggestions Original list of refused annotation suggestions
661  */
662  public void setOrigRefusedSuggestions(ArrayList<SuggestionLogEntry> origRefusedSuggestions) {
663  this.origRefusedSuggestions = origRefusedSuggestions;
664  }
665 
666  /**
667  * Gets list of confirmed annotation suggestions
668  *
669  * @return Returns list of confirmed annotation suggestions
670  */
671  public ArrayList<SuggestionLogEntry> getConfirmedSuggestions() {
672  return confirmedSuggestions;
673  }
674 
675  /**
676  * Clears list of confirmed annotation suggestions.
677  */
679  if(confirmedSuggestions != null){
680  confirmedSuggestions.clear();
681  }
682  }
683 
684  /**
685  * Sets list of confirmed annotation suggestions
686  *
687  * @param confirmedSuggestions List of confirmed annotation suggestions
688  */
689  public void setConfirmedSuggestions(ArrayList<SuggestionLogEntry> confirmedSuggestions) {
690  this.confirmedSuggestions = confirmedSuggestions;
691  }
692 
693  /**
694  * Adds confirmed annotation suggestion to the list
695  *
696  * @param confirmedSuggestion Confirmed annotation suggestion
697  */
698  public void addConfirmedSuggestion(SuggestionLogEntry confirmedSuggestion) {
699  this.confirmedSuggestions.add(confirmedSuggestion);
700  }
701 
702  /**
703  * Gets array of suggestions for which alternatives was requested
704  *
705  * @return Returns array of suggestions for which alternatives was requested
706  */
707  public ArrayList<Suggestion> getAlternativesRequestedFor() {
709  }
710 
711  /**
712  * Sets array of suggestions for which alternatives was requested
713  *
714  * @param alternativesRequestedFor Array of suggestions for which alternatives was requested
715  */
716  public void setAlternativesRequestedFor(ArrayList<Suggestion> alternativesRequestedFor) {
717  this.alternativesRequestedFor = alternativesRequestedFor;
718  }
719 
720  /**
721  * Adds suggestion into array of suggestions for which alternatives was requested
722  *
723  * @param sug Suggestion to add
724  */
726  this.alternativesRequestedFor.add(sug);
727  }
728 
729  /**
730  * Gets list of params of user settings
731  *
732  * @return Returns list of params of user settings
733  */
734  public ArrayList<Settings> getSettings() {
735  return settings;
736  }
737 
738  /**
739  * Sets list of params of user settings
740  *
741  * @param settings List of params of user settings
742  */
743  public void setSettings(ArrayList<Settings> settings) {
744  this.settings = settings;
745  }
746 
747  /**
748  * Gets data of synchronized document (data from user request)
749  *
750  * @return Returns data of synchronized document (data from user request)
751  */
753  return syncDocumentData;
754  }
755 
756  /**
757  * Sets data of synchronized document (data from user request)
758  *
759  * @param syncDocumentData Data of synchronized document (data from user request)
760  */
762  this.syncDocumentData = syncDocumentData;
763  }
764 
765  /**
766  * Gets synchronized document. This is set by server module in the case
767  * of successfull synchronization.
768  *
769  * @return Returns synchronized document
770  */
772  return syncDocument;
773  }
774 
775  /**
776  * Sets synchronized document. This is set by server module in the case
777  * of successfull synchronization.
778  *
779  * @param syncDocument Synchronized document
780  */
782  this.syncDocument = syncDocument;
783  }
784 
785  /**
786  * Gets information about whether synchronization is with linearization
787  *
788  * @return If synchronization is with linearization, returns true, false otherwise
789  */
790  public boolean isSyncLinearized() {
791  return syncLinearized;
792  }
793 
794  /**
795  * Sets information about whether synchronization is with linearization
796  *
797  * @param syncLinearized If synchronization is with linearization, true, false otherwise
798  */
799  public void setSyncLinearized(boolean syncLinearized) {
800  this.syncLinearized = syncLinearized;
801  }
802 
803  /**
804  * Gets information about whether synchronization is forced (overwrite document)
805  *
806  * @return If synchronization is forced, returns true, false otherwise
807  */
808  public boolean isSyncWithOverwrite() {
809  return syncWithOverwrite;
810  }
811 
812  /**
813  * Sets information about whether synchronization is is forced (overwrite document)
814  *
815  * @param syncWithOverwrite If synchronization is forced, true, false otherwise
816  */
818  this.syncWithOverwrite = syncWithOverwrite;
819  }
820 
821  /**
822  * Gets content of resynchronized document (data from client request)
823  *
824  * @return Returns content of resynchronized document
825  */
826  public String getResyncDocContent() {
827  return resyncDocContent;
828  }
829 
830  /**
831  * Sets content of resynchronized document (data from client request)
832  *
833  * @param resyncDocContent Content of resynchronized document
834  */
835  public void setResyncDocContent(String resyncDocContent) {
836  this.resyncDocContent = resyncDocContent;
837  }
838 
839  /**
840  * Gets list of reloaded annotations
841  *
842  * @return Returns list of reloaded annotations
843  */
844  public ArrayList<Annotation> getReloadAnnotations() {
845  return reloadAnnotations;
846  }
847 
848  /**
849  * Sets the list of reloaded annotations
850  *
851  * @param reloadAnnotations List of reloaded annotations (requested by client)
852  */
853  public void setReloadAnnotations(ArrayList<Annotation> reloadAnnotations) {
854  this.reloadAnnotations = reloadAnnotations;
855  }
856 
857  /**
858  * Adds reloaded annotation to the list
859  *
860  * @param reloadAnnotation Reloaded annotation (requested by client)
861  */
862  public void addReloadAnnotations(Annotation reloadAnnotation) {
863  this.reloadAnnotations.add(reloadAnnotation);
864  }
865 
866  /**
867  * Returns, whether client requested reloading of all annotations
868  *
869  * @return If client requested reloading of all annotations, returns true, false otherwise
870  */
871  public boolean getReloadAll() {
872  return reloadAll;
873  }
874 
875  /**
876  * Sets, whether client requested reloading of all annotations
877  *
878  * @param reloadAll If client requested reloading of all annotations, true, false otherwise
879  */
880  public void setReloadAll(boolean reloadAll) {
881  this.reloadAll = reloadAll;
882  }
883 
884  /**
885  * Gets queried annotation types (list of strings with filters)
886  *
887  * @return Returns queried annotation types (list of strings with filters)
888  */
889  public ArrayList<String> getQueryTypes() {
890  return queryTypes;
891  }
892 
893  /**
894  * Sets queried annotation types (list of strings with filters)
895  *
896  * @param queryTypes Queried annotation types (list of strings with filters)
897  */
898  public void setQueryTypes(ArrayList<String> queryTypes) {
899  this.queryTypes = queryTypes;
900  }
901 
902  /**
903  * Adds queried annotation type(s) (string with filter) to the list
904  *
905  * @param queryType Queried annotation type (string with filter)
906  */
907  public void addQueryTypes(String queryType) {
908  this.queryTypes.add(queryType);
909  }
910 
911  /**
912  * Gets queried persons (list of strings with filters)
913  *
914  * @return Returns queried persons (list of strings with filters)
915  */
916  public ArrayList<String> getQueryPersons() {
917  return queryPersons;
918  }
919 
920  /**
921  * Sets queried persons (list of strings with filters)
922  *
923  * @param queryPersons Queried persons (list of strings with filters)
924  */
925  public void setQueryPersons(ArrayList<String> queryPersons) {
926  this.queryPersons = queryPersons;
927  }
928 
929  /**
930  * Adds queried person(s) (string with filter) to the list
931  *
932  * @param queryPerson Queried persons (string with filter)
933  */
934  public void addQueryPersons(String queryPerson) {
935  this.queryPersons.add(queryPerson);
936  }
937 
938  /**
939  * Gets queried user groups (list of strings with filters)
940  *
941  * @return Returns queried user groups (list of strings with filters)
942  */
943  public ArrayList<String> getQueryUserGroups() {
944  return queryUserGroups;
945  }
946 
947  /**
948  * Sets queried user groups (list of strings with filters)
949  *
950  * @param queryUserGroups Queried user groups (list of strings with filters)
951  */
952  public void setQueryUserGroups(ArrayList<String> queryUserGroups) {
953  this.queryUserGroups = queryUserGroups;
954  }
955 
956  /**
957  * Adds queried user group(s) (string with filter) to the list
958  *
959  * @param queryUserGroups Queried user group(s) (string with filter)
960  */
961  public void addQueryUserGroups(String queryUserGroups) {
962  this.queryUserGroups.add(queryUserGroups);
963  }
964 
965  /**
966  * Gets queried persons with list of user groups (list of strings with filters)
967  *
968  * @return Returns queried persons wiht list of user groups (list of strings with filters)
969  */
970  public ArrayList<String> getQueryPersonsWG() {
971  return queryPersonsWG;
972  }
973 
974  /**
975  * Sets queried persons with list of user groups (list of strings with filters)
976  *
977  * @param queryPersonsWG Queried persons with list of user groups (list of strings with filters)
978  */
979  public void setQueryPersonsWG(ArrayList<String> queryPersonsWG) {
980  this.queryPersonsWG = queryPersonsWG;
981  }
982 
983  /**
984  * Adds queried person(s) with list of user groups (string with filter) to the list
985  *
986  * @param queryPersonsWG Queried person(s) (string with filter)
987  */
988  public void addQueryPersonsWG(String queryPersonsWG) {
989  this.queryPersonsWG.add(queryPersonsWG);
990  }
991 
992  /**
993  * Gets queried user groups with list of persons (list of strings with filters)
994  *
995  * @return Returns queried user groups with list of persons (list of strings with filters)
996  */
997  public ArrayList<String> getQueryUserGroupsWP() {
998  return queryUserGroupsWP;
999  }
1000 
1001  /**
1002  * Sets queried user groups with list of persons (list of strings with filters)
1003  *
1004  * @param queryUserGroupsWP Queried user groups with list of persons (list of strings with filters)
1005  */
1006  public void setQueryUserGroupsWP(ArrayList<String> queryUserGroupsWP) {
1007  this.queryUserGroupsWP = queryUserGroupsWP;
1008  }
1009 
1010  /**
1011  * Adds queried user group(s) with list of persons (string with filter) to the list
1012  *
1013  * @param queryUserGroupsWP Queried user group(s) (string with filter)
1014  */
1016  this.queryUserGroupsWP.add(queryUserGroupsWP);
1017  }
1018 
1019  /**
1020  * Gets raw request data
1021  *
1022  * @return Returns raw request data
1023  */
1024  public String getRequestString() {
1025  return requestString;
1026  }
1027 
1028  /**
1029  * Sets raw request data
1030  *
1031  * @param requestString Raw request data
1032  */
1033  public void setRequestString(String requestString) {
1034  this.requestString = requestString;
1035  }
1036 
1037  /**
1038  * Gets parsed request data in document
1039  *
1040  * @return Returns parsed request data in document
1041  */
1042  public Document getRequestDocument() {
1043  return requestDocument;
1044  }
1045 
1046  /**
1047  * Sets parsed request data in document
1048  *
1049  * @param requestDocument Parsed request data in document
1050  */
1051  public void setRequestDocument(Document requestDocument) {
1052  this.requestDocument = requestDocument;
1053  }
1054 
1055  /**
1056  * Gets just logged in user
1057  *
1058  * @return Returns just logged in user
1059  */
1060  public User getLoggedIn() {
1061  return loggedIn;
1062  }
1063 
1064  /**
1065  * Sets just logged in user
1066  *
1067  * @param loggedIn Just logged in user
1068  */
1069  public void setLoggedIn(User loggedIn) {
1070  this.loggedIn = loggedIn;
1071  }
1072 
1073  /**
1074  * Gets protocol version (set only if this request contains Connect message)
1075  *
1076  * @return Returns protocol version
1077  */
1078  public String getConnectWPV() {
1079  return connectWPV;
1080  }
1081 
1082  /**
1083  * Sets protocol version (from Connect message)
1084  *
1085  * @return Returns protocol version
1086  */
1087  public void setConnectWPV(String connectWPV) {
1088  this.connectWPV = connectWPV;
1089  }
1090 
1091  /**
1092  * Returns whether this request contains disconnect message
1093  *
1094  * @return If disconnect is presented, returns true, false otherwise
1095  */
1096  public boolean isDisconnect() {
1097  return disconnect;
1098  }
1099 
1100  /**
1101  * Sets whether this request contains disconnect message
1102  *
1103  * @param disconnect If disconnect is presented, true, false otherwise
1104  */
1105  public void setDisconnect(boolean disconnect) {
1106  this.disconnect = disconnect;
1107  }
1108 
1109  /**
1110  * Returns whether this request contains logout message
1111  *
1112  * @return If logout is presented, returns true, false otherwise
1113  */
1114  public boolean isLogout() {
1115  return logout;
1116  }
1117 
1118  /**
1119  * Sets whether this request contains logout message
1120  *
1121  * @param logout If logout is presented, true, false otherwise
1122  */
1123  public void setLogout(boolean logout) {
1124  this.logout = logout;
1125  }
1126 
1127  /**
1128  * Returns whether informations from the processed request can be notified
1129  * to comet handlers (whether error not ocurred)
1130  *
1131  * @return If informations can be notified, returns true, false otherwise
1132  */
1133  public boolean getCanNotify() {
1134  return canNotify;
1135  }
1136 
1137  /**
1138  * Sets whether informations from the processed request can be notified
1139  * to comet handlers (whether error not ocurred)
1140  *
1141  * @param canNotify If informations can be notified, true, false otherwise
1142  */
1143  public void setCanNotify(boolean canNotify) {
1144  this.canNotify = canNotify;
1145  }
1146 
1147  /**
1148  * Returns whether annotated document is changed (text modified).
1149  * This can be done by textModification message.
1150  *
1151  * @return If document is changed, returns true, false otherwise
1152  */
1153  public boolean isDocumentChanged() {
1154  return documentChanged;
1155  }
1156 
1157  /**
1158  * Sets whether annotated document is changed (text modified)
1159  *
1160  * @param documentChanged If document is changed, true, false otherwise
1161  */
1162  public void setDocumentChanged(boolean documentChanged) {
1163  this.documentChanged = documentChanged;
1164  }
1165 
1166  /**
1167  * Returns, whether just synchronized document is new (yet unknown)
1168  *
1169  * @return If just synchronized document is new, returns true, false otherwise
1170  */
1171  public boolean isNewDocument() {
1172  return newDocument;
1173  }
1174 
1175  /**
1176  * Sets, whether just synchronized document is new (yet unknown)
1177  *
1178  * @param newDocument If just synchronized document is new, true, false otherwis
1179  */
1180  public void setNewDocument(boolean newDocument) {
1181  this.newDocument = newDocument;
1182  }
1183 
1184  /**
1185  * Gets list of groups to which is user trying to join
1186  *
1187  * @return Returns list of groups to which is user trying to join
1188  */
1189  public ArrayList<UserGroup> getJoinedGroups() {
1190  return joinedGroups;
1191  }
1192 
1193  /**
1194  * Sets the list of groups to which is user trying to join
1195  *
1196  * @param joinedGroups List of groups to which is user trying to join
1197  */
1198  public void setJoinedGroups(ArrayList<UserGroup> joinedGroups) {
1199  this.joinedGroups = joinedGroups;
1200  }
1201 
1202  /**
1203  * Adds group to which is user trying to join to the list
1204  *
1205  * @param joinedGroup Group to which is user trying to join
1206  */
1207  public void addJoinedGroup(UserGroup joinedGroup) {
1208  this.joinedGroups.add(joinedGroup);
1209  }
1210 
1211  /**
1212  * Gets List of groups to be leaved
1213  *
1214  * @return Returns list of groups to be leaved
1215  */
1216  public ArrayList<UserGroup> getLeavedGroups() {
1217  return leavedGroups;
1218  }
1219 
1220  /**
1221  * Sets the list of groups to be leaved
1222  *
1223  * @param leavedGroups List of groups to be leaved
1224  */
1225  public void setLeavedGroups(ArrayList<UserGroup> leavedGroups) {
1226  this.leavedGroups = leavedGroups;
1227  }
1228 
1229  /**
1230  * Adds group to be leaved to the list
1231  *
1232  * @param leavedGroup Group to be leaved
1233  */
1234  public void addLeavedGroup(UserGroup leavedGroup) {
1235  this.leavedGroups.add(leavedGroup);
1236  }
1237 
1238  /**
1239  * Gets indicator whether is only one message sent that was session
1240  *
1241  * @return Returns indicator whether is only one message sent that was session
1242  */
1243  public boolean isSessionOnly() {
1244  return sessionOnly;
1245  }
1246 
1247  /**
1248  * Sets whether is only one message sent that was session
1249  *
1250  * @param sessionOnly Indicator whether is only one message sent that was session
1251  */
1252  public void setSessionOnly(boolean sessionOnly) {
1253  this.sessionOnly = sessionOnly;
1254  }
1255 
1256  /**
1257  * Gets URI ofuser group in which are queried attributes from ontology
1258  *
1259  * @return Returns URI of user group in which are queried attributes from ontology
1260  */
1261  public String getQueryTypeAttOnto() {
1262  return queryTypeAttOnto;
1263  }
1264 
1265  /**
1266  * Sets URI of user group in which are queried attributes from ontology
1267  *
1268  * @param queryTypeAttOnto URI of user group in which are queried attributes from ontology
1269  */
1271  this.queryTypeAttOnto = queryTypeAttOnto;
1272  }
1273 
1274  /**
1275  * Gets sent text modifications which should be applied to document.
1276  *
1277  * @return Sent text modifications which should be applied to document.
1278  */
1279  public ArrayList<TextModification> getTextModifications() {
1280  return textModifications;
1281  }
1282 
1283  /**
1284  * Sets identifier of last applied modification
1285  *
1286  * @param id Identifier of last applied modification
1287  */
1288  public void setLastModificationNumber(int id){
1289  this.lastModificationNumber = id;
1290  }
1291 
1292  /**
1293  * Gets last applied modification identifier
1294  *
1295  * @return Returns last applied modification identifier
1296  */
1298  return lastModificationNumber;
1299  }
1300 
1301  /**
1302  * Adds sent text modifications which should be applied to document.
1303  *
1304  * @param textModifications Sent text modifications which should be applied to document.
1305  */
1306  public void addTextModifications(ArrayList<TextModification> textModifications) {
1307  this.textModifications.addAll(textModifications);
1308  }
1309 
1310  /**
1311  * Adds sent text modification which should be applied to document.
1312  *
1313  * @param textModification Sent text modification which should be applied to document.
1314  */
1315  public void addTextModification(TextModification textModification) {
1316  this.textModifications.add(textModification);
1317  }
1318 
1319  /**
1320  * Gets indicator of all entity types request.
1321  *
1322  * @return indicator of all entity types request
1323  */
1324  public boolean isGetEntityTypes() {
1325  return getEntityTypes;
1326  }
1327 
1328  /**
1329  * Sets indicator of all entity types request.
1330  *
1331  * @param getEntityTypes indicator of all entity types request
1332  */
1333  public void setGetEntityTypes(boolean getEntityTypes) {
1334  this.getEntityTypes = getEntityTypes;
1335  }
1336 
1337  /**
1338  * Gets request of controlled dictionary entity.
1339  *
1340  * @return request of controlled dictionary entity
1341  */
1343  return entityRequest;
1344  }
1345 
1346  /**
1347  * Sets request of controlled dictionary entity.
1348  *
1349  * @param entityRequest request of controlled dictionary entity
1350  */
1352  this.entityRequest = entityRequest;
1353  }
1354 
1355  /**
1356  * Gets version of document before changes.
1357  *
1358  * @return version of document before changes
1359  */
1360  public String getOldDocumentVersion() {
1361  return oldDocumentVersion;
1362  }
1363 
1364  /**
1365  * Gets queried persons attribues for protocol version 2.0.
1366  *
1367  * @return queried persons attribues
1368  */
1369  public ArrayList<String> getUsersQueryV2() {
1370  return usersQueryV2;
1371  }
1372 
1373  /**
1374  * Sets queried persons attribues for protocol version 2.0.
1375  *
1376  * @param usersQueryV2 queried persons attribues
1377  */
1378  public void setUsersQueryV2(ArrayList<String> usersQueryV2) {
1379  this.usersQueryV2 = usersQueryV2;
1380  }
1381 
1382  /**
1383  * Gets queried persons restrictions for protocol version 2.0.
1384  *
1385  * @return queried persons restrictions
1386  */
1387  public boolean[] getUsersRestrictionsV2() {
1388  return usersRestrictionsV2;
1389  }
1390 
1391  /**
1392  * Sets queried persons restrictions for protocol version 2.0.
1393  *
1394  * @param usersRestrictionsV2 queried persons restrictions
1395  */
1397  this.usersRestrictionsV2 = usersRestrictionsV2;
1398  }
1399 
1400  /**
1401  * Gets queried users groups attribues for protocol version 2.0.
1402  *
1403  * @return queried users groups attribues
1404  */
1405  public ArrayList<String> getGroupsQueryV2() {
1406  return groupsQueryV2;
1407  }
1408 
1409  /**
1410  * Sets queried users groups attribues for protocol version 2.0.
1411  *
1412  * @param groupsQueryV2 queried users groups attribues
1413  */
1414  public void setGroupsQueryV2(ArrayList<String> groupsQueryV2) {
1415  this.groupsQueryV2 = groupsQueryV2;
1416  }
1417 
1418  /**
1419  * Gets queried user groups persons restrictions for protocol version 2.0.
1420  *
1421  * @return persons restrictions
1422  */
1423  public boolean[] getUsersGroupRestrictionsV2() {
1424  return usersGroupRestrictionsV2;
1425  }
1426 
1427  /**
1428  * Sets queried user groups persons restrictions for protocol version 2.0.
1429  *
1430  * @param usersGroupRestrictionsV2 persons restrictions
1431  */
1433  this.usersGroupRestrictionsV2 = usersGroupRestrictionsV2;
1434  }
1435 
1436  /**
1437  * Gets list of just subscribed subscriptions
1438  *
1439  * @return Returns list of just subscribed subscriptions
1440  */
1441  public ArrayList<Subscription> getSubscribeList() {
1442  return subscribeList;
1443  }
1444 
1445  /**
1446  * Sets list of just subscribed subscriptions
1447  *
1448  * @param subscribeList List of just subscribed subscriptions
1449  */
1450  public void setSubscribeList(ArrayList<Subscription> subscribeList) {
1451  this.subscribeList = subscribeList;
1452  }
1453 
1454  /**
1455  * Adds subscription into list of just subscribed subscriptions
1456  *
1457  * @param subscription Just subscribed subscription
1458  */
1459  public void addToSubscribe(Subscription subscription) {
1460  this.subscribeList.add(subscription);
1461  }
1462 
1463  /**
1464  * Gets list of just unsubscribed subscriptions
1465  *
1466  * @return Returns list of just unsubscribed subscriptions
1467  */
1468  public ArrayList<Subscription> getUnsubscribeList() {
1469  return unsubscribeList;
1470  }
1471 
1472  /**
1473  * Sets list of just unsubscribed subscriptions
1474  *
1475  * @param unsubscribeList List of just unsubscribed subscriptions
1476  */
1477  public void setUnsubscribeList(ArrayList<Subscription> unsubscribeList) {
1478  this.unsubscribeList = unsubscribeList;
1479  }
1480 
1481  /**
1482  * Adds just unsubscribed subscription into list of just unsubscribed subscriptions
1483  *
1484  * @param subscription Just unsubscribed subscription
1485  */
1486  public void addToUnsubscribe(Subscription subscription) {
1487  this.unsubscribeList.add(subscription);
1488  }
1489 
1490  /**
1491  * Gets array of updated user subscriptions
1492  *
1493  * @return Return array of updated user subscriptions
1494  */
1495  public ArrayList<Subscription> getUpdatedSubscriptions() {
1496  return updatedSubscriptions;
1497  }
1498 
1499  /**
1500  * Adds updated subscription into array of updated user subscriptions
1501  *
1502  * @param updatedSubscription Updated subscription
1503  */
1504  public void addUpdatedSubscriptions(Subscription updatedSubscription) {
1505  this.updatedSubscriptions.add(updatedSubscription);
1506  }
1507 
1508  /**
1509  * Sets array of updated user subscriptions
1510  *
1511  * @param updatedSubscriptions Array of updated user subscriptions
1512  */
1513  public void setUpdatedSubscriptions(ArrayList<Subscription> updatedSubscriptions) {
1514  this.updatedSubscriptions = updatedSubscriptions;
1515  }
1516 
1517  /**
1518  * Gets array of deleted user subscriptions
1519  *
1520  * @return Returns array of deleted user subscriptions
1521  */
1522  public ArrayList<Subscription> getDeletedSubscriptions() {
1523  return deletedSubscriptions;
1524  }
1525 
1526  /**
1527  * Adds subscription into array of deleted user subscriptions
1528  *
1529  * @param deletedSubscription Deleted user subscription
1530  */
1531  public void addDeletedSubscription(Subscription deletedSubscription) {
1532  this.deletedSubscriptions.add(deletedSubscription);
1533  }
1534 
1535  /**
1536  * Sets array of deleted user subscriptions
1537  *
1538  * @param deletedSubscriptions Array of deleted user subscriptions
1539  */
1540  public void setDeletedSubscriptions(ArrayList<Subscription> deletedSubscriptions) {
1541  this.deletedSubscriptions = deletedSubscriptions;
1542  }
1543 
1544  /**
1545  * Gets array of added user subscriptions
1546  *
1547  * @return Returns array of added user subscriptions
1548  */
1549  public ArrayList<Subscription> getNewSubscriptions() {
1550  return newSubscriptions;
1551  }
1552 
1553  /**
1554  * Adds new subscription into array of added user subscriptions
1555  *
1556  * @param newSubscription New user subscription
1557  */
1558  public void addNewSubscriptions(Subscription newSubscription) {
1559  this.newSubscriptions.add(newSubscription);
1560  }
1561 
1562  /**
1563  * Sets array of added user subscriptions
1564  *
1565  * @param newSubscriptions Array of added user subscriptions
1566  */
1567  public void setNewSubscriptions(ArrayList<Subscription> newSubscriptions) {
1568  this.newSubscriptions = newSubscriptions;
1569  }
1570 
1571  /**
1572  * Gets array of subscriptions before update
1573  *
1574  * @return Returns array of subscriptions before update
1575  */
1576  public ArrayList<Subscription> getBeforeUpdatedSubscriptions() {
1578  }
1579 
1580  /**
1581  * Sets array of subscriptions before update
1582  *
1583  * @param beforeUpdatedSubscriptions Array of subscriptions before update
1584  */
1585  public void setBeforeUpdatedSubscriptions(ArrayList<Subscription> beforeUpdatedSubscriptions) {
1586  this.beforeUpdatedSubscriptions = beforeUpdatedSubscriptions;
1587  }
1588 
1589  /**
1590  * Adds subscription into array of subscriptions before update
1591  *
1592  * @param beforeUpdatedSubscriptions Subscription before update
1593  */
1595  this.beforeUpdatedSubscriptions.add(beforeUpdatedSubscriptions);
1596  }
1597 
1598  /**
1599  * Gets array with parameters of subscription query
1600  *
1601  * @return Returns array with parameters of subscription query
1602  */
1603  public ArrayList<String> getSubscriptionQuery() {
1604  return subscriptionQuery;
1605  }
1606 
1607  /**
1608  * Sets array with parameters of subscription query
1609  *
1610  * @param subscriptionQuery Array with parameters of subscription query
1611  */
1612  public void setSubscriptionQuery(ArrayList<String> subscriptionQuery) {
1613  this.subscriptionQuery = subscriptionQuery;
1614  }
1615 
1616  /**
1617  * Sets minimal confidence
1618  *
1619  * @param minConfidence Number of minimal confidence
1620  */
1621  public void setMinConfidence(Integer minConfidence){
1622  this.minConfidence = minConfidence;
1623  }
1624 
1625  /**
1626  * Gets number of minimal confidence
1627  *
1628  * @return number of minimal confidence
1629  */
1630  public Integer getMinConfidence(){
1631  return minConfidence;
1632  }
1633 
1634  /**
1635  * Gets information about request for autoconfirm suggestions.
1636  *
1637  * @return information about autoconfirm suggestions
1638  */
1639  public boolean isAutoconfirmRequested() {
1640  return autoconfirmRequested;
1641  }
1642 
1643  /**
1644  * Sets information about request for autoconfirm suggestions.
1645  *
1646  * @param autoconfirmRequested information about autoconfirm suggestions
1647  */
1649  this.autoconfirmRequested = autoconfirmRequested;
1650  }
1651 
1652  /**
1653  * Gets list of automatically confirmed suggestions
1654  *
1655  * @return Returns list of automatically confirmed suggestions
1656  */
1657  public ArrayList<SuggestionLogEntry> getAutoconfirmedSuggestions() {
1658  return autoconfirmedSuggestions;
1659  }
1660 
1661  /**
1662  * Sets list of automatically confirmed suggestions
1663  *
1664  * @param autoconfirmedSuggestions List of automatically confirmed suggestions
1665  */
1666  public void setAutoconfirmedSuggestions(ArrayList<SuggestionLogEntry> autoconfirmedSuggestions) {
1667  this.autoconfirmedSuggestions = autoconfirmedSuggestions;
1668  }
1669 
1670  /**
1671  * Adds suggestion into list of automatically confirmed suggestions
1672  *
1673  * @param autoconfirmedSuggestion Automatically confirmed suggestions
1674  */
1675  public void addAutoconfirmedSuggestion(SuggestionLogEntry autoconfirmedSuggestion) {
1676  this.autoconfirmedSuggestions.add(autoconfirmedSuggestion);
1677  }
1678 
1679  /**
1680  * Auxiliary class to query the dictionary entity.
1681  *
1682  * @brief Holds information about the query to dictionary entries.
1683  * @author Martin Petr
1684  */
1685  public static class EntityRequest{
1686  /** Type of dictionary entity */
1687  private String type;
1688  /** Filter of dictionary entities */
1689  private String filter;
1690  /** Maximum number of results */
1691  private Integer maxResults;
1692 
1693  /**
1694  * Constructor.
1695  */
1696  public EntityRequest() {
1697  }
1698 
1699  /**
1700  * Constructor.
1701  *
1702  * @param type type of dictionary entity
1703  * @param filter filter of dictionary entities
1704  */
1705  public EntityRequest(String type, String filter) {
1706  this.type = type;
1707  this.filter = filter;
1708  }
1709 
1710  /**
1711  * Constructor.
1712  *
1713  * @param type type of dictionary entity
1714  * @param filter filter of dictionary entities
1715  * @param maxResults Maximum number of results
1716  */
1717  public EntityRequest(String type, String filter, Integer maxResults) {
1718  this.type = type;
1719  this.filter = filter;
1720  this.maxResults = maxResults;
1721  }
1722 
1723  /**
1724  * Gets type of dictionary entity.
1725  *
1726  * @return type of dictionary entity
1727  */
1728  public String getType() {
1729  return type;
1730  }
1731 
1732  /**
1733  * Sets type of dictionary entity.
1734  *
1735  * @param type type of dictionary entity
1736  */
1737  public void setType(String type) {
1738  this.type = type;
1739  }
1740 
1741  /**
1742  * Gets filter of dictionary entities.
1743  *
1744  * @return filter of dictionary entities
1745  */
1746  public String getFilter() {
1747  return filter;
1748  }
1749 
1750  /**
1751  * Sets filter of dictionary entities.
1752  *
1753  * @param filter filter of dictionary entities
1754  */
1755  public void setFilter(String filter) {
1756  this.filter = filter;
1757  }
1758 
1759  /**
1760  * Gets maximum number of results.
1761  *
1762  * @return maximum number of results
1763  */
1764  public Integer getMaxResults() {
1765  return maxResults;
1766  }
1767 
1768  /**
1769  * Sets maximum number of results.
1770  *
1771  * @param maxResults Maximum number of results
1772  */
1773  public void setMaxResults(Integer maxResults) {
1774  this.maxResults = maxResults;
1775  }
1776  }
1777 } // class RequestInfo
void setRefusedSuggestions(ArrayList< SuggestionLogEntry > refusedSuggestions)
void addAutoconfirmedSuggestion(SuggestionLogEntry autoconfirmedSuggestion)
void setSyncWithOverwrite(boolean syncWithOverwrite)
void addError(int version, int lNum, int error, String info, String text)
void setCometSessionList(ArrayList< EditorSession > sessionList)
void setQueryPersons(ArrayList< String > queryPersons)
void setResyncDocContent(String resyncDocContent)
ArrayList< Subscription > getUpdatedSubscriptions()
EntityRequest(String type, String filter, Integer maxResults)
void setSyncLinearized(boolean syncLinearized)
void setDeletedSubscriptions(ArrayList< Subscription > deletedSubscriptions)
void setEntityRequest(EntityRequest entityRequest)
ArrayList< TextModification > getTextModifications()
ArrayList< SuggestionLogEntry > autoconfirmedSuggestions
void setUnsubscribeList(ArrayList< Subscription > unsubscribeList)
Class representing annotated copy of document.
static String createErrorMsg2(int lNum, int error, String info, String text)
void setLeavedGroups(ArrayList< UserGroup > leavedGroups)
ArrayList< TextModification > textModifications
void setSubscribeList(ArrayList< Subscription > subscribeList)
void setOrigRefusedSuggestions(ArrayList< SuggestionLogEntry > origRefusedSuggestions)
void setBeforeUpdatedSubscriptions(ArrayList< Subscription > beforeUpdatedSubscriptions)
ArrayList< SuggestionLogEntry > getAutoconfirmedSuggestions()
void addBeforeUpdatedSubscriptions(Subscription beforeUpdatedSubscriptions)
void setUpdatedSubscriptions(ArrayList< Subscription > updatedSubscriptions)
void addError(int version, int lNum, int error, String info)
void addError(int version, int lNum, int error)
void setGroupsQueryV2(ArrayList< String > groupsQueryV2)
void addTextModification(TextModification textModification)
void setConfirmedSuggestions(ArrayList< SuggestionLogEntry > confirmedSuggestions)
ArrayList< Subscription > getUnsubscribeList()
Suggested annotation with informations about suggestion.
Class representing user group.
Definition: UserGroup.java:47
void setAutoconfirmedSuggestions(ArrayList< SuggestionLogEntry > autoconfirmedSuggestions)
Class representing parameter of user settings.
Definition: Settings.java:45
ArrayList< SuggestionLogEntry > refusedSuggestions
Holds information about the query to dictionary entries.
static String createErrorMsg1(int lNum, int error, String info, String text)
void addConfirmedSuggestion(SuggestionLogEntry confirmedSuggestion)
void addQueryPersonsWG(String queryPersonsWG)
ArrayList< EditorSession > getCometSessionList()
void setJoinedGroups(ArrayList< UserGroup > joinedGroups)
ArrayList< SuggestionLogEntry > getOrigRefusedSuggestions()
void addQueryUserGroups(String queryUserGroups)
void setSyncDocument(AnnotDocument syncDocument)
ArrayList< Suggestion > getAlternativesRequestedFor()
void addDeletedSubscription(Subscription deletedSubscription)
void setRequestDocument(Document requestDocument)
ArrayList< Subscription > getBeforeUpdatedSubscriptions()
void setQueryTypeAttOnto(String queryTypeAttOnto)
void setQueryUserGroups(ArrayList< String > queryUserGroups)
Class representing user.
Definition: User.java:51
void addRefusedSuggestion(SuggestionLogEntry refusedSuggestion)
void addToUnsubscribe(Subscription subscription)
Class representing modification of annotated document text.
static String createErrorMsg(int version, int lNum, int error, String info)
void addWarning(int lNum, int warning, String annotation, String text)
Flier with informations for comet handlers.
Definition: Flier.java:31
ArrayList< SuggestionLogEntry > confirmedSuggestions
ArrayList< Subscription > getDeletedSubscriptions()
static String createErrorMsg(int version, int lNum, int error)
void addNewSubscriptions(Subscription newSubscription)
void addTextModifications(ArrayList< TextModification > textModifications)
void setSuggFragmentChanged(Boolean suggFragmentChanged)
void setUsersQueryV2(ArrayList< String > usersQueryV2)
static String createErrorMsg(int version, int lNum, int error, String info, String text)
void setUsersGroupRestrictionsV2(boolean[] usersGroupRestrictionsV2)
void setAutoconfirmRequested(boolean autoconfirmRequested)
void setUsersRestrictionsV2(boolean[] usersRestrictionsV2)
void addQueryUserGroupsWP(String queryUserGroupsWP)
ArrayList< SuggestionLogEntry > getConfirmedSuggestions()
void setSubscriptionQuery(ArrayList< String > subscriptionQuery)
Processed informations about client request.
void addUpdatedSubscriptions(Subscription updatedSubscription)
void setQueryTypes(ArrayList< String > queryTypes)
Class representing suggestion of annotation.
Definition: Suggestion.java:87
void addToSubscribe(Subscription subscription)
void setReloadAnnotations(ArrayList< Annotation > reloadAnnotations)
void setGetEntityTypes(boolean getEntityTypes)
void setQueryPersonsWG(ArrayList< String > queryPersonsWG)
Class responsible for localised strings.
ArrayList< Subscription > getNewSubscriptions()
Informations about client session.
void addWarning2(int lNum, int warning, String info, String text)
ArrayList< SuggestionLogEntry > getRefusedSuggestions()
void setSettings(ArrayList< Settings > settings)
void addReloadAnnotations(Annotation reloadAnnotation)
void setNewSubscriptions(ArrayList< Subscription > newSubscriptions)
ArrayList< SuggestionLogEntry > origRefusedSuggestions
void setSyncDocumentData(AnnotDocument syncDocumentData)
void addWarning(int version, int lNum, int warning)
void setQueryUserGroupsWP(ArrayList< String > queryUserGroupsWP)
void setAlternativesRequestedFor(ArrayList< Suggestion > alternativesRequestedFor)
ArrayList< Subscription > beforeUpdatedSubscriptions
void addWarning(int version, int lNum, int warning, String annotation)
void setDocumentChanged(boolean documentChanged)