14 package cz.vutbr.fit.knot.annotations.comet;
16 import com.sun.grizzly.comet.CometContext;
17 import com.sun.grizzly.comet.CometEngine;
23 import cz.vutbr.fit.knot.annotations.entity.*;
25 import java.util.ArrayList;
26 import java.util.Arrays;
27 import java.util.Iterator;
28 import java.util.List;
29 import java.util.ListIterator;
30 import java.util.logging.Level;
31 import java.util.logging.Logger;
32 import javax.persistence.Query;
33 import org.w3c.dom.Document;
138 this.suggestionsFr =
new ArrayList<Fragment>();
199 int protocolVer = this.getProtocolLOD();
242 subscribedSources.add(source);
251 subscribedSources.remove(source);
261 return subscribedSources.contains(source);
270 unsubscribedSources.add(source);
279 unsubscribedSources.remove(source);
288 return unsubscribedSources.contains(source);
315 this.queriedTypes.add(queriedType);
396 ArrayList<String> sources =
new ArrayList<String>();
440 ArrayList<String> sources =
new ArrayList<String>();
454 Iterator<UserGroup> gIter = annot.getUser().getGroups().iterator();
455 while (gIter.hasNext()) {
457 sources.add(AppBean.getBaseGroupUri() + userGroup.
getId());
487 return this.cometContext;
496 return this.cometHandler;
505 CometEngine engine = CometEngine.getEngine();
506 CometContext<?> context = engine.getCometContext(
cometContext);
511 String msg =
"Can't notify comet.";
512 Logger.getLogger(EditorSession.class.getName()).log(Level.ALL, msg);
528 ArrayList<SubscribedSource> resultList =
new ArrayList<SubscribedSource>();
532 ListIterator<SubscribedSource> iter = list.listIterator();
537 if (sources != null) {
538 if (!sources.isEmpty()) {
539 ListIterator<String> sIter = sources.listIterator();
540 String source = null;
541 while (sIter.hasNext()) {
542 source = sIter.next();
543 iter = list.listIterator();
544 while (iter.hasNext()) {
546 if (subS.matches(type.
getUri(), annot.getUser().getURI(), source) || subS.matches(type.
getUri(), annot.getUser().getURIV2(), source)) {
547 resultList.add(subS);
552 while (iter.hasNext()) {
554 if (subS.matches(type.
getUri(), annot.getUser().getURI(), null) || subS.matches(type.
getUri(), annot.getUser().getURIV2(), null)) {
555 resultList.add(subS);
560 while (iter.hasNext()) {
562 if (subS.matches(type.
getUri(), annot.getUser().getURI(), null) || subS.matches(type.
getUri(), annot.getUser().getURIV2(), null)) {
563 resultList.add(subS);
568 iter = list.listIterator();
569 if (sources != null) {
570 if (!sources.isEmpty()) {
571 ListIterator<String> sIter = sources.listIterator();
572 String source = null;
573 while (sIter.hasNext()) {
574 source = sIter.next();
575 iter = list.listIterator();
576 while (iter.hasNext()) {
578 if (subS.matches(type.
getUri(), annot.getAuthorAddress(), source)) {
579 resultList.add(subS);
584 while (iter.hasNext()) {
586 if (subS.matches(type.
getUri(), annot.getAuthorAddress(), null)) {
587 resultList.add(subS);
592 while (iter.hasNext()) {
594 if (subS.matches(type.
getUri(), annot.getAuthorAddress(), null)) {
595 resultList.add(subS);
600 }
catch(Exception e) {
601 throw new NullPointerException(
"NullPointerException was occurs in EditorSessionModule, while trying to find corresponding subscriptions");
615 ListIterator<SubscribedSource> iter = list.listIterator();
617 while(iter.hasNext()){
619 if(actualSource.
getType() != null)
621 if((!actualSource.
getType().startsWith(
"*"))){
639 ListIterator<SubscribedSource> iter = list.listIterator();
641 while(iter.hasNext()){
644 if(actualSource.
getUser() != null){
661 ListIterator<SubscribedSource> iter = list.listIterator();
663 while(iter.hasNext()){
666 if(actualSource.
getUri() != null){
685 ArrayList<SubscribedSource> unsubResult, ArrayList<SubscribedSource> subResult){
689 while(actualType != null)
691 int ancestorsCount = actualType.getAncestorTypes().size();
693 if(ancestorsCount <= 1){
711 actualType = actualType.getAncestorType();
713 Iterator<AnnotType> typeIt = actualType.getAncestorTypes().iterator();
714 int resultsArray[] =
new int [ancestorsCount];
715 boolean unsubscribedOccur =
false;
717 for(
int i = 0;typeIt.hasNext();i++){
718 resultsArray[i] =
checkBranch(typeIt.next(),annot,sources,unsubResult,subResult);
742 ArrayList<SubscribedSource> unsubResult =
new ArrayList<SubscribedSource>();
743 ArrayList<SubscribedSource> subResult =
new ArrayList<SubscribedSource>();
746 case Constants.SUBSCRIBED:
return true;
747 case Constants.UNSUBSCRIBED:
return false;
753 if(!subResult.isEmpty() || !unsubResult.isEmpty())
814 this.docIDdependentVariablesInitialized =
false;
815 if(this.syncDocument != null && this.syncDocument.
getId() != null){
816 AppBean.decrementDocumentUsage(this.syncDocument.getId());
818 if (syncDocument != null && syncDocument.
getId() != null) {
819 this.docIDdependentVariablesInitialized =
true;
821 AppBean.removePossibleModificationSets(syncDocument.getId());
822 AppBean.initLastDocModification(syncDocument.getId());
824 AppBean.incrementDocumentUsage(syncDocument.getId());
838 AppBean.removePossibleModificationSets(syncDocument.getId());
839 AppBean.initLastDocModification(syncDocument.getId());
841 AppBean.incrementDocumentUsage(syncDocument.getId());
873 this.suggestionsTypes =
new ArrayList<String>();
876 this.suggestionsTypes.add(suggestionsType);
881 this.suggestionsTypes =
new ArrayList<String>();
884 this.suggestionsTypes.clear();
889 this.suggestionsTypes =
new ArrayList<String>();
892 return this.suggestionsTypes.isEmpty();
901 this.parsedSyncDocument = doc;
910 return this.parsedSyncDocument;
974 return !this.messagesTSVC.isEmpty();
1025 Iterator<Subscription> subscribeListIt = subscribeList.iterator();
1026 while(subscribeListIt.hasNext()){
1027 if(subscription.
getId() != null && subscription.equals(subscribeListIt.next())){
1028 subscribeListIt.remove();
1044 this.subscribeList.add(subscription);
1047 this.subscribeList =
new ArrayList<Subscription>();
1048 this.subscribeList.add(subscription);
1059 Iterator<Subscription> subscribeListIt = subscribeList.iterator();
1060 while(subscribeListIt.hasNext()){
1061 Subscription currentSubscription = subscribeListIt.next();
1062 if(currentSubscription.
getId().equals(id)){
1063 return currentSubscription;
1081 Iterator<Subscription> subscribeListIt = subscribeList.iterator();
1082 while(subscribeListIt.hasNext()){
1083 if(subscription.
getId() != null && subscription.getId().
equals(subscribeListIt.next().getId())){
1098 ArrayList<SubscribedSource> sourcePosList = subscription.getSourcesAsSubSource(
true);
1099 if(sourcePosList != null && !sourcePosList.isEmpty()){
1100 Iterator<SubscribedSource> posSourcesIt = sourcePosList.iterator();
1101 while(posSourcesIt.hasNext()){
1108 ArrayList<SubscribedSource> sourceNegList = subscription.getSourcesAsSubSource(
false);
1109 if(sourceNegList != null && !sourceNegList.isEmpty()){
1110 Iterator<SubscribedSource> negSourcesIt = sourceNegList.iterator();
1111 while(negSourcesIt.hasNext()){
1125 ArrayList<SubscribedSource> sourcePosList = subscription.getSourcesAsSubSource(
true);
1126 if(sourcePosList != null && !sourcePosList.isEmpty()){
1127 Iterator<SubscribedSource> posSourcesIt = sourcePosList.iterator();
1128 while(posSourcesIt.hasNext()){
1135 ArrayList<SubscribedSource> sourceNegList = subscription.getSourcesAsSubSource(
false);
1136 if(sourceNegList != null && !sourceNegList.isEmpty()){
1137 Iterator<SubscribedSource> negSourcesIt = sourceNegList.iterator();
1138 while(negSourcesIt.hasNext()){
1152 if(sources != null && !sources.isEmpty()){
1153 Iterator<SubscribedSource> sourcesIt = sources.iterator();
1154 while(sourcesIt.hasNext()){
1156 boolean isTypeEqual =
false;
1157 boolean isUriEqual =
false;
1158 boolean isSourceEqual =
false;
1160 if((actualSource.
getType() != null && subSource.getType() != null) &&
1163 }
else if((actualSource.
getType() == null && subSource.getType() == null) ){
1167 if((actualSource.
getUri() != null && subSource.getUri() != null) &&
1170 }
else if((actualSource.
getUri() == null && subSource.getUri() == null) ){
1174 if((actualSource.
getUser() != null && subSource.getUser() != null) &&
1176 isSourceEqual =
true;
1177 }
else if((actualSource.
getUser() == null && subSource.getUser() == null) ){
1178 isSourceEqual =
true;
1181 if(isTypeEqual && isUriEqual && isSourceEqual){
1195 if (this.
user == null) {
1198 PersistM pm = AppBean.getPersistenceManager();
1199 ArrayList<Settings> settings =
new ArrayList<Settings>();
1200 Object[] params =
new Object[2];
1201 params[0] =
"userId";
1202 params[1] = this.user.getId();
1204 @SuppressWarnings(
"unchecked")
1205 List<Settings> sList = pm.queryDB(
"Settings.findByUser", params);
1206 if (sList != null && !sList.isEmpty()) {
1207 Iterator<Settings> sIterator = sList.iterator();
1208 while (sIterator.hasNext()) {
1209 settings.add(sIterator.next());
1243 if (this.
user == null) {
1246 PersistM pm = AppBean.getPersistenceManager();
1248 Object[] params =
new Object[4];
1249 params[0] =
"userId";
1250 params[1] = this.user.getId();
1253 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1254 if (sList != null && !sList.isEmpty()) {
1255 attFilterParam = (
Settings) sList.get(0);
1257 if (attFilterParam != null) {
1258 String attFilterParamStr = attFilterParam.getValue();
1259 if (attFilterParamStr != null && !attFilterParamStr.isEmpty()) {
1260 String[] splitted = attFilterParamStr.split(
",");
1261 attFilter =
new ArrayList<String>(Arrays.asList(splitted));
1286 if (this.
user == null) {
1289 PersistM pm = AppBean.getPersistenceManager();
1291 Object[] params =
new Object[4];
1292 params[0] =
"userId";
1293 params[1] = this.user.getId();
1296 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1297 if (sList != null && !sList.isEmpty()) {
1298 negFeedParam = (
Settings) sList.get(0);
1302 if (negFeedParam != null) {
1303 String negFeedParamStr = negFeedParam.getValue();
1304 if (negFeedParamStr != null && !negFeedParamStr.isEmpty()) {
1305 if (negFeedParamStr.contentEquals(
"1") || negFeedParamStr.equalsIgnoreCase(
"true")) {
1345 if (this.
user == null) {
1348 PersistM pm = AppBean.getPersistenceManager();
1350 Object[] params =
new Object[4];
1351 params[0] =
"userId";
1352 params[1] = this.user.getId();
1355 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1356 if (sList != null && !sList.isEmpty()) {
1357 negFeedParam = (
Settings) sList.get(0);
1361 if (negFeedParam != null) {
1362 String negFeedParamStr = negFeedParam.getValue();
1363 if (negFeedParamStr != null && !negFeedParamStr.isEmpty()) {
1364 if (negFeedParamStr.contentEquals(
"1") || negFeedParamStr.equalsIgnoreCase(
"true")) {
1400 if (this.
user == null) {
1403 PersistM pm = AppBean.getPersistenceManager();
1405 Object[] params =
new Object[4];
1406 params[0] =
"userId";
1407 params[1] = this.user.getId();
1410 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1411 if (sList != null && !sList.isEmpty()) {
1412 posFeedParam = (
Settings) sList.get(0);
1416 if (posFeedParam != null) {
1417 String posFeedParamStr = posFeedParam.getValue();
1418 if (posFeedParamStr != null && !posFeedParamStr.isEmpty()) {
1419 if (posFeedParamStr.contentEquals(
"1") || posFeedParamStr.equalsIgnoreCase(
"true")) {
1482 int lNum = Localisation.LANGUAGE_CODES.indexOf(
language);
1484 this.language =
"eng";
1489 this.languageNum = lNum;
1499 if (this.
user == null) {
1502 PersistM pm = AppBean.getPersistenceManager();
1504 Object[] params =
new Object[4];
1505 params[0] =
"userId";
1506 params[1] = this.user.getId();
1509 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1510 if (sList != null && !sList.isEmpty()) {
1511 langParam = (
Settings) sList.get(0);
1543 PersistM pm = AppBean.getPersistenceManager();
1545 Object[] params =
new Object[4];
1546 params[0] =
"userId";
1547 params[1] = this.user.getId();
1550 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1552 if (sList != null && !sList.isEmpty()) {
1553 groupParam = (
Settings) sList.get(0);
1555 if (groupParam != null) {
1556 String grStr = groupParam.getValue();
1557 if (grStr != null && !grStr.isEmpty()) {
1558 grStr = grStr.replace(AppBean.getBaseGroupUri(),
"");
1559 Integer grId = null;
1561 grId = Integer.parseInt(grStr);
1562 }
catch (NumberFormatException nfe) {
1564 String msg =
"NumberFormatException in getDefaultGroup.";
1565 Logger.getLogger(EditorSession.class.getName()).log(Level.ALL, msg);
1571 List<UserGroup> groupList = user.getGroups();
1572 int index = groupList.indexOf(cmpG);
1574 retGroup = groupList.get(index);
1579 if (retGroup == null) {
1581 Iterator<UserGroup> grIt = user.getGroups().iterator();
1582 while (grIt.hasNext() && retGroup == null) {
1637 synchronized (
this) {
1639 sendedSuggestions.addAll(sugArray);
1651 sendedSuggestions.add(suggestion.getId());
1664 Iterator<Suggestion> sugArrayIt = sugArray.iterator();
1665 while (sugArrayIt.hasNext()) {
1669 Iterator<Suggestion> sugArrayIt = sugArray.iterator();
1670 while (sugArrayIt.hasNext()) {
1671 sendedSuggestions.add(sugArrayIt.next().getId());
1684 sendedSuggestions.remove(suggestion.getId());
1696 Iterator<Suggestion> sugArrayIt = sugArray.iterator();
1697 while (sugArrayIt.hasNext()) {
1713 ArrayList<Suggestion> result =
new ArrayList<Suggestion>(sugArray.size());
1714 Iterator<Suggestion> sugArrayIt = sugArray.iterator();
1715 while (sugArrayIt.hasNext()) {
1718 result.add(actualSugg);
1734 ArrayList<Suggestion> result =
new ArrayList<Suggestion>(sugArray.size());
1735 Iterator<Suggestion> sugArrayIt = sugArray.iterator();
1736 while (sugArrayIt.hasNext()) {
1739 result.add(actualSugg);
1755 ArrayList<Integer> result =
new ArrayList<Integer>(sugArray.size());
1756 Iterator<Integer> sugArrayIdIt = sendedSuggestions.iterator();
1757 while (sugArrayIdIt.hasNext()) {
1758 Integer actualSuggId = sugArrayIdIt.next();
1759 Iterator<Suggestion> sugArrayIt = sugArray.iterator();
1760 boolean founded =
false;
1761 while (sugArrayIt.hasNext()) {
1763 if (actualSugg.
getId().equals(actualSuggId)) {
1770 result.add(actualSuggId);
1808 synchronized (
this) {
1809 ArrayList<Suggestion> suggestions =
new ArrayList<Suggestion>();
1811 Iterator<Integer> it = sendedSuggestions.iterator();
1812 while(it.hasNext()){
1813 Query query = AppBean.getPersistenceManager().getEM().createNamedQuery(
"Suggestion.findById");
1814 query.setParameter(
"id", it.next());
1815 List sList = query.getResultList();
1816 if (sList != null && !sList.isEmpty()) {
1830 Query query = AppBean.getPersistenceManager().getEM().createNamedQuery(
"Suggestion.findById");
1831 query.setParameter(
"id", id);
1832 List sList = query.getResultList();
1833 if (sList != null && !sList.isEmpty()) {
1879 if (this.
user == null) {
1882 PersistM pm = AppBean.getPersistenceManager();
1884 Object[] params =
new Object[4];
1885 params[0] =
"userId";
1886 params[1] = this.user.getId();
1889 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1890 if (sList != null && !sList.isEmpty()) {
1891 posFeedParam = (
Settings) sList.get(0);
1895 if (posFeedParam != null) {
1896 String posFeedParamStr = posFeedParam.getValue();
1897 if (posFeedParamStr != null && !posFeedParamStr.isEmpty()) {
1898 if (posFeedParamStr.contentEquals(
"1") || posFeedParamStr.equalsIgnoreCase(
"true")) {
1933 if (this.
user == null) {
1936 PersistM pm = AppBean.getPersistenceManager();
1938 Object[] params =
new Object[4];
1939 params[0] =
"userId";
1940 params[1] = this.user.getId();
1943 List sList = pm.queryDB(
"Settings.findByUserAndName", params);
1944 if (sList != null && !sList.isEmpty()) {
1945 kRMParam = (
Settings) sList.get(0);
1949 if (kRMParam != null) {
1950 String kRMParamStr = kRMParam.getValue();
1951 if (kRMParamStr != null && !kRMParamStr.isEmpty()) {
1952 if (kRMParamStr.contentEquals(
"1") || kRMParamStr.equalsIgnoreCase(
"true")) {
1977 if (getClass() != obj.getClass()) {
static final String SETTINGS_PARAM_UPDATE_NEG_FEEDBACK_FOR_REFUSED_BY_SAME
void actualizeEnableUpdatePositiveFeedback()
AnnotDocument getSourceDocument()
Document parsedSyncDocument
void addQueriedTypes(String queriedType)
Class representing subscription.
boolean isSubscribed(Annotation annot, ArrayList< String > sources)
synchronized String getAndCleanMessages()
void actualizeNegFeedbackSetting()
static ArrayList< SubscribedSource > listOfMatches(ArrayList< SubscribedSource > list, Annotation annot, AnnotType type, ArrayList< String > sources)
void setMessagesTSVC(String messagesTSVC)
int checkBranch(AnnotType rootType, Annotation annot, ArrayList< String > sources, ArrayList< SubscribedSource > unsubResult, ArrayList< SubscribedSource > subResult)
boolean equals(Object obj)
AnnotDocument getSyncDocument()
AnnotHandler getCometHandler()
void deleteFromSubscribeList(Subscription subscription)
Subscription getSubscriptionFromList(Integer id)
synchronized void setSugRequestFlag(Boolean sugRequestFlag)
ArrayList< Fragment > suggestionsFr
static final String SETTINGS_PARAM_ATT_FILTER
Persistence manager (database manipulator)
ArrayList< Subscription > subscribeList
void setUpdateNegFeedbackForRefusedBySame(boolean updateNegFeedbackForRefusedBySame)
void deleteSendedSugg(Suggestion suggestion)
boolean enableUpdatePositiveFeedback
ArrayList< String > getQueriedTypes()
void actualizeAutoAltSetting()
static final String SETTINGS_PARAM_DISPLAY_SUG_CONFIDENCE
boolean isInSubscribeList(Subscription subscription)
boolean isSubscribedWG(Annotation annot, boolean testDoc)
void setLastActivityTime(long lastActivityTime)
boolean containsSource(SubscribedSource source)
long getLastConfirmTime()
boolean hasMessagesTSVC()
ArrayList< String > getSuggestionsTypes()
void setDisplaySugConfidence(boolean displaySugConfidence)
boolean isSubscribed(Annotation annot)
Boolean docIDdependentVariablesInitialized
Class representing annotated copy of document.
void clearSuggestionsTypes()
void setKBRefMode(boolean KBRefMode)
boolean isSubscribedWG(Annotation annot, ArrayList< String > sources, boolean testDoc)
void setAutoActivateAlternatives(boolean autoActivateAlternatives)
void setProtocolVersion(String protocolVersion)
Singleton for storing global variables.
ArrayList< Subscription > getSubscribeList()
ArrayList< Suggestion > haveSendedSug(ArrayList< Suggestion > sugArray)
void setLinearization(boolean linearization)
volatile ArrayList< Integer > sendedSuggestions
void addSendedSugg(Suggestion suggestion)
void addSuggestionsFr(Fragment suggestionsFr)
Suggestion getWholeSendedSuggestion(Integer id)
ArrayList< Integer > diffStoredSug(ArrayList< Suggestion > sugArray)
static final String SETTINGS_PARAM_ENABLE_UPDATE_POSITIVE_FEEDBACK
void setAutoConfirm(Integer autoConfirm)
void setParsedLinDocument(String parsedLinDocument)
void addUnsubscribeSource(SubscribedSource source)
void setSubscribeList(ArrayList< Subscription > subscribeList)
void deleteFromSubscribes(Subscription subscription)
boolean getDisplaySugConfidence()
static boolean containSourceRule(ArrayList< SubscribedSource > list)
static final int PROTOCOL_LOD_V1
void addToSubscribeList(Subscription subscription)
void findSubscriptionAndDelete(ArrayList< SubscribedSource > sources, SubscribedSource subSource)
boolean containsUnsubscribedSource(SubscribedSource source)
ArrayList< Suggestion > getWholeSendedSuggestions()
boolean getUpdateNegFeedbackForRefusedBySame()
void setMinConfidence(Integer minConfidence)
static final String SETTINGS_PARAM_DEFAULT_GROUP
Class representing user group.
Class representing parameter of user settings.
static final String UPDATABLE_AN_AT_NAME
void setSuggestionsTypes(ArrayList< String > suggestionsTypes)
boolean getEnableUpdatePositiveFeedback()
static final String SETTINGS_PARAM_KB_REF_MODE
boolean equals(Object object)
void actualizeKBRefMode()
static final int SUBSCRIBED
void setCometContext(String cometContext)
void initDocumentUsageAndTMNumber()
String getProtocolVersion()
static final int NAMESPACES_LOD_V2
boolean setLanguage(String language)
void setSendedSugg(ArrayList< Integer > sugArray)
AnnotCometServlet.AnnotHandler cometHandler
List< UserGroup > getGroups()
EditorSession(long sessId)
void addSource(SubscribedSource source)
static boolean containTypeRule(ArrayList< SubscribedSource > list)
ArrayList< SuggestionLogEntry > getSuggestionsCache()
ArrayList< String > getAttFilter()
boolean isSubscribed(Annotation annot, ArrayList< String > sources, boolean testDoc)
long getLastActivityTime()
String getParsedLinDocument()
boolean isLinearization()
ArrayList< String > suggestionsTypes
void setCometHandler(AnnotHandler cometHandler)
Document getParsedSyncDocument()
ArrayList< Fragment > getSuggestionsFr()
static final int LOG_LEVEL
Class representing type of annotation.
boolean isSuggInSendedSuggestions(Integer suggID)
void actualizeAttFilter()
void actualizeDisplaySugConfidence()
void setSuggestionsCache(ArrayList< SuggestionLogEntry > suggestionsCache)
void setAttFilter(ArrayList< String > attFilter)
void setEnableUpdatePositiveFeedback(boolean enableUpdatePositiveFeedback)
static final int LOG_LEVEL_ALL
void removeUnsubscribeSource(SubscribedSource source)
ArrayList< String > attFilter
void setSyncDocument(AnnotDocument syncDocument)
boolean displaySugConfidence
static final String SETTINGS_PARAM_AUTO_ALTERNATIVES
static final int LANGUAGE_ENG
void setQueriedTypes(ArrayList< String > queriedTypes)
static PersistM getPersistenceManager()
boolean isSuggestionType()
void setSuggestionsFr(ArrayList< Fragment > suggestionsFr)
boolean getAutoActivateAlternatives()
UserGroup getDefaultGroup()
ArrayList< SubscribedSource > getSubscribedSources()
boolean isSubscribedWG(Annotation annot)
static final int PROTOCOL_LOD_V1_1
static final int PROTOCOL_LOD_V2
Integer getMinConfidence()
ArrayList< Integer > getSendedSuggestions()
boolean isSubscribed(Annotation annot, boolean testDoc)
Class representing suggestion of annotation.
void setLastConfirmTime(long lastConfirmTime)
static boolean containUserRule(ArrayList< SubscribedSource > list)
synchronized void addMessageTS(String message)
void setParsedSyncDocument(Document doc)
synchronized Boolean getSugRequestFlag()
void deleteSendedSugg(ArrayList< Suggestion > sugArray)
Class responsible for localised strings.
ArrayList< Settings > getSettings()
AnnotDocument syncDocument
void actualizeAllCachedSettings()
Subscribed source of annotations.
static final String SETTINGS_PARAM_SERVER_LANGUAGE
Informations about client session.
void addToSubscribes(Subscription subscription)
ArrayList< String > queriedTypes
Class representing annotated fragment.
static synchronized int getDocumentUsage(Integer documentId)
void removeSource(SubscribedSource source)
Class representing annotation.
ArrayList< SuggestionLogEntry > suggestionsCache
ArrayList< SubscribedSource > unsubscribedSources
boolean autoActivateAlternatives
boolean updateNegFeedbackForRefusedBySame
void addSuggestionType(String suggestionsType)
static final int NAMESPACES_LOD_V1
ArrayList< Suggestion > diffSendedSug(ArrayList< Suggestion > sugArray)
ArrayList< SubscribedSource > subscribedSources
EditorSession(String protocolVersion)
static final int UNSUBSCRIBED
void addSendedSugg(ArrayList< Suggestion > sugArray)
boolean actualizeLanguage()
boolean isSubscribedWG(Annotation annot, ArrayList< String > sources)