-
Notifications
You must be signed in to change notification settings - Fork 0
/
dbc-docs.lisp
5763 lines (5314 loc) · 323 KB
/
dbc-docs.lisp
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; :FILE-CREATED <Timestamp: #{2011-09-26T13:27:24-04:00Z}#{11391} - by MON>
;;; :FILE dbc-specific/dbc-docs.lisp
;;; ==============================
;; The partially functional texinfo tool we cobbled from the super top secret sb-texinfo circa 2011:
;;
;; (mon-docs:document-package :dbc
;; (make-pathname
;; :directory `,(pathname-directory (merge-pathnames "info-docs/" (sb-ext:parse-native-namestring (sb-unix:posix-getcwd/))))
;; :name "dbc"
;; :type "texinfo"))
(in-package #:dbc)
;;; ==============================
;;; :SPECIALS-DOCUMENTATION
;;; ==============================
(vardoc '*system-path*
"The base dbc-sytsem path.~%~@
An instance of the `dbc:system-path' class holds the class allocated slot system-path.~%
:EXAMPLE~%
\(and \(eql \(mon:class-name-of *system-path*\)
\(class-name \(find-class 'system-path\)\)\)
\(system-base-path *system-path*\)\)~%~@
:SEE-ALSO `system-described', `system-path', `sub-path', `sub-name', `parent-path',
`var-name', `*system-path*',`*system-tests-dir*', `*system-tests-temp-dir*',
`*xml-output-dir*', `*xml-input-dir*', `*dbc-base-item-number-image-pathname*'
`*parsed-class-table-output-dir*',`*parsed-class-table-csv-output-dir*',
`*parsed-class-table-output-pathname-type*',`*parsed-tgm-theme-output-dir*.~%▶▶▶")
(vardoc '*system-notes-dir*
"An instance of class `system-subdir' identifying a DBC system subdirectory
where notes and static input files are located.~%
Instantiated in :FILE dbc-specific/loadtime-bind.lisp when system is initialized
with value of sub-path initially defined as the symbol-value via defparameter
with following string:~%
\(sub-name *system-notes-dir*\)~%
:EXAMPLE~%
\(eq \(type-of *system-notes-dir*\) 'system-subdir\)~%
\(sub-path *system-notes-dir*\)~%
\(system-described *system-notes-dir* nil\)~%
:SEE-ALSO `dbc:system-path', `*system-tests-dir*',
`*system-tests-temp-dir*', `*xml-output-dir*', `*xml-input-dir*',
`*dbc-base-item-number-image-pathname*'.~%▶▶▶")
(vardoc '*parsed-class-table-output-dir*
"An instance of class `dbc-system-subdir' that dereferences a directory
pathname where for use when writing the contents of DBC
hash-tables identified in varialbe`*parsed-class-parse-table*'
eg with the `write-parsed-<FOO>-record-parse-table-to-file' functions.
:EXAMPLE~%
\(sub-path *parsed-class-table-output-dir*\)~%
\(class-of *parsed-class-table-output-dir*\)~%
\(system-described *parsed-class-table-output-dir* nil\)~%
:NOTE Rebound in :FILE dbc-specific/loadtime-bind.lisp at loadtime with form:~%
\(system-subdir-init-w-var '*parsed-class-table-output-dir*
:parent-path \(dbc::sub-path dbc::*xml-output-dir*\)\)~%
:SEE-ALSO `system-described', `system-path', `sub-path', `sub-name', `parent-path',
`var-name', `*system-path*',`*system-tests-dir*', `*system-tests-temp-dir*',
`*xml-output-dir*', `*xml-input-dir*', `*dbc-base-item-number-image-pathname*'
`*parsed-class-table-output-dir*',`*parsed-class-table-csv-output-dir*',
`*parsed-class-table-output-pathname-type*',`*parsed-tgm-theme-output-dir*'~%▶▶▶")
(vardoc '*parsed-class-table-csv-output-dir*
"An instance of class `dbc-system-subdir' that dereferences a directory
pathname where for use when writing the contents of DBC
hash-tables identified in varialbe`*parsed-class-parse-table*'
eg with the `write-parsed-<FOO>-record-parse-table-to-csv-file' functions.
:EXAMPLE~%
\(sub-path *parsed-class-table-csv-output-dir*\)~%
\(class-of *parsed-class-table-csv-output-dir*\)~%
\(system-described *parsed-class-table-output-dir* nil\)~%
:NOTE Rebound in :FILE dbc-specific/loadtime-bind.lisp at loadtime with form:~%
\(system-subdir-init-w-var '*parsed-class-table-csv-output-dir*
:parent-path \(dbc::sub-path dbc::*xml-output-dir*\)\)~%
:SEE-ALSO `system-described', `system-path', `sub-path', `sub-name', `parent-path',
`var-name', `*system-path*',`*system-tests-dir*', `*system-tests-temp-dir*',
`*xml-output-dir*', `*xml-input-dir*', `*dbc-base-item-number-image-pathname*'
`*parsed-class-table-output-dir*',`*parsed-class-table-csv-output-dir*',
`*parsed-class-table-output-pathname-type*',`*parsed-tgm-theme-output-dir*.'~%▶▶▶")
(vardoc '*parsed-class-table-output-pathname-type*
"Default pathname-type for use when writing the contents of DBC
hash-tables identified in varialbe`*parsed-class-parse-table*'
eg with the `write-parsed-<FOO>-record-parse-table-to-file' functions.~%
:EXAMPLE~%
\(pathname-type \(make-pathname :type *parsed-class-table-output-pathname-type*\)\)~%
:SEE-ALSO `*parsed-class-table-output-dir*'~%▶▶▶")
(vardoc '*parsed-class-parse-table*
"A hash-table. It's keys are symbols naming subclasses of class `parsed-class'
its values are hash-tables of the parsed XML database files corresponding to the
subclass identified by the key.~%~@
:EXAMPLE~%
\(gethash 'parsed-inventory-record *parsed-class-parse-table*\)~%~@
:SEE-ALSO `*parsed-class-table-output-pathname-type*'.~%▶▶▶")
(vardoc '*dbc-base-item-number-image-pathname*
"Default base pathname under which dbc images are located on the local system disk.~%
Size of content of directory named by *dbc-base-item-number-image-pathname* ->
3.13 GB~% :SEE-ALSO `*system-path*', `*system-tests-dir*',
`*system-tests-temp-dir*', `*xml-output-dir*', `*xml-input-dir*',
`*dbc-wild-httpd-synced-item-number-image-pathname-list*',
`*dbc-base-httpd-synced-item-number-image-pathname*',
`*dbc-wild-httpd-synced-item-number-image-pathname-list*'.~%▶▶▶")
(vardoc '*dbc-base-httpd-synced-item-number-image-pathname*
"Pathname under which old dbc images are stored on remote server.~%~@
:NOTE may not be mounted!!!~%~@
Callers will signal an error if cl:probe-file doesn't return true. ~%~@
:SEE-ALSO `*dbc-wild-httpd-synced-item-number-image-pathname-list*',
`*dbc-item-number-path-source-destination-vector*',
`parsed-class-slot-value-format-image-pathnames',
`parsed-inventory-record-image-file-pathname-get',
`%parsed-inventory-record-image-file-pathname-match',
`%parsed-inventory-record-image-file-pathname-valid-p-or-error',
`*parsed-inventory-record-image-pathname-regex*',
`inventory-record-image-jpg-probe-all',
`inventory-record-image-jpg-probe',
`inventory-record-image-directory-probe'.~%▶▶▶")
(vardoc '*dbc-wild-httpd-synced-item-number-image-pathname-list*
"List of pathname-directory components to construct wild pathnames for matching
jpg images beneath `*dbc-base-httpd-synced-item-number-image-pathname*'.~%~@
Elements of list are either strings or a list of strings and/or wild pathname
keywords e.g. :wild :wild-inferiors.~%~@
:NOTE Order in wich the elements are specified is important!!!~%~@
:SEE-ALSO `*dbc-item-number-path-source-destination-vector*',
`parsed-class-slot-value-format-image-pathnames',
`parsed-inventory-record-image-file-pathname-get',
`%parsed-inventory-record-image-file-pathname-match',
`%parsed-inventory-record-image-file-pathname-valid-p-or-error',
`*parsed-inventory-record-image-pathname-regex*',
`inventory-record-image-jpg-probe-all',
`inventory-record-image-jpg-probe',
`inventory-record-image-directory-probe',
`parsed-inventory-record-image-file-pathnames-update'.~%▶▶▶")
(vardoc '*parsed-inventory-record-image-pathname-regex*
"Regular expressioin for macthing follwoing image pahtname-names:~%
<RECORD-NUM>.jpg <- :full
<RECORD-NUM>-s.jpg <- :small
<RECORD-NUM>-m.jpg <- :medium
<RECORD-NUM>-z.jpg <- :zoom
<RECORD-NUM>-f.jpg <- :flash
<RECORD-NUM>-fc.jpg <- :flash-c
<RECORD-NUM>-fs.jpg <- :flash-s
<RECORD-NUM>-h.jpg <- :header~%~@
Regular expression has the form:~% \"^\([0-9]{6}?\)\(-??\)\(\([smzh]{1}?\)??|\(f[sc]??\)??\)??$\"~%~@
:EXAMPLE~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305-m.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305-z.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305-h.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305-f.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305-fs.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"006305-fc.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"063050-ff.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"063050-F.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"0063050.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"0006305.jpg\"\)\)~%~@
\(cl-ppcre:scan-to-strings *parsed-inventory-record-image-pathname-regex* \(cl:pathname-name #P\"A006305.jpg\"\)\)~%~@
:SEE-ALSO `parsed-class-slot-value-format-image-pathnames',
`parsed-class-slot-value-format-image-pathnames',
`parsed-inventory-record-image-file-pathname-get',
`%parsed-inventory-record-image-file-pathname-match',
`%parsed-inventory-record-image-file-pathname-valid-p-or-error',
`*parsed-inventory-record-image-pathname-regex*',
`inventory-record-image-jpg-probe-all', `inventory-record-image-jpg-probe',
`inventory-record-image-directory-probe'.~%▶▶▶")
;;; ==============================
;;; :SPECIALS-DBC-TEST-PATHS-DOCUMENTATION
;;; ==============================
(vardoc '*system-tests-dir*
"Initially set to the string \"dbc-tests\".~%~@
The dbc package defines this parameter and `dbc:*system-tests-temp-dir*' in
:FILE dbc-specific/specials.lisp~%~@
Its value is set at loadtime from :FILE dbc-specific/loadtime-bind.lisp~%~@
Once set the parameter is an instance of `dbc:system-subdir' with a parent-path
as if by the return value of `dbc:find-system-path', e.g.:~%
\(equal \(dbc:parent-path dbc:*system-tests-dir*\)
\(dbc:find-system-path\)\)~%~@
Its pathname is accessible with the `dbc:sub-path' accessor.~%~@
:EXAMPLE~%
\(dbc:sub-path dbc:*system-tests-dir*\)~%
\(pathname-directory \(dbc:sub-path dbc:*system-tests-dir*\)\)~%~@
:SEE-ALSO `*system-path*', `*system-tests-dir*', `*system-tests-temp-dir*',
`*xml-output-dir*', `*xml-input-dir*', `*dbc-base-item-number-image-pathname*'.~%▶▶▶")
(vardoc '*system-tests-temp-dir*
"Initially set to the string \"tests\".
The dbc package defines this parameter and `dbc:*system-tests-temp-dir*' in
:FILE dbc-specific/specials.lisp~%~@
Its value is set at loadtime from :FILE dbc-specific/loadtime-bind.lisp~%~@
Once set the parameter is an instance of `dbc:system-subdir' with a parent-path
relative to `dbc:*system-tests-dir*' which has a parent-path relative to return
value of `dbc:find-system-path', e.g.:~%
\(equal \(find-system-path\)
\(and \(equal
\(dbc:parent-path dbc::*system-tests-temp-dir*\)
\(dbc:sub-path dbc::*system-tests-dir*\)\)
\(slot-value dbc::*system-tests-temp-dir* 'system-path\)\)\)~%~@
Its pathname is accessible with the `dbc:sub-path' accessor.~%~@
:EXAMPLE~%
\(dbc:sub-path dbc::*system-tests-temp-dir*\)~%
\(pathname-directory \(dbc:sub-path dbc::*system-tests-temp-dir*\)\)~%~@
:SEE-ALSO `*system-path*', `*system-tests-dir*', `*system-tests-temp-dir*',
`*xml-output-dir*', `*xml-input-dir*'.~%▶▶▶")
;;; ==============================
;;; :SPECIALS-XML-PATHS-DOCUMENTATION
;;; ==============================
(vardoc '*xml-output-dir*
"System relative directory pathname object for storing dbc-xml-dump files.~%~@
Evaluated when system is loaded.~%
:EXAMPLE~%
\(sub-path *xml-output-dir*\)~%
\(system-described *xml-output-dir* nil\)~%~@
:SEE-ALSO `system-path-xml-dump-dir-ensure', `*xml-output-dir*',
`*xml-output-refs-name*', `*xml-output-refs-ext*', `*xml-input-dir*',
`*xml-input-refs-name*', `*xml-input-refs-name-temp*',
`*dbc-base-item-number-image-pathname*'.~%▶▶▶")
(vardoc '*xml-output-refs-name*
"---> Output file name with directory components.~%~@
Use when dumping parsed dbc XML files.~%~@
:EXAMPLE~%
\(pathname-directory *xml-output-refs-name*\)~%
\(pathname-name *xml-output-refs-name*\)~%
\(namestring *xml-output-refs-name*\)~%~@
:SEE-ALSO `*xml-output-dir*', `*xml-output-refs-name*', `*xml-output-refs-ext*',
`*xml-input-dir*', `*xml-input-refs-name*', `*xml-input-refs-name-temp*'.~%▶▶▶")
(vardoc '*xml-output-refs-ext*
"---> Output file name with extension and directory components.~%~@
Use when dumping parsed dbc XML files.~%~@
:EXAMPLE~%~@
\(pathname-directory *xml-output-refs-ext*\)~%
\(pathname-name *xml-output-refs-ext*\)~%
\(pathname-type *xml-output-refs-ext*\)~%
\(namestring *xml-output-refs-ext*\)~%~@
:SEE-ALSO `*xml-output-dir*', `*xml-output-refs-name*', `*xml-output-refs-ext*',
`*xml-input-dir*', `*xml-input-refs-name*', `*xml-input-refs-name-temp*'.~%▶▶▶")
(vardoc '*xml-input-dir*
"System relative directory pathname object for reading dbc-xml-dump files.~%~@
Evaluated when system is loaded.~%~@
:EXAMPLE~%
\(sub-path *xml-input-dir*\)~%
\(system-described *xml-input-dir* nil\)~%~@
:SEE-ALSO `*xml-output-dir*', `*xml-output-refs-name*', `*xml-output-refs-ext*',
`*xml-input-dir*', `*xml-input-refs-name*', `*xml-input-refs-name-temp*',
`*dbc-base-item-number-image-pathname*'.~%▶▶▶")
;;; ==============================
;;; dbc-utils.lisp
(fundoc 'notevery-digit-char-p
"Return T if not every char in STRING satisfies `cl:digit-char-p'.~%~@
:EXAMPLE~%~@
\(notevery-digit-char-p \"000000foo\"\)~%~@
\(notevery-digit-char-p \"000000\"\)~%~@
:SEE-ALSO `every-digit-char-p'.~%▶▶▶")
(fundoc 'every-digit-char-p
"Return T if every char in STRING satisfies `cl:digit-char-p'.~%~@
:EXAMPLE~%~@
\(every-digit-char-p \"000000\"\)~%~@
\(every-digit-char-p \"000000FOO\"\)~%~@
:SEE-ALSO `notevery-digit-char-p'.~%▶▶▶")
(fundoc 'make-hash-table-sync
"Create and return a new hash table. The keywords are as follows:~%
TEST Determines how keys are compared. Must a designator for one of the
standard hash table tests, or a hash table test defined using
SB-EXT:DEFINE-HASH-TABLE-TEST. Additionally, when an explicit
HASH-FUNCTION is provided (see below), any two argument equivalence
predicate can be used as the TEST.~%
SIZE A hint as to how many elements will be put in this hash table.~%
REHASH-SIZE Indicates how to expand the table when it fills up. If an integer,
add space for that many elements. If a floating point number (which must be
greater than 1.0), multiply the size by that amount.~%
REHASH-THRESHOLD Indicates how dense the table can become before forcing a
rehash. Can be any positive number <=1, with density approaching zero as the
threshold approaches 0. Density 1 means an average of one entry per bucket.~%
HASH-FUNCTION If unsupplied, a hash function based on the TEST argument is used,
which then must be one of the standardized hash table test functions, or
one for which a default hash function has been defined using
`sb-ext:define-hash-table-test'. If HASH-FUNCTION is specified, the TEST
argument can be any two argument predicate consistent with it. The
HASH-FUNCTION is expected to return a non-negative fixnum hash code.
If TEST is neither standard nor defined by DEFINE-HASH-TABLE-TEST,
then the HASH-FUNCTION must be specified.~%
WEAKNESS is one of :key | :value | :key-and-value | :key-or-value | nil~%
SYNCHRONIZED If NIL (the default), the hash-table may have multiple concurrent
readers, but results are undefined if a thread writes to the hash-table
concurrently with another reader or writer. If T, all concurrent accesses are
safe, but note that CLHS 3.6 \(Traversal Rules and Side Effects\) remains in
force.~%
:EXAMPLE~%~@
\(sb-ext:hash-table-synchronized-p \(make-hash-table-sync\)\)~%
:SEE-ALSO `dbc::with-locked-hash-table', `sb-ext:define-hash-table-test'.~%▶▶▶")
(fundoc 'with-locked-hash-table
"Limits concurrent accesses to HASH-TABLE for the duration of BODY.
If HASH-TABLE is synchronized, BODY will execute with exclusive ownership of the table.
If HASH-TABLE is not synchronized, BODY will execute with other
`with-locked-hash-table' bodies excluded -- exclusion of hash-table accesses not
surrounded by `with-locked-hash-table' is unspecified.
:EXAMPLE~%~@
\(let \(\(ht \(make-hash-table-sync\)\)\)
\(with-locked-hash-table
\(ht\)
\(setf \(gethash \"FOO\" ht\) 'bar\)\)\)
SEE-ALSO `make-hash-table-sync'.~%▶▶▶")
;;; ==============================
;; dbc-time/date-localtime-utils.lisp
;;; ==============================
(typedoc 'nanosecond-range
"The range of nanoseconds for a timestamp.~%
Objects of this type satisfy `valid-nanosecond-date-p'.~%
:EXAMPLE~%~@
\(valid-nanosecond-date-p 999999999\)~%
\(null\(valid-nanosecond-date-p 1000000000\)\)~%
:SEE-ALSO `second-minute-range', `hour-range', `day-range',
`month-range', `year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(typedoc 'second-minute-range
"The range of seconds/minutes for a timestamp.~%
Objects of this type satisfy `valid-second-date-p' and `1valid-minute-date-p'.~%
:EXAMPLE~%
\(valid-minute-date-p 59\)~%
\(valid-second-date-p 59\)~%
\(null \(valid-second-date-p 60\)\)~%
:SEE-ALSO `nanosecond-range', `second-minute-range', `hour-range', `day-range',
`month-range', `year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(typedoc 'hour-range
"The range of hours for a timestamp.~%
Objects of this type satisfy `valid-hour-date-p'.~%
:EXAMPLE~%~@
(valid-hour-date-p 23)~%
\(null \(valid-hour-date-p 24\)\)~%
:SEE-ALSO `nanosecond-range', `second-minute-range', `day-range',
`month-range', `year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(typedoc 'day-range
"The range of days for a timestamp.~%
Objects of this type satisfy `valid-day-date-p'.~%
:EXAMPLE~%~@
\(valid-day-date-p 31\)~%
\(null \(valid-day-date-p 32\)\)~%
:SEE-ALSO `nanosecond-range', `second-minute-range', `hour-range',
`month-range', `year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(typedoc 'month-range
"The range of months for a timestamp.~%
Objects of this type satisfy `valid-month-date-p'.~%
:EXAMPLE~%~@
\(valid-month-date-p 12\)~%
\(null \(valid-month-date-p 13\)\)~%
:SEE-ALSO `nanosecond-range', `second-minute-range', `hour-range', `day-range',
`year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(typedoc 'year-range
"The range of years for a timestamp.~%
Objects of this type satisfy `valid-year-date-p'.~%
:EXAMPLE~%~@
(valid-year-date-p 1000000)
(valid-year-date-p -1000000)
\(null \(valid-year-date-p 1000001\)\)~%
\(null \(valid-year-date-p -1000001\)\)~%
:SEE-ALSO `nanosecond-range', `second-minute-range', `hour-range', `day-range',
`month-range', `year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(typedoc 'year-range-non-zero-unsigned
"The range of years \(as unsigned-byte's\)for a timestamp.~%
Objects of this type satisfy `valid-year-date-non-zero-unsigned-p'.~%
:EXAMPLE~%~@
\(valid-year-date-non-zero-unsigned-p 1000000\)
(null (valid-year-date-non-zero-unsigned-p -1000000))
(null (valid-year-date-non-zero-unsigned-p 1000001))~%
(null (valid-year-date-non-zero-unsigned-p -1000001))~%
:SEE-ALSO `nanosecond-range', `second-minute-range', `hour-range', `day-range',
`month-range', `year-range', `year-range-non-zero-unsigned'.~%▶▶▶")
(fundoc 'valid-second-date-p
"Return t if PUTATIVE-SECOND-DATE is of type `second-minute-range'.
:EXAMPLE~%~@
\(valid-second-date-p 59\)
\(null \(valid-second-date-p60\)\)~%
:SEE-ALSO `valid-minute-date-p', `valid-hour-date-p', `valid-day-date-p',
`valid-month-date-p', `valid-year-date-p'.~%▶▶▶")
(fundoc 'valid-minute-date-p
"Return t if PUTATIVE-MINUTE-DATE is of type `minute-range'.
:EXAMPLE~%~@
\(valid-minute-date-p 59\)~%
\(null \(valid-minute-date-p 60\)\)~%$
:SEE-ALSO `valid-second-date-p', `valid-hour-date-p', `valid-day-date-p',
`valid-month-date-p', `valid-year-date-p'.~%▶▶▶")
(fundoc 'valid-hour-date-p
"Return t if PUTATIVE-HOUR-DATE is of type `hour-range'.
:EXAMPLE~%~@
(valid-hour-date-p 23)~%
\(null \(valid-hour-date-p 24\)\)~%
:SEE-ALSO `valid-second-date-p', `valid-minute-date-p', `valid-day-date-p',
`valid-month-date-p', `valid-year-date-p'.~%▶▶▶")
(fundoc 'valid-day-date-p
"Return t if PUTATIVE-DAY-DATE is of type `day-range'.
:EXAMPLE~%~@
\(valid-day-date-p 31\)~%
:SEE-ALSO `valid-second-date-p', `valid-minute-date-p', `valid-hour-date-p',
`valid-month-date-p', `valid-year-date-p'.~%▶▶▶")
(fundoc 'valid-month-date-p
"Return t if PUTATIVE-MONTH-DATE is of type `month-range'.
:EXAMPLE~%~@
\(valid-month-date-p 12\)~%
:SEE-ALSO `valid-second-date-p', `valid-minute-date-p', `valid-hour-date-p',
`valid-year-date-p'.~%▶▶▶")
(fundoc 'valid-year-date-p
"Return t if PUTATIVE-YEAR-DATE is of type `year-range'.
:EXAMPLE~%~@
\(valid-year-date-p 1970\)~%
:SEE-ALSO `valid-second-date-p', `valid-minute-date-p', `valid-hour-date-p',
`valid-day-date-p', `valid-month-date-p'.~%▶▶▶")
(fundoc 'valid-timestamp-or-error
"Return T if the time values refer to a valid time, otherwise signals an
`invalid-timestamp-component' condition.~%
Following forms for Function will error instead of returning nil.
The intent here is to account for certain anomalous behaviour exhibitted by the
current implementation of local-time::valid-timestamp-p when YEAR is outside the
integer range [-1000000,1000000] e.g.:~%
\(local-time::valid-timestamp-p 000001 0 0 0 28 2 most-positive-fixnum\)~% => T~%
\(local-time::valid-timestamp-p 000001 0 0 0 29 2 most-positive-fixnum\)~% => NIL~%
\(local-time:encode-timestamp 000001 0 0 0 29 2 most-positive-fixnum\)~% => error~%
\(local-time:encode-timestamp 000001 0 0 0 28 2 most-positive-fixnum\)~% => error~%
\(valid-timestamp-or-error 000001 0 0 0 29 2 2012\)~% => T~%
\(valid-timestamp-or-error 000001 0 0 0 29 2 -1000000\)~% => T~%
\(valid-timestamp-or-error 000001 0 0 0 29 2 1000000\)~% => T~%
Following error successfully:~%
\(valid-timestamp-or-error 000001 0 0 0 28 2 -1000001\)~%
\(valid-timestamp-or-error 000001 0 0 0 28 2 1000001\)~%
\(valid-timestamp-or-error 000001 0 0 0 28 2 most-positive-fixnum\)~%
\(valid-timestamp-or-error 000001 0 0 0 29 2 2011\)~%
:EXAMPLE~%~@
:SEE-ALSO .~%▶▶▶")
(fundoc 'timestamp-year-only-p
"Return the decoded time as multiple values:~%
nsec, ss, mm, hh, day, month, year, day-of-week~%
:EXAMPLE~%~@
\(timestamp-year-only-p \(make-timestamp-year-only 2012\)\)~%
\(null \(timestamp-year-only-p \(make-timestamp-year-month-day 2012 1 1\)\)\)~%
:SEE-ALSO `make-timestamp-year-only'.~%▶▶▶")
(fundoc 'timestamp-year-month-only-p
"Are year and month the only values present for TIMESTAMP.~%
:EXAMPLE~%~@
\(timestamp-year-month-only-p \(make-timestamp-year-month-only 2012 3\)\)~%
\(timestamp-year-month-only-p \(make-timestamp-year-only 2012\)\)~%
\(null \(timestamp-year-month-only-p \(make-timestamp-year-month-day 2012 1 1\)\)\)~%
:SEE-ALSO `make-timestamp-year-month-only'.~%▶▶▶")
(fundoc 'timestamp-year-month-day-p
"Are year month and day values present for TIMESTAMP.~%
:EXAMPLE~%~@
\(timestamp-year-month-day-p \(make-timestamp-year-month-day 2012 3 1\)\)~%
\(null \(timestamp-year-month-day-p \(make-timestamp-year-only 2012\)\)\)~%
\(null \(timestamp-year-month-day-p \(make-timestamp-year-month-only 2012 1\)\)\)~%
\(null \(timestamp-year-month-only-p \(make-timestamp-year-month-day 2012 1 1\)\)\)~%
:SEE-ALSO `make-timestamp-year-month-day'.~%▶▶▶")
(fundoc 'make-timestamp-year-only
"Return a timestamp with only the YEAR value set.~%
YEAR is of type `year-range'.~%
:EXAMPLE~%~@
\(local-time:timestamp-century \(make-timestamp-year-only 2012\)\)~%
\(local-time:timestamp-century \(make-timestamp-year-only 1895\)\)~%
\(local-time:timestamp-century \(make-timestamp-year-only 1\)\)~%
\(local-time:timestamp-decade \(make-timestamp-year-only 1895\)\)~%
\(local-time:timestamp-decade \(make-timestamp-year-only 2012\)\)~%
\(local-time:timestamp-decade \(make-timestamp-year-only 1\)\)~%
\(local-time:timestamp-month \(make-timestamp-year-only 2012\)\)~%
\(local-time:timestamp-month \(make-timestamp-year-only 1895\)\)~%
\(local-time:timestamp-day \(make-timestamp-year-only 1895\)\)~%
:SEE-ALSO `timestamp-year-only-p'.~%▶▶▶")
(fundoc 'make-timestamp-year-month-only
"Return a timestamp with only the YEAR and MONTH value set.~%
YEAR is of type `year-range'.~%
MONTH is of type `month-range'.~%
:EXAMPLE~%~@
\(make-timestamp-year-month-only 2024 07\)~%
:SEE-ALSO `timestamp-year-month-only-p'.~%▶▶▶")
(fundoc 'make-timestamp-year-month-day
"Return a timestamp with the YEAR, MONTH, and DAY value set.~%
YEAR is of type `year-range'.~%
MONTH is of type `month-range'.~%
DAY is of type `day-range'.~%
:EXAMPLE~%~@
\(make-timestamp-year-month-day 2024 07 31\)~%
:SEE-ALSO `timestamp-year-month-day-p'.~%▶▶▶")
;;; ==============================
;;; :DBC-CLASS-PATHS-DOCUMENTATION
;;; :FILE dbc-classes/dbc-class-paths.lisp
;;; ==============================
(generic-doc #'system-base-path
"Access the class allocated slot value `system-path' of DBC-SYSTEM.~%~@
The value of the `system-path' slot affects _all_ instances of `system-path' and~@
subclassed instances.~%
:NOTE User code should not specialize methods on this function use system-path instead.~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure',`system-path-xml-dump-dir-ensure', `find-system-path',
`system-subdir-init-w-var', `system-path-if',`*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'(setf system-base-path)
"Set class allocated slot `system-path' to PATH for DBC-SYSTEM.~%~@
Setting the `system-path' slot affects _all_ instances of `system-path' class and
subclassing instances.~%~@
:NOTE The intent is that this slot be bound _once_ at system loadtime.
IOW not intendend for user code method specializers!~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var',
`system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'system-path
"Access the class allocated slot value `system-path' of DBC-SYSTEM.~%~@
The value of the the `system-path' slot affects _all_ instances of `system-path' and~@
subclassed instances. It is not intendend that this slot be setfable.
:NOTE User code should specialize methods on this function.~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var',
`system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'(setf system-path)
"A no-op when attempting to set class allocated slot value `system-path' of DBC-SYSTEM.~%~@
The value of the the `system-path' slot affects _all_ instances of `system-path' and~@
subclassed instances.~%
:NOTE It is not intendend that this slot be directly setfable!~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var',
`system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'system-described
"Describer for instances of subclasses of `system-base'.~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var',
`system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'system-path-var-binding
"Names a variable bound to an object instance.~%~
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var', `system-path-if',
`*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'(setf system-path-var-binding)
"Set the name of a variable bound to an object instance of a class `system-path' or subclasses.~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding', `system-parent-path-ensure', `system-path-xml-dump-dir-ensure', `find-system-path', `system-subdir-init-w-var', `system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'system-path-if
"Set the path for OBJECT if other slots are available and directory exists.~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding', `system-parent-path-ensure', `system-path-xml-dump-dir-ensure', `find-system-path', `system-subdir-init-w-var', `system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(generic-doc #'system-parent-path-ensure
"Ensure the specified parent path for object exists.~%
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding', `system-parent-path-ensure', `system-path-xml-dump-dir-ensure', `find-system-path', `system-subdir-init-w-var', `system-path-if', `*dbc-xml-dump-dir-name*'.~%")
(fundoc 'system-path-xml-dump-dir-ensure
"Verify, bind, create a base system relative directory for dbc xml->CLOS.~%~@
Evaluated after the dbc system is loaded.~%~@
Binds value of `dbc:*xml-output-dir*' according to `dbc:*dbc-xml-dump-dir-name*'.
Return non-nil on success.~%~@
:EXAMPLE~%
\(ensure-dbc-xml-dump-dir\)~%~@
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var', `system-path-if',
`*dbc-xml-dump-dir-name*'.~%▶▶▶")
(fundoc 'find-system-path
"Return the pathname-directory of the system.~%~@
Signal an error if system can not be found or its directory does not exist.~%~@
:EXAMPLE~%
\(find-system-path\)~%~@
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var', `system-path-if',
`*dbc-xml-dump-dir-name*'.~%▶▶▶")
(fundoc 'system-subdir-init-w-var
"Make W-VAR an instance of class SYSTEM-SUBDIR.~%~@
WE-VAR is a quoted symbol namimg a variable.
Return value is as per `system-described'.~%~@
Keywords :SUB-NAME and :PARENT-PATH are as per SYSTEM-SUBDIR accessors.~%~@
When SUB-NAME is ommitted default to value of symbol W-VAR.~%~@
When W-VAR is already an instance of class SYSTEM-SUBDIR signal an error.~%~@
:EXAMPLE~%
\(system-subdir-init-w-var '*dbc-notes-dir*
:parent-path \(system-base-path *system-path*\)\)~%~@
:SEE-ALSO `system-base-path', `system-described', `system-path-var-binding',
`system-parent-path-ensure', `system-path-xml-dump-dir-ensure',
`find-system-path', `system-subdir-init-w-var', `system-path-if',
`*dbc-xml-dump-dir-name*'.~%▶▶▶")
;;; ==============================
;; /dbc-classes/dbc-class-regexps.lisp
;;; ==============================
(fundoc 'make-entity-regexp-subclass-allocation-if
"Verify the keyword arguments for `make-entity-regexp-subclass-allocation'.~%~@
If any of the following constraints are not met signal an error.~%~@
Args MATCH-ENTITY-CLASS, MATCH-ENTITY-DB, and MATCH-MATCHER-DB must each be
non-nil.~%~@
Arg MATCH-ENTITY-CLASS must a class which returns non-nil when given as the
argument to `cl:find-class'.~%~@
Args MATCH-ENTITY-DB and MATCH-MATCHER-DB must each satisfy `cl:hash-table-p'.~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `<XREF>'.~%▶▶▶")
(fundoc 'make-entity-regexp-subclass-allocation
"Instantiate an instance of the ENTITY-REGEXP-SUBCLASS-ALLOCATION class.~%
Keyword MATCH-ENTITY-CLASS is the class-name of an isntance that matchers of a
subclass of the ENTITY-REGEXP class will match.~%
Keyword MATCH-ENTITY-DB is a symbol naming a special variable the value of
which is a table mapping key/value pairs of the form:~%
match-container-uuid entity-instance-uuid~%~@
Keyword MATCH-MATCHER-DB is a symbol naming a special variable the value of
which is a table mapping key/value pairs of the form:~%
match-container-uuid match-entity-matcher~%~@
:EXAMPLE~%~@
{ ... <EXAMPLE> ... } ~%~@
:SEE-ALSO `<XREF>'.~%▶▶▶")
(generic-doc #'regexp-match-entity-class
"Get the entity-class for OBJ.~%~
:SEE-ALSO `entity-regexp-subclass-allocation', `entity-regexp',
`regexp-match-entity-class', `regexp-match-entity-db',
`regexp-match-matcher-db', `regexp-match-container-type',
`regexp-match-container-uuid', `regexp-matcher'.~%▶▶▶~%")
(generic-doc #'regexp-match-entity-db
"Get the entity-db lookup table for OBJ.~%~
:SEE-ALSO `entity-regexp-subclass-allocation', `entity-regexp',
`regexp-match-entity-class', `regexp-match-entity-db',
`regexp-match-matcher-db', `regexp-match-container-type',
`regexp-match-container-uuid', `regexp-matcher'.~%▶▶▶~%")
(generic-doc #'regexp-match-matcher-db
"Return the matcher-db lookup table for OBJ.~%~
:SEE-ALSO `entity-regexp-subclass-allocation', `entity-regexp',
`regexp-match-entity-class', `regexp-match-entity-db',
`regexp-match-matcher-db', `regexp-match-container-type',
`regexp-match-container-uuid', `regexp-matcher'.~%▶▶▶~%")
(generic-doc #'regexp-match-container-type
"Get the container type for OBJ's matcher.~%~
:SEE-ALSO `entity-regexp', `regexp-match-entity-class',
`regexp-match-entity-db', `regexp-match-matcher-db',
`regexp-match-container-type', `regexp-match-container-uuid',
`regexp-matcher'.~%▶▶▶~%")
(generic-doc #'(setf regexp-match-container-type)
"Set the CONTAINER-TYPE for OBJ matcher.^~%~@
:SEE-ALSO `entity-regexp', `regexp-match-entity-class',
`regexp-match-entity-db', `regexp-match-matcher-db',
`regexp-match-container-type', `regexp-match-container-uuid',
`regexp-matcher'.~%▶▶▶~%")
(generic-doc #'regexp-match-container-uuid
"Return the UUID of the container holding a matcher for OBJ.~%~
:SEE-ALSO `entity-regexp', `regexp-match-entity-class',
`regexp-match-entity-db', `regexp-match-matcher-db',
`regexp-match-container-type', `regexp-match-container-uuid',
`regexp-matcher'.~%▶▶▶~%")
(generic-doc #'(setf regexp-match-container-uuid)
"Set the match-container-uuid for the container holding OBJ's matcher.~%~
Specializers should take special care to ensure that they don't overwrite an existing UUID.~%~
An OBJ's UUID should be treated as an immutable constant in almost all circumstances.~%~
Therefor, the intent of this function is to mediate generation of UUID's run~%~
:after initialize-instance and/or when an instance is obsoleted with~%~
`cl:make-instances-obsolete'.~%~
:SEE-ALSO `entity-regexp', `regexp-match-entity-class',
`regexp-match-entity-db', `regexp-match-matcher-db',
`regexp-match-container-type', `regexp-match-container-uuid',
`regexp-matcher'.~%▶▶▶~%")
(generic-doc #'regexp-matcher
"Get OBJ's matcher.~%~
:SEE-ALSO `entity-regexp', `regexp-match-entity-class',
`regexp-match-entity-db', `regexp-match-matcher-db',
`regexp-match-container-type', `regexp-match-container-uuid',
`regexp-matcher'.~%▶▶▶~%")
(generic-doc #'(setf regexp-matcher)
"Set OBJ's matcher.~%~
Speacializers should take care to verify that matcher can be contained of its~%~
specified container type.~%
:SEE-ALSO `entity-regexp', `regexp-match-entity-class',
`regexp-match-entity-db', `regexp-match-matcher-db',
`regexp-match-container-type', `regexp-match-container-uuid',
`regexp-matcher'.~%▶▶▶~%")
(vardoc '*naf-entity-artist-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type `naf-entity-artist'.~%
:SEE-ALSO
`naf-entity-artist-control-regexp', `naf-entity-artist-alt-regexp',
`naf-entity-artist-regexp', `*category-entity-regexp-db*',
`*theme-entity-regexp-db*', `*media-entity-regexp-db*',
`*location-entity-regexp-db*', `*parsed-field-name-regexp-db*',
`*naf-entity-artist-regexp-db*', `*naf-entity-person-regexp-db*',
`*naf-entity-author-regexp-db*', `*naf-entity-brand-regexp-db*',
`*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*naf-entity-person-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type `naf-entity-person'.~%
:SEE-ALSO `naf-entity-person-control-regexp', `naf-entity-person-alt-regexp',
`*category-entity-regexp-db*', `*theme-entity-regexp-db*',
`*media-entity-regexp-db*', `*location-entity-regexp-db*',
`*parsed-field-name-regexp-db*', `*naf-entity-artist-regexp-db*',
`*naf-entity-person-regexp-db*', `*naf-entity-author-regexp-db*',
`*naf-entity-brand-regexp-db*', `*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*naf-entity-author-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type `naf-entity-author'.~%
:SEE-ALSO `naf-entity-author-control-regexp', `naf-entity-author-alt-regexp',
`*category-entity-regexp-db*', `*theme-entity-regexp-db*',
`*media-entity-regexp-db*', `*location-entity-regexp-db*',
`*parsed-field-name-regexp-db*', `*naf-entity-artist-regexp-db*',
`*naf-entity-person-regexp-db*', `*naf-entity-author-regexp-db*',
`*naf-entity-brand-regexp-db*', `*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*naf-entity-brand-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type `naf-entity-brand'.~%
:SEE-ALSO`naf-entity-brand-control-regexp', `naf-entity-brand-alt-regexp',
`*category-entity-regexp-db*', `*theme-entity-regexp-db*',
`*media-entity-regexp-db*', `*location-entity-regexp-db*',
`*parsed-field-name-regexp-db*', `*naf-entity-artist-regexp-db*',
`*naf-entity-person-regexp-db*', `*naf-entity-author-regexp-db*',
`*naf-entity-brand-regexp-db*', `*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*naf-entity-publication-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type `naf-entity-publication'.~%
:SEE-ALSO `naf-entity-publication-control-regexp', `naf-entity-publication-alt-regexp',
`*category-entity-regexp-db*', `*theme-entity-regexp-db*',
`*media-entity-regexp-db*', `*location-entity-regexp-db*',
`*parsed-field-name-regexp-db*', `*naf-entity-artist-regexp-db*',
`*naf-entity-person-regexp-db*', `*naf-entity-author-regexp-db*',
`*naf-entity-brand-regexp-db*', `*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*category-entity-regexp-db*
"Lookup table containing regexps for nameforms identifying category entities.~%
:SEE-ALSO `category-entity-regexp', `*category-entity-regexp-db*',
`*theme-entity-regexp-db*', `*media-entity-regexp-db*',
`*location-entity-regexp-db*', `*parsed-field-name-regexp-db*',
`*naf-entity-artist-regexp-db*', `*naf-entity-person-regexp-db*',
`*naf-entity-author-regexp-db*', `*naf-entity-brand-regexp-db*',
`*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*theme-entity-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type theme.~%
:SEE-ALSO `theme-entity-regexp', `*category-entity-regexp-db*',
`*theme-entity-regexp-db*', `*media-entity-regexp-db*',
`*location-entity-regexp-db*', `*parsed-field-name-regexp-db*',
`*naf-entity-artist-regexp-db*', `*naf-entity-person-regexp-db*',
`*naf-entity-author-regexp-db*', `*naf-entity-brand-regexp-db*',
`*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*media-entity-regexp-db*
"Lookup table containing regexps for nameforms identifying entities of type media.~%
:SEE-ALSO `media-entity-regexp', `*category-entity-regexp-db*',
`*theme-entity-regexp-db*', `*media-entity-regexp-db*',
`*location-entity-regexp-db*', `*parsed-field-name-regexp-db*',
`*naf-entity-artist-regexp-db*', `*naf-entity-person-regexp-db*',
`*naf-entity-author-regexp-db*', `*naf-entity-brand-regexp-db*',
`*naf-entity-publication-regexp-db*'.~%▶▶▶")
(vardoc '*location-entity-regexp-db*
"Lookup table containing regexps for nameforms identifying naf-entities of type `naf-entity-location'.~%
:SEE-ALSO `location-entity-regexp', `*category-entity-regexp-db*',
`*theme-entity-regexp-db*', `*media-entity-regexp-db*',
`*location-entity-regexp-db*', `*parsed-field-name-regexp-db*',
`*naf-entity-artist-regexp-db*', `*naf-entity-person-regexp-db*',
`*naf-entity-author-regexp-db*', `*naf-entity-brand-regexp-db*',
`*naf-entity-publication-regexp-db*'.~%▶▶▶")
;; unused/deprecated
(vardoc '*parsed-field-name-regexp-db*
"DEPRECATED intent was to use a lookup of regexps for matching when parsing fiedl names.~%
:SEE-ALSO `parsed-field-name-regexp', `*category-entity-regexp-db*',
`*theme-entity-regexp-db*', `*media-entity-regexp-db*',
`*location-entity-regexp-db*', `*parsed-field-name-regexp-db*',
`*naf-entity-artist-regexp-db*', `*naf-entity-person-regexp-db*',
`*naf-entity-author-regexp-db*', `*naf-entity-brand-regexp-db*',
`*naf-entity-publication-regexp-db*'.~%▶▶▶")
;;; ==============================
;;; :SPECIALS-PARSED-CLASS-HASH-TABLES
;;; ==============================
(vardoc '*parsed-class-parse-table*
"Table mapping symbols which subclass `parsed-class' to a corresponding
hash-table of parsed xml-data for that subclass.~%~@
For use with `load-sax-parsed-xml-file-to-parsed-class-hash',
`write-sax-parsed-class-hash-to-files', and functions defined with
`def-parsed-class-record-xml-dump-file-and-hash'.~%~@
:EXAMPLE~%
\(gethash 'parsed-inventory-record *parsed-class-parse-table*\)~%
\(gethash 'parsed-inventory-sales-order-record *parsed-class-parse-table*\)~%~@
:SEE-ALSO `*parsed-class-field-slot-accessor-mapping-table*'.~%▶▶▶")
(vardoc '*parsed-class-field-slot-accessor-mapping-table*
"Big table mapping parsed-class symbols to instances of class `parsed-class-field-slot-accessor-mapping'.~%~@
Its keys name object instances which subclass the class `parsed-class'.~%~@
Its values are an instance of three slots:~%~% ~
parsed-class-mapped -- a sybmol naming a parsed-class~% ~
field-to-accessor-table -- a hash-table mapping field-names to slot-accessors~% ~
accessor-to-field-table -- a hash-table mapping slot-accessors to field-names~%~@
For use with the macro `def-set-parsed-class-record-slot-value' which is used to
define functions which map setf slot-value forms for use with `string-case:string-case'.~%~@
:SEE-ALSO `make-parsed-class-field-slot-accessor-mapping', `*parsed-class-parse-table*'.~%▶▶▶")
;;; ==============================
;; dbc-specific/dbc-classes/dbc-class-parsed-slot-value-cleaning.lisp
;;; ==============================
(fundoc 'parsed-class-slot-value-sort-unique-numeric-string-sequence
"Return a copy of STRING-SEQUENCE sorted according to TEST.~%
STRING-SEQUENCE is a list or simple-vector.~%
When STRING-SEQUENCE has length zerop return it, else each element of
string-sequence must be a non-empty string with 0 every character satsifying
cl:digit-char-p such that the parse-integer representation of string is a unique
integer value for the set of parse-integer elements represented by
STRING-SEQUENCE, an error is signalled if not (possibly leaving
STRING-SEQUENCE in a corrupted state).~%~@
Keyword TEST is a function either #'> or #'<. An error is signaled if not.~%~@
:EXAMPLE~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence '\(\"1\" \"1000\" \"100\" \"0002\"\) :test #'>\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence '\(\"1\" \"1000\" \"100\" \"0002\"\) :test #'>\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence #\(\"1\" \"1000\" \"100\" \"0002\"\) :test #'<\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence #\(\"1\" \"1000\" \"100\" \"0002\"\) :test #'>\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence \(\) :test #'<\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence #\(\) :test #'<\)~%~@
Following error succesfully:~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence #\(\"1\" \"1000\" \"100\" \"0002\"\) :test #'<=\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence '\(\"\" \"1000\" \"100\" \"0002\"\) :test #'>\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence '\(\"1.8\" \"1000\" \"100\" \"0002\"\) :test #'>\)~%
\(parsed-class-slot-value-sort-unique-numeric-string-sequence #\(\"1\" \"1000\" \"100\" \"0001\" \"0002\"\) :test #'>\)~%~@
:SEE-ALSO `parsed-class-slot-value-compare-count', `parsed-class-slot-value-count-null',
`parsed-class-slot-value-count-non-null', `parsed-class-slot-value-count-string=',
`parsed-class-slot-value-count-eql', `parsed-class-slot-value-count-equal',
`parsed-class-slot-value-count-equalp', `parsed-class-slot-value-count-string/=',
`parsed-class-slot-value-count-not-eql', `parsed-class-slot-value-count-not-equal',
`parsed-class-slot-value-count-not-equalp', `parsed-class-slot-value-always-string=',
`parsed-class-slot-value-always-null', `parsed-class-slot-value-always-eql',
`parsed-class-slot-value-always-equal', `parsed-class-slot-value-always-equalp',
`parsed-class-slot-value-never-null', `parsed-class-slot-value-never-string=',
`parsed-class-slot-value-never-eql', `parsed-class-slot-value-never-equal',
`parsed-class-slot-value-never-equalp', `parsed-class-slot-value-thereis-null',
`parsed-class-slot-value-thereis-string=', `parsed-class-slot-value-thereis-eql',
`parsed-class-slot-value-thereis-equal', `parsed-class-slot-value-thereis-equalp',
`parsed-class-slot-value-collect-all', `parsed-class-slot-value-collect-string=',
`parsed-class-slot-value-collect-string/=', `parsed-class-slot-value-collect-null',
`parsed-class-slot-value-collect-non-null', `parsed-class-slot-value-collect-eql',
`parsed-class-slot-value-collect-equal', `parsed-class-slot-value-collect-equalp',
`parsed-class-slot-value-collect-not-eql', `parsed-class-slot-value-collect-not-equal',
`parsed-class-slot-value-collect-not-equalp', `parsed-class-slot-value-set-when-null',
`parsed-class-slot-value-set-when-string=', `parsed-class-slot-value-set-when-eql',
`parsed-class-slot-value-set-when-equal', `parsed-class-slot-value-set-when-equalp',
`parsed-class-slot-value-set-when-string/=', `parsed-class-set-slot-value-from-consed-pairs'.~%▶▶▶")
(fundoc 'parsed-class-set-slot-value-from-consed-pairs
"HASH-KEY-AND-NEW-VALUE is a list of conses of the form:~%
\(<HASH-KEY> . <NEW-VALUE>\)~%
:NOTE !BE CAREFUL! This function does not check `slot-exists-p' `slot-boundp' and
does not discriminate wrt whether <NEW-VALUE> is appropriate for SLOT-NAME.
:SEE-ALSO `parsed-class-slot-value-collect-string=',`parsed-class-slot-value-set-when-string=',
`parsed-class-slot-value-collect-string/=',`parsed-class-set-slot-value-from-consed-pairs',
`parsed-class-slot-value-compare-count',`parsed-class-slot-value-count-string/=',
`oparsed-class-slot-value-count-string=', `parsed-class-slot-value-count-null',
`parsed-class-slot-value-count-non-null', `parsed-class-slot-value-count-eql',
`parsed-class-slot-value-count-equal', `parsed-class-slot-value-count-equalp',
`parsed-class-slot-value-count-not-eql',`parsed-class-slot-value-count-not-equal',
`parsed-class-slot-value-count-not-equalp',`parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-string=', `parsed-class-slot-value-always-null',
`parsed-class-slot-value-always-eql', `parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-equalp', `parsed-class-slot-value-never-null',
`parsed-class-slot-value-never-string=', `parsed-class-slot-value-never-eql',
`parsed-class-slot-value-never-equal', `parsed-class-slot-value-never-equalp',
`parsed-class-slot-value-thereis-null',`parsed-class-slot-value-thereis-string=',
`parsed-class-slot-value-thereis-eql',`parsed-class-slot-value-thereis-equal',
`parsed-class-slot-value-thereis-equalp'.~%▶▶▶")
(fundoc 'parsed-class-slot-value-collect-string/=
"<DOCSTR> ~%~@
:EXAMPLE~%~@
\(parsed-class-slot-value-collect-string/= 'parsed-inventory-record 'category-entity-0-coref \"Natural History\"\) ~%~@
`parsed-class-slot-value-sort-unique-numeric-string-sequence',
`parsed-class-slot-value-collect-slot-values-using-slot-list',
`parsed-class-slot-value-collect-all', `parsed-class-slot-value-collect-equalp',
:SEE-ALSO `parsed-class-slot-value-collect-string=',`parsed-class-slot-value-set-when-string=',
`parsed-class-slot-value-collect-string/=',`parsed-class-set-slot-value-from-consed-pairs',
`parsed-class-slot-value-compare-count',`parsed-class-slot-value-count-string/=',
`oparsed-class-slot-value-count-string=', `parsed-class-slot-value-count-null',
`parsed-class-slot-value-count-non-null', `parsed-class-slot-value-count-eql',
`parsed-class-slot-value-count-equal', `parsed-class-slot-value-count-equalp',
`parsed-class-slot-value-count-not-eql',`parsed-class-slot-value-count-not-equal',
`parsed-class-slot-value-count-not-equalp',`parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-string=', `parsed-class-slot-value-always-null',
`parsed-class-slot-value-always-eql', `parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-equalp', `parsed-class-slot-value-never-null',
`parsed-class-slot-value-never-string=', `parsed-class-slot-value-never-eql',
`parsed-class-slot-value-never-equal', `parsed-class-slot-value-never-equalp',
`parsed-class-slot-value-thereis-null',`parsed-class-slot-value-thereis-string=',
`parsed-class-slot-value-thereis-eql',`parsed-class-slot-value-thereis-equal',
`parsed-class-slot-value-thereis-equalp'.~%▶▶▶")
(fundoc 'parsed-class-slot-value-thereis-equalp
"<DOCSTR> ~%~@
:EXAMPLE~%~@
\(parsed-class-slot-value-thereis-equalp 'parsed-inventory-record 'publication-date '\(:YEAR 1932 :MONTH 12 :DAY NIL\)\) ~%~@
`parsed-class-slot-value-sort-unique-numeric-string-sequence',
`parsed-class-slot-value-collect-slot-values-using-slot-list',
`parsed-class-slot-value-collect-all', `parsed-class-slot-value-collect-equalp',
:SEE-ALSO `parsed-class-slot-value-collect-string=',`parsed-class-slot-value-set-when-string=',
`parsed-class-slot-value-collect-string/=',`parsed-class-set-slot-value-from-consed-pairs',
`parsed-class-slot-value-compare-count',`parsed-class-slot-value-count-string/=',
`oparsed-class-slot-value-count-string=', `parsed-class-slot-value-count-null',
`parsed-class-slot-value-count-non-null', `parsed-class-slot-value-count-eql',
`parsed-class-slot-value-count-equal', `parsed-class-slot-value-count-equalp',
`parsed-class-slot-value-count-not-eql',`parsed-class-slot-value-count-not-equal',
`parsed-class-slot-value-count-not-equalp',`parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-string=', `parsed-class-slot-value-always-null',
`parsed-class-slot-value-always-eql', `parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-equalp', `parsed-class-slot-value-never-null',
`parsed-class-slot-value-never-string=', `parsed-class-slot-value-never-eql',
`parsed-class-slot-value-never-equal', `parsed-class-slot-value-never-equalp',
`parsed-class-slot-value-thereis-null',`parsed-class-slot-value-thereis-string=',
`parsed-class-slot-value-thereis-eql',`parsed-class-slot-value-thereis-equal',
`parsed-class-slot-value-thereis-equalp'.~%▶▶▶")
(fundoc 'parsed-class-slot-value-thereis-equal
"<DOCSTR> ~%~@
:EXAMPLE~%~@
\(parsed-class-slot-value-thereis-equal 'parsed-inventory-record 'publication-date '\(:YEAR 1932 :MONTH 12 :DAY NIL\)\) ~%~@
:SEE-ALSO `parsed-class-slot-value-collect-string=',`parsed-class-slot-value-set-when-string=',
`parsed-class-slot-value-collect-string/=',`parsed-class-set-slot-value-from-consed-pairs',
`parsed-class-slot-value-compare-count',`parsed-class-slot-value-count-string/=',
`oparsed-class-slot-value-count-string=', `parsed-class-slot-value-count-null',
`parsed-class-slot-value-count-non-null', `parsed-class-slot-value-count-eql',
`parsed-class-slot-value-count-equal', `parsed-class-slot-value-count-equalp',
`parsed-class-slot-value-count-not-eql',`parsed-class-slot-value-count-not-equal',
`parsed-class-slot-value-count-not-equalp',`parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-string=', `parsed-class-slot-value-always-null',
`parsed-class-slot-value-always-eql', `parsed-class-slot-value-always-equal',
`parsed-class-slot-value-always-equalp', `parsed-class-slot-value-never-null',
`parsed-class-slot-value-never-string=', `parsed-class-slot-value-never-eql',
`parsed-class-slot-value-never-equal', `parsed-class-slot-value-never-equalp',
`parsed-class-slot-value-thereis-null',`parsed-class-slot-value-thereis-string=',
`parsed-class-slot-value-thereis-eql',`parsed-class-slot-value-thereis-equal',
`parsed-class-slot-value-thereis-equalp',
`parsed-class-slot-value-sort-unique-numeric-string-sequence',