Class: SiSU_DbCreate::Comment

Inherits:
SiSU_DbColumns::Columns show all
Defined in:
lib/sisu/db_create.rb

Instance Method Summary collapse

Methods inherited from SiSU_DbColumns::Columns

#classify_dewey, #classify_keywords, #classify_loc, #classify_subject, #classify_topic_register, #column, #column_comment, #create_column, #creator_audio, #creator_author, #creator_author_honorific, #creator_author_nationality, #creator_contributor, #creator_digitized_by, #creator_editor, #creator_illustrator, #creator_photographer, #creator_prepared_by, #creator_translator, #creator_video, #date_added_to_site, #date_available, #date_created, #date_generated, #date_issued, #date_modified, #date_original_publication, #date_published, #date_translated, #date_valid, #fulltext, #identifier_isbn, #identifier_oclc, #language_document, #language_document_char, #language_original, #language_original_char, #links, #name, #notes_abstract, #notes_comment, #notes_coverage, #notes_description, #notes_format, #notes_history, #notes_prefix, #notes_prefix_a, #notes_prefix_b, #notes_relation, #notes_suffix, #notes_type, #original_institution, #original_language, #original_language_char, #original_nationality, #original_publisher, #original_source, #publisher, #rights_all, #rights_copyright_audio, #rights_copyright_digitization, #rights_copyright_illustrations, #rights_copyright_photographs, #rights_copyright_preparation, #rights_copyright_text, #rights_copyright_translation, #rights_copyright_video, #rights_license, #src_filename, #src_filesize, #src_fingerprint, #src_txt, #src_word_count, #title, #title_edition, #title_language, #title_language_char, #title_main, #title_note, #title_short, #title_sub, #tuple

Methods inherited from SiSU_DbText::Prepare

#clean_document_objects_body, #clean_searchable_text_from_document_objects, #clean_searchable_text_from_document_source, #special_character_escape, #strip_markup, #unique_words

Constructor Details

#initialize(conn, sql_type = :pg) ⇒ Comment

Returns a new instance of Comment.



421
422
423
424
425
# File 'lib/sisu/db_create.rb', line 421

def initialize(conn,sql_type=:pg)
  @conn=conn
  if sql_type == :pg then psql
  end
end

Instance Method Details

#conn_execute_array(sql_arr) ⇒ Object



427
428
429
430
431
432
433
# File 'lib/sisu/db_create.rb', line 427

def conn_execute_array(sql_arr)
  @conn.transaction do |conn|
    sql_arr.each do |sql|
      conn.exec_params(sql)
    end
  end
end

#doc_objectsObject



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
# File 'lib/sisu/db_create.rb', line 520

def doc_objects
  sql_arr=[
    %{COMMENT ON Table doc_objects
      IS 'contains searchable text of SiSU document objects';},
    %{COMMENT ON COLUMN doc_objects.lid
      IS 'unique';},
    %{COMMENT ON COLUMN doc_objects.metadata_tid
      IS 'tie to title in metadata_and_text';},
    %{COMMENT ON COLUMN doc_objects.lev_an
      IS 'doc level A-D 1-4';},
    %{COMMENT ON COLUMN doc_objects.lev
      IS 'doc level 0-7 \d\~';},
    %{COMMENT ON COLUMN doc_objects.seg
      IS 'segment name from level number 4 (lv 1)';},
    %{COMMENT ON COLUMN doc_objects.ocn
      IS 'object citation number';},
    %{COMMENT ON COLUMN doc_objects.en_a
      IS 'first endnote number in text object (eg. NULL or 34) (used with en_z to create range)';},
    %{COMMENT ON COLUMN doc_objects.en_z
      IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a to create range)';},
    %{COMMENT ON COLUMN doc_objects.en_a_asterisk
      IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_asterisk to create range)';},
    %{COMMENT ON COLUMN doc_objects.en_z_asterisk
      IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_asterisk to create range)';},
    %{COMMENT ON COLUMN doc_objects.en_a_plus
      IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_plus to create range)';},
    %{COMMENT ON COLUMN doc_objects.en_z_plus
      IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_plus to create range)';},
    %{COMMENT ON COLUMN doc_objects.types
      IS 'document types seg scroll';},
    %{COMMENT ON COLUMN doc_objects.clean
      IS 'text object - substantive text: clean, stripped of markup';},
    %{COMMENT ON COLUMN doc_objects.body
      IS 'text object - substantive text: light html markup';},
    %{COMMENT ON COLUMN doc_objects.book_idx
      IS 'book index creation information for paragraph, if provided';},
    %{COMMENT ON COLUMN doc_objects.lev0
      IS 'document structure, level number 0';},
    %{COMMENT ON COLUMN doc_objects.lev1
      IS 'document structure, level number 1';},
    %{COMMENT ON COLUMN doc_objects.lev2
      IS 'document structure, level number 2';},
    %{COMMENT ON COLUMN doc_objects.lev3
      IS 'document structure, level number 3';},
    %{COMMENT ON COLUMN doc_objects.lev4
      IS 'document structure, level number 4';},
    %{COMMENT ON COLUMN doc_objects.lev5
      IS 'document structure, level number 5';},
    %{COMMENT ON COLUMN doc_objects.lev6
      IS 'document structure, level number 6';},
    %{COMMENT ON COLUMN doc_objects.lev7
      IS 'document structure, level number 7';},
    %{COMMENT ON COLUMN doc_objects.t_of
      IS 'document structure, type of object (object is of)';},
    %{COMMENT ON COLUMN doc_objects.t_is
      IS 'document structure, object is';},
    %{COMMENT ON COLUMN doc_objects.node
      IS 'document structure, object node if heading';},
    %{COMMENT ON COLUMN doc_objects.parent
      IS 'document structure, object parent (is a heading)';}
  ]
  conn_execute_array(sql_arr)
end

#endnotesObject



583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# File 'lib/sisu/db_create.rb', line 583

def endnotes
  sql_arr=[
    %{COMMENT ON Table endnotes
      IS 'contains searchable text of SiSU documents endnotes';},
    %{COMMENT ON COLUMN endnotes.nid
      IS 'unique';},
    %{COMMENT ON COLUMN endnotes.document_lid
      IS 'ties to text block from which referenced';},
    %{COMMENT ON COLUMN endnotes.nr
      IS 'endnote number <!e_(\d+)!>';},
    %{COMMENT ON COLUMN endnotes.clean
      IS 'endnote substantive content, stripped of markup';},
    %{COMMENT ON COLUMN endnotes.body
      IS 'endnote substantive content';},
    %{COMMENT ON COLUMN endnotes.ocn
      IS 'object citation no# <\~(\d+)> from which endnote is referenced';},
    %{COMMENT ON COLUMN doc_objects.metadata_tid
      IS 'tie to title in metadata_and_text - unique for each document';}
  ]
  conn_execute_array(sql_arr)
end

#endnotes_asteriskObject



604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
# File 'lib/sisu/db_create.rb', line 604

def endnotes_asterisk
  sql_arr=[
    %{COMMENT ON Table endnotes_asterisk
      IS 'contains searchable text of SiSU documents endnotes marked with asterisk';},
    %{COMMENT ON COLUMN endnotes_asterisk.nid
      IS 'unique';},
    %{COMMENT ON COLUMN endnotes_asterisk.document_lid
      IS 'ties to text block from which referenced';},
    %{COMMENT ON COLUMN endnotes_asterisk.nr
      IS 'endnote number <!e_(\d+)!>';},
    %{COMMENT ON COLUMN endnotes_asterisk.clean
      IS 'endnote substantive content, stripped of markup';},
    %{COMMENT ON COLUMN endnotes_asterisk.body
      IS 'endnote substantive content';},
    %{COMMENT ON COLUMN endnotes_asterisk.ocn
      IS 'object citation no# <\~(\d+)> from which endnote is referenced';},
    %{COMMENT ON COLUMN doc_objects.metadata_tid
      IS 'tie to title in metadata_and_text - unique for each document';}
  ]
  conn_execute_array(sql_arr)
end

#endnotes_plusObject



625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/sisu/db_create.rb', line 625

def endnotes_plus
  sql_arr=[
    %{COMMENT ON Table endnotes_plus
      IS 'contains searchable text of SiSU documents endnotes marked with plus';},
    %{COMMENT ON COLUMN endnotes_plus.nid
      IS 'unique';},
    %{COMMENT ON COLUMN endnotes_plus.document_lid
      IS 'ties to text block from which referenced';},
    %{COMMENT ON COLUMN endnotes_plus.nr
      IS 'endnote number <!e_(\d+)!>';},
    %{COMMENT ON COLUMN endnotes_plus.clean
      IS 'endnote substantive content, stripped of markup';},
    %{COMMENT ON COLUMN endnotes_plus.body
      IS 'endnote substantive content';},
    %{COMMENT ON COLUMN endnotes_plus.ocn
      IS 'object citation no# <\~(\d+)> from which endnote is referenced';},
    %{COMMENT ON COLUMN doc_objects.metadata_tid
      IS 'tie to title in metadata_and_text - unique for each document';},
  ]
  conn_execute_array(sql_arr)
end

#metadata_and_textObject



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
# File 'lib/sisu/db_create.rb', line 434

def 
  sql_arr=[
    %{COMMENT ON Table metadata_and_text
      IS 'contains SiSU metadata and fulltext for search (including source .sst if shared)';},
    %{COMMENT ON COLUMN metadata_and_text.tid
      IS 'unique';},
    %{#{column.title.column_comment}},
    %{#{column.title_main.column_comment}},
    %{#{column.title_sub.column_comment}},
    %{#{column.title_short.column_comment}},
    %{#{column.title_edition.column_comment}},
    %{#{column.title_note.column_comment}},
    %{#{column.title_language.column_comment}},
    %{#{column.title_language_char.column_comment}},
    %{#{column.creator_author.column_comment}},
    %{#{column.creator_author_honorific.column_comment}},
    %{#{column.creator_author_nationality.column_comment}},
    %{#{column.creator_editor.column_comment}},
    %{#{column.creator_contributor.column_comment}},
    %{#{column.creator_illustrator.column_comment}},
    %{#{column.creator_photographer.column_comment}},
    %{#{column.creator_translator.column_comment}},
    %{#{column.creator_prepared_by.column_comment}},
    %{#{column.creator_digitized_by.column_comment}},
    %{#{column.creator_audio.column_comment}},
    %{#{column.creator_video.column_comment}},
    %{#{column.language_document.column_comment}},
    %{#{column.language_document_char.column_comment}},
    %{#{column.language_original.column_comment}},
    %{#{column.language_original_char.column_comment}},
    %{#{column.date_added_to_site.column_comment}},
    %{#{column.date_available.column_comment}},
    %{#{column.date_created.column_comment}},
    %{#{column.date_issued.column_comment}},
    %{#{column.date_modified.column_comment}},
    %{#{column.date_published.column_comment}},
    %{#{column.date_valid.column_comment}},
    %{#{column.date_translated.column_comment}},
    %{#{column.date_original_publication.column_comment}},
    %{#{column.date_generated.column_comment}},
    %{#{column.publisher.column_comment}},
    %{#{column.original_publisher.column_comment}},
    %{#{column.original_language.column_comment}},
    %{#{column.original_language_char.column_comment}},
    %{#{column.original_source.column_comment}},
    %{#{column.original_institution.column_comment}},
    %{#{column.original_nationality.column_comment}},
    %{#{column.rights_all.column_comment}},
    %{#{column.rights_copyright_text.column_comment}},
    %{#{column.rights_copyright_translation.column_comment}},
    %{#{column.rights_copyright_illustrations.column_comment}},
    %{#{column.rights_copyright_photographs.column_comment}},
    %{#{column.rights_copyright_preparation.column_comment}},
    %{#{column.rights_copyright_digitization.column_comment}},
    %{#{column.rights_copyright_audio.column_comment}},
    %{#{column.rights_copyright_video.column_comment}},
    %{#{column.rights_license.column_comment}},
    %{#{column.classify_topic_register.column_comment}},
    %{#{column.classify_subject.column_comment}},
    %{#{column.classify_loc.column_comment}},
    %{#{column.classify_dewey.column_comment}},
    %{#{column.classify_keywords.column_comment}},
    %{#{column.identifier_oclc.column_comment}},
    %{#{column.identifier_isbn.column_comment}},
    %{#{column.notes_abstract.column_comment}},
    %{#{column.notes_comment.column_comment}},
    %{#{column.notes_description.column_comment}},
    %{#{column.notes_history.column_comment}},
    %{#{column.notes_coverage.column_comment}},
    %{#{column.notes_relation.column_comment}},
    %{#{column.notes_type.column_comment}},
    %{#{column.notes_format.column_comment}},
    %{#{column.notes_prefix.column_comment}},
    %{#{column.notes_prefix_a.column_comment}},
    %{#{column.notes_prefix_b.column_comment}},
    %{#{column.notes_suffix.column_comment}},
    %{#{column.src_filename.column_comment}},
    %{#{column.src_fingerprint.column_comment}},
    %{#{column.src_filesize.column_comment}},
    %{#{column.src_word_count.column_comment}},
    %{#{column.src_txt.column_comment}},
    %{#{column.fulltext.column_comment}},
    %{#{column.links.column_comment}},
  ]
  conn_execute_array(sql_arr)
end

#psqlObject



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
# File 'lib/sisu/db_create.rb', line 426

def psql
  def conn_execute_array(sql_arr)
    @conn.transaction do |conn|
      sql_arr.each do |sql|
        conn.exec_params(sql)
      end
    end
  end
  def 
    sql_arr=[
      %{COMMENT ON Table metadata_and_text
        IS 'contains SiSU metadata and fulltext for search (including source .sst if shared)';},
      %{COMMENT ON COLUMN metadata_and_text.tid
        IS 'unique';},
      %{#{column.title.column_comment}},
      %{#{column.title_main.column_comment}},
      %{#{column.title_sub.column_comment}},
      %{#{column.title_short.column_comment}},
      %{#{column.title_edition.column_comment}},
      %{#{column.title_note.column_comment}},
      %{#{column.title_language.column_comment}},
      %{#{column.title_language_char.column_comment}},
      %{#{column.creator_author.column_comment}},
      %{#{column.creator_author_honorific.column_comment}},
      %{#{column.creator_author_nationality.column_comment}},
      %{#{column.creator_editor.column_comment}},
      %{#{column.creator_contributor.column_comment}},
      %{#{column.creator_illustrator.column_comment}},
      %{#{column.creator_photographer.column_comment}},
      %{#{column.creator_translator.column_comment}},
      %{#{column.creator_prepared_by.column_comment}},
      %{#{column.creator_digitized_by.column_comment}},
      %{#{column.creator_audio.column_comment}},
      %{#{column.creator_video.column_comment}},
      %{#{column.language_document.column_comment}},
      %{#{column.language_document_char.column_comment}},
      %{#{column.language_original.column_comment}},
      %{#{column.language_original_char.column_comment}},
      %{#{column.date_added_to_site.column_comment}},
      %{#{column.date_available.column_comment}},
      %{#{column.date_created.column_comment}},
      %{#{column.date_issued.column_comment}},
      %{#{column.date_modified.column_comment}},
      %{#{column.date_published.column_comment}},
      %{#{column.date_valid.column_comment}},
      %{#{column.date_translated.column_comment}},
      %{#{column.date_original_publication.column_comment}},
      %{#{column.date_generated.column_comment}},
      %{#{column.publisher.column_comment}},
      %{#{column.original_publisher.column_comment}},
      %{#{column.original_language.column_comment}},
      %{#{column.original_language_char.column_comment}},
      %{#{column.original_source.column_comment}},
      %{#{column.original_institution.column_comment}},
      %{#{column.original_nationality.column_comment}},
      %{#{column.rights_all.column_comment}},
      %{#{column.rights_copyright_text.column_comment}},
      %{#{column.rights_copyright_translation.column_comment}},
      %{#{column.rights_copyright_illustrations.column_comment}},
      %{#{column.rights_copyright_photographs.column_comment}},
      %{#{column.rights_copyright_preparation.column_comment}},
      %{#{column.rights_copyright_digitization.column_comment}},
      %{#{column.rights_copyright_audio.column_comment}},
      %{#{column.rights_copyright_video.column_comment}},
      %{#{column.rights_license.column_comment}},
      %{#{column.classify_topic_register.column_comment}},
      %{#{column.classify_subject.column_comment}},
      %{#{column.classify_loc.column_comment}},
      %{#{column.classify_dewey.column_comment}},
      %{#{column.classify_keywords.column_comment}},
      %{#{column.identifier_oclc.column_comment}},
      %{#{column.identifier_isbn.column_comment}},
      %{#{column.notes_abstract.column_comment}},
      %{#{column.notes_comment.column_comment}},
      %{#{column.notes_description.column_comment}},
      %{#{column.notes_history.column_comment}},
      %{#{column.notes_coverage.column_comment}},
      %{#{column.notes_relation.column_comment}},
      %{#{column.notes_type.column_comment}},
      %{#{column.notes_format.column_comment}},
      %{#{column.notes_prefix.column_comment}},
      %{#{column.notes_prefix_a.column_comment}},
      %{#{column.notes_prefix_b.column_comment}},
      %{#{column.notes_suffix.column_comment}},
      %{#{column.src_filename.column_comment}},
      %{#{column.src_fingerprint.column_comment}},
      %{#{column.src_filesize.column_comment}},
      %{#{column.src_word_count.column_comment}},
      %{#{column.src_txt.column_comment}},
      %{#{column.fulltext.column_comment}},
      %{#{column.links.column_comment}},
    ]
    conn_execute_array(sql_arr)
  end
  def doc_objects
    sql_arr=[
      %{COMMENT ON Table doc_objects
        IS 'contains searchable text of SiSU document objects';},
      %{COMMENT ON COLUMN doc_objects.lid
        IS 'unique';},
      %{COMMENT ON COLUMN doc_objects.metadata_tid
        IS 'tie to title in metadata_and_text';},
      %{COMMENT ON COLUMN doc_objects.lev_an
        IS 'doc level A-D 1-4';},
      %{COMMENT ON COLUMN doc_objects.lev
        IS 'doc level 0-7 \d\~';},
      %{COMMENT ON COLUMN doc_objects.seg
        IS 'segment name from level number 4 (lv 1)';},
      %{COMMENT ON COLUMN doc_objects.ocn
        IS 'object citation number';},
      %{COMMENT ON COLUMN doc_objects.en_a
        IS 'first endnote number in text object (eg. NULL or 34) (used with en_z to create range)';},
      %{COMMENT ON COLUMN doc_objects.en_z
        IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a to create range)';},
      %{COMMENT ON COLUMN doc_objects.en_a_asterisk
        IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_asterisk to create range)';},
      %{COMMENT ON COLUMN doc_objects.en_z_asterisk
        IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_asterisk to create range)';},
      %{COMMENT ON COLUMN doc_objects.en_a_plus
        IS 'first endnote number in text object (eg. NULL or 34) (used with en_z_plus to create range)';},
      %{COMMENT ON COLUMN doc_objects.en_z_plus
        IS 'last endnote number within text object (eg. NULL, 34 or say 47) (used with en_a_plus to create range)';},
      %{COMMENT ON COLUMN doc_objects.types
        IS 'document types seg scroll';},
      %{COMMENT ON COLUMN doc_objects.clean
        IS 'text object - substantive text: clean, stripped of markup';},
      %{COMMENT ON COLUMN doc_objects.body
        IS 'text object - substantive text: light html markup';},
      %{COMMENT ON COLUMN doc_objects.book_idx
        IS 'book index creation information for paragraph, if provided';},
      %{COMMENT ON COLUMN doc_objects.lev0
        IS 'document structure, level number 0';},
      %{COMMENT ON COLUMN doc_objects.lev1
        IS 'document structure, level number 1';},
      %{COMMENT ON COLUMN doc_objects.lev2
        IS 'document structure, level number 2';},
      %{COMMENT ON COLUMN doc_objects.lev3
        IS 'document structure, level number 3';},
      %{COMMENT ON COLUMN doc_objects.lev4
        IS 'document structure, level number 4';},
      %{COMMENT ON COLUMN doc_objects.lev5
        IS 'document structure, level number 5';},
      %{COMMENT ON COLUMN doc_objects.lev6
        IS 'document structure, level number 6';},
      %{COMMENT ON COLUMN doc_objects.lev7
        IS 'document structure, level number 7';},
      %{COMMENT ON COLUMN doc_objects.t_of
        IS 'document structure, type of object (object is of)';},
      %{COMMENT ON COLUMN doc_objects.t_is
        IS 'document structure, object is';},
      %{COMMENT ON COLUMN doc_objects.node
        IS 'document structure, object node if heading';},
      %{COMMENT ON COLUMN doc_objects.parent
        IS 'document structure, object parent (is a heading)';}
    ]
    conn_execute_array(sql_arr)
  end
  def endnotes
    sql_arr=[
      %{COMMENT ON Table endnotes
        IS 'contains searchable text of SiSU documents endnotes';},
      %{COMMENT ON COLUMN endnotes.nid
        IS 'unique';},
      %{COMMENT ON COLUMN endnotes.document_lid
        IS 'ties to text block from which referenced';},
      %{COMMENT ON COLUMN endnotes.nr
        IS 'endnote number <!e_(\d+)!>';},
      %{COMMENT ON COLUMN endnotes.clean
        IS 'endnote substantive content, stripped of markup';},
      %{COMMENT ON COLUMN endnotes.body
        IS 'endnote substantive content';},
      %{COMMENT ON COLUMN endnotes.ocn
        IS 'object citation no# <\~(\d+)> from which endnote is referenced';},
      %{COMMENT ON COLUMN doc_objects.metadata_tid
        IS 'tie to title in metadata_and_text - unique for each document';}
    ]
    conn_execute_array(sql_arr)
  end
  def endnotes_asterisk
    sql_arr=[
      %{COMMENT ON Table endnotes_asterisk
        IS 'contains searchable text of SiSU documents endnotes marked with asterisk';},
      %{COMMENT ON COLUMN endnotes_asterisk.nid
        IS 'unique';},
      %{COMMENT ON COLUMN endnotes_asterisk.document_lid
        IS 'ties to text block from which referenced';},
      %{COMMENT ON COLUMN endnotes_asterisk.nr
        IS 'endnote number <!e_(\d+)!>';},
      %{COMMENT ON COLUMN endnotes_asterisk.clean
        IS 'endnote substantive content, stripped of markup';},
      %{COMMENT ON COLUMN endnotes_asterisk.body
        IS 'endnote substantive content';},
      %{COMMENT ON COLUMN endnotes_asterisk.ocn
        IS 'object citation no# <\~(\d+)> from which endnote is referenced';},
      %{COMMENT ON COLUMN doc_objects.metadata_tid
        IS 'tie to title in metadata_and_text - unique for each document';}
    ]
    conn_execute_array(sql_arr)
  end
  def endnotes_plus
    sql_arr=[
      %{COMMENT ON Table endnotes_plus
        IS 'contains searchable text of SiSU documents endnotes marked with plus';},
      %{COMMENT ON COLUMN endnotes_plus.nid
        IS 'unique';},
      %{COMMENT ON COLUMN endnotes_plus.document_lid
        IS 'ties to text block from which referenced';},
      %{COMMENT ON COLUMN endnotes_plus.nr
        IS 'endnote number <!e_(\d+)!>';},
      %{COMMENT ON COLUMN endnotes_plus.clean
        IS 'endnote substantive content, stripped of markup';},
      %{COMMENT ON COLUMN endnotes_plus.body
        IS 'endnote substantive content';},
      %{COMMENT ON COLUMN endnotes_plus.ocn
        IS 'object citation no# <\~(\d+)> from which endnote is referenced';},
      %{COMMENT ON COLUMN doc_objects.metadata_tid
        IS 'tie to title in metadata_and_text - unique for each document';},
    ]
    conn_execute_array(sql_arr)
  end
  def urls
    sql_arr=[
      %{COMMENT ON Table urls
        IS 'contains base url links to different SiSU output';},
      %{COMMENT ON COLUMN doc_objects.metadata_tid
        IS 'tie to title in metadata_and_text - unique for each document, the mapping of rows is one to one';},
      %{COMMENT ON COLUMN urls.plaintext
        IS 'plaintext utf-8';},
      %{COMMENT ON COLUMN urls.html_toc
        IS 'table of contents for segmented html document';},
      %{COMMENT ON COLUMN urls.html_doc
        IS 'html document (scroll)';},
      %{COMMENT ON COLUMN urls.xhtml
        IS 'xhtml document (scroll)';},
      %{COMMENT ON COLUMN urls.xml_sax
        IS 'xml sax oriented document (scroll)';},
      %{COMMENT ON COLUMN urls.xml_dom
        IS 'xml dom oriented document (scroll)';},
      %{COMMENT ON COLUMN urls.odf
        IS 'opendocument format text';},
      %{COMMENT ON COLUMN urls.pdf_p
        IS 'pdf portrait';},
      %{COMMENT ON COLUMN urls.pdf_l
        IS 'pdf landscape';},
      %{COMMENT ON COLUMN urls.concordance
        IS 'rudimentary document index linked to html';},
      %{COMMENT ON COLUMN urls.latex_p
        IS 'latex portrait';},
      %{COMMENT ON COLUMN urls.latex_l
        IS 'latex_landscape';},
      %{COMMENT ON COLUMN urls.markup
        IS 'markup';},
      %{COMMENT ON COLUMN urls.sisupod
        IS 'SiSU document format .tgz (all SiSU information on document)';},
    ]
    conn_execute_array(sql_arr)
  end
  self
end

#urlsObject



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
# File 'lib/sisu/db_create.rb', line 646

def urls
  sql_arr=[
    %{COMMENT ON Table urls
      IS 'contains base url links to different SiSU output';},
    %{COMMENT ON COLUMN doc_objects.metadata_tid
      IS 'tie to title in metadata_and_text - unique for each document, the mapping of rows is one to one';},
    %{COMMENT ON COLUMN urls.plaintext
      IS 'plaintext utf-8';},
    %{COMMENT ON COLUMN urls.html_toc
      IS 'table of contents for segmented html document';},
    %{COMMENT ON COLUMN urls.html_doc
      IS 'html document (scroll)';},
    %{COMMENT ON COLUMN urls.xhtml
      IS 'xhtml document (scroll)';},
    %{COMMENT ON COLUMN urls.xml_sax
      IS 'xml sax oriented document (scroll)';},
    %{COMMENT ON COLUMN urls.xml_dom
      IS 'xml dom oriented document (scroll)';},
    %{COMMENT ON COLUMN urls.odf
      IS 'opendocument format text';},
    %{COMMENT ON COLUMN urls.pdf_p
      IS 'pdf portrait';},
    %{COMMENT ON COLUMN urls.pdf_l
      IS 'pdf landscape';},
    %{COMMENT ON COLUMN urls.concordance
      IS 'rudimentary document index linked to html';},
    %{COMMENT ON COLUMN urls.latex_p
      IS 'latex portrait';},
    %{COMMENT ON COLUMN urls.latex_l
      IS 'latex_landscape';},
    %{COMMENT ON COLUMN urls.markup
      IS 'markup';},
    %{COMMENT ON COLUMN urls.sisupod
      IS 'SiSU document format .tgz (all SiSU information on document)';},
  ]
  conn_execute_array(sql_arr)
end