-
Notifications
You must be signed in to change notification settings - Fork 1
/
How to run and compile.txt
173 lines (127 loc) · 6.64 KB
/
How to run and compile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
Copyright 2015 Institute of Computer Science,
Foundation for Research and Technology - Hellas.
Licensed under the EUPL, Version 1.1 or - as soon they will be approved
by the European Commission - subsequent versions of the EUPL (the "Licence");
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at:
http://ec.europa.eu/idabc/eupl
Unless required by applicable law or agreed to in writing, software distributed
under the Licence is distributed on an "AS IS" basis,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and limitations
under the Licence.
Contact: POBox 1385, Heraklion Crete, GR-700 13 GREECE
Tel:+30-2810-391632
Fax: +30-2810-391638
E-mail: [email protected]
https://www.ics.forth.gr/isl
Authors: Elias Tzortzakakis <[email protected]>
This file is part of the THEMAS system.
================================================================
How to run for the first time
================================================================
- create the database minimal structure using the file /libs/DBFolder.zip
- deploy war file e.g. Tomcat
- - edit database paths, Primary DB language and configurable options in file:
/WEB-INF/DBadmin/tms_db_admin_config_files/config.xml
- - edit Primary UI Language in web.xml (UILanguage)
- - edit log path in /WEB-INF/classes/logging.properties
- iff in linux then make sure that e.g. tomcat user is defined as owner
of the DB folder and the webapp folder recursively
- if everything ready then login with admin/admin
- Navigate to (Left menu) Thesauri / gear icon / 3rd tab thesauri management
- Create a Thesaurus with initialize db option (only needed for the first time)
- Navigate to LoginAdmin in order to edit its translations e.g. EN -> English
- Logout
- Login and start build your thesaurus.
- In order to create more thesauri follow the same procedure but
- without selecting the the initialize db option
================================================================
How to compile
================================================================
The following instructions have been tested in the following environment
but should be sufficient guidance for the installation to different environments
OS: windows 10 64 bit
IDE: Netbeans 11.0 IDE
Java: jdk1.8.0_231 64 bit
Server: Apache Tomcat 9.0.19 (coming with Netbeans 11.0)
THEMAS: version used 1.4.2
1) In Netbeans 11.0 menu open Team > Git > Clone -> Repository Url: https://github.com/isl/THEMAS.git
2) Create the necessary database folder structure by unzipping file /libs/DBFolder.zip
to the desired database location
3) Configure Themas according to the instructions
found below with prefix ##1##
4) Download the third party javascript files or use the copies provided at
/libs/Javascript folder and place them respectively in:
-- /src/main/webapp/third-party-javascript/chosen
-- /src/main/webapp/third-party-javascript/mktree
-- /src/main/webapp/third-party-javascript/wztooltip
-- /src/main/webapp/third-party-javascript/ckeditor
5) configure the aforementioned javascript thrid-party plugins
according to the instructions with prefix ##2##
6) Netbeans 11.0 > Tools > Server> Apache~ > Platform > VM Options
-Dfile.encoding=UTF8
7) Build Project - Run and enjoy!
Use admin/admin as username/password (similar for other default users)
Start by creating a new thesaurus
with initialize db option
(left menu > Thesauri > Top menu > Thesauri management >
Create Thesaurus with "Initialize the database" option checked)
* in case dependency Neo4j-sisapi is not resolved you can downloaded it directly from
https://github.com/isl/Neo4j-sisapi/releases/tag/1.4.2
* in case commons-fileupload-1.0.jar and kxml2-2.3.0.jar
dependencies cannot be resolved, you can find copies of these jars in libs folder
================================================================
##1## Configure THEMAS
================================================================
a) File "/src/main/webapp/DBadmin/tms_db_admin_config_files/config.xml"
- Database Paths and configuration (/src/main/webapp/DBadmin/tms_db_admin_config_files/config.xml)
Set "Neo4j_DB_FOLDER_PATH" xml element text
to the path where neo4j database files will be created
- IF NEEDED define different PrimaryLanguage Parameters
and unclassified terms hierarchy by changing the following XML element values
<PrimaryLanguage>English</PrimaryLanguage> <!-- no spaces-->
<PrimaryLanguagePrefix>EN</PrimaryLanguagePrefix> <!-- 2 letter code preferrably -->
<UnclassifiedTermsFacetName>UNCLASSIFIED TERMS</UnclassifiedTermsFacetName> <!-- Proposed Format UPPERCASE -->
<UnclassifiedTermsHierarchyName>Unclassified terms</UnclassifiedTermsHierarchyName> <!-- Proposed Format: Capitalize first letter -->
b) IF DEPLOYED UNDER different name e.g. THEMAS-DEMO
- edit file: "/src/main/webapp/META-INF/context.xml"
e.g.
<Context antiJARLocking="true" path="/THEMAS-DEMO"/>
- edit file: "/src/main/webapp/WEB-INF/classes/logging.properties"
so that logfile folder and log file prefix are correctly set
e.g.
org.apache.juli.FileHandler.directory = ${catalina.base}/webapps/THEMAS-DEMO/WEB-INF/SystemLogs/
org.apache.juli.FileHandler.prefix = THEMAS-DEMOLogs_
================================================================
================================================================
##2## third-party-javascript plugins configurations
===============================================================
a) Chosen Javascript Plugin
Customize chozen plugin by adding at the end of chosen.css
/* customize chosen appearence for multiple selection */
.chosen-container-multi .chosen-choices li.search-choice{
background-image: none;
border:none;
}
/*limit chosen results size */
div.chosen-drop{
height:180px;
}
ul.chosen-results{
height:180px;
}
b) wz_tooltip configuration configurations
set the values of the following vars in file wz_tooltip.js to:
var ttBorderColor = "#000000";
var ttFontColor = "#898B5E";
var ttWidth = 250;
c) Customize ckeditor - optional configurations
CASE OF GREEK LANG -->
In order to save Greek data in viewable format
for XML files in fields that we use CKEditor
we have to add one parameter to ckeditor config file.
- Path for the config file is : "ckeditor/config.js"
- Parameter to add at the end of file (removing quotes in config file):
"config.entities_greek = false;"
===============================================================