aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3dv/cgi_sql_common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3dv/cgi_sql_common.rb')
-rw-r--r--lib/sisu/v3dv/cgi_sql_common.rb56
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/sisu/v3dv/cgi_sql_common.rb b/lib/sisu/v3dv/cgi_sql_common.rb
index 15adf2f5..59844d2b 100644
--- a/lib/sisu/v3dv/cgi_sql_common.rb
+++ b/lib/sisu/v3dv/cgi_sql_common.rb
@@ -230,7 +230,7 @@ module SiSU_CGI_SQL
end
def search_request
<<-'WOK_SQL'
- class Search_request #% search_for
+ class SearchRequest #% search_for
attr_accessor :text1,:fulltext,:keywords,:title,:author,:topic_register,:subject,:description,:publisher,:editor,:contributor,:date,:type,:format,:identifier,:source,:language,:relation,:coverage,:rights,:comment,:abstract,:owner,:date_created,:date_issued,:date_modified,:date_available,:date_valid,:filename
def initialize(search_field='',q='')
@search_field,@q=search_field,q
@@ -326,7 +326,7 @@ module SiSU_CGI_SQL
end
def search_statement_common
<<-'WOK_SQL'
- class Dbi_search_statement
+ class DBI_SearchStatement
attr_reader :text_search_flag,:sql_select_body_format,:sql_select_endnotes_format,:sql_offset,:sql_limit
def initialize(conn,search_for,q,c)
@conn=conn
@@ -336,114 +336,114 @@ module SiSU_CGI_SQL
#@offset+=@@limit
search={ :text => [], :endnotes => [] }
cse=(c =~/\S/) ? true : false
- st=Dbi_search_string.new('doc_objects.clean',search_for.text1,q['s1'],cse).string
- se=Dbi_search_string.new('endnotes.clean',search_for.text1,q['s1'],cse).string
+ st=DBI_SearchString.new('doc_objects.clean',search_for.text1,q['s1'],cse).string
+ se=DBI_SearchString.new('endnotes.clean',search_for.text1,q['s1'],cse).string
@text_search_flag=st[:flag]
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << se[:search]
end
- st=Dbi_search_string.new('metadata_and_text.fulltext',search_for.fulltext,q['ft'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.fulltext',search_for.fulltext,q['ft'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_keywords',search_for.keywords,q['key'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_keywords',search_for.keywords,q['key'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.title',search_for.title,q['ti'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.title',search_for.title,q['ti'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.creator_author',search_for.author,q['au'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.creator_author',search_for.author,q['au'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_topic_register',search_for.topic_register,q['tr'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_topic_register',search_for.topic_register,q['tr'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_subject',search_for.subject,q['sj'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_subject',search_for.subject,q['sj'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.notes_description',search_for.description,q['dsc'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.notes_description',search_for.description,q['dsc'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.publisher',search_for.publisher,q['pb'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.publisher',search_for.publisher,q['pb'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.creator_editor',search_for.editor,q['cntr'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.creator_editor',search_for.editor,q['cntr'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.creator_contributor',search_for.contributor,q['cntr'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.creator_contributor',search_for.contributor,q['cntr'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.date_published',search_for.date,q['dt'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.date_published',search_for.date,q['dt'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_type',search_for.type,q['ty'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_type',search_for.type,q['ty'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_identifier',search_for.identifier,q['id'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_identifier',search_for.identifier,q['id'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.original_source',search_for.source,q['src'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.original_source',search_for.source,q['src'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.language_document_char',search_for.language,q['lang'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.language_document_char',search_for.language,q['lang'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_relation',search_for.relation,q['rel'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_relation',search_for.relation,q['rel'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.classify_coverage',search_for.coverage,q['cov'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.classify_coverage',search_for.coverage,q['cov'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.rights_all',search_for.rights,q['cr'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.rights_all',search_for.rights,q['cr'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.notes_comment',search_for.comment,q['co'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.notes_comment',search_for.comment,q['co'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.notes_abstract',search_for.abstract,q['ab'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.notes_abstract',search_for.abstract,q['ab'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
end
- st=Dbi_search_string.new('metadata_and_text.src_filename',search_for.filename,q['fns'],cse).string
+ st=DBI_SearchString.new('metadata_and_text.src_filename',search_for.filename,q['fns'],cse).string
if st[:flag]
search[:text] << st[:search]
search[:endnotes] << st[:search]
@@ -539,7 +539,7 @@ module SiSU_CGI_SQL
WOK_SQL
end
def tail
- v=SiSU_Env::Info_version.instance.get_version
+ v=SiSU_Env::InfoVersion.instance.get_version
<<-WOK_SQL
def tail
<<-'WOK'
@@ -703,7 +703,7 @@ module SiSU_CGI_SQL
def main2
<<-'WOK_SQL'
search_field=cgi['find'] if cgi['find'] # =~/\S+/
- @search_for=Search_request.new(search_field,q) #.analyze #% search_for
+ @search_for=SearchRequest.new(search_field,q) #.analyze #% search_for
#% searches
#Canned_search.new(@base,@search_for.text1,cgi)
if @search_for.text1=~/\S+/ or @search_for.fulltext=~/\S+/ or @search_for.author=~/\S+/ or @search_for.topic_register=~/\S+/ #and search_field =~/\S/
@@ -819,7 +819,7 @@ module SiSU_CGI_SQL
@search[:endnotes]<<%{endnotes.clean~*'#{CGI.unescape(s1)}'}
end
#% dbi_request
- dbi_statement=Dbi_search_statement.new(@conn,@search_for,q,checked_case)
+ dbi_statement=DBI_SearchStatement.new(@conn,@search_for,q,checked_case)
@text_search_flag=false
@text_search_flag=dbi_statement.text_search_flag
s_contents=dbi_statement.contents