1 package eu.fbk.dkm.premon.vocab;
2
3 import java.util.Map;
4
5 import com.google.common.base.Preconditions;
6 import com.google.common.collect.Maps;
7
8 import org.openrdf.model.Namespace;
9 import org.openrdf.model.URI;
10 import org.openrdf.model.impl.NamespaceImpl;
11 import org.openrdf.model.impl.ValueFactoryImpl;
12
13
14
15
16 public final class PMOVN {
17
18 private static Map<URI, Map<String, URI>> INDEX = Maps.newHashMap();
19
20
21 public static final String PREFIX = "pmovn";
22
23
24
25
26
27 public static final Namespace NS = new NamespaceImpl(PREFIX, NAMESPACE);
28
29
30
31
32 public static final URI VERB_CLASS = createURI("VerbClass");
33
34
35 public static final URI SEMANTIC_ROLE = createURI("SemanticRole");
36
37
38 public static final URI THEMATIC_ROLE_C = createURI("ThematicRole");
39
40
41 public static final URI VERBNET_FRAME = createURI("VerbNetFrame");
42
43
44
45
46 public static final URI SYN_ITEM = createURI("SynItem");
47
48
49 public static final URI ADJ_SYN_ITEM = createURI("AdjSynItem");
50
51
52 public static final URI ADV_SYN_ITEM = createURI("AdvSynItem");
53
54
55 public static final URI LEX_SYN_ITEM = createURI("LexSynItem");
56
57
58 public static final URI PREP_SYN_ITEM = createURI("PrepSynItem");
59
60
61 public static final URI VERB_SYN_ITEM = createURI("VerbSynItem");
62
63
64 public static final URI NP_SYN_ITEM = createURI("NpSynItem");
65
66
67 public static final URI AUXNP_TYPE = createURI("AuxnpType");
68
69
70
71
72 public static final URI PRED = createURI("Pred");
73
74
75 public static final URI PRED_TYPE = createURI("PredType");
76
77
78 public static final URI PRED_ARG = createURI("PredArg");
79
80
81 public static final URI VERB_SPECIFIC_PRED_ARG = createURI("VerbSpecificPredArg");
82
83
84 public static final URI THEM_ROLE_PRED_ARG = createURI("ThemRolePredArg");
85
86
87 public static final URI CONSTANT_PRED_ARG = createURI("ConstantPredArg");
88
89
90 public static final URI EVENT_PRED_ARG = createURI("EventPredArg");
91
92
93 public static final URI EVENT_PRED_ARG_TYPE = createURI("EventPredArgType");
94
95
96
97
98 public static final URI RESTRICTION_C = createURI("Restriction");
99
100
101 public static final URI ATOMIC_RESTRICTION = createURI("AtomicRestriction");
102
103
104 public static final URI EXIST_ATOMIC_RESTRICTION = createURI("ExistAtomicRestriction");
105
106
107 public static final URI ABSENT_ATOMIC_RESTRICTION = createURI("AbsentAtomicRestriction");
108
109
110 public static final URI COMPOUND_RESTRICTION = createURI("CompoundRestriction");
111
112
113 public static final URI AND_COMPOUND_RESTRICTION = createURI("AndCompoundRestriction");
114
115
116 public static final URI OR_COMPOUND_RESTRICTION = createURI("OrCompoundRestriction");
117
118
119 public static final URI SYNTACTIC_RESTRICTION = createURI("SyntacticRestriction");
120
121
122 public static final URI SELECTIONAL_RESTRICTION = createURI("SelectionalRestriction");
123
124
125 public static final URI PREPOSITION_SELECTIONAL_RESTRICTION = createURI("PrepositionSelectionalRestriction");
126
127
128 public static final URI ROLE_SELECTIONAL_RESTRICTION = createURI("RoleSelectionalRestriction");
129
130
131
132
133 public static final URI RESTRICTION_PROPERTY = createURI("RestrictionProperty");
134
135
136 public static final URI SYNTACTIC_RESTRICTION_PROPERTY = createURI("SyntacticRestrictionProperty");
137
138
139 public static final URI SELECTIONAL_RESTRICTION_PROPERTY = createURI("SelectionalRestrictionProperty");
140
141
142 public static final URI PREPOSITION_RESTRICTION_PROPERTY = createURI("PrepositionRestrictionProperty");
143
144
145 public static final URI ROLE_RESTRICTION_PROPERTY = createURI("RoleRestrictionProperty");
146
147
148
149
150 public static final URI FRAME = createURI("frame");
151
152
153 public static final URI FRAME_EXAMPLE = createURI("frameExample");
154
155
156 public static final URI DEFINES_FRAME = createURI("definesFrame");
157
158
159 public static final URI DEFINES_SEM_ROLE = createURI("definesSemRole");
160
161
162 public static final URI RESTRICTION_P = createURI("restriction");
163
164
165 public static final URI SUBCLASS_OF = createURI("subclassOf");
166
167
168 public static final URI THEMATIC_ROLE_P = createURI("thematicRole");
169
170
171
172
173 public static final URI FRAME_DESC_NUMBER = createURI("frameDescNumber");
174
175
176 public static final URI FRAME_PRIMARY = createURI("framePrimary");
177
178
179 public static final URI FRAME_SECONDARY = createURI("frameSecondary");
180
181
182 public static final URI FRAME_SEMANTICS_DESCRIPTION = createURI("frameSemanticsDescription");
183
184
185 public static final URI FRAME_SYNTAX_DESCRIPTION = createURI("frameSyntaxDescription");
186
187
188 public static final URI FRAME_XTAG = createURI("frameXtag");
189
190
191 public static final URI NEG_PRE = createURI("negPred");
192
193
194 public static final URI IMPL_PRED_ARG = createURI("implPredArg");
195
196
197
198
199 public static final URI ACTOR = createURI("actor", THEMATIC_ROLE_C, "Actor");
200
201
202 public static final URI AGENT = createURI("agent", THEMATIC_ROLE_C, "Agent");
203
204
205 public static final URI ASSET = createURI("asset", THEMATIC_ROLE_C, "Asset");
206
207
208 public static final URI ATTRIBUTE = createURI("attribute", THEMATIC_ROLE_C, "Attribute");
209
210
211 public static final URI BENEFICIARY = createURI("beneficiary", THEMATIC_ROLE_C, "Beneficiary");
212
213
214 public static final URI CAUSE = createURI("cause", THEMATIC_ROLE_C, "Cause");
215
216
217 public static final URI CO_AGENT = createURI("coAgent", THEMATIC_ROLE_C, "Co-Agent");
218
219
220 public static final URI CO_PATIENT = createURI("coPatient", THEMATIC_ROLE_C, "Co-Patient");
221
222
223 public static final URI CO_THEME = createURI("coTheme", THEMATIC_ROLE_C, "Co-Theme");
224
225
226 public static final URI DESTINATION = createURI("destination", THEMATIC_ROLE_C, "Destination");
227
228
229 public static final URI DURATION = createURI("duration", THEMATIC_ROLE_C, "Duration");
230
231
232 public static final URI EXPERIENCER = createURI("experiencer", THEMATIC_ROLE_C, "Experiencer");
233
234
235 public static final URI EXTENT = createURI("extent", THEMATIC_ROLE_C, "Extent");
236
237
238 public static final URI FINAL_TIME = createURI("finalTime", THEMATIC_ROLE_C, "Final_Time");
239
240
241 public static final URI FREQUENCY = createURI("frequency", THEMATIC_ROLE_C, "Frequency");
242
243
244 public static final URI GOAL = createURI("goal", THEMATIC_ROLE_C, "Goal");
245
246
247 public static final URI INITIAL_LOCATION = createURI("initialLocation", THEMATIC_ROLE_C,
248 "Initial_Location");
249
250
251 public static final URI INITIAL_TIME = createURI("initialTime", THEMATIC_ROLE_C,
252 "Initial_Time");
253
254
255 public static final URI INSTRUMENT = createURI("instrument", THEMATIC_ROLE_C, "Instrument");
256
257
258 public static final URI LOCATION = createURI("location", THEMATIC_ROLE_C, "Location");
259
260
261 public static final URI MATERIAL = createURI("material", THEMATIC_ROLE_C, "Material");
262
263
264 public static final URI PARTICIPANT = createURI("participant", THEMATIC_ROLE_C, "Participant");
265
266
267 public static final URI PATIENT = createURI("patient", THEMATIC_ROLE_C, "Patient");
268
269
270 public static final URI PIVOT = createURI("pivot", THEMATIC_ROLE_C, "Pivot");
271
272
273 public static final URI PLACE = createURI("place", THEMATIC_ROLE_C, "Place");
274
275
276 public static final URI PREDICATE = createURI("predicate", THEMATIC_ROLE_C, "Predicate");
277
278
279 public static final URI PRODUCT = createURI("product", THEMATIC_ROLE_C, "Product");
280
281
282 public static final URI RECIPIENT = createURI("recipient", THEMATIC_ROLE_C, "Recipient");
283
284
285 public static final URI REFLEXIVE = createURI("reflexive", THEMATIC_ROLE_C, "Reflexive");
286
287
288 public static final URI RESULT = createURI("result", THEMATIC_ROLE_C, "Result");
289
290
291 public static final URI SOURCE = createURI("source", THEMATIC_ROLE_C, "Source");
292
293
294 public static final URI STIMULUS = createURI("stimulus", THEMATIC_ROLE_C, "Stimulus");
295
296
297 public static final URI THEME = createURI("theme", THEMATIC_ROLE_C, "Theme");
298
299
300 public static final URI TIME = createURI("time", THEMATIC_ROLE_C, "Time");
301
302
303 public static final URI TOPIC = createURI("topic", THEMATIC_ROLE_C, "Topic");
304
305
306 public static final URI TRAJECTORY = createURI("trajectory", THEMATIC_ROLE_C, "Trajectory");
307
308
309 public static final URI UNDERGOER = createURI("undergoer", THEMATIC_ROLE_C, "Undergoer");
310
311
312 public static final URI VALUE = createURI("value", THEMATIC_ROLE_C, "Value");
313
314
315
316
317 public static final URI NP_AUXNP_TYPE = createURI("np_auxnpType", AUXNP_TYPE, "NP");
318
319
320 public static final URI OBLIQUE_AUXNP_TYPE = createURI("oblique_auxnpType", AUXNP_TYPE,
321 "Oblique");
322
323
324 public static final URI OBLIQUE1_AUXNP_TYPE = createURI("oblique1_auxnpType", AUXNP_TYPE,
325 "Oblique1");
326
327
328 public static final URI OBLIQUE2_AUXNP_TYPE = createURI("oblique2_auxnpType", AUXNP_TYPE,
329 "Oblique2");
330
331
332
333
334 public static final URI DURING_EVENT_ARG = createURI("duringEventArg", EVENT_PRED_ARG_TYPE,
335 "during");
336
337
338 public static final URI END_EVENT_ARG = createURI("endEventArg", EVENT_PRED_ARG_TYPE, "end");
339
340
341 public static final URI RESULT_EVENT_ARG = createURI("resultEventArg", EVENT_PRED_ARG_TYPE,
342 "result");
343
344
345 public static final URI START_EVENT_ARG = createURI("startEventArg", EVENT_PRED_ARG_TYPE,
346 "start");
347
348
349
350
351 public static final URI DEST_CONF_PRP = createURI("dest_conf_prp",
352 PREPOSITION_RESTRICTION_PROPERTY, "dest_conf");
353
354
355 public static final URI DEST_DIR_PRP = createURI("dest_dir_prp",
356 PREPOSITION_RESTRICTION_PROPERTY, "dest_dir");
357
358
359 public static final URI DEST_PRP = createURI("dest_prp", PREPOSITION_RESTRICTION_PROPERTY,
360 "dest");
361
362
363 public static final URI DIR_PRP = createURI("dir_prp", PREPOSITION_RESTRICTION_PROPERTY, "dir");
364
365
366 public static final URI LOC_PRP = createURI("loc_prp", PREPOSITION_RESTRICTION_PROPERTY, "loc");
367
368
369 public static final URI PATH_PRP = createURI("path_prp", PREPOSITION_RESTRICTION_PROPERTY,
370 "path");
371
372
373 public static final URI PLURAL_PRP = createURI("plural_prp", PREPOSITION_RESTRICTION_PROPERTY,
374 "plural");
375
376
377 public static final URI SPATIAL_PRP = createURI("spatial_prp",
378 PREPOSITION_RESTRICTION_PROPERTY, "spatial");
379
380
381 public static final URI SRC_PRP = createURI("src_prp", PREPOSITION_RESTRICTION_PROPERTY, "src");
382
383
384
385
386 public static final URI ABSTRACT_RRP = createURI("abstract_rrp", ROLE_RESTRICTION_PROPERTY,
387 "abstract");
388
389
390 public static final URI ANIMAL_RRP = createURI("animal_rrp", ROLE_RESTRICTION_PROPERTY,
391 "animal");
392
393
394 public static final URI ANIMATE_RRP = createURI("animate_rrp", ROLE_RESTRICTION_PROPERTY,
395 "animate");
396
397
398 public static final URI ARTIFACT_RRP = createURI("artifact_rrp", ROLE_RESTRICTION_PROPERTY,
399 "artifact");
400
401
402 public static final URI BIOTIC_RRP = createURI("biotic_rrp", ROLE_RESTRICTION_PROPERTY,
403 "biotic");
404
405
406 public static final URI BODY_PART_RRP = createURI("body_part_rrp", ROLE_RESTRICTION_PROPERTY,
407 "body_part");
408
409
410 public static final URI COMESTIBLE_RRP = createURI("comestible_rrp",
411 ROLE_RESTRICTION_PROPERTY, "comestible");
412
413
414 public static final URI COMMUNICATION_RRP = createURI("communication_rrp",
415 ROLE_RESTRICTION_PROPERTY, "communication");
416
417
418 public static final URI CONCRETE_RRP = createURI("concrete_rrp", ROLE_RESTRICTION_PROPERTY,
419 "concrete");
420
421
422 public static final URI CURRENCY_RRP = createURI("currency_rrp", ROLE_RESTRICTION_PROPERTY,
423 "currency");
424
425
426 public static final URI ELONGATED_RRP = createURI("elongated_rrp", ROLE_RESTRICTION_PROPERTY,
427 "elongated");
428
429
430 public static final URI FORCE_RRP = createURI("force_rrp", ROLE_RESTRICTION_PROPERTY, "force");
431
432
433 public static final URI GARMENT_RRP = createURI("garment_rrp", ROLE_RESTRICTION_PROPERTY,
434 "garment");
435
436
437 public static final URI HUMAN_RRP = createURI("human_rrp", ROLE_RESTRICTION_PROPERTY, "human");
438
439
440 public static final URI IDEA_RRP = createURI("idea_rrp", ROLE_RESTRICTION_PROPERTY, "idea");
441
442
443 public static final URI INT_CONTROL_RRP = createURI("int_control_rrp",
444 ROLE_RESTRICTION_PROPERTY, "int_control");
445
446
447 public static final URI LOCATION_RRP = createURI("location_rrp", ROLE_RESTRICTION_PROPERTY,
448 "location");
449
450
451 public static final URI MACHINE_RRP = createURI("machine_rrp", ROLE_RESTRICTION_PROPERTY,
452 "machine");
453
454
455 public static final URI NATURAL_RRP = createURI("natural_rrp", ROLE_RESTRICTION_PROPERTY,
456 "natural");
457
458
459 public static final URI NONRIGID_RRP = createURI("nonrigid_rrp", ROLE_RESTRICTION_PROPERTY,
460 "nonrigid");
461
462
463 public static final URI ORGANIZATION_RRP = createURI("organization_rrp",
464 ROLE_RESTRICTION_PROPERTY, "organization");
465
466
467 public static final URI PHYS_OBJ_RRP = createURI("phys_obj_rrp", ROLE_RESTRICTION_PROPERTY,
468 "phys-obj");
469
470
471 public static final URI PLANT_RRP = createURI("plant_rrp", ROLE_RESTRICTION_PROPERTY, "plant");
472
473
474 public static final URI PLURAL_RRP = createURI("plural_rrp", ROLE_RESTRICTION_PROPERTY,
475 "plural");
476
477
478 public static final URI POINTY_RRP = createURI("pointy_rrp", ROLE_RESTRICTION_PROPERTY,
479 "pointy");
480
481
482 public static final URI REFL_RRP = createURI("refl_rrp", ROLE_RESTRICTION_PROPERTY, "refl");
483
484
485 public static final URI REGION_RRP = createURI("region_rrp", ROLE_RESTRICTION_PROPERTY,
486 "region");
487
488
489 public static final URI RIGID_RRP = createURI("rigid_rrp", ROLE_RESTRICTION_PROPERTY, "rigid");
490
491
492 public static final URI SCALAR_RRP = createURI("scalar_rrp", ROLE_RESTRICTION_PROPERTY,
493 "scalar");
494
495
496 public static final URI SHAPE_RRP = createURI("shape_rrp", ROLE_RESTRICTION_PROPERTY, "shape");
497
498
499 public static final URI SOLID_RRP = createURI("solid_rrp", ROLE_RESTRICTION_PROPERTY, "solid");
500
501
502 public static final URI SOUND_RRP = createURI("sound_rrp", ROLE_RESTRICTION_PROPERTY, "sound");
503
504
505 public static final URI STATE_RRP = createURI("state_rrp", ROLE_RESTRICTION_PROPERTY, "state");
506
507
508 public static final URI SUSBSTANCE_RRP = createURI("substance_rrp", ROLE_RESTRICTION_PROPERTY,
509 "substance");
510
511
512 public static final URI TIME_RRP = createURI("time_rrp", ROLE_RESTRICTION_PROPERTY, "time");
513
514
515 public static final URI TOOL_RRP = createURI("tool_rrp", ROLE_RESTRICTION_PROPERTY, "tool");
516
517
518 public static final URI VEHICLE_RRP = createURI("vehicle_rrp", ROLE_RESTRICTION_PROPERTY,
519 "vehicle");
520
521
522
523
524 public static final URI ACC_ING_SYRP = createURI("acc_ing_syrp",
525 SYNTACTIC_RESTRICTION_PROPERTY, "acc_ing");
526
527
528 public static final URI AC_ING_SYRP = createURI("ac_ing_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
529 "ac_ing");
530
531
532 public static final URI AC_TO_INF_SYRP = createURI("ac_to_inf_syrp",
533 SYNTACTIC_RESTRICTION_PROPERTY, "ac_to_inf");
534
535
536 public static final URI ADV_LOC_SYRP = createURI("adv_loc_syrp",
537 SYNTACTIC_RESTRICTION_PROPERTY, "adv_loc");
538
539
540 public static final URI BE_SC_ING_SYRP = createURI("be_sc_ing_syrp",
541 SYNTACTIC_RESTRICTION_PROPERTY, "be_sc_ing");
542
543
544 public static final URI BODY_PART_SYRP = createURI("body_part_syrp",
545 SYNTACTIC_RESTRICTION_PROPERTY, "body_part");
546
547
548 public static final URI DEFINITE_SYRP = createURI("definite_syrp",
549 SYNTACTIC_RESTRICTION_PROPERTY, "definite");
550
551
552 public static final URI FOR_COMP_SYRP = createURI("for_comp_syrp",
553 SYNTACTIC_RESTRICTION_PROPERTY, "for_comp");
554
555
556 public static final URI GENITIVE_SYRP = createURI("genitive_syrp",
557 SYNTACTIC_RESTRICTION_PROPERTY, "genitive");
558
559
560 public static final URI HOW_EXTRACT_SYRP = createURI("how_extract_syrp",
561 SYNTACTIC_RESTRICTION_PROPERTY, "how_extract");
562
563
564 public static final URI NP_ING_SYRP = createURI("np_ing_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
565 "np_ing");
566
567
568 public static final URI NP_OMIT_ING_SYRP = createURI("np_omit_ing_syrp",
569 SYNTACTIC_RESTRICTION_PROPERTY, "np_omit_ing");
570
571
572 public static final URI NP_P_ING_SYRP = createURI("np_p_ing_syrp",
573 SYNTACTIC_RESTRICTION_PROPERTY, "np_p_ing");
574
575
576 public static final URI NP_PPART_SYRP = createURI("np_ppart_syrp",
577 SYNTACTIC_RESTRICTION_PROPERTY, "np_ppart");
578
579
580 public static final URI NP_TOBE_SYRP = createURI("np_tobe_syrp",
581 SYNTACTIC_RESTRICTION_PROPERTY, "np_tobe");
582
583
584 public static final URI NP_TO_INF_SYRP = createURI("np_to_inf_syrp",
585 SYNTACTIC_RESTRICTION_PROPERTY, "np_to_inf");
586
587
588 public static final URI OC_BARE_INF_SYRP = createURI("oc_bare_inf_syrp",
589 SYNTACTIC_RESTRICTION_PROPERTY, "oc_bare_inf");
590
591
592 public static final URI OC_ING_SYRP = createURI("oc_ing_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
593 "oc_ing");
594
595
596 public static final URI OC_TO_INF_SYRP = createURI("oc_to_inf_syrp",
597 SYNTACTIC_RESTRICTION_PROPERTY, "oc_to_inf");
598
599
600 public static final URI PLURAL_SYRP = createURI("plural_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
601 "plural");
602
603
604 public static final URI POSS_ING_SYRP = createURI("poss_ing_syrp",
605 SYNTACTIC_RESTRICTION_PROPERTY, "poss_ing");
606
607
608 public static final URI QUOTATION_SYRP = createURI("quotation_syrp",
609 SYNTACTIC_RESTRICTION_PROPERTY, "quotation");
610
611
612 public static final URI REFL_SYRP = createURI("refl_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
613 "refl");
614
615
616 public static final URI RS_TO_INF_SYRP = createURI("rs_to_inf_syrp",
617 SYNTACTIC_RESTRICTION_PROPERTY, "rs_to_inf");
618
619
620 public static final URI SC_ING_SYRP = createURI("sc_ing_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
621 "sc_ing");
622
623
624 public static final URI SC_TO_INF_SYRP = createURI("sc_to_inf_syrp",
625 SYNTACTIC_RESTRICTION_PROPERTY, "sc_to_inf");
626
627
628 public static final URI SENTENTIAL_SYRP = createURI("sentential_syrp",
629 SYNTACTIC_RESTRICTION_PROPERTY, "sentential");
630
631
632 public static final URI SMALL_CLAUSE_SYRP = createURI("small_clause_syrp",
633 SYNTACTIC_RESTRICTION_PROPERTY, "small_clause");
634
635
636 public static final URI TENSED_THAT_SYRP = createURI("tensed_that_syrp",
637 SYNTACTIC_RESTRICTION_PROPERTY, "tensed_that");
638
639
640 public static final URI THAT_COMP_SYRP = createURI("that_comp_syrp",
641 SYNTACTIC_RESTRICTION_PROPERTY, "that_comp");
642
643
644 public static final URI TO_BE_SYRP = createURI("to_be_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
645 "to_be");
646
647
648 public static final URI VC_TO_INF_SYRP = createURI("vc_to_inf_syrp",
649 SYNTACTIC_RESTRICTION_PROPERTY, "vc_to_inf");
650
651
652 public static final URI WHAT_EXTRACT_SYRP = createURI("what_extract_syrp",
653 SYNTACTIC_RESTRICTION_PROPERTY, "what_extract");
654
655
656 public static final URI WHAT_INF_SYRP = createURI("what_inf_syrp",
657 SYNTACTIC_RESTRICTION_PROPERTY, "what_inf");
658
659
660 public static final URI WH_COMP_SYRP = createURI("wh_comp_syrp",
661 SYNTACTIC_RESTRICTION_PROPERTY, "wh_comp");
662
663
664 public static final URI WHETH_INF_SYRP = createURI("wheth_inf_syrp",
665 SYNTACTIC_RESTRICTION_PROPERTY, "wheth_inf");
666
667
668 public static final URI WH_EXTRACT_SYRP = createURI("wh_extract_syrp",
669 SYNTACTIC_RESTRICTION_PROPERTY, "wh_extract");
670
671
672 public static final URI WH_INF_SYRP = createURI("wh_inf_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
673 "wh_inf");
674
675
676 public static final URI WH_ING_SYRP = createURI("wh_ing_syrp", SYNTACTIC_RESTRICTION_PROPERTY,
677 "wh_ing");
678
679
680
681
682 public static final URI TO_INF_RF_SYRP = createURI("to_inf_rs_syrp",
683 SYNTACTIC_RESTRICTION_PROPERTY, "to_inf_rs");
684
685
686 public static final URI POS_ING_SYRP = createURI("pos_ing_syrp",
687 SYNTACTIC_RESTRICTION_PROPERTY, "pos_ing");
688
689
690
691
692
693
694
695 public static URI lookup(final URI individualClass, final String externalID) {
696 final Map<String, URI> map = INDEX.get(individualClass);
697 if (map != null) {
698 return map.get(normalizeID(externalID));
699 }
700 return null;
701 }
702
703 public static URI createURI(final String localName) {
704 return ValueFactoryImpl.getInstance().createURI(NAMESPACE, localName);
705 }
706
707 private static URI createURI(final String localName, final URI individualClass,
708 final String... externalIDs) {
709 final URI uri = createURI(localName);
710 if (externalIDs.length > 0) {
711 Map<String, URI> map = INDEX.get(individualClass);
712 if (map == null) {
713 map = Maps.newHashMap();
714 INDEX.put(individualClass, map);
715 }
716 for (final String externalID : externalIDs) {
717 final URI oldURI = map.put(normalizeID(externalID), uri);
718 Preconditions.checkState(oldURI == null);
719 }
720 }
721 return uri;
722 }
723
724 private static String normalizeID(final String id) {
725 final int len = id.length();
726 for (int i = 0; i < len; ++i) {
727 char ch = id.charAt(i);
728 if (!(ch >= '0' && ch <= '9') && !(ch >= 'a' && ch <= 'z')) {
729 final StringBuilder builder = new StringBuilder(id.length());
730 for (int j = 0; j < len; ++j) {
731 ch = id.charAt(j);
732 if (Character.isLetterOrDigit(ch)) {
733 builder.append(Character.toLowerCase(ch));
734 }
735 }
736 return builder.toString();
737 }
738 }
739 return id;
740 }
741
742 private PMOVN() {
743 }
744
745 }