19 package cz.vutbr.fit.knot.annotations.modules.SECDictionaryInterface;
31 import java.util.ArrayList;
32 import java.util.Iterator;
33 import java.util.logging.Level;
34 import java.util.logging.Logger;
77 StringBuilder response =
new StringBuilder();
84 return response.toString();
115 Iterator<SecApiReqTypeDef> avIt;
117 avIt = AppBean.getReqTypeDefinitionsEA().iterator();
119 avIt = AppBean.getAvTypeDefinitions().iterator();
125 if (avIt.hasNext()) {
126 message =
"<entityTypes>\n";
128 while (avIt.hasNext()) {
131 message +=
" <type name=\"" + td.getTypeName() +
"\"";
133 message +=
" description=\"" + td.getAltDescDef() +
"\"/>\n";
139 message +=
"</entityTypes>\n";
160 SuggestionManager.initReqTypesFromRemote(sac, requestInfo);
161 }
catch (Exception e) {
162 String message =
"SECApi call error: " + e.getMessage();
163 Logger.getLogger(SECDInterfaceModule.class.getName()).log(Level.SEVERE, message);
167 Logger.getLogger(SECDInterfaceModule.class.getName()).log(Level.WARNING,
"SECApi has failed or connection timeout!");
175 SuggestionManager.initReqTypes();
176 }
catch (Exception e) {
177 String logMessage =
"SECApi call error: " + e.getMessage();
178 Logger.getLogger(SECDInterfaceModule.class.getName()).log(Level.SEVERE, logMessage);
183 Logger.getLogger(SECDInterfaceModule.class.getName()).log(Level.WARNING,
"SECApi has failed!");
200 return "SECDInterfaceModule";
212 return "Module provides communication between 4A Server and SEC Store API for"+
"prupose of controlled dictionary.";
String getModuleDescription(int lang)
String messagesFromFlier(Flier flier, EditorSession session)
boolean isGetEntityTypes()
String processRequestAfterPersist(RequestInfo requestInfo, boolean persistFailed)
static final ArrayList< String > FORBIDDEN_ENTITY_TYPES
static boolean isSecCommandEmpty()
Singleton for storing global variables.
String getModuleName(int lang)
Class provides connection of SEC Dictionary module with server.
Interface for call of SEC API as external program (deamon)
static ArrayList< SecApiReqTypeDef > getAvTypeDefinitions()
String processGetEntityTypes(RequestInfo requestInfo)
boolean initArrays(RequestInfo requestInfo)
Class provides offerining of suggestions with usage of local knowledge repository.
Class forwards queries from anotation client to the SEC API server and and creates a message for anno...
Class for creating of requested type definition for SEC API.
Flier with informations for comet handlers.
String processRequestBeforePersist(RequestInfo requestInfo)
Interface for server module.
static final Boolean USE_REMOTE_SEC_API
Class implementing functions for communication with remote SEC API.
static ArrayList< SecApiReqTypeDef > getReqTypeDefinitionsEA()
Processed informations about client request.
Informations about client session.
EntityRequest getEntityRequest()