4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
TextsFromOWLConstants.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: TextsFromOWLConstants.java
5  * Description: Class with constants for ontology import
6  */
7 
8 /**
9  * @file TextsFromOWLConstants.java
10  *
11  * @brief Class with constants for ontology import.
12  */
13 
14 package cz.vutbr.fit.knot.annotations.web;
15 
17 
18 /**
19  * Class with constants for ontology import.
20  *
21  * @brief Class with constants for ontology import.
22  * @author Marek Kopecky
23  */
24 public class TextsFromOWLConstants {
25 
26  /** minCardinality restriction information to comment */
27  public static final int MIN_CARDINALITY_ONE_OBJECT_COMMENT_1 = 1;
28  public static final int MIN_CARDINALITY_ONE_OBJECT_COMMENT_2 = 2;
29  public static final int MIN_CARDINALITY_MORE_OBJECT_COMMENT_1 = 3;
30  public static final int MIN_CARDINALITY_MORE_OBJECT_COMMENT_2 = 4;
31  public static final int MIN_CARDINALITY_MORE_OBJECT_COMMENT_3 = 5;
32 
33  /** maxCardinality restriction information to comment */
34  public static final int MAX_CARDINALITY_ONE_OBJECT_COMMENT_1 = 6;
35  public static final int MAX_CARDINALITY_ONE_OBJECT_COMMENT_2 = 7;
36  public static final int MAX_CARDINALITY_MORE_OBJECT_COMMENT_1 = 8;
37  public static final int MAX_CARDINALITY_MORE_OBJECT_COMMENT_2 = 9;
38  public static final int MAX_CARDINALITY_MORE_OBJECT_COMMENT_3 = 10;
39 
40  /** exactCardinality restriction information to comment */
41  public static final int EXACT_CARDINALITY_ONE_OBJECT_COMMENT_1 = 11;
42  public static final int EXACT_CARDINALITY_ONE_OBJECT_COMMENT_2 = 12;
43  public static final int EXACT_CARDINALITY_MORE_OBJECT_COMMENT_1 = 13;
44  public static final int EXACT_CARDINALITY_MORE_OBJECT_COMMENT_2 = 14;
45  public static final int EXACT_CARDINALITY_MORE_OBJECT_COMMENT_3 = 15;
46 
47  /** someValuesFrom restriction information to comment */
48  public static final int SOME_VALUES_FROM_ONE_OBJECT_COMMENT_1 = 16;
49  public static final int SOME_VALUES_FROM_ONE_OBJECT_COMMENT_2 = 17;
50  public static final int SOME_VALUES_FROM_MORE_OBJECT_COMMENT_1 = 18;
51  public static final int SOME_VALUES_FROM_MORE_OBJECT_COMMENT_2 = 19;
52  public static final int SOME_VALUES_FROM_MORE_OBJECT_COMMENT_3 = 20;
53 
54  /** hasSelf restriction information to comment */
55  public static final int HAS_SELF_COMMENT = 21;
56 
57  /** complementOf information to comment */
58  public static final int COMPLEMENT_OF_COMMENT_1 = 22;
59  public static final int COMPLEMENT_OF_COMMENT_2 = 23;
60 
61  /** information about property ancestor to comment */
62  public static final int SUB_PROPERTY_COMMENT_1 = 24;
63  public static final int SUB_PROPERTY_COMMENT_2 = 25;
64 
65  /** information about disjoint classes */
66  public static final int DISJOINT_WITH_COMMENT_1 = 26;
67  public static final int DISJOINT_WITH_COMMENT_2 = 27;
68 
69  /** information about label in classes */
70  public static final int LABEL_COMMENT_1 = 28;
71  public static final int LABEL_COMMENT_2 = 29;
72 
73  /** information about seeAlso in classes */
74  public static final int SEE_ALSO_COMMENT = 30;
75 
76  /** information about functional property */
77  public static final int FUNCTIONAL_PROPERTY_ONE_OBJECT_COMMENT = 31;
78  public static final int FUNCTIONAL_PROPERTY_MORE_OBJECT_COMMENT_1 = 32;
79  public static final int FUNCTIONAL_PROPERTY_MORE_OBJECT_COMMENT_2 = 33;
80 
81  /** information about asymmetric property */
82  public static final int ASSYMETRIC_PROPERTY_ONE_OBJECT_COMMENT = 34;
83  public static final int ASSYMETRIC_PROPERTY_MORE_OBJECT_COMMENT_1 = 35;
84  public static final int ASSYMETRIC_PROPERTY_MORE_OBJECT_COMMENT_2 = 36;
85 
86  /** information about inverse-functional property */
87  public static final int INVERSE_FUNCTIONAL_PROPERTY_ONE_OBJECT_COMMENT = 37;
90 
91  /** information about irreflexive property */
92  public static final int IRREFLEXIVE_PROPERTY_ONE_OBJECT_COMMENT = 40;
93  public static final int IRREFLEXIVE_PROPERTY_MORE_OBJECT_COMMENT_1 = 41;
94  public static final int IRREFLEXIVE_PROPERTY_MORE_OBJECT_COMMENT_2 = 42;
95 
96  /** information about reflexive property */
97  public static final int REFLEXIVE_PROPERTY_ONE_OBJECT_COMMENT = 43;
98  public static final int REFLEXIVE_PROPERTY_MORE_OBJECT_COMMENT_1 = 44;
99  public static final int REFLEXIVE_PROPERTY_MORE_OBJECT_COMMENT_2 = 45;
100 
101  /** information about symetric property */
102  public static final int SYMETRIC_PROPERTY_ONE_OBJECT_COMMENT = 46;
103  public static final int SYMETRIC_PROPERTY_MORE_OBJECT_COMMENT_1 = 47;
104  public static final int SYMETRIC_PROPERTY_MORE_OBJECT_COMMENT_2 = 48;
105 
106  /** information about transitive property */
107  public static final int TRANSITIVE_PROPERTY_ONE_OBJECT_COMMENT = 49;
108  public static final int TRANSITIVE_PROPERTY_MORE_OBJECT_COMMENT_1 = 50;
109  public static final int TRANSITIVE_PROPERTY_MORE_OBJECT_COMMENT_2 = 51;
110 
111  /** part of name of anonymous classes */
112  public static final int DISJOINT_WITH_ANONYMOUS_NAME_FIRST = 52;
113  public static final int DISJOINT_WITH_ANONYMOUS_NAME = 53;
114 
115  /** part of name of anonymous classes
116  *
117  * in ATTRIBUTES_WITH_ANONYMOUS_NAME_FIRST and ATTRIBUTES_WITH_ANONYMOUS_NAME_FIRST_AFTER
118  * last letter is removed, when there is only one attribute
119  */
120  public static final int ATTRIBUTES_WITH_ANONYMOUS_NAME_FIRST = 54;
121  public static final int ATTRIBUTES_WITH_ANONYMOUS_NAME_FIRST_AFTER = 55;
122  public static final int ATTRIBUTE_WITH_ANONYMOUS_NAME_FIRST = 63;
123  public static final int ATTRIBUTE_WITH_ANONYMOUS_NAME_FIRST_AFTER = 64;
124  public static final int ATTRIBUTES_WITH_ANONYMOUS_NAME = 56;
125 
126 
127  /** unionOf information to comments */
128  public static final int UNION_OF_COMMENT_1 = 57;
129  public static final int UNION_OF_COMMENT_2 = 58;
130  public static final int UNION_OF_COMMENT_3 = 59;
131 
132  /** intersectionOf information to comments */
133  public static final int INTERSECTION_OF_COMMENT_1 = 60;
134  public static final int INTERSECTION_OF_COMMENT_2 = 61;
135  public static final int INTERSECTION_OF_COMMENT_3 = 62;
136 
137  /** Array with czech strings for knowledge base */
138  public static final String[] OWL_STRINGS_EN = {
139  /* 0 */ "", /* pad - number starts with 1 */
140  /* 1 */ "Minimum cardinality of this attribute is ",
141  /* 2 */ ".",
142  /* 3 */ "Total minimum cardinality of attributes starting with ",
143  /* 4 */ " is ",
144  /* 5 */ ".",
145  /* 6 */ "Maximum cardinality of this attribute is ",
146  /* 7 */ ".",
147  /* 8 */ "Total maximum cardinality of attributes starting with ",
148  /* 9 */ " is ",
149  /* 10 */ ".",
150  /* 11 */ "Exact cardinality of this attribute is ",
151  /* 12 */ ".",
152  /* 13 */ "Total exact cardinality of attributes starting with ",
153  /* 14 */ " is ",
154  /* 15 */ ".",
155  /* 16 */ "Some value of this attribute should have type ",
156  /* 17 */ ".",
157  /* 18 */ "Some value of attributes starting with ",
158  /* 19 */ " should have type ",
159  /* 20 */ ".",
160  /* 21 */ "This attribute should refer to same annotation.",
161  /* 22 */ "This type is complement of ",
162  /* 23 */ ".",
163  /* 24 */ "Ancestor of this attribute is ",
164  /* 25 */ ".",
165  /* 26 */ "This type is disjoint with type ",
166  /* 27 */ ".",
167  /* 28 */ "This type has label: ",
168  /* 29 */ ".",
169  /* 30 */ "For more information see also: ",
170  /* 31 */ "Maximum cardinality of this attribute is 1.",
171  /* 32 */ "Total maximum cardinality of attributes starting with ",
172  /* 33 */ " is 1.",
173  /* 34 */ "This attribute should be asymmetric.",
174  /* 35 */ "Every attribute that starts with ",
175  /* 36 */ " should be asymmetric.",
176  /* 37 */ "This attribute should be inverse-functional (max. cardinality is 1, value can be used only once).",
177  /* 38 */ "Every attribute that starts with ",
178  /* 39 */ " should be inverse-functional (max. cardinality is 1, value can be used only once).",
179  /* 40 */ "This attribute should not be reflexive.",
180  /* 41 */ "Every attribute that starts with ",
181  /* 42 */ " should not be reflexive.",
182  /* 43 */ "This attribute should be reflexive.",
183  /* 44 */ "Every attribute that starts with ",
184  /* 45 */ " should be reflexive.",
185  /* 46 */ "This attribute should be symmetric.",
186  /* 47 */ "Every attribute that starts with ",
187  /* 48 */ " should be symmetric.",
188  /* 49 */ "This attribute should be transitive.",
189  /* 50 */ "Every attribute that starts with ",
190  /* 51 */ " should be transitive.",
191  /* 52 */ "not",
192  /* 53 */ "AndNot",
193  /* 54 */ "withAttributes",
194  /* 55 */ "WithAttributes",
195  /* 56 */ "And",
196  /* 57 */ "This type is union of ",
197  /* 58 */ ", ",
198  /* 59 */ ".",
199  /* 60 */ "This type is intersection of ",
200  /* 61 */ ", ",
201  /* 62 */ ".",
202  /* 63 */ "withAttribute",
203  /* 64 */ "WithAttribute"
204  };
205 
206  /** Array with czech strings for knowledge base */
207  public static final String[] OWL_STRINGS_CS = {
208  /* 0 */ "", /* pad - number starts with 1 */
209  /* 1 */ "Minimální kardinalita tohoto atributu je ",
210  /* 2 */ ".",
211  /* 3 */ "Celková minimální kardinalita atributů začínajících na ",
212  /* 4 */ " je ",
213  /* 5 */ ".",
214  /* 6 */ "Maximální kardinalita tohoto atributu je ",
215  /* 7 */ ".",
216  /* 8 */ "Celková maximální kardinalita atributů začínajících na ",
217  /* 9 */ " je ",
218  /* 10 */ ".",
219  /* 11 */ "Kardinalita tohoto atributu je ",
220  /* 12 */ ".",
221  /* 13 */ "Celková kardinalita atributů začínajících na ",
222  /* 14 */ " je ",
223  /* 15 */ ".",
224  /* 16 */ "Některá hodnota tohoto atributu by měla být typu ",
225  /* 17 */ ".",
226  /* 18 */ "Některá hodnota atributu začínajícího na ",
227  /* 19 */ " by měla být typu ",
228  /* 20 */ ".",
229  /* 21 */ "Tento atribut by měl odkazovat na nějakou anotaci.",
230  /* 22 */ "Tento typ je doplněk ",
231  /* 23 */ ".",
232  /* 24 */ "Předek tohoto atributu je ",
233  /* 25 */ ".",
234  /* 26 */ "Tento typ je disjunktní s typem ",
235  /* 27 */ ".",
236  /* 28 */ "Tento typ má štítek: ",
237  /* 29 */ ".",
238  /* 30 */ "Pro více informací se podívejte na: ",
239  /* 31 */ "Maximální kardinalita tohoto atributu je 1.",
240  /* 32 */ "Celková maximální kardinalita atributů začínajících na ",
241  /* 33 */ " je 1.",
242  /* 34 */ "Tento atribut by měl být asymetrický.",
243  /* 35 */ "Každý atribut, který začíná na ",
244  /* 36 */ " by měl být asymetrický.",
245  /* 37 */ "Tento atribut by měl být inverzně-funkcionální (max. kardinalita je 1, hodnota smí být využita pouze 1).",
246  /* 38 */ "Každý atribut, který začíná na ",
247  /* 39 */ "by měl být inverzně-funkcionální (max. kardinalita je 1, hodnota smí být využita pouze 1).",
248  /* 40 */ "Tento atribut by neměl být reflexivní.",
249  /* 41 */ "Žádný atribut, který začíná na ",
250  /* 42 */ " by neměl být reflexivní.",
251  /* 43 */ "Tento atribut by měl být reflexivní.",
252  /* 44 */ "Každý atribut, který začíná na ",
253  /* 45 */ " by měl být reflexivní.",
254  /* 46 */ "Tento atribut by měl být symetrický.",
255  /* 47 */ "Každý atribut, který začíná na ",
256  /* 48 */ " by měl být symetrický.",
257  /* 49 */ "Tento atribut by měl být tranzitivní.",
258  /* 50 */ "Každý atribut, který začíná na ",
259  /* 51 */ " by měl být tranzitivní.",
260  /* 52 */ "ne",
261  /* 53 */ "ANe",
262  /* 54 */ "sAtributy",
263  /* 55 */ "SAtributy",
264  /* 56 */ "A",
265  /* 57 */ "Tento typ je sjednocením ",
266  /* 58 */ ", ",
267  /* 59 */ ".",
268  /* 60 */ "Tento typ je průnikem ",
269  /* 61 */ ", ",
270  /* 62 */ ".",
271  /* 63 */ "sAtributem",
272  /* 64 */ "SAtributem"
273  };
274 
275  /**
276  * Gets localised string for OWL olnology import
277  *
278  * @param langNum Number of language
279  * @param stringNum Number of string
280  * @return Returns localised string
281  */
282  public static String getOWLString(int langNum, int stringNum) {
283  switch (langNum) {
284  case Localisation.LANGUAGE_ENG:
285  return OWL_STRINGS_EN[stringNum];
286  case Localisation.LANGUAGE_CZE:
287  return OWL_STRINGS_CS[stringNum];
288  }
289  return OWL_STRINGS_EN[stringNum]; // default
290  } // getOWLString()
291 
292 } // public class TextsFromOWLConstants
static String getOWLString(int langNum, int stringNum)
Class responsible for localised strings.