diff --git a/CREDITS b/CREDITS index 7e29415c8..bd6e479c0 100644 --- a/CREDITS +++ b/CREDITS @@ -1,90 +1,94 @@ CDS Invenio CREDITS =================== Revision: $Id$ Several people outside the CDS Invenio Development Team contributed to the project: - Thierry Thomas Patches for compiling old CDSware 0.3.x sources on FreeBSD. - Guido Pelzer Contributions to the German translation. German stopword list. - Valerio Gracco Contributions to the Italian translation. - Tullio Basaglia Contributions to the Italian translation. - Flavio C. Coelho Contributions to the Portuguese translation. - Lyuba Vasilevskaya Contributions to the Russian translation. - Maria Gomez Marti Contributions to the Spanish translation. - Magaly Bascones Dominguez Contributions to the Spanish translation. - Urban Andersson Contributions to the Swedish translation. - Eric Grand Contributions to the French translation. - Theodoros Theodoropoulos Contributions to the Greek translation, Greek stopword list. - Vasyl Ostrovskyi Contributions to the Ukrainian translation. - Ferran Jorba Contributions to the Catalan and Spanish translations. Cleanup of the old PHP-based BibFormat Admin Guide. Several minor patches. - Beatriu Piera Translation of the Search Guide into Catalan and Spanish. - Anonymous contributor (name withheld by request) Contributions to the Japanese translation. - Anonymous contributor (name withheld by request) Contributions to the Spanish translation. - Alen Vodopijevec Contributions to the Croatian translation. - Jasna Marković Contributions to the Croatian translation. - Kam-ming Ku Contributions to the Chinese translations (zh_CN, zh_TW). - Benedikt Koeppel Contributions to the German translation. - Toru Tsuboyama Contributions to the Japanese translation. - Mike Marino Several minor patches and suggestions. The web session management and the URL handler were inspired by the Quixote Web Framework which is ``Copyright (c) 2004 Corporation for National Research Initiatives; All Rights Reserved''. Javascript Quicktags scripts from Alex King are used to provide additional capabilities to the edition of BibFormat templates through the web admin interface. The indexer engine uses the Martin Porter Stemming Algorithm and its Vivake Gupta free Python implementation. +The CSS style for rounded corners box used in detailed record pages +adapted from Francky Lleyneman liquidcorners CSS. + + - end of file - diff --git a/modules/bibformat/etc/format_templates/Default_HTML_actions.bft b/modules/bibformat/etc/format_templates/Default_HTML_actions.bft new file mode 100644 index 000000000..6f937c57d --- /dev/null +++ b/modules/bibformat/etc/format_templates/Default_HTML_actions.bft @@ -0,0 +1,9 @@ +Actions HTML detailed +Output the various actions available on a record + + + \ No newline at end of file diff --git a/modules/bibformat/etc/format_templates/Default_HTML_detailed.bft b/modules/bibformat/etc/format_templates/Default_HTML_detailed.bft index f778342e9..9b782e546 100644 --- a/modules/bibformat/etc/format_templates/Default_HTML_detailed.bft +++ b/modules/bibformat/etc/format_templates/Default_HTML_detailed.bft @@ -1,44 +1,41 @@ Default HTML detailed This is the default HTML detailed format. - - + + + +


- - -

- +
\ No newline at end of file diff --git a/modules/bibformat/etc/format_templates/Default_HTML_files.bft b/modules/bibformat/etc/format_templates/Default_HTML_files.bft new file mode 100644 index 000000000..b4a3a8758 --- /dev/null +++ b/modules/bibformat/etc/format_templates/Default_HTML_files.bft @@ -0,0 +1,4 @@ +Default HTML files +Outputs the available files for a record + + diff --git a/modules/bibformat/etc/format_templates/Default_HTML_references.bft b/modules/bibformat/etc/format_templates/Default_HTML_references.bft new file mode 100644 index 000000000..0db1bfed7 --- /dev/null +++ b/modules/bibformat/etc/format_templates/Default_HTML_references.bft @@ -0,0 +1,8 @@ +Default HTML References +Outputs the references of a record + +
+ +
+ + \ No newline at end of file diff --git a/modules/bibformat/etc/format_templates/Makefile.am b/modules/bibformat/etc/format_templates/Makefile.am index e96754fa4..ba6eae967 100644 --- a/modules/bibformat/etc/format_templates/Makefile.am +++ b/modules/bibformat/etc/format_templates/Makefile.am @@ -1,40 +1,42 @@ ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. etcdir = $(sysconfdir)/bibformat/format_templates etc_DATA = Default_HTML_captions.bft Picture_HTML_brief.bft \ Default_HTML_detailed.bft Default_HTML_portfolio.bft \ Picture_HTML_detailed.bft Default_HTML_brief.bft \ BibTeX.bft MARCXML.bft Excel.bft \ Default_HTML_similarity.bft \ EndNote.bft EndNote.bfx \ DC.bft DC.bfx \ NLM.bft NLM.bfx \ RSS.bft RSS.bfx \ MARCXML.bfx \ - OAI_DC.xsl DC.xsl + OAI_DC.xsl DC.xsl\ + Default_HTML_references.bft Default_HTML_files.bft \ + Default_HTML_actions.bft tmpdir = $(prefix)/var/tmp tmp_DATA = Test1.bft Test3.bft Test_2.bft Test_no_template.test EXTRA_DIST = $(etc_DATA) $(tmp_DATA) CLEANFILES = *.tmp diff --git a/modules/bibformat/etc/format_templates/Picture_HTML_detailed.bft b/modules/bibformat/etc/format_templates/Picture_HTML_detailed.bft index 879e06c6c..0f52fca8e 100644 --- a/modules/bibformat/etc/format_templates/Picture_HTML_detailed.bft +++ b/modules/bibformat/etc/format_templates/Picture_HTML_detailed.bft @@ -1,60 +1,62 @@ Picture HTML detailed The detailed HTML format suitable for displaying pictures. - +
+
+
+

-
+
© CERN Geneva: The use of photos requires prior authorization (from CERN copyright). The words CERN Photo must be quoted for each use.
+
\ No newline at end of file diff --git a/modules/bibformat/etc/output_formats/HDACT.bfo b/modules/bibformat/etc/output_formats/HDACT.bfo new file mode 100644 index 000000000..a01bccb9b --- /dev/null +++ b/modules/bibformat/etc/output_formats/HDACT.bfo @@ -0,0 +1 @@ +default: Default_HTML_actions.bft diff --git a/modules/bibformat/etc/output_formats/HDFILE.bfo b/modules/bibformat/etc/output_formats/HDFILE.bfo new file mode 100644 index 000000000..95b1c11b1 --- /dev/null +++ b/modules/bibformat/etc/output_formats/HDFILE.bfo @@ -0,0 +1 @@ +default: Default_HTML_files.bft \ No newline at end of file diff --git a/modules/bibformat/etc/output_formats/HDREF.bfo b/modules/bibformat/etc/output_formats/HDREF.bfo new file mode 100644 index 000000000..8b946d081 --- /dev/null +++ b/modules/bibformat/etc/output_formats/HDREF.bfo @@ -0,0 +1 @@ +default: Default_HTML_references.bft \ No newline at end of file diff --git a/modules/bibformat/etc/output_formats/Makefile.am b/modules/bibformat/etc/output_formats/Makefile.am index c0c3bdc42..d3096ed82 100644 --- a/modules/bibformat/etc/output_formats/Makefile.am +++ b/modules/bibformat/etc/output_formats/Makefile.am @@ -1,33 +1,34 @@ ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. etcdir = $(sysconfdir)/bibformat/output_formats etc_DATA = HB.bfo HC.bfo HD.bfo HP.bfo HX.bfo XM.bfo EXCEL.bfo \ XD.bfo HS.bfo \ XE.bfo XN.bfo XR.bfo \ - XOAIDC.bfo + XOAIDC.bfo \ + HDREF.bfo HDFILE.bfo HDACT.bfo tmpdir = $(prefix)/var/tmp tmp_DATA = TEST1.bfo TEST2.bfo TEST3.bfo EXTRA_DIST = $(etc_DATA) $(tmp_DATA) CLEANFILES = *.tmp diff --git a/modules/bibformat/lib/bibformat_engine.py b/modules/bibformat/lib/bibformat_engine.py index b1877b560..bc791d34a 100644 --- a/modules/bibformat/lib/bibformat_engine.py +++ b/modules/bibformat/lib/bibformat_engine.py @@ -1,1932 +1,1943 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """ Formats a single XML Marc record using specified format. There is no API for the engine. Instead use bibformat.py. SEE: bibformat.py, bibformat_utils.py """ __revision__ = "$Id$" import re import sys import os import inspect import traceback import zlib import cgi from invenio.config import \ CFG_PATH_PHP, \ bindir, \ cdslang from invenio.errorlib import \ register_errors, \ get_msgs_for_code_list from invenio.bibrecord import \ create_record, \ record_get_field_instances, \ record_get_field_value, \ record_get_field_values from invenio.bibformat_xslt_engine import format from invenio.dbquery import run_sql from invenio.messages import \ language_list_long, \ wash_language from invenio import bibformat_dblayer from invenio.bibformat_config import \ CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION, \ CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION, \ CFG_BIBFORMAT_TEMPLATES_PATH, \ CFG_BIBFORMAT_ELEMENTS_PATH, \ CFG_BIBFORMAT_OUTPUTS_PATH, \ CFG_BIBFORMAT_ELEMENTS_IMPORT_PATH from bibformat_utils import \ record_get_xml, \ parse_tag from invenio.htmlutils import HTMLWasher -from xml.dom import minidom #Remove when call_old_bibformat is removed - +if CFG_PATH_PHP: #Remove when call_old_bibformat is removed + from xml.dom import minidom + import tempfile + # Cache for data we have already read and parsed format_templates_cache = {} format_elements_cache = {} format_outputs_cache = {} kb_mappings_cache = {} cdslangs = language_list_long() html_field = '' # String indicating that field should be # treated as HTML (and therefore no escaping of # HTML tags should occur. # Appears in some field values. washer = HTMLWasher() # Used to remove dangerous tags from HTML # sources # Regular expression for finding ... tag in format templates pattern_lang = re.compile(r''' #closing start tag (?P.*?) #anything but the next group (greedy) () #end tag ''', re.IGNORECASE | re.DOTALL | re.VERBOSE) # Builds regular expression for finding each known language in tags ln_pattern_text = r"<(" for lang in cdslangs: ln_pattern_text += lang[0] +r"|" ln_pattern_text = ln_pattern_text.rstrip(r"|") ln_pattern_text += r")>(.*?)" ln_pattern = re.compile(ln_pattern_text) # Regular expression for finding tag in format templates pattern_format_template_name = re.compile(r''' #closing start tag (?P.*?) #name value. any char that is not end tag ()(\n)? #end tag ''', re.IGNORECASE | re.DOTALL | re.VERBOSE) # Regular expression for finding tag in format templates pattern_format_template_desc = re.compile(r''' #closing start tag (?P.*?) #description value. any char that is not end tag (\n)? #end tag ''', re.IGNORECASE | re.DOTALL | re.VERBOSE) # Regular expression for finding tags in format templates pattern_tag = re.compile(r''' [^/\s]+) #any char but a space or slash \s* #any number of spaces (?P(\s* #params here (?P([^=\s])*)\s* #param name: any chars that is not a white space or equality. Followed by space(s) =\s* #equality: = followed by any number of spaces (?P[\'"]) #one of the separators (?P.*?) #param value: any chars that is not a separator like previous one (?P=sep) #same separator as starting one )*) #many params \s* #any number of spaces (/)?> #end of the tag ''', re.IGNORECASE | re.DOTALL | re.VERBOSE) # Regular expression for finding params inside tags in format templates pattern_function_params = re.compile(''' (?P([^=\s])*)\s* # Param name: any chars that is not a white space or equality. Followed by space(s) =\s* # Equality: = followed by any number of spaces (?P[\'"]) # One of the separators (?P.*?) # Param value: any chars that is not a separator like previous one (?P=sep) # Same separator as starting one ''', re.VERBOSE | re.DOTALL ) # Regular expression for finding format elements "params" attributes # (defined by @param) pattern_format_element_params = re.compile(''' @param\s* # Begins with @param keyword followed by space(s) (?P[^\s=]*)\s* # A single keyword, and then space(s) #(=\s*(?P[\'"]) # Equality, space(s) and then one of the separators #(?P.*?) # Default value: any chars that is not a separator like previous one #(?P=sep) # Same separator as starting one #)?\s* # Default value for param is optional. Followed by space(s) (?P.*) # Any text that is not end of line (thanks to MULTILINE parameter) ''', re.VERBOSE | re.MULTILINE) # Regular expression for finding format elements "see also" attribute # (defined by @see) pattern_format_element_seealso = re.compile('''@see\s*(?P.*)''', re.VERBOSE | re.MULTILINE) #Regular expression for finding 2 expressions in quotes, separated by #comma (as in template("1st","2nd") ) #Used when parsing output formats ## pattern_parse_tuple_in_quotes = re.compile(''' ## (?P[\'"]) ## (?P.*) ## (?P=sep1) ## \s*,\s* ## (?P[\'"]) ## (?P.*) ## (?P=sep2) ## ''', re.VERBOSE | re.MULTILINE) def call_old_bibformat(recID, format="HD", on_the_fly=False, verbose=0): """ FIXME: REMOVE FUNCTION WHEN MIGRATION IS DONE Calls BibFormat for the record RECID in the desired output format FORMAT. @param on_the_fly if False, try to return an already preformatted version of the record in the database Note: this functions always try to return HTML, so when bibformat returns XML with embedded HTML format inside the tag FMT $g, as is suitable for prestoring output formats, we perform un-XML-izing here in order to return HTML body only. """ out = "" res = [] if not on_the_fly: # look for formatted notice existence: query = "SELECT value, last_updated FROM bibfmt WHERE "\ "id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it if verbose == 9: last_updated = res[0][1] out += """\n
Found preformatted output for record %i (cache updated on %s). """ % (recID, last_updated) decompress = zlib.decompress return "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', # so try to call BibFormat on the fly or use default format: if verbose == 9: out += """\n
Formatting record %i on-the-fly with old BibFormat.
""" % recID - pipe_input, pipe_output, pipe_error = os.popen3(["%s/bibformat" % bindir, - "otype=%s" % format], - 'rw') +## pipe_input, pipe_output, pipe_error = os.popen3(["%s/bibformat" % bindir, +## "otype=%s" % format], +## 'rw') # Retrieve MARCXML # Build it on-the-fly only if 'call_old_bibformat' was called # with format=xm and on_the_fly=True xm_record = record_get_xml(recID, 'xm', on_the_fly=(on_the_fly and format == 'xm')) - pipe_input.write(xm_record) - pipe_input.close() - bibformat_output = pipe_output.read() - pipe_output.close() - pipe_error.close() + (result_code, result_path) = tempfile.mkstemp() + command = "( %s/bibformat otype=%s ) > %s" % (bindir, format, result_path) + (xm_code, xm_path) = tempfile.mkstemp() + open(xm_path, "w").write(xm_record) + command = command + " <" + xm_path + os.system(command) + bibformat_output = open(result_path,"r").read() + os.remove(result_path) + os.remove(xm_path) +## pipe_input.write(xm_record) +## pipe_input.close() +## bibformat_output = pipe_output.read() +## pipe_output.close() +## pipe_error.close() if bibformat_output.startswith(""): dom = minidom.parseString(bibformat_output) for e in dom.getElementsByTagName('subfield'): if e.getAttribute('code') == 'g': for t in e.childNodes: out += t.data.encode('utf-8') else: out += bibformat_output return out def format_record(recID, of, ln=cdslang, verbose=0, search_pattern=[], xml_record=None, uid=None): """ Formats a record given output format. Main entry function of bibformat engine. Returns a formatted version of the record in the specified language, search pattern, and with the specified output format. The function will define which format template must be applied. You can either specify an record ID to format, or give its xml representation. if 'xml_record' is not None, then use it instead of recID. 'uid' allows to grant access to some functionalities on a page depending on the user's priviledges. @param recID the ID of record to format @param of an output format code (or short identifier for the output format) @param ln the language to use to format the record @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, stop if error in format elements 9: errors and warnings, stop if error (debug mode )) @param search_pattern list of strings representing the user request in web interface @param xml_record an xml string representing the record to format @param uid the user id of the person who will view the formatted page @return formatted record """ out = "" errors_ = [] # Temporary workflow (during migration of formats): # Call new BibFormat # But if format not found for new BibFormat, then call old BibFormat #Create a BibFormat Object to pass that contain record and context bfo = BibFormatObject(recID, ln, search_pattern, xml_record, uid, of) #Find out which format template to use based on record and output format. template = decide_format_template(bfo, of) if verbose == 9 and template is not None: out += """\n
Using %s template for record %i. """ % (template, recID) ############### FIXME: REMOVE WHEN MIGRATION IS DONE ############### path = "%s%s%s" % (CFG_BIBFORMAT_TEMPLATES_PATH, os.sep, template) if template is None or not os.access(path, os.R_OK): # template not found in new BibFormat. Call old one if verbose == 9: if template is None: out += """\n
No template found for output format %s and record %i. (Check invenio.err log file for more details) """ % (of, recID) else: out += """\n
Template %s could not be read. """ % (template) if CFG_PATH_PHP: if verbose == 9: out+= """\n
Using old BibFormat for record %s. """ % recID return out + call_old_bibformat(recID, format=of, on_the_fly=True, verbose=verbose) ############################# END ################################## error = get_msgs_for_code_list([("ERR_BIBFORMAT_NO_TEMPLATE_FOUND", of)], stream='error', ln=cdslang) errors_.append(error) if verbose == 0: register_errors(error, 'error') elif verbose > 5: return out + error[0][1] return out # Format with template (out_, errors) = format_with_format_template(template, bfo, verbose) errors_.extend(errors) out += out_ return out def decide_format_template(bfo, of): """ Returns the format template name that should be used for formatting given output format and BibFormatObject. Look at of rules, and take the first matching one. If no rule matches, returns None To match we ignore lettercase and spaces before and after value of rule and value of record @param bfo a BibFormatObject @param of the code of the output format to use """ output_format = get_output_format(of) for rule in output_format['rules']: value = bfo.field(rule['field']).strip()#Remove spaces pattern = rule['value'].strip() #Remove spaces match_obj = re.match(pattern, value, re.IGNORECASE) if match_obj is not None and \ match_obj.start() == 0 and match_obj.end() == len(value): return rule['template'] template = output_format['default'] if template != '': return template else: return None def format_with_format_template(format_template_filename, bfo, verbose=0, format_template_code=None): """ Format a record given a format template. Also returns errors Returns a formatted version of the record represented by bfo, in the language specified in bfo, and with the specified format template. If format_template_code is provided, the template will not be loaded from format_template_filename (but format_template_filename will still be used to determine if bft or xsl transformation applies). This allows to preview format code without having to save file on disk. @param format_template_filename the dilename of a format template @param bfo the object containing parameters for the current formatting @param format_template_code if not empty, use code as template instead of reading format_template_filename (used for previews) @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @return tuple (formatted text, errors) """ errors_ = [] if format_template_code is not None: format_content = str(format_template_code) else: format_content = get_format_template(format_template_filename)['code'] if format_template_filename is None or \ format_template_filename.endswith("."+CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION): # .bft localized_format = filter_languages(format_content, bfo.lang) (evaluated_format, errors) = eval_format_template_elements(localized_format, bfo, verbose) errors_ = errors else: #.xsl # Fetch MARCXML. On-the-fly xm if we are now formatting in xm xml_record = record_get_xml(bfo.recID, 'xm', on_the_fly=(bfo.format != 'xm')) # Transform MARCXML using stylesheet evaluated_format = format(xml_record, template_source=format_content) return (evaluated_format, errors_) def eval_format_template_elements(format_template, bfo, verbose=0): """ Evalutes the format elements of the given template and replace each element with its value. Also returns errors. Prepare the format template content so that we can directly replace the marc code by their value. This implies: 1) Look for special tags 2) replace special tags by their evaluation @param format_template the format template code @param bfo the object containing parameters for the current formatting @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @return tuple (result, errors) """ errors_ = [] # First define insert_element_code(match), used in re.sub() function def insert_element_code(match): """ Analyses 'match', interpret the corresponding code, and return the result of the evaluation. Called by substitution in 'eval_format_template_elements(...)' @param match a match object corresponding to the special tag that must be interpreted """ function_name = match.group("function_name") try: format_element = get_format_element(function_name, verbose) except Exception, e: if verbose >= 5: return '' + \ cgi.escape(str(e)).replace('\n', '
') + \ '
' if format_element is None: error = get_msgs_for_code_list([("ERR_BIBFORMAT_CANNOT_RESOLVE_ELEMENT_NAME", function_name)], stream='error', ln=cdslang) errors_.append(error) if verbose >= 5: return '' + \ error[0][1]+'' else: params = {} # Look for function parameters given in format template code all_params = match.group('params') if all_params is not None: function_params_iterator = pattern_function_params.finditer(all_params) for param_match in function_params_iterator: name = param_match.group('param') value = param_match.group('value') params[name] = value # Evaluate element with params and return (Do not return errors) (result, errors) = eval_format_element(format_element, bfo, params, verbose) errors_.append(errors) return result # Substitute special tags in the format by our own text. # Special tags have the form format = pattern_tag.sub(insert_element_code, format_template) return (format, errors_) def eval_format_element(format_element, bfo, parameters={}, verbose=0): """ Returns the result of the evaluation of the given format element name, with given BibFormatObject and parameters. Also returns the errors of the evaluation. @param format_element a format element structure as returned by get_format_element @param bfo a BibFormatObject used for formatting @param parameters a dict of parameters to be used for formatting. Key is parameter and value is value of parameter @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @return tuple (result, errors) """ errors = [] #Load special values given as parameters prefix = parameters.get('prefix', "") suffix = parameters.get('suffix', "") default_value = parameters.get('default', "") escape = parameters.get('escape', "") output_text = '' # 3 possible cases: # a) format element file is found: we execute it # b) format element file is not found, but exist in tag table (e.g. bfe_isbn) # c) format element is totally unknown. Do nothing or report error if format_element is not None and format_element['type'] == "python": # a) We found an element with the tag name, of type "python" # Prepare a dict 'params' to pass as parameter to 'format' # function of element params = {} # Look for parameters defined in format element # Fill them with specified default values and values # given as parameters for param in format_element['attrs']['params']: name = param['name'] default = param['default'] params[name] = parameters.get(name, default) # Add BibFormatObject params['bfo'] = bfo # Execute function with given parameters and return result. function = format_element['code'] try: output_text = apply(function, (), params) except Exception, e: name = format_element['attrs']['name'] error = ("ERR_BIBFORMAT_EVALUATING_ELEMENT", name, str(params)) errors.append(error) if verbose == 0: register_errors(errors, 'error') elif verbose >= 5: tb = sys.exc_info()[2] error_string = get_msgs_for_code_list(error, stream='error', ln=cdslang) stack = traceback.format_exception(Exception, e, tb, limit=None) output_text = ''+ \ str(error_string[0][1]) + "".join(stack) +' ' # None can be returned when evaluating function if output_text is None: output_text = "" else: output_text = str(output_text) # Escaping: # (1) By default, everything is escaped in mode 1 # (2) If evaluated element has 'escape_values()' function, use # its returned value as escape mode, and override (1) # (3) If template has a defined parameter (in allowed values), # use it, and override (1) and (2) # (1) escape_mode = 1 # (2) escape_function = format_element['escape_function'] if escape_function is not None: try: escape_mode = apply(escape_function, (), {'bfo': bfo}) except Exception, e: error = ("ERR_BIBFORMAT_EVALUATING_ELEMENT_ESCAPE", name) errors.append(error) if verbose == 0: register_errors(errors, 'error') elif verbose >= 5: tb = sys.exc_info()[2] error_string = get_msgs_for_code_list(error, stream='error', ln=cdslang) output_text += ''+ \ str(error_string[0][1]) +' ' # (3) if escape in ['0', '1']: escape_mode = int(escape) #If escape is equal to 1, then escape all # HTML reserved chars. if escape_mode == 1: output_text = cgi.escape(output_text) # Add prefix and suffix if they have been given as parameters and if # the evaluation of element is not empty if output_text.strip() != "": output_text = prefix + output_text + suffix # Add the default value if output_text is empty if output_text == "": output_text = default_value return (output_text, errors) elif format_element is not None and format_element['type'] == "field": # b) We have not found an element in files that has the tag # name. Then look for it in the table "tag" # # # # Load special values given as parameters separator = parameters.get('separator ', "") nbMax = parameters.get('nbMax', "") escape = parameters.get('escape', "1") # By default, escape here # Get the fields tags that have to be printed tags = format_element['attrs']['tags'] output_text = [] # Get values corresponding to tags for tag in tags: p_tag = parse_tag(tag) values = record_get_field_values(bfo.get_record(), p_tag[0], p_tag[1], p_tag[2], p_tag[3]) if len(values)>0 and isinstance(values[0], dict): #flatten dict to its values only values_list = map(lambda x: x.values(), values) #output_text.extend(values) for values in values_list: output_text.extend(values) else: output_text.extend(values) if nbMax != "": try: nbMax = int(nbMax) output_text = output_text[:nbMax] except: name = format_element['attrs']['name'] error = ("ERR_BIBFORMAT_NBMAX_NOT_INT", name) errors.append(error) if verbose < 5: register_errors(error, 'error') elif verbose >= 5: error_string = get_msgs_for_code_list(error, stream='error', ln=cdslang) output_text = output_text.append(error_string[0][1]) # Add prefix and suffix if they have been given as parameters and if # the evaluation of element is not empty. # If evaluation is empty string, return default value if it exists. # Else return empty string if ("".join(output_text)).strip() != "": # If escape is equal to 1, then escape all # HTML reserved chars. if escape == '1': output_text = cgi.escape(separator.join(output_text)) else: output_text = separator.join(output_text) output_text = prefix + output_text + suffix else: #Return default value output_text = default_value return (output_text, errors) else: # c) Element is unknown error = get_msgs_for_code_list([("ERR_BIBFORMAT_CANNOT_RESOLVE_ELEMENT_NAME", format_element)], stream='error', ln=cdslang) errors.append(error) if verbose < 5: register_errors(error, 'error') return ("", errors) elif verbose >= 5: if verbose >= 9: sys.exit(error[0][1]) return ('' + \ error[0][1]+'', errors) def filter_languages(format_template, ln='en'): """ Filters the language tags that do not correspond to the specified language. @param format_template the format template code @param ln the language that is NOT filtered out from the template @return the format template with unnecessary languages filtered out """ # First define search_lang_tag(match) and clean_language_tag(match), used # in re.sub() function def search_lang_tag(match): """ Searches for the ... tag and remove inner localized tags such as , , that are not current_lang. If current_lang cannot be found inside ... , try to use 'cdslang' @param match a match object corresponding to the special tag that must be interpreted """ current_lang = ln def clean_language_tag(match): """ Return tag text content if tag language of match is output language. Called by substitution in 'filter_languages(...)' @param match a match object corresponding to the special tag that must be interpreted """ if match.group(1) == current_lang: return match.group(2) else: return "" # End of clean_language_tag lang_tag_content = match.group("langs") # Try to find tag with current lang. If it does not exists, # then current_lang becomes cdslang until the end of this # replace pattern_current_lang = re.compile(r"<"+current_lang+ \ "\s*>(.*?)") if re.search(pattern_current_lang, lang_tag_content) is None: current_lang = cdslang cleaned_lang_tag = ln_pattern.sub(clean_language_tag, lang_tag_content) return cleaned_lang_tag # End of search_lang_tag filtered_format_template = pattern_lang.sub(search_lang_tag, format_template) return filtered_format_template def get_format_template(filename, with_attributes=False): """ Returns the structured content of the given formate template. if 'with_attributes' is true, returns the name and description. Else 'attrs' is not returned as key in dictionary (it might, if it has already been loaded previously) {'code':"Some template code" 'attrs': {'name': "a name", 'description': "a description"} } @param filename the filename of an format template @param with_attributes if True, fetch the attributes (names and description) for format' @return strucured content of format template """ # Get from cache whenever possible global format_templates_cache if not filename.endswith("."+CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION) and \ not filename.endswith(".xsl"): return None if format_templates_cache.has_key(filename): # If we must return with attributes and template exist in # cache with attributes then return cache. # Else reload with attributes if with_attributes and \ format_templates_cache[filename].has_key('attrs'): return format_templates_cache[filename] format_template = {'code':""} try: path = "%s%s%s" % (CFG_BIBFORMAT_TEMPLATES_PATH, os.sep, filename) format_file = open(path) format_content = format_file.read() format_file.close() # Load format template code # Remove name and description if filename.endswith("."+CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION): code_and_description = pattern_format_template_name.sub("", format_content) code = pattern_format_template_desc.sub("", code_and_description) else: code = format_content format_template['code'] = code except Exception, e: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_CANNOT_READ_TEMPLATE_FILE", filename, str(e))], stream='error', ln=cdslang) register_errors(errors, 'error') # Save attributes if necessary if with_attributes: format_template['attrs'] = get_format_template_attrs(filename) # Cache and return format_templates_cache[filename] = format_template return format_template def get_format_templates(with_attributes=False): """ Returns the list of all format templates, as dictionary with filenames as keys if 'with_attributes' is true, returns the name and description. Else 'attrs' is not returned as key in each dictionary (it might, if it has already been loaded previously) [{'code':"Some template code" 'attrs': {'name': "a name", 'description': "a description"} }, ... } @param with_attributes if True, fetch the attributes (names and description) for formats """ format_templates = {} files = os.listdir(CFG_BIBFORMAT_TEMPLATES_PATH) for filename in files: if filename.endswith("."+CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION) or \ filename.endswith(".xsl"): format_templates[filename] = get_format_template(filename, with_attributes) return format_templates def get_format_template_attrs(filename): """ Returns the attributes of the format template with given filename The attributes are {'name', 'description'} Caution: the function does not check that path exists or that the format element is valid. @param the path to a format element """ attrs = {} attrs['name'] = "" attrs['description'] = "" try: template_file = open("%s%s%s" % (CFG_BIBFORMAT_TEMPLATES_PATH, os.sep, filename)) code = template_file.read() template_file.close() match = None if filename.endswith(".xsl"): # .xsl attrs['name'] = filename[:-4] else: # .bft match = pattern_format_template_name.search(code) if match is not None: attrs['name'] = match.group('name') else: attrs['name'] = filename match = pattern_format_template_desc.search(code) if match is not None: attrs['description'] = match.group('desc').rstrip('.') except Exception, e: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_CANNOT_READ_TEMPLATE_FILE", filename, str(e))], stream='error', ln=cdslang) register_errors(errors, 'error') attrs['name'] = filename return attrs def get_format_element(element_name, verbose=0, with_built_in_params=False): """ Returns the format element structured content. Return None if element cannot be loaded (file not found, not readable or invalid) The returned structure is {'attrs': {some attributes in dict. See get_format_element_attrs_from_*} 'code': the_function_code, 'type':"field" or "python" depending if element is defined in file or table, 'escape_function': the function to call to know if element output must be escaped} @param element_name the name of the format element to load @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @param with_built_in_params if True, load the parameters built in all elements @return a dictionary with format element attributes """ # Get from cache whenever possible global format_elements_cache errors = [] # Resolve filename and prepare 'name' as key for the cache filename = resolve_format_element_filename(element_name) if filename is not None: name = filename.upper() else: name = element_name.upper() if format_elements_cache.has_key(name): element = format_elements_cache[name] if not with_built_in_params or \ (with_built_in_params and \ element['attrs'].has_key('builtin_params')): return element if filename is None: # Element is maybe in tag table if bibformat_dblayer.tag_exists_for_name(element_name): format_element = {'attrs': get_format_element_attrs_from_table( \ element_name, with_built_in_params), 'code':None, 'escape_function':None, 'type':"field"} # Cache and returns format_elements_cache[name] = format_element return format_element else: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_FORMAT_ELEMENT_NOT_FOUND", element_name)], stream='error', ln=cdslang) if verbose == 0: register_errors(errors, 'error') elif verbose >= 5: sys.stderr.write(errors[0][1]) return None else: format_element = {} module_name = filename if module_name.endswith(".py"): module_name = module_name[:-3] # Load element try: module = __import__(CFG_BIBFORMAT_ELEMENTS_IMPORT_PATH + \ "." + module_name) # Load last module in import path # For eg. load bfe_name in # invenio.bibformat_elements.bfe_name # Used to keep flexibility regarding where elements # directory is (for eg. test cases) components = CFG_BIBFORMAT_ELEMENTS_IMPORT_PATH.split(".") for comp in components[1:]: module = getattr(module, comp) except Exception, e: # We catch all exceptions here, as we just want to print # traceback in all cases tb = sys.exc_info()[2] stack = traceback.format_exception(Exception, e, tb, limit=None) errors = get_msgs_for_code_list([("ERR_BIBFORMAT_IN_FORMAT_ELEMENT", element_name,"\n" + "\n".join(stack[-2:-1]))], stream='error', ln=cdslang) if verbose == 0: register_errors(errors, 'error') elif verbose >= 5: sys.stderr.write(errors[0][1]) if errors: if verbose >= 7: raise Exception, errors[0][1] return None # Load function 'format()' inside element try: function_format = module.__dict__[module_name].format format_element['code'] = function_format except AttributeError, e: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_FORMAT_ELEMENT_FORMAT_FUNCTION", element_name)], stream='warning', ln=cdslang) if verbose == 0: register_errors(errors, 'error') elif verbose >= 5: sys.stderr.write(errors[0][1]) if errors: if verbose >= 7: raise Exception, errors[0][1] return None # Load function 'escape_values()' inside element function_escape = getattr(module.__dict__[module_name], 'escape_values', None) format_element['escape_function'] = function_escape # Prepare, cache and return format_element['attrs'] = get_format_element_attrs_from_function( \ function_format, element_name, with_built_in_params) format_element['type'] = "python" format_elements_cache[name] = format_element return format_element def get_format_elements(with_built_in_params=False): """ Returns the list of format elements attributes as dictionary structure Elements declared in files have priority over element declared in 'tag' table The returned object has this format: {element_name1: {'attrs': {'description':..., 'seealso':... 'params':[{'name':..., 'default':..., 'description':...}, ...] 'builtin_params':[{'name':..., 'default':..., 'description':...}, ...] }, 'code': code_of_the_element }, element_name2: {...}, ...} Returns only elements that could be loaded (not error in code) @return a dict of format elements with name as key, and a dict as attributes @param with_built_in_params if True, load the parameters built in all elements """ format_elements = {} mappings = bibformat_dblayer.get_all_name_tag_mappings() for name in mappings: format_elements[name.upper().replace(" ", "_").strip()] = get_format_element(name, with_built_in_params=with_built_in_params) files = os.listdir(CFG_BIBFORMAT_ELEMENTS_PATH) for filename in files: filename_test = filename.upper().replace(" ", "_") if filename_test.endswith(".PY") and filename.upper() != "__INIT__.PY": if filename_test.startswith("BFE_"): filename_test = filename_test[4:] element_name = filename_test[:-3] element = get_format_element(element_name, with_built_in_params=with_built_in_params) if element is not None: format_elements[element_name] = element return format_elements def get_format_element_attrs_from_function(function, element_name, with_built_in_params=False): """ Returns the attributes of the function given as parameter. It looks for standard parameters of the function, default values and comments in the docstring. The attributes are {'description', 'seealso':['element.py', ...], 'params':{name:{'name', 'default', 'description'}, ...], name2:{}} The attributes are {'name' : "name of element" #basically the name of 'name' parameter 'description': "a string description of the element", 'seealso' : ["element_1.py", "element_2.py", ...] #a list of related elements 'params': [{'name':"param_name", #a list of parameters for this element (except 'bfo') 'default':"default value", 'description': "a description"}, ...], 'builtin_params': {name: {'name':"param_name",#the parameters builtin for all elem of this kind 'default':"default value", 'description': "a description"}, ...}, } @param function the formatting function of a format element @param element_name the name of the element @param with_built_in_params if True, load the parameters built in all elements """ attrs = {} attrs['description'] = "" attrs['name'] = element_name.replace(" ", "_").upper() attrs['seealso'] = [] docstring = function.__doc__ if isinstance(docstring, str): # Look for function description in docstring #match = pattern_format_element_desc.search(docstring) description = docstring.split("@param")[0] description = description.split("@see")[0] attrs['description'] = description.strip().rstrip('.') # Look for @see in docstring match = pattern_format_element_seealso.search(docstring) if match is not None: elements = match.group('see').rstrip('.').split(",") for element in elements: attrs['seealso'].append(element.strip()) params = {} # Look for parameters in function definition (args, varargs, varkw, defaults) = inspect.getargspec(function) # Prepare args and defaults_list such that we can have a mapping # from args to defaults args.reverse() if defaults is not None: defaults_list = list(defaults) defaults_list.reverse() else: defaults_list = [] for arg, default in map(None, args, defaults_list): if arg == "bfo": #Don't keep this as parameter. It is hidden to users, and #exists in all elements of this kind continue param = {} param['name'] = arg if default is None: #In case no check is made inside element, we prefer to #print "" (nothing) than None in output param['default'] = "" else: param['default'] = default param['description'] = "(no description provided)" params[arg] = param if isinstance(docstring, str): # Look for @param descriptions in docstring. # Add description to existing parameters in params dict params_iterator = pattern_format_element_params.finditer(docstring) for match in params_iterator: name = match.group('name') if params.has_key(name): params[name]['description'] = match.group('desc').rstrip('.') attrs['params'] = params.values() # Load built-in parameters if necessary if with_built_in_params: builtin_params = [] # Add 'prefix' parameter param_prefix = {} param_prefix['name'] = "prefix" param_prefix['default'] = "" param_prefix['description'] = """A prefix printed only if the record has a value for this element""" builtin_params.append(param_prefix) # Add 'suffix' parameter param_suffix = {} param_suffix['name'] = "suffix" param_suffix['default'] = "" param_suffix['description'] = """A suffix printed only if the record has a value for this element""" builtin_params.append(param_suffix) # Add 'default' parameter param_default = {} param_default['name'] = "default" param_default['default'] = "" param_default['description'] = """A default value printed if the record has no value for this element""" builtin_params.append(param_default) # Add 'escape' parameter param_escape = {} param_escape['name'] = "escape" param_escape['default'] = "" param_escape['description'] = """If set to 1, replaces special characters '&', '<' and '>' of this element by SGML entities""" builtin_params.append(param_escape) attrs['builtin_params'] = builtin_params return attrs def get_format_element_attrs_from_table(element_name, with_built_in_params=False): """ Returns the attributes of the format element with given name in 'tag' table. Returns None if element_name does not exist in tag table. The attributes are {'name' : "name of element" #basically the name of 'element_name' parameter 'description': "a string description of the element", 'seealso' : [] #a list of related elements. Always empty in this case 'params': [], #a list of parameters for this element. Always empty in this case 'builtin_params': [{'name':"param_name", #the parameters builtin for all elem of this kind 'default':"default value", 'description': "a description"}, ...], 'tags':["950.1", 203.a] #the list of tags printed by this element } @param element_name an element name in database @param element_name the name of the element @param with_built_in_params if True, load the parameters built in all elements """ attrs = {} tags = bibformat_dblayer.get_tags_from_name(element_name) field_label = "field" if len(tags)>1: field_label = "fields" attrs['description'] = "Prints %s %s of the record" % (field_label, ", ".join(tags)) attrs['name'] = element_name.replace(" ", "_").upper() attrs['seealso'] = [] attrs['params'] = [] attrs['tags'] = tags # Load built-in parameters if necessary if with_built_in_params: builtin_params = [] # Add 'prefix' parameter param_prefix = {} param_prefix['name'] = "prefix" param_prefix['default'] = "" param_prefix['description'] = """A prefix printed only if the record has a value for this element""" builtin_params.append(param_prefix) # Add 'suffix' parameter param_suffix = {} param_suffix['name'] = "suffix" param_suffix['default'] = "" param_suffix['description'] = """A suffix printed only if the record has a value for this element""" builtin_params.append(param_suffix) # Add 'separator' parameter param_separator = {} param_separator['name'] = "separator" param_separator['default'] = " " param_separator['description'] = """A separator between elements of the field""" builtin_params.append(param_separator) # Add 'nbMax' parameter param_nbMax = {} param_nbMax['name'] = "nbMax" param_nbMax['default'] = "" param_nbMax['description'] = """The maximum number of values to print for this element. No limit if not specified""" builtin_params.append(param_nbMax) # Add 'default' parameter param_default = {} param_default['name'] = "default" param_default['default'] = "" param_default['description'] = """A default value printed if the record has no value for this element""" builtin_params.append(param_default) # Add 'escape' parameter param_escape = {} param_escape['name'] = "escape" param_escape['default'] = "" param_escape['description'] = """If set to 1, replaces special characters '&', '<' and '>' of this element by SGML entities""" builtin_params.append(param_escape) attrs['builtin_params'] = builtin_params return attrs def get_output_format(code, with_attributes=False, verbose=0): """ Returns the structured content of the given output format If 'with_attributes' is true, also returns the names and description of the output formats, else 'attrs' is not returned in dict (it might, if it has already been loaded previously). if output format corresponding to 'code' is not found return an empty structure. See get_output_format_attrs() to learn more on the attributes {'rules': [ {'field': "980__a", 'value': "PREPRINT", 'template': "filename_a.bft", }, {...} ], 'attrs': {'names': {'generic':"a name", 'sn':{'en': "a name", 'fr':"un nom"}, 'ln':{'en':"a long name"}} 'description': "a description" 'code': "fnm1", 'content_type': "application/ms-excel" } 'default':"filename_b.bft" } @param code the code of an output_format @param with_attributes if True, fetch the attributes (names and description) for format @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @return strucured content of output format """ output_format = {'rules':[], 'default':""} filename = resolve_output_format_filename(code, verbose) if filename is None: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_OUTPUT_FORMAT_CODE_UNKNOWN", code)], stream='error', ln=cdslang) register_errors(errors, 'error') if with_attributes: #Create empty attrs if asked for attributes output_format['attrs'] = get_output_format_attrs(code, verbose) return output_format # Get from cache whenever possible global format_outputs_cache if format_outputs_cache.has_key(filename): # If was must return with attributes but cache has not # attributes, then load attributes if with_attributes and not \ format_outputs_cache[filename].has_key('attrs'): format_outputs_cache[filename]['attrs'] = get_output_format_attrs(code, verbose) return format_outputs_cache[filename] try: if with_attributes: output_format['attrs'] = get_output_format_attrs(code, verbose) path = "%s%s%s" % (CFG_BIBFORMAT_OUTPUTS_PATH, os.sep, filename ) format_file = open(path) current_tag = '' for line in format_file: line = line.strip() if line == "": # Ignore blank lines continue if line.endswith(":"): # Retrieve tag # Remove : spaces and eol at the end of line clean_line = line.rstrip(": \n\r") # The tag starts at second position current_tag = "".join(clean_line.split()[1:]).strip() elif line.find('---') != -1: words = line.split('---') template = words[-1].strip() condition = ''.join(words[:-1]) value = "" output_format['rules'].append({'field': current_tag, 'value': condition, 'template': template, }) elif line.find(':') != -1: # Default case default = line.split(':')[1].strip() output_format['default'] = default except Exception, e: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_CANNOT_READ_OUTPUT_FILE", filename, str(e))], stream='error', ln=cdslang) register_errors(errors, 'error') # Cache and return format_outputs_cache[filename] = output_format return output_format def get_output_format_attrs(code, verbose=0): """ Returns the attributes of an output format. The attributes contain 'code', which is the short identifier of the output format (to be given as parameter in format_record function to specify the output format), 'description', a description of the output format, and 'names', the localized names of the output format. If 'content_type' is specified then the search_engine will send a file with this content type and with result of formatting as content to the user. The 'names' dict always contais 'generic', 'ln' (for long name) and 'sn' (for short names) keys. 'generic' is the default name for output format. 'ln' and 'sn' contain long and short localized names of the output format. Only the languages for which a localization exist are used. {'names': {'generic':"a name", 'sn':{'en': "a name", 'fr':"un nom"}, 'ln':{'en':"a long name"}} 'description': "a description" 'code': "fnm1", 'content_type': "application/ms-excel" } @param code the short identifier of the format @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @return strucured content of output format attributes """ if code.endswith("."+CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION): code = code[:-(len(CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION) + 1)] attrs = {'names':{'generic':"", 'ln':{}, 'sn':{}}, 'description':'', 'code':code.upper(), 'content_type':""} filename = resolve_output_format_filename(code, verbose) if filename is None: return attrs attrs['names'] = bibformat_dblayer.get_output_format_names(code) attrs['description'] = bibformat_dblayer.get_output_format_description(code) attrs['content_type'] = bibformat_dblayer.get_output_format_content_type(code) return attrs def get_output_formats(with_attributes=False): """ Returns the list of all output format, as a dictionary with their filename as key If 'with_attributes' is true, also returns the names and description of the output formats, else 'attrs' is not returned in dicts (it might, if it has already been loaded previously). See get_output_format_attrs() to learn more on the attributes {'filename_1.bfo': {'rules': [ {'field': "980__a", 'value': "PREPRINT", 'template': "filename_a.bft", }, {...} ], 'attrs': {'names': {'generic':"a name", 'sn':{'en': "a name", 'fr':"un nom"}, 'ln':{'en':"a long name"}} 'description': "a description" 'code': "fnm1" } 'default':"filename_b.bft" }, 'filename_2.bfo': {...}, ... } @return the list of output formats """ output_formats = {} files = os.listdir(CFG_BIBFORMAT_OUTPUTS_PATH) for filename in files: if filename.endswith("."+CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION): code = "".join(filename.split(".")[:-1]) output_formats[filename] = get_output_format(code, with_attributes) return output_formats def get_kb_mapping(kb, string, default=""): """ Returns the value of the string' in the knowledge base 'kb'. If kb does not exist or string does not exist in kb, returns 'default' string value. @param kb a knowledge base name @param string a key in a knowledge base @param default a default value if 'string' is not in 'kb' @return the value corresponding to the given string in given kb """ global kb_mappings_cache if kb_mappings_cache.has_key(kb): kb_cache = kb_mappings_cache[kb] if kb_cache.has_key(string): value = kb_mappings_cache[kb][string] if value is None: return default else: return value else: # Precreate for caching this kb kb_mappings_cache[kb] = {} value = bibformat_dblayer.get_kb_mapping_value(kb, string) kb_mappings_cache[kb][str(string)] = value if value is None: return default else: return value def resolve_format_element_filename(string): """ Returns the filename of element corresponding to string This is necessary since format templates code call elements by ignoring case, for eg. is the same as . It is also recommended that format elements filenames are prefixed with bfe_ . We need to look for these too. The name of the element has to start with "BFE_". @param name a name for a format element @return the corresponding filename, with right case """ if not string.endswith(".py"): name = string.replace(" ", "_").upper() +".PY" else: name = string.replace(" ", "_").upper() files = os.listdir(CFG_BIBFORMAT_ELEMENTS_PATH) for filename in files: test_filename = filename.replace(" ", "_").upper() if test_filename == name or \ test_filename == "BFE_" + name or \ "BFE_" + test_filename == name: return filename # No element with that name found # Do not log error, as it might be a normal execution case: # element can be in database return None def resolve_output_format_filename(code, verbose=0): """ Returns the filename of output corresponding to code This is necessary since output formats names are not case sensitive but most file systems are. @param code the code for an output format @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, 9: errors and warnings, stop if error (debug mode )) @return the corresponding filename, with right case, or None if not found """ #Remove non alphanumeric chars (except .) code = re.sub(r"[^.0-9a-zA-Z]", "", code) if not code.endswith("."+CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION): code = re.sub(r"\W", "", code) code += "."+CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION files = os.listdir(CFG_BIBFORMAT_OUTPUTS_PATH) for filename in files: if filename.upper() == code.upper(): return filename # No output format with that name found errors = get_msgs_for_code_list([("ERR_BIBFORMAT_CANNOT_RESOLVE_OUTPUT_NAME", code)], stream='error', ln=cdslang) if verbose == 0: register_errors(errors, 'error') elif verbose >= 5: sys.stderr.write(errors[0][1]) if verbose >= 9: sys.exit(errors[0][1]) return None def get_fresh_format_template_filename(name): """ Returns a new filename and name for template with given name. Used when writing a new template to a file, so that the name has no space, is unique in template directory Returns (unique_filename, modified_name) @param a name for a format template @return the corresponding filename, and modified name if necessary """ #name = re.sub(r"\W", "", name) #Remove non alphanumeric chars name = name.replace(" ", "_") filename = name # Remove non alphanumeric chars (except .) filename = re.sub(r"[^.0-9a-zA-Z]", "", filename) path = CFG_BIBFORMAT_TEMPLATES_PATH + os.sep + filename \ + "." + CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION index = 1 while os.path.exists(path): index += 1 filename = name + str(index) path = CFG_BIBFORMAT_TEMPLATES_PATH + os.sep + filename \ + "." + CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION if index > 1: returned_name = (name + str(index)).replace("_", " ") else: returned_name = name.replace("_", " ") return (filename + "." + CFG_BIBFORMAT_FORMAT_TEMPLATE_EXTENSION, returned_name) #filename.replace("_", " ")) def get_fresh_output_format_filename(code): """ Returns a new filename for output format with given code. Used when writing a new output format to a file, so that the code has no space, is unique in output format directory. The filename also need to be at most 6 chars long, as the convention is that filename == output format code (+ .extension) We return an uppercase code Returns (unique_filename, modified_code) @param code the code of an output format @return the corresponding filename, and modified code if necessary """ #code = re.sub(r"\W", "", code) #Remove non alphanumeric chars code = code.upper().replace(" ", "_") # Remove non alphanumeric chars (except .) code = re.sub(r"[^.0-9a-zA-Z]", "", code) if len(code) > 6: code = code[:6] filename = code path = CFG_BIBFORMAT_OUTPUTS_PATH + os.sep + filename \ + "." + CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION index = 2 while os.path.exists(path): filename = code + str(index) if len(filename) > 6: filename = code[:-(len(str(index)))]+str(index) index += 1 path = CFG_BIBFORMAT_OUTPUTS_PATH + os.sep + filename \ + "." + CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION # We should not try more than 99999... Well I don't see how we # could get there.. Sanity check. if index >= 99999: errors = get_msgs_for_code_list([("ERR_BIBFORMAT_NB_OUTPUTS_LIMIT_REACHED", code)], stream='error', ln=cdslang) register_errors(errors, 'error') sys.exit("Output format cannot be named as %s"%code) return (filename + "." + CFG_BIBFORMAT_FORMAT_OUTPUT_EXTENSION, filename) def clear_caches(): """ Clear the caches (Output Format, Format Templates and Format Elements) """ global format_templates_cache, format_elements_cache , \ format_outputs_cache, kb_mappings_cache format_templates_cache = {} format_elements_cache = {} format_outputs_cache = {} kb_mappings_cache = {} class BibFormatObject: """ An object that encapsulates a record and associated methods, and that is given as parameter to all format elements 'format' function. The object is made specifically for a given formatting, i.e. it includes for example the language for the formatting. The object provides basic accessors to the record. For full access, one can get the record with get_record() and then use BibRecord methods on the returned object. """ # The record record = None # The language in which the formatting has to be done lang = cdslang # A list of string describing the context in which the record has # to be formatted. # It represents the words of the user request in web interface search search_pattern = [] # The id of the record recID = 0 # The user id of the person who will view the formatted page (if applicable) # This allows for example to print a "edit record" link for people # who have right to edit a record. uid = None # The format in which the record is being formatted format = '' # The mod_python request object req = None def __init__(self, recID, ln=cdslang, search_pattern=[], xml_record=None, uid=None, format='', req=None): """ Creates a new bibformat object, with given record. You can either specify an record ID to format, or give its xml representation. if 'xml_record' is not None, use 'xml_record' instead of recID for the record. 'uid' allows to grant access to some functionalities on a page depending on the user's priviledges. @param recID the id of a record @param ln the language in which the record has to be formatted @param search_pattern list of string representing the request used by the user in web interface @param xml_record a xml string of the record to format @param uid the user id of the person who will view the formatted page @param format the format used for formatting this record """ if xml_record is not None: # If record is given as parameter self.record = create_record(xml_record)[0] recID = record_get_field_value(self.record,"001") self.lang = wash_language(ln) self.search_pattern = search_pattern self.recID = recID self.uid = uid self.format = format self.req = req def get_record(self): """ Returns the record of this BibFormatObject instance @return the record structure as returned by BibRecord """ # Create record if necessary if self.record is None: # on-the-fly creation if current output is xm record = create_record(record_get_xml(self.recID, 'xm', on_the_fly=(self.format.lower() == 'xm'))) self.record = record[0] return self.record def control_field(self, tag, escape=0): """ Returns the value of control field given by tag in record @param tag the marc code of a field @param escape 1 if returned value should be escaped. Else 0. @return value of field tag in record """ if self.get_record() is None: #Case where BibRecord could not parse object return '' p_tag = parse_tag(tag) field_value = record_get_field_value(self.get_record(), p_tag[0], p_tag[1], p_tag[2], p_tag[3]) if escape == 0: return field_value else: return escape_field(field_value, escape) def field(self, tag, escape=0): """ Returns the value of the field corresponding to tag in the current record. If the value does not exist, return empty string 'escape' parameter allows to escape special characters of the field. The value of escape can be: 0 - no escaping 1 - escape all HTML characters 2 - escape all HTML characters by default. If field starts with , escape only unsafe characters, but leave basic HTML tags. @param tag the marc code of a field @param escape 1 if returned value should be escaped. Else 0. (see above for other modes) @return value of field tag in record """ list_of_fields = self.fields(tag) if len(list_of_fields) > 0: # Escaping below if escape == 0: return list_of_fields[0] else: return escape_field(list_of_fields[0], escape) else: return "" def fields(self, tag, escape=0, repeatable_subfields_p=False): """ Returns the list of values corresonding to "tag". If tag has an undefined subcode (such as 999C5), the function returns a list of dictionaries, whoose keys are the subcodes and the values are the values of tag.subcode. If the tag has a subcode, simply returns list of values corresponding to tag. Eg. for given MARC: 999C5 $a value_1a $b value_1b 999C5 $b value_2b 999C5 $b value_3b $b value_3b_bis >> bfo.fields('999C5b') >> ['value_1b', 'value_2b', 'value_3b', 'value_3b_bis'] >> bfo.fields('999C5') >> [{'a':'value_1a', 'b':'value_1b'}, {'b':'value_2b'}, {'b':'value_3b'}] By default the function returns only one value for each subfield (that is it considers that repeatable subfields are not allowed). It is why in the above example 'value3b_bis' is not shown for bfo.fields('999C5'). (Note that it is not defined which of value_3b or value_3b_bis is returned). This is to simplify the use of the function, as most of the time subfields are not repeatable (in that way we get a string instead of a list). You can allow repeatable subfields by setting 'repeatable_subfields_p' parameter to True. In this mode, the above example would return: >> bfo.fields('999C5b') >> ['value_1b', 'value_2b', 'value_3b'] >> bfo.fields('999C5') >> [{'a':['value_1a'], 'b':['value_1b']}, {'b':['value_2b']}, {'b':['value_3b', 'value3b_bis']}] NOTICE THAT THE RETURNED STRUCTURE IS DIFFERENT. Also note that whatever the value of 'repeatable_subfields_p' is, bfo.fields('999C5b') always show all fields, even repeatable ones. This is because the parameter has no impact on the returned structure (it is always a list). 'escape' parameter allows to escape special characters of the fields. The value of escape can be: 0 - no escaping 1 - escape all HTML characters 2 - escape all HTML characters by default. If field starts with , escape only unsafe characters, but leave basic HTML tags. @param tag the marc code of a field @param escape 1 if returned values should be escaped. Else 0. @repeatable_subfields_p if True, returns the list of subfields in the dictionary @return values of field tag in record """ if self.get_record() is None: # Case where BibRecord could not parse object return [] p_tag = parse_tag(tag) if p_tag[3] != "": # Subcode has been defined. Simply returns list of values values = record_get_field_values(self.get_record(), p_tag[0], p_tag[1], p_tag[2], p_tag[3]) if escape == 0: return values else: return [escape_field(value, escape) for value in values] else: # Subcode is undefined. Returns list of dicts. # However it might be the case of a control field. instances = record_get_field_instances(self.get_record(), p_tag[0], p_tag[1], p_tag[2]) if repeatable_subfields_p: list_of_instances = [] for instance in instances: instance_dict = {} for subfield in instance[0]: if not instance_dict.has_key(subfield[0]): instance_dict[subfield[0]] = [] if escape == 0: instance_dict[subfield[0]].append(subfield[1]) else: instance_dict[subfield[0]].append(escape_field(subfield[1], escape)) list_of_instances.append(instance_dict) return list_of_instances else: if escape == 0: return [dict(instance[0]) for instance in instances] else: return [dict([ (subfield[0], escape_field(subfield[1], escape)) \ for subfield in instance[0] ]) \ for instance in instances] def kb(self, kb, string, default=""): """ Returns the value of the "string" in the knowledge base "kb". If kb does not exist or string does not exist in kb, returns 'default' string or empty string if not specified. @param kb a knowledge base name @param string the string we want to translate @param default a default value returned if 'string' not found in 'kb' """ if string is None: return default val = get_kb_mapping(kb, string, default) if val is None: return default else: return val def escape_field(value, mode=0): """ Utility function used to escape the value of a field in given mode. - mode 0: no escaping - mode 1: escaping all HTML/XML characters - mode 2: escaping dangerous HTML tags to avoid XSS, but keep basic one (such as
) - mode 3: mix of mode 1 and mode 2. If field_value starts with , then use mode 2. Else use mode 1. """ if mode == 1: return cgi.escape(value) elif mode == 2: return washer.wash(value, allowed_attribute_whitelist=['href', 'name', 'class'] ) elif mode == 3: if value.lstrip(' \n').startswith(html_field): return washer.wash(value, allowed_attribute_whitelist=['href', 'name', 'class'] ) else: return cgi.escape(value) else: return value def bf_profile(): """ Runs a benchmark """ for i in range(1, 51): format_record(i, "HD", ln=cdslang, verbose=9, search_pattern=[]) return if __name__ == "__main__": import profile import pstats #bf_profile() profile.run('bf_profile()', "bibformat_profile") p = pstats.Stats("bibformat_profile") p.strip_dirs().sort_stats("cumulative").print_stats() diff --git a/modules/bibformat/lib/bibformat_regression_tests.py b/modules/bibformat/lib/bibformat_regression_tests.py index 1e2592c38..b3da290f4 100644 --- a/modules/bibformat/lib/bibformat_regression_tests.py +++ b/modules/bibformat/lib/bibformat_regression_tests.py @@ -1,336 +1,345 @@ # -*- coding: utf-8 -*- ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """WebSearch module regression tests.""" __revision__ = "$Id$" import unittest from invenio.config import weburl, cdslang from invenio.testutils import make_test_suite, \ warn_user_about_tests_and_run, \ test_web_page_content from invenio.bibformat import format_record class BibFormatAPITest(unittest.TestCase): """Check BibFormat API""" def test_basic_formatting(self): """bibformat - Checking BibFormat API""" result = format_record(recID=73, of='hx', ln=cdslang, verbose=0, search_pattern=[], xml_record=None, uid=None, on_the_fly=True) pageurl = weburl + '/record/73?of=hx' result = test_web_page_content(pageurl, expected_text=result) class BibFormatBibTeXTest(unittest.TestCase): """Check output produced by BibFormat for BibTeX output for various records""" def setUp(self): """Prepare some ideal outputs""" self.record_74_hx = '''
 @article{Wang:74,
       author       = "Wang, B and Lin, C Y and Abdalla, E",
       title        = "Quasinormal modes of Reissner-Nordstrom Anti-de Sitter
                       Black Holes",
       journal      = "Phys. Lett., B",
       number       = "hep-th/0003295",
       volume       = "481",
       pages        = "79-88",
       year         = "2000",
 }
 
''' def test_bibtex_output(self): """bibformat - BibTeX output""" pageurl = weburl + '/record/74?of=hx' result = test_web_page_content(pageurl, expected_text=self.record_74_hx) self.assertEqual([], result) class BibFormatDetailedHTMLTest(unittest.TestCase): """Check output produced by BibFormat for detailed HTML ouput for various records""" def setUp(self): """Prepare some ideal outputs""" # Record 7 (Article) - self.record_74_hd_header = '''
- Published Article - / Particle Physics - Theoryhep-th/0003295
''' + self.record_74_hd_header = ''' + + + + + +
Published Article / Particle Physics - Theory / Particle Physics - Theoryhep-th/0003295
''' self.record_74_hd_title = '''
Quasinormal modes of Reissner-Nordstrom Anti-de Sitter Black Holes
''' self.record_74_hd_authors = '''Wang, B ; Lin, C Y ; Abdalla, E
'''% \ {'weburl' : weburl, 'lang': cdslang} self.record_74_hd_abstract = '''Abstract: Complex frequencies associated with quasinormal modes for large Reissner-Nordstr$\ddot{o}$m Anti-de Sitter black holes have been computed. These frequencies have close relation to the black hole charge and do not linearly scale withthe black hole temperature as in Schwarzschild Anti-de Sitter case. In terms of AdS/CFT correspondence, we found that the bigger the black hole charge is, the quicker for the approach to thermal equilibrium in the CFT. The propertiesof quasinormal modes for $l>0$ have also been studied.
''' self.record_74_hd_pubinfo = '''Published in: Phys. Lett., B :481 2000 79-88''' - self.record_74_hd_fulltext = '''External link: Fulltext''' + self.record_74_hd_fulltext = '''(external link):
Download fulltext
Fulltext
''' self.record_74_hd_citations = '''Cited by: try citation search for hep-th/0003295'''% \ {'weburl' : weburl, 'lang': cdslang} self.record_74_hd_references = '''
  • [17] A. Chamblin, R. Emparan, C. V. Johnson and R. C. Myers, Phys. Rev., D60: 104026 (1999) 5070 90 110 130 150 r+ 130 230 330 50 70 90 110 130 150 r+
  • ''' # Record 7 (Picture) - self.record_7_hd_header = '''
    - Pictures - / Life at CERNCERN-GE-9806033
    ''' + self.record_7_hd_header = ''' + + + + + +
    Pictures / Life at CERN / Life at CERNCERN-GE-9806033
    ''' self.record_7_hd_title = '''
    Tim Berners-Lee
    ''' self.record_7_hd_date = '''
    28 Jun 1998
    ''' self.record_7_hd_abstract = '''

    Caption
    Conference "Internet, Web, What's next?" on 26 June 1998 at CERN : Tim Berners-Lee, inventor of the World-Wide Web and Director of the W3C, explains how the Web came to be and give his views on the future.

    Légende
    Conference "Internet, Web, What's next?" le 26 juin 1998 au CERN: Tim Berners-Lee, inventeur du World-Wide Web et directeur du W3C, explique comment le Web est ne, et donne ses opinions sur l'avenir.

    ''' self.record_7_hd_resource = '''Resources

    High resolution: http://preprints.cern.ch/cgi-bin/setlink?base=PHO&categ=photo-ge&id=9806033


    © CERN Geneva''' def test_detailed_html_output(self): """bibformat - Detailed HTML output""" # Test record 74 (Article) pageurl = weburl + '/record/74?of=hd' result = test_web_page_content(pageurl, expected_text=[self.record_74_hd_header, self.record_74_hd_title, self.record_74_hd_authors, self.record_74_hd_abstract, self.record_74_hd_pubinfo, self.record_74_hd_fulltext, - self.record_74_hd_citations, - self.record_74_hd_references]) + #self.record_74_hd_citations, + #self.record_74_hd_references + ]) self.assertEqual([], result) # Test record 7 (Picture) pageurl = weburl + '/record/7?of=hd' result = test_web_page_content(pageurl, expected_text=[self.record_7_hd_header, self.record_7_hd_title, self.record_7_hd_date, self.record_7_hd_abstract, self.record_7_hd_resource]) self.assertEqual([], result) def test_detailed_html_edit_record(self): """bibformat - Detailed HTML output edit record link presence""" pageurl = weburl + '/record/74?of=hd' result = test_web_page_content(pageurl, username='admin', expected_text="Edit This Record") self.assertEqual([], result) def test_detailed_html_no_error_message(self): """bibformat - Detailed HTML output without error message""" # No error message should be displayed in the web interface, whatever happens pageurl = weburl + '/record/74?of=hd' result = test_web_page_content(pageurl, username='admin', expected_text=["Exception", "Could not"]) self.assertNotEqual([], result) pageurl = weburl + '/record/7?of=hd' result = test_web_page_content(pageurl, username='admin', expected_text=["Exception", "Could not"]) self.assertNotEqual([], result) class BibFormatNLMTest(unittest.TestCase): """Check output produced by BibFormat for NLM output for various records""" def setUp(self): """Prepare some ideal outputs""" self.record_70_xn = '''
    J. High Energy Phys.J. High Energy Phys.1126-6708AdS/CFT For Non-Boundary ManifoldsMcInnesB200005In its Euclidean formulation, the AdS/CFT correspondence begins as a study of Yang-Mills conformal field theories on the sphere, S^4. It has been successfully extended, however, to S^1 X S^3 and to the torus T^4. It is natural tohope that it can be made to work for any manifold on which it is possible to define a stable Yang-Mills conformal field theory. We consider a possible classification of such manifolds, and show how to deal with the most obviousobjection : the existence of manifolds which cannot be represented as boundaries. We confirm Witten's suggestion that this can be done with the help of a brane in the bulk.research-article
    ''' % weburl def test_nlm_output(self): """bibformat - NLM output""" pageurl = weburl + '/record/70?of=xn' result = test_web_page_content(pageurl, expected_text=self.record_70_xn) self.assertEqual([], result) class BibFormatBriefHTMLTest(unittest.TestCase): """Check output produced by BibFormat for brief HTML ouput for various records""" def setUp(self): """Prepare some ideal outputs""" self.record_76_hb = '''Ιθάκη / Καβάφης, Κ Π
    Σα βγεις στον πηγαιμό για την Ιθάκη,
    να εύχεσαι νάναι μακρύς ο δρόμος,
    γεμάτος περιπέτειες, γεμάτος γνώσεις [...]
    ''' % (weburl, cdslang) def test_brief_html_output(self): """bibformat - Brief HTML output""" pageurl = weburl + '/record/76?of=HB' result = test_web_page_content(pageurl, expected_text=self.record_76_hb) self.assertEqual([], result) class BibFormatMARCXMLTest(unittest.TestCase): """Check output produced by BibFormat for MARCXML ouput for various records""" def setUp(self): """Prepare some ideal outputs""" self.record_9_xm = ''' 9 eng PRE-25553 RL-82-024 Ellis, J Grand unification with large supersymmetry breaking Mar 1982 18 p SzGeCERN General Theoretical Physics Ibanez, L E Ross, G G 1982 11 Oxford Univ. Univ. Auton. Madrid Rutherford Lab. 1990-01-28 50 2002-01-04 BATCH h 1982n PREPRINT ''' def test_marcxml_output(self): """bibformat - MARCXML output""" pageurl = weburl + '/record/9?of=xm' result = test_web_page_content(pageurl, expected_text=self.record_9_xm) self.assertEqual([], result) class BibFormatMARCTest(unittest.TestCase): """Check output produced by BibFormat for MARC ouput for various records""" def setUp(self): """Prepare some ideal outputs""" self.record_29_hm = '''000000029 001__ 29 000000029 041__ $$aeng 000000029 080__ $$a517.11 000000029 100__ $$aKleene, Stephen Cole 000000029 245__ $$aIntroduction to metamathematics 000000029 260__ $$aAmsterdam$$bNorth-Holland$$c1952 (repr.1964.) 000000029 300__ $$a560 p 000000029 490__ $$aBibl. Matematica$$v1 000000029 909C0 $$y1952 000000029 909C0 $$b21 000000029 909C1 $$c1990-01-27$$l00$$m2002-04-12$$oBATCH 000000029 909CS $$sm$$w198606 000000029 980__ $$aBOOK''' def test_marc_output(self): """bibformat - MARC output""" pageurl = weburl + '/record/29?of=hm' result = test_web_page_content(pageurl, expected_text=self.record_29_hm) self.assertEqual([], result) test_suite = make_test_suite(BibFormatBibTeXTest, BibFormatDetailedHTMLTest, BibFormatBriefHTMLTest, BibFormatNLMTest, BibFormatMARCTest, BibFormatMARCXMLTest, BibFormatAPITest) if __name__ == "__main__": warn_user_about_tests_and_run(test_suite) diff --git a/modules/bibformat/lib/elements/Makefile.am b/modules/bibformat/lib/elements/Makefile.am index ec1f4e2ca..3fb4586f8 100644 --- a/modules/bibformat/lib/elements/Makefile.am +++ b/modules/bibformat/lib/elements/Makefile.am @@ -1,41 +1,41 @@ ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. pylibdir=$(libdir)/python/invenio/bibformat_elements pylib_DATA = bfe_field.py bfe_title.py bfe_authors.py bfe_abstract.py bfe_affiliation.py \ bfe_imprint.py bfe_fulltext.py bfe_place.py bfe_publisher.py bfe_topbanner.py \ bfe_date_rec.py bfe_keywords.py bfe_notes.py bfe_reprints.py bfe_publi_info.py \ bfe_cited_by.py bfe_references.py bfe_photo_resources.py bfe_title_brief.py \ bfe_additional_report_numbers.py bfe_url.py \ bfe_addresses.py bfe_contact.py bfe_photo_resources_brief.py \ bfe_collection.py bfe_editors.py bfe_bibtex.py bfe_edit_record.py \ bfe_date.py bfe_xml_record.py bfe_external_publications.py __init__.py \ bfe_bfx_engine.py bfe_creation_date.py bfe_server_info.py bfe_issn.py \ - bfe_client_info.py bfe_language.py bfe_record_id.py + bfe_client_info.py bfe_language.py bfe_record_id.py bfe_comments.py tmpdir = $(prefix)/var/tmp/tests_bibformat_elements tmp_DATA = test_1.py bfe_test_2.py bfe_test_4.py test3.py test_5.py \ test_no_element.test __init__.py EXTRA_DIST = $(pylib_DATA) $(tmp_DATA) CLEANFILES = *~ *.tmp diff --git a/modules/bibformat/lib/elements/bfe_fulltext.py b/modules/bibformat/lib/elements/bfe_fulltext.py index 5c0be9885..7c95739f8 100644 --- a/modules/bibformat/lib/elements/bfe_fulltext.py +++ b/modules/bibformat/lib/elements/bfe_fulltext.py @@ -1,148 +1,183 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibFormat element - Prints a links to fulltext """ __revision__ = "$Id$" from invenio.file import BibRecDocs, file_strip_ext from invenio.config import weburl, CFG_CERN_SITE from cgi import escape from urlparse import urlparse from os.path import basename, splitext -def format(bfo, style, separator='; '): +def format(bfo, style, separator='; ', show_icons='no'): """ This is the default format for formatting full-text reference. @param separator the separator between urls. @param style CSS class of the link + @param show_icons if 'yes', print icons for fulltexts """ urls = bfo.fields("8564_") ret = "" bibarchive = BibRecDocs(bfo.recID) old_version_there = False main_urls = {} # Urls hosted by Invenio (bibdocs) others_urls = {} # External urls if CFG_CERN_SITE: cern_urls = {} # cern.ch urls additionals = False for complete_url in urls: if complete_url.has_key('u'): url = complete_url['u'] (dontcare, host, path, dontcare, dontcare, dontcare) = urlparse(url) filename = basename(path) name = file_strip_ext(filename) format = filename[len(name):] if format.startswith('.'): format = format[1:] descr = '' if complete_url.has_key('z'): # Let's take the description descr = complete_url['z'] elif complete_url.has_key('y'): descr = complete_url['y'] if not url.startswith(weburl): # Not a bibdoc? if not descr: # For not bibdoc let's have a description if '/setlink?' in url: # Setlink (i.e. hosted on doc.cern.ch) descr = "Fulltext" # Surely a fulltext else: #FIXME remove eventual ?parameters descr = filename or host # Let's take the name from the url if CFG_CERN_SITE and 'cern.ch' in host: cern_urls[url] = descr # Obsolete cern.ch url (we're migrating) else: others_urls[url] = descr # external url else: # It's a bibdoc! assigned = False for doc in bibarchive.listBibDocs(): if int(doc.getLatestVersion()) > 1: old_version_there = True if filename in [f.fullname for f in doc.listAllFiles()]: assigned = True if not doc.type == 'Main': additionals = True else: if not descr: descr = 'Main file(s)' if not main_urls.has_key(descr): main_urls[descr] = [] main_urls[descr].append((url, name, format)) if not assigned: # Url is not a bibdoc :-S if not descr: descr = filename others_urls[url] = descr # Let's put it in a general other url if style != "": style = 'class="'+style+'"' # Build urls list. # Escape special chars for tag value. additional_str = '' if additionals: additional_str = ' (additional files)' versions_str = '' if old_version_there: versions_str = ' (older versions)' if main_urls: + # Put a big file icon if only one file + if len(main_urls) == 1 and len(main_urls[0][1]) == 1 and \ + (not CFG_CERN_SITE or len(cern_urls) == 0) and len(others_urls) == 0 and \ + show_icons.lower() == 'yes': + file_icon = 'Download fulltext
    ' % weburl + elif show_icons.lower() == 'yes': + file_icon = 'Download fulltext' % weburl + else: + file_icon = '' + last_name = "" for descr, urls in main_urls.items(): - ret += "%s: " % descr + ret += "%s: " % descr url_list = [] urls.sort(lambda (url1, name1, format1), (url2, name2, format2): url1 < url2 and -1 or url1 > url2 and 1 or 0) + for url, name, format in urls: if not name == last_name and len(main_urls) > 1: print_name = "%s - " % name else: print_name = "" last_name = name - url_list.append(print_name + ''+format.upper()+'') + url_list.append(print_name + ''+file_icon+format.upper()+'') ret += separator.join(url_list) + additional_str + versions_str + '
    ' if CFG_CERN_SITE and cern_urls: + # Put a big file icon if only one file + if len(main_urls) == 0 and \ + len(cern_urls) == 1 and len(others_urls) == 0 and \ + show_icons.lower() == 'yes': + file_icon = 'Download fulltext
    ' % weburl + elif show_icons.lower() == 'yes': + file_icon = 'Download fulltext' % weburl + else: + file_icon = '' + link_word = len(cern_urls) == 1 and 'link' or 'links' - ret += 'CERN %s: ' % link_word + ret += '(CERN %s)
    ' % link_word url_list = [] for url,descr in cern_urls.items(): - url_list.append(''+escape(str(descr))+'') + url_list.append(''+file_icon+escape(str(descr))+'') ret += separator.join(url_list) + '
    ' if others_urls: + # Put a big file icon if only one file + if len(main_urls) == 0 and \ + (not CFG_CERN_SITE or len(cern_urls) == 0) and len(others_urls) == 1 and \ + show_icons.lower() == 'yes': + file_icon = 'Download fulltext
    ' % weburl + elif show_icons.lower() == 'yes': + file_icon = 'Download fulltext' % weburl + else: + file_icon = '' link_word = len(others_urls) == 1 and 'link' or 'links' - ret += 'External %s: ' % link_word + ret += '(external %s):
    ' % link_word url_list = [] for url,descr in others_urls.items(): - url_list.append(''+escape(str(descr))+'') - ret += separator.join(url_list) + '
    ' + url_list.append(''+file_icon+escape(str(descr))+'') + ret += '' + separator.join(url_list) + '
    ' if ret.endswith('
    '): ret = ret[:-len('
    ')] + + if ret == '' and show_icons.lower() == 'yes': + ret += 'Download fulltext
    No fulltext' % weburl + return ret def escape_values(bfo): """ Called by BibFormat in order to check if output of this element should be escaped. """ return 0 diff --git a/modules/bibformat/lib/elements/bfe_topbanner.py b/modules/bibformat/lib/elements/bfe_topbanner.py index 1d326a955..c9216eff9 100644 --- a/modules/bibformat/lib/elements/bfe_topbanner.py +++ b/modules/bibformat/lib/elements/bfe_topbanner.py @@ -1,69 +1,83 @@ # -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """BibFormat element - Prints HTML topbanner with categorz, rep. number, etc. """ __revision__ = "$Id$" import cgi -def format(bfo, - kb_name="dbcollid2coll"): +def format(bfo, kb_name="dbcollid2coll"): """ HTML top page banner containing category, rep. number, etc """ collection_indicator = bfo.kb(kb_name, bfo.field("980__a")) collection_indicator = cgi.escape(collection_indicator) subject = bfo.field("65017a") subject = cgi.escape(subject) subject_2 = bfo.field("65027a") subject_2 = cgi.escape(subject_2) additional_report_numbers = bfo.fields("088__a") source_of_aquisition = bfo.field("037__a") source_of_aquisition = cgi.escape(source_of_aquisition) - out = '' - out += '''" + if subject != "XX" and subject: + subject = " / " + subject + + if len(source_of_aquisition) > 0: + source_of_aquisition = '" + report_numbers_out = '' for report_number in additional_report_numbers: - out += "" - - if len(source_of_aquisition) > 0: - out += '" + report_numbers_out += "" - out += "
    - %s - ''' % collection_indicator - if subject != "XX": - out += " / "+ subject - - out += subject_2 - out += "'+ source_of_aquisition + "" +cgi.escape(report_number) +" '+ source_of_aquisition + "" + \ + cgi.escape(report_number) + \ + "

    " + out = ''' + + + + + %(source_of_aquisition)s + +
    %(collection_indicator)s%(subject)s %(subject)s%(report_number)s
    + ''' % {'collection_indicator': collection_indicator, + 'subject': subject, + 'subject2': subject_2, + 'report_number': report_numbers_out, + 'source_of_aquisition': source_of_aquisition} - return out + if collection_indicator or \ + subject or \ + subject2 or \ + source_of_aquisition or \ + report_numbers_out: + return out + else: + return '' def escape_values(bfo): """ Called by BibFormat in order to check if output of this element should be escaped. """ return 0 diff --git a/modules/miscutil/lib/config.py.wml b/modules/miscutil/lib/config.py.wml index dd64a4642..4bb0ef770 100644 --- a/modules/miscutil/lib/config.py.wml +++ b/modules/miscutil/lib/config.py.wml @@ -1,194 +1,195 @@ ## $Id$ ## CDS Invenio config file, to be read by all Python programs. ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## read config variables: #include "config.wml" #include "configbis.wml" ## -*- coding: utf-8 -*- ## $Id$ ## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDS Invenio WML SOURCES. """CDS Invenio config file, to be read by all Python programs.""" __revision__ = "$Id$" ## fill all the generally-interesting config variables from WML: cdsname = "" cdslang = "" supportemail = "" adminemail = "" alertengineemail = "" CFG_PREFIX = "" webdir = "" weburl = "" sweburl = "" bindir = "" pylibdir = "/python" cachedir = "" logdir = "" tmpdir = "" etcdir = "" version = "" localedir = "" ## intl versions of CDSNAME of this installation: cdsnameintl = {} cdsnameintl['de'] = "" cdsnameintl['en'] = "" cdsnameintl['es'] = "" cdsnameintl['ca'] = "" cdsnameintl['pt'] = "" cdsnameintl['fr'] = "" cdsnameintl['hr'] = "" cdsnameintl['it'] = "" cdsnameintl['ru'] = "" cdsnameintl['sk'] = "" cdsnameintl['cs'] = "" cdsnameintl['no'] = "" cdsnameintl['sv'] = "" cdsnameintl['el'] = "" cdsnameintl['uk'] = "" cdsnameintl['ja'] = "" cdsnameintl['pl'] = "" cdsnameintl['bg'] = "" cdsnameintl['zh_CN'] = "" cdsnameintl['zh_TW'] = "" ## helper programs: CFG_PATH_PHP = "" CFG_PATH_PDFTOTEXT = "" CFG_PATH_PSTOTEXT = "" CFG_PATH_PSTOASCII = "" CFG_PATH_ANTIWORD = "" CFG_PATH_CATDOC = "" CFG_PATH_WVTEXT = "" CFG_PATH_PPTHTML = "" CFG_PATH_XLHTML = "" CFG_PATH_HTMLTOTEXT = "" CFG_PATH_GFILE = "" CFG_PATH_GZIP = "" CFG_PATH_TAR = "" CFG_PATH_GUNZIP = "" CFG_PATH_ACROREAD = "" CFG_PATH_DISTILLER = "" CFG_PATH_CONVERT = "" ## Apache password/group files: CFG_APACHE_PASSWORD_FILE = "" CFG_APACHE_GROUP_FILE = "" ## are we running CERN specifics? CFG_CERN_SITE = ## for websubmit: images = "/img" urlpath = "" accessurl = "/search" counters = "" storage = "" filedir = "" filedirsize = xmlmarc2textmarc = "/xmlmarc2textmarc" bibupload = "/bibupload" bibformat = "/bibformat" bibwords = "/bibwords" bibconvert = "/bibconvert" bibconvertconf = "/bibconvert/config" htdocsurl = "" ## for search engine: CFG_MAX_RECID = CFG_MAX_CACHED_QUERIES = CFG_WEBSEARCH_INSTANT_BROWSE = CFG_WEBSEARCH_AUTHOR_ET_AL_THRESHOLD = CFG_WEBSEARCH_SEARCH_CACHE_SIZE = CFG_WEBSEARCH_NB_RECORDS_TO_SORT = CFG_WEBSEARCH_CALL_BIBFORMAT = CFG_WEBSEARCH_USE_ALEPH_SYSNOS = CFG_WEBSEARCH_FIELDS_CONVERT = CFG_WEBSEARCH_SIMPLESEARCH_PATTERN_BOX_WIDTH = # FIXME: not used? CFG_WEBSEARCH_ADVANCEDSEARCH_PATTERN_BOX_WIDTH = CFG_WEBSEARCH_NARROW_SEARCH_SHOW_GRANDSONS = CFG_WEBSEARCH_CREATE_SIMILARLY_NAMED_AUTHORS_LINK_BOX = ## for access control: CFG_ACCESS_CONTROL_LEVEL_SITE = CFG_ACCESS_CONTROL_LEVEL_GUESTS = CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS = CFG_ACCESS_CONTROL_LIMIT_REGISTRATION_TO_DOMAIN = "" CFG_ACCESS_CONTROL_NOTIFY_ADMIN_ABOUT_NEW_ACCOUNTS = CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_NEW_ACCOUNT = CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_ACTIVATION = CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_DELETION = ## for OAI repository: CFG_OAI_ID_PREFIX = "" CFG_OAI_SAMPLE_IDENTIFIER = "" CFG_OAI_IDENTIFY_DESCRIPTION = """""" CFG_OAI_ID_FIELD = "" CFG_OAI_SET_FIELD = "" CFG_OAI_DELETED_POLICY = "" CFG_OAI_EXPIRE = CFG_OAI_SLEEP = CFG_OAI_LOAD = ## for the indexer: CFG_BIBINDEX_FULLTEXT_INDEX_LOCAL_FILES_ONLY = CFG_BIBINDEX_STEMMER_DEFAULT_LANGUAGE = "" CFG_BIBINDEX_REMOVE_STOPWORDS = CFG_BIBINDEX_PATH_TO_STOPWORDS_FILE = "" CFG_BIBINDEX_CHARS_ALPHANUMERIC_SEPARATORS = r"[]" CFG_BIBINDEX_CHARS_PUNCTUATION = r"[]" CFG_BIBINDEX_REMOVE_HTML_MARKUP = CFG_BIBINDEX_MIN_WORD_LENGTH = CFG_BIBINDEX_URLOPENER_USERNAME = "" # FIXME: not found in modules subdir?! CFG_BIBINDEX_URLOPENER_PASSWORD = "" # FIXME: not found in modules subdir?! ## for ranking: CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS = 0 ## for commenting: CFG_WEBCOMMENT_ALLOW_COMMENTS = 1 CFG_WEBCOMMENT_ALLOW_REVIEWS = 1 +CFG_WEBCOMMENT_ALLOW_SHORT_REVIEWS = 0 CFG_WEBCOMMENT_NB_REPORTS_BEFORE_SEND_EMAIL_TO_ADMIN = 5 CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW = 1 CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW = 1 CFG_WEBCOMMENT_ADMIN_NOTIFICATION_LEVEL = 1 CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_COMMENTS_IN_SECONDS = 20 CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_REVIEWS_IN_SECONDS = 20 CFG_WEBCOMMENT_TIMELIMIT_VOTE_VALIDITY_IN_DAYS = 365 # FIXME: not found in modules subdir?! CFG_WEBCOMMENT_TIMELIMIT_REPORT_VALIDITY_IN_DAYS = 100 # FIXME: not found in modules subdir?! ## page and style elements: CFG_WEBSTYLE_TEMPLATE_SKIN = "" CFG_WEBSTYLE_CDSPAGEHEADER = """""" CFG_WEBSTYLE_CDSPAGEBOXLEFTTOP = """""" CFG_WEBSTYLE_CDSPAGEBOXLEFTBOTTOM = """""" CFG_WEBSTYLE_CDSPAGEBOXRIGHTTOP = """""" CFG_WEBSTYLE_CDSPAGEBOXRIGHTBOTTOM = """""" CFG_WEBSTYLE_CDSPAGEFOOTER = """""" # for task scheduler: CFG_BIBSCHED_REFRESHTIME = 5 # CFG_BIBSCHED_LOG_PAGER = "/bin/more" CFG_BIBSCHED_LOG_PAGER = None # will use the environment defined one # for db engine: -CFG_MISCUTIL_USE_SQLALCHEMY = \ No newline at end of file +CFG_MISCUTIL_USE_SQLALCHEMY = diff --git a/modules/miscutil/sql/tabcreate.sql b/modules/miscutil/sql/tabcreate.sql index ab29399c2..659501104 100644 --- a/modules/miscutil/sql/tabcreate.sql +++ b/modules/miscutil/sql/tabcreate.sql @@ -1,3065 +1,3073 @@ -- $Id$ -- This file is part of CDS Invenio. -- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. -- -- CDS Invenio is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of the -- License, or (at your option) any later version. -- -- CDS Invenio is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with CDS Invenio; if not, write to the Free Software Foundation, Inc., -- 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. -- tables for bibliographic records: CREATE TABLE IF NOT EXISTS bibrec ( id mediumint(8) unsigned NOT NULL auto_increment, creation_date datetime NOT NULL default '0000-00-00', modification_date datetime NOT NULL default '0000-00-00', PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib00x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib01x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib02x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib03x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib04x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib05x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib06x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib07x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib08x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib09x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib10x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib11x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib12x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib13x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib14x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib15x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib16x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib17x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib18x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib19x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib20x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib21x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib22x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib23x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib24x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib25x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib26x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib27x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib28x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib29x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib30x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib31x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib32x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib33x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib34x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib35x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib36x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib37x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib38x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib39x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib40x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib41x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib42x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib43x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib44x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib45x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib46x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib47x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib48x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib49x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib50x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib51x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib52x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib53x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib54x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib55x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib56x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib57x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib58x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib59x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib60x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib61x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib62x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib63x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib64x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib65x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib66x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib67x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib68x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib69x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib70x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib71x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib72x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib73x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib74x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib75x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib76x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib77x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib78x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib79x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib80x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib81x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib82x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib83x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib84x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib85x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib86x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib87x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib88x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib89x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib90x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib91x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib92x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib93x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib94x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib95x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib96x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib97x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib98x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bib99x ( id mediumint(8) unsigned NOT NULL auto_increment, tag varchar(6) NOT NULL default '', value text NOT NULL, PRIMARY KEY (id), KEY kt (tag), KEY kv (value(35)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib00x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib01x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib02x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib03x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib04x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib05x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib06x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib07x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib08x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib09x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib10x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib11x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib12x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib13x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib14x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib15x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib16x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib17x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib18x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib19x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib20x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib21x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib22x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib23x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib24x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib25x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib26x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib27x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib28x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib29x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib30x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib31x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib32x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib33x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib34x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib35x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib36x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib37x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib38x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib39x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib40x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib41x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib42x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib43x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib44x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib45x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib46x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib47x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib48x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib49x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib50x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib51x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib52x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib53x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib54x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib55x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib56x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib57x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib58x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib59x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib60x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib61x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib62x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib63x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib64x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib65x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib66x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib67x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib68x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib69x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib70x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib71x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib72x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib73x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib74x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib75x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib76x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib77x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib78x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib79x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib80x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib81x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib82x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib83x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib84x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib85x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib86x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib87x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib88x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib89x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib90x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib91x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib92x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib93x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib94x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib95x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib96x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib97x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib98x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bib99x ( id_bibrec mediumint(8) unsigned NOT NULL default '0', id_bibxxx mediumint(8) unsigned NOT NULL default '0', field_number smallint(5) unsigned default NULL, KEY id_bibxxx (id_bibxxx), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; -- tables for bibliographic records formatted: CREATE TABLE IF NOT EXISTS bibfmt ( id mediumint(8) unsigned NOT NULL auto_increment, id_bibrec int(8) unsigned NOT NULL default '0', format varchar(10) NOT NULL default '', last_updated datetime NOT NULL default '0000-00-00', value longblob, PRIMARY KEY (id), KEY id_bibrec (id_bibrec), KEY format (format) ) TYPE=MyISAM; -- tables for index files: CREATE TABLE IF NOT EXISTS idxINDEX ( id mediumint(9) unsigned NOT NULL, name varchar(50) NOT NULL default '', description varchar(255) NOT NULL default '', last_updated datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxINDEXNAME ( id_idxINDEX mediumint(9) unsigned NOT NULL, ln char(5) NOT NULL default '', type char(3) NOT NULL default 'sn', value varchar(255) NOT NULL, PRIMARY KEY (id_idxINDEX,ln,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxINDEX_field ( id_idxINDEX mediumint(9) unsigned NOT NULL, id_field mediumint(9) unsigned NOT NULL, regexp_punctuation varchar(255) NOT NULL default "[\.\,\:\;\?\!\"]", regexp_alphanumeric_separators varchar(255) NOT NULL default "[\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~]", PRIMARY KEY (id_idxINDEX,id_field) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD01F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD01R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD02F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD02R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD03F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD03R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD04F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD04R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD05F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD05R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD06F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD06R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD07F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD07R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD08F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD08R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD09F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD09R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD10F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxWORD10R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE01F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE01R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE02F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE02R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE03F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE03R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE04F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE04R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE05F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE05R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE06F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE06R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE07F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE07R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE08F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE08R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE09F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE09R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE10F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS idxPHRASE10R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; -- tables for ranking: CREATE TABLE IF NOT EXISTS rnkMETHOD ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(20) NOT NULL default '', last_updated datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id), UNIQUE KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkMETHODNAME ( id_rnkMETHOD mediumint(9) unsigned NOT NULL, ln char(5) NOT NULL default '', type char(3) NOT NULL default 'sn', value varchar(255) NOT NULL, PRIMARY KEY (id_rnkMETHOD,ln,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkMETHODDATA ( id_rnkMETHOD mediumint(9) unsigned NOT NULL, relevance_data longblob, PRIMARY KEY (id_rnkMETHOD) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS collection_rnkMETHOD ( id_collection mediumint(9) unsigned NOT NULL, id_rnkMETHOD mediumint(9) unsigned NOT NULL, score tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_collection,id_rnkMETHOD) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkWORD01F ( id mediumint(9) unsigned NOT NULL auto_increment, term varchar(50) default NULL, hitlist longblob, PRIMARY KEY (id), UNIQUE KEY term (term) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkWORD01R ( id_bibrec mediumint(9) unsigned NOT NULL, termlist longblob, type enum('CURRENT','FUTURE','TEMPORARY') NOT NULL default 'CURRENT', PRIMARY KEY (id_bibrec,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkPAGEVIEWS ( id_bibrec mediumint(8) unsigned default NULL, id_user int(15) unsigned default '0', client_host int(10) unsigned default NULL, view_time datetime default '0000-00-00 00:00:00', KEY view_time (view_time), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkDOWNLOADS ( id_bibrec mediumint(8) unsigned default NULL, download_time datetime default '0000-00-00 00:00:00', client_host int(10) unsigned default NULL, id_user int(15) unsigned default NULL, id_bibdoc mediumint(8) unsigned default NULL, file_version smallint(2) unsigned default NULL, file_format text, KEY download_time (download_time), KEY id_bibrec (id_bibrec) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS rnkCITATIONDATA ( citation_data longblob, citation_data_reversed longblob ) TYPE=MyISAM; -- tables for collections and collection tree: CREATE TABLE IF NOT EXISTS collection ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, dbquery text, nbrecs int(10) unsigned default '0', reclist longblob, restricted varchar(255) default NULL, PRIMARY KEY (id), UNIQUE KEY name (name), KEY dbquery (dbquery(50)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS collectionname ( id_collection mediumint(9) unsigned NOT NULL, ln char(5) NOT NULL default '', type char(3) NOT NULL default 'sn', value varchar(255) NOT NULL, PRIMARY KEY (id_collection,ln,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS collection_collection ( id_dad mediumint(9) unsigned NOT NULL, id_son mediumint(9) unsigned NOT NULL, type char(1) NOT NULL default 'r', score tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_dad,id_son) ) TYPE=MyISAM; -- tables for OAI sets: CREATE TABLE IF NOT EXISTS oaiARCHIVE ( id mediumint(9) unsigned NOT NULL auto_increment, setName varchar(255) NOT NULL default '', setSpec varchar(255) NOT NULL default '', setCollection varchar(255) NOT NULL default '', setDescription text NOT NULL default '', setDefinition text NOT NULL default '', setRecList longblob, p1 text NOT NULL default '', f1 text NOT NULL default '', m1 text NOT NULL default '', p2 text NOT NULL default '', f2 text NOT NULL default '', m2 text NOT NULL default '', p3 text NOT NULL default '', f3 text NOT NULL default '', m3 text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS oaiHARVEST ( id mediumint(9) unsigned NOT NULL auto_increment, baseurl varchar(255) NOT NULL default '', metadataprefix varchar(255) NOT NULL default 'oai_dc', arguments text, comment text, bibconvertcfgfile varchar(255), name varchar(255) NOT NULL, lastrun datetime, frequency mediumint(12) NOT NULL default '0', postprocess varchar(20) NOT NULL default 'h', bibfilterprogram varchar(255) NOT NULL default '', setspecs text NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM; -- tables for portal elements: CREATE TABLE IF NOT EXISTS collection_portalbox ( id_collection mediumint(9) unsigned NOT NULL, id_portalbox mediumint(9) unsigned NOT NULL, ln char(5) NOT NULL default '', position char(3) NOT NULL default 'top', score tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_collection,id_portalbox,ln) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS portalbox ( id mediumint(9) unsigned NOT NULL auto_increment, title text NOT NULL, body text NOT NULL, UNIQUE KEY id (id) ) TYPE=MyISAM; -- tables for search examples: CREATE TABLE IF NOT EXISTS collection_example ( id_collection mediumint(9) unsigned NOT NULL, id_example mediumint(9) unsigned NOT NULL, score tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_collection,id_example) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS example ( id mediumint(9) unsigned NOT NULL auto_increment, type text NOT NULL default '', body text NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- tables for collection formats: CREATE TABLE IF NOT EXISTS collection_format ( id_collection mediumint(9) unsigned NOT NULL, id_format mediumint(9) unsigned NOT NULL, score tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_collection,id_format) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS format ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, code varchar(6) NOT NULL, description varchar(255) default '', content_type varchar(255) default '', PRIMARY KEY (id), UNIQUE KEY code (code) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS formatname ( id_format mediumint(9) unsigned NOT NULL, ln char(5) NOT NULL default '', type char(3) NOT NULL default 'sn', value varchar(255) NOT NULL, PRIMARY KEY (id_format,ln,type) ) TYPE=MyISAM; +-- tables for collection detailed page options + +CREATE TABLE IF NOT EXISTS collectiondetailedpagetabs ( + id_collection mediumint(9) unsigned NOT NULL, + tabs varchar(255) NOT NULL default '', + PRIMARY KEY (id_collection) +) TYPE=MyISAM; + -- tables for search options and MARC tags: CREATE TABLE IF NOT EXISTS collection_field_fieldvalue ( id_collection mediumint(9) unsigned NOT NULL, id_field mediumint(9) unsigned NOT NULL, id_fieldvalue mediumint(9) unsigned, type char(3) NOT NULL default 'src', score tinyint(4) unsigned NOT NULL default '0', score_fieldvalue tinyint(4) unsigned NOT NULL default '0', KEY id_collection (id_collection), KEY id_field (id_field), KEY id_fieldvalue (id_fieldvalue) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS field ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, code varchar(255) NOT NULL, PRIMARY KEY (id), UNIQUE KEY code (code) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS fieldname ( id_field mediumint(9) unsigned NOT NULL, ln char(5) NOT NULL default '', type char(3) NOT NULL default 'sn', value varchar(255) NOT NULL, PRIMARY KEY (id_field,ln,type) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS fieldvalue ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, value text NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS field_tag ( id_field mediumint(9) unsigned NOT NULL, id_tag mediumint(9) unsigned NOT NULL, score tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_field,id_tag) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS tag ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, value char(6) NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- tables for file management CREATE TABLE IF NOT EXISTS bibdoc ( id mediumint(9) unsigned NOT NULL auto_increment, status varchar(50) NOT NULL default '', docname varchar(250) NOT NULL default 'file', creation_date datetime NOT NULL default '0000-00-00', modification_date datetime NOT NULL default '0000-00-00', PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibrec_bibdoc ( id_bibrec mediumint(9) unsigned NOT NULL default '0', id_bibdoc mediumint(9) unsigned NOT NULL default '0', type varchar(255), KEY (id_bibrec), KEY (id_bibdoc) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bibdoc_bibdoc ( id_bibdoc1 mediumint(9) unsigned NOT NULL, id_bibdoc2 mediumint(9) unsigned NOT NULL, type varchar(255), KEY (id_bibdoc1), KEY (id_bibdoc2) ) TYPE=MyISAM; -- tables for publication requests: CREATE TABLE IF NOT EXISTS publreq ( id int(11) NOT NULL auto_increment, host varchar(255) NOT NULL default '', date varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', email varchar(255) NOT NULL default '', address text NOT NULL, publication text NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- table for sessions and users: CREATE TABLE IF NOT EXISTS session ( session_key varchar(32) NOT NULL default '', session_expiry int(11) unsigned NOT NULL default '0', session_object blob, uid int(15) unsigned NOT NULL, UNIQUE KEY session_key (session_key), KEY uid (uid) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS user ( id int(15) unsigned NOT NULL auto_increment, email varchar(255) NOT NULL default '', password blob NOT NULL, note varchar(255) default NULL, settings blob default NULL, nickname varchar(255) NOT NULL default '', last_login datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY id (id), KEY email (email), KEY nickname (nickname) ) TYPE=MyISAM; -- tables for usergroups CREATE TABLE IF NOT EXISTS usergroup ( id int(15) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL default '', description text default '', join_policy char(2) NOT NULL default '', login_method varchar(255) NOT NULL default 'INTERNAL', PRIMARY KEY (id), UNIQUE KEY login_method_name (login_method(70), name), KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS user_usergroup ( id_user int(15) unsigned NOT NULL default '0', id_usergroup int(15) unsigned NOT NULL default '0', user_status char(1) NOT NULL default '', user_status_date datetime NOT NULL default '0000-00-00 00:00:00', KEY id_user (id_user), KEY id_usergroup (id_usergroup) ) TYPE=MyISAM; -- tables for access control engine CREATE TABLE IF NOT EXISTS accROLE ( id int(15) unsigned NOT NULL auto_increment, name varchar(32), description varchar(255), firerole_def_ser tinyblob NULL, firerole_def_src tinytext NULL, PRIMARY KEY (id), UNIQUE KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS user_accROLE ( id_user int(15) unsigned NOT NULL, id_accROLE int(15) unsigned NOT NULL, expiration datetime NOT NULL default '9999-12-31 23:59:59', PRIMARY KEY (id_user, id_accROLE) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS accMAILCOOKIE ( id int(15) unsigned NOT NULL auto_increment, data blob NOT NULL, expiration datetime NOT NULL default '9999-12-31 23:59:59', kind varchar(32) NOT NULL, onetime boolean NOT NULL default 0, PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS accACTION ( id int(15) unsigned NOT NULL auto_increment, name varchar(32), description varchar(255), allowedkeywords varchar(255), optional ENUM ('yes', 'no') NOT NULL default 'no', PRIMARY KEY (id), UNIQUE KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS accARGUMENT ( id int(15) unsigned NOT NULL auto_increment, keyword varchar (32), value varchar(64), PRIMARY KEY (id), KEY KEYVAL (keyword, value) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS accROLE_accACTION_accARGUMENT ( id_accROLE int(15), id_accACTION int(15), id_accARGUMENT int(15), argumentlistid mediumint(8), KEY id_accROLE (id_accROLE), KEY id_accACTION (id_accACTION), KEY id_accARGUMENT (id_accARGUMENT) ) TYPE=MyISAM; -- tables for personal/collaborative features (baskets, alerts, searches, messages, usergroups): CREATE TABLE IF NOT EXISTS user_query ( id_user int(15) unsigned NOT NULL default '0', id_query int(15) unsigned NOT NULL default '0', hostname varchar(50) default 'unknown host', date datetime default NULL, KEY id_user (id_user,id_query) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS query ( id int(15) unsigned NOT NULL auto_increment, type char(1) NOT NULL default 'r', urlargs text NOT NULL, PRIMARY KEY (id), KEY urlargs (urlargs(100)) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS user_query_basket ( id_user int(15) unsigned NOT NULL default '0', id_query int(15) unsigned NOT NULL default '0', id_basket int(15) unsigned NOT NULL default '0', frequency varchar(5) NOT NULL default '', date_creation date default NULL, date_lastrun date default '0000-00-00', alert_name varchar(30) NOT NULL default '', notification char(1) NOT NULL default 'y', PRIMARY KEY (id_user,id_query,frequency,id_basket), KEY alert_name (alert_name) ) TYPE=MyISAM; -- baskets CREATE TABLE IF NOT EXISTS bskBASKET ( id int(15) unsigned NOT NULL auto_increment, id_owner int(15) unsigned NOT NULL default '0', name varchar(50) NOT NULL default '', date_modification datetime NOT NULL default '0000-00-00 00:00:00', nb_views int(15) NOT NULL default '0', PRIMARY KEY (id), KEY id_owner (id_owner), KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bskREC ( id_bibrec_or_bskEXTREC int(16) NOT NULL default '0', id_bskBASKET int(15) unsigned NOT NULL default '0', id_user_who_added_item int(15) NOT NULL default '0', score int(15) NOT NULL default '0', date_added datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id_bibrec_or_bskEXTREC,id_bskBASKET), KEY id_bibrec_or_bskEXTREC (id_bibrec_or_bskEXTREC), KEY id_bskBASKET (id_bskBASKET), KEY score (score), KEY date_added (date_added) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bskEXTREC ( id int(15) unsigned NOT NULL default '0', creation_date datetime NOT NULL default '0000-00-00 00:00:00', modification_date datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bskEXTFMT ( id int(15) unsigned NOT NULL auto_increment, id_bskEXTREC int(15) unsigned NOT NULL default '0', format varchar(10) NOT NULL default '', last_updated datetime NOT NULL default '0000-00-00 00:00:00', value longblob, PRIMARY KEY (id), KEY id_bskEXTREC (id_bskEXTREC), KEY format (format) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS user_bskBASKET ( id_user int(15) unsigned NOT NULL default '0', id_bskBASKET int(15) unsigned NOT NULL default '0', topic varchar(50) NOT NULL default '', PRIMARY KEY (id_user,id_bskBASKET), KEY id_user (id_user), KEY id_bskBASKET (id_bskBASKET) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS usergroup_bskBASKET ( id_usergroup int(15) unsigned NOT NULL default '0', id_bskBASKET int(15) unsigned NOT NULL default '0', topic varchar(50) NOT NULL default '', date_shared datetime NOT NULL default '0000-00-00 00:00:00', share_level char(2) NOT NULL default '', PRIMARY KEY (id_usergroup,id_bskBASKET), KEY id_usergroup (id_usergroup), KEY id_bskBASKET (id_bskBASKET) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS bskRECORDCOMMENT ( id int(15) unsigned NOT NULL auto_increment, id_bibrec_or_bskEXTREC int(16) NOT NULL default '0', id_bskBASKET int(15) unsigned NOT NULL default '0', id_user int(15) unsigned NOT NULL default '0', title varchar(255) NOT NULL default '', body text NOT NULL, date_creation datetime NOT NULL default '0000-00-00 00:00:00', priority int(15) NOT NULL default '0', PRIMARY KEY (id), KEY id_bskBASKET (id_bskBASKET), KEY id_bibrec_or_bskEXTREC (id_bibrec_or_bskEXTREC), KEY date_creation (date_creation) ) TYPE=MyISAM; -- tables for messaging system CREATE TABLE IF NOT EXISTS msgMESSAGE ( id int(15) unsigned NOT NULL auto_increment, id_user_from int(15) unsigned NOT NULL default '0', sent_to_user_nicks text NOT NULL default '', sent_to_group_names text NOT NULL default '', subject text NOT NULL default '', body text default NULL, sent_date datetime NOT NULL default '0000-00-00 00:00:00', received_date datetime NULL default '0000-00-00 00:00:00', PRIMARY KEY id (id), KEY id_user_from (id_user_from) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS user_msgMESSAGE ( id_user_to int(15) unsigned NOT NULL default '0', id_msgMESSAGE int(15) unsigned NOT NULL default '0', status char(1) NOT NULL default 'N', PRIMARY KEY id (id_user_to, id_msgMESSAGE), KEY id_user_to (id_user_to), KEY id_msgMESSAGE (id_msgMESSAGE) ) TYPE=MyISAM; --tables for WebComment CREATE TABLE IF NOT EXISTS cmtRECORDCOMMENT ( id int(15) unsigned NOT NULL auto_increment, id_bibrec int(15) unsigned NOT NULL default '0', id_user int(15) unsigned NOT NULL default '0', title varchar(255) NOT NULL default '', body text NOT NULL default '', date_creation datetime NOT NULL default '0000-00-00 00:00:00', star_score tinyint(5) unsigned NOT NULL default '0', nb_votes_yes int(10) NOT NULL default '0', nb_votes_total int(10) unsigned NOT NULL default '0', nb_abuse_reports int(10) NOT NULL default '0', PRIMARY KEY (id), KEY id_bibrec (id_bibrec), KEY id_user (id_user) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS cmtACTIONHISTORY ( id_cmtRECORDCOMMENT int(15) unsigned NULL, id_bibrec int(15) unsigned NULL, id_user int(15) unsigned NULL default NULL, client_host int(10) unsigned NOT NULL, action_time datetime NOT NULL default '0000-00-00 00:00:00', action_code char(1) NOT NULL, KEY id_cmtRECORDCOMMENT (id_cmtRECORDCOMMENT), KEY client_host (client_host), KEY id_user (id_user), KEY action_code (action_code) ) TYPE=MyISAM; -- tables for BibFormat in Python CREATE TABLE IF NOT EXISTS fmtKNOWLEDGEBASES ( id mediumint(8) unsigned NOT NULL auto_increment, name varchar(255) default '', description text default '', PRIMARY KEY (id), UNIQUE KEY name (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS fmtKNOWLEDGEBASEMAPPINGS ( id mediumint(8) unsigned NOT NULL auto_increment, m_key varchar(255) NOT NULL default '', m_value text NOT NULL default '', id_fmtKNOWLEDGEBASES mediumint(8) NOT NULL default '0', PRIMARY KEY (id), KEY id_fmtKNOWLEDGEBASES (id_fmtKNOWLEDGEBASES) ) TYPE=MyISAM; -- tables for BibFormat, formely known as FlexElink: CREATE TABLE IF NOT EXISTS flxFORMATS ( name varchar(255) NOT NULL default '', value text, doc text, serialized longtext, PRIMARY KEY (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxKBS ( kb_name varchar(255) NOT NULL default '', kb_table varchar(255) NOT NULL default '', doc text, PRIMARY KEY (kb_name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxKBDBCOLLID2COLL ( vkey varchar(255) NOT NULL default '', value text, PRIMARY KEY (vkey) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxKBDBCOLLID2BIBTEX ( vkey varchar(255) NOT NULL default '', value text, PRIMARY KEY (vkey) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxKBEJOURNALS ( vkey varchar(255) NOT NULL default '', value text, PRIMARY KEY (vkey) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxLINKTYPES ( linktype varchar(255) NOT NULL default '', check_exists enum('Y','N') NOT NULL default 'N', solvingtype enum('INT','EXT') NOT NULL default 'EXT', base_file varchar(255) NOT NULL default '', base_url varchar(255) NOT NULL default '', PRIMARY KEY (linktype) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxLINKTYPECONDITIONS ( linktype varchar(255) NOT NULL default '', eval_order int(11) NOT NULL default '0', el_condition text NOT NULL, el_action text NOT NULL, solvingtype enum('INT','EXT') NOT NULL default 'EXT', base_file varchar(255) NOT NULL default '', base_url varchar(255) NOT NULL default '', PRIMARY KEY (linktype,eval_order) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxLINKTYPECONDITIONSACTIONS ( linktype varchar(255) NOT NULL default '', eval_order int(11) NOT NULL default '0', apply_order int(11) NOT NULL default '0', el_code text, PRIMARY KEY (linktype,eval_order,apply_order) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxLINKTYPECONDITIONSFILEFORMATS ( linktype varchar(255) NOT NULL default '', eval_order int(11) NOT NULL default '0', fname varchar(30) NOT NULL default '', PRIMARY KEY (linktype,eval_order,fname) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxFILEFORMATS ( name varchar(30) NOT NULL default '', text varchar(255) default '', extensions text, PRIMARY KEY (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxLINKTYPEPARAMS ( linktype varchar(255) NOT NULL default '', pname varchar(78) NOT NULL default '', ord tinyint(4) NOT NULL default '0', PRIMARY KEY (linktype,pname), UNIQUE KEY IDX_LINKTYPE_PARAMS_ORD (linktype,ord) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxXMLMARCEXTRULES ( type varchar(8) NOT NULL default '', varname varchar(50) NOT NULL default '', att_id varchar(150) default NULL, att_i1 varchar(150) default NULL, att_i2 varchar(150) default NULL, mvalues enum('S','N') NOT NULL default 'S', ftype enum("DATAFIELD", "CONTROLFIELD") not null, PRIMARY KEY (type,varname) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxXMLMARCEXTRULESUBFIELDS ( type varchar(8) NOT NULL default '', varname varchar(50) NOT NULL default '', sfname varchar(50) NOT NULL default '', att_label varchar(150) default NULL, PRIMARY KEY (type,varname,sfname) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxBEHAVIORCONDITIONSACTIONS ( otype varchar(40) NOT NULL default '', eval_order int(11) NOT NULL default '0', apply_order int(11) NOT NULL default '0', locator text, el_code text, PRIMARY KEY (otype,eval_order,apply_order) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxBEHAVIORCONDITIONS ( otype varchar(40) NOT NULL default '', eval_order int(11) NOT NULL default '0', el_condition text NOT NULL, PRIMARY KEY (otype,eval_order) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxBEHAVIORS ( name varchar(40) NOT NULL default '', type enum('NORMAL','IENRICH') NOT NULL default 'NORMAL', doc text, PRIMARY KEY (name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxUDFS ( fname varchar(100) NOT NULL default '', code text NOT NULL, rtype enum('STRING','BOOL') NOT NULL default 'STRING', doc text, PRIMARY KEY (fname) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxUDFPARAMS ( fname varchar(100) NOT NULL default '', pname varchar(100) NOT NULL default '', ord tinyint(4) NOT NULL default '0', PRIMARY KEY (fname,pname), UNIQUE KEY IDX_UDFS_PARAMS_ORD (fname,ord) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxUSERS ( id int(11) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS flxREFORMAT ( id int(10) unsigned NOT NULL auto_increment, user varchar(50) NOT NULL, date DATETIME NOT NULL, reg_select text, otypes varchar(40) not null, state varchar(20), PRIMARY KEY (id) ) TYPE=MyISAM; -- tables for webSubmit: CREATE TABLE IF NOT EXISTS sbmACTION ( lactname text, sactname char(3) NOT NULL default '', dir text, cd date default NULL, md date default NULL, actionbutton text, statustext text, PRIMARY KEY (sactname) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmALLFUNCDESCR ( function varchar(40) NOT NULL default '', description tinytext, PRIMARY KEY (function) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmAPPROVAL ( doctype varchar(10) NOT NULL default '', categ varchar(50) NOT NULL default '', rn varchar(50) NOT NULL default '', status varchar(10) NOT NULL default '', dFirstReq datetime NOT NULL default '0000-00-00 00:00:00', dLastReq datetime NOT NULL default '0000-00-00 00:00:00', dAction datetime NOT NULL default '0000-00-00 00:00:00', access varchar(20) NOT NULL default '0', PRIMARY KEY (rn) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmCOLLECTION ( id int(11) NOT NULL auto_increment, name varchar(100) NOT NULL default '', PRIMARY KEY (id) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS sbmCOLLECTION_sbmCOLLECTION ( id_father int(11) NOT NULL default '0', id_son int(11) NOT NULL default '0', catalogue_order int(11) NOT NULL default '0' ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS sbmCOLLECTION_sbmDOCTYPE ( id_father int(11) NOT NULL default '0', id_son char(10) NOT NULL default '0', catalogue_order int(11) NOT NULL default '0' ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS sbmCATEGORIES ( doctype varchar(10) NOT NULL default '', sname varchar(75) NOT NULL default '', lname varchar(75) NOT NULL default '', score tinyint unsigned NOT NULL default 0, PRIMARY KEY (doctype, sname), KEY doctype (doctype), KEY sname (sname) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmCHECKS ( chname varchar(15) NOT NULL default '', chdesc text, cd date default NULL, md date default NULL, chefi1 text, chefi2 text, PRIMARY KEY (chname) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmDOCTYPE ( ldocname text, sdocname varchar(10) default NULL, cd date default NULL, md date default NULL, description text ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmFIELD ( subname varchar(13) default NULL, pagenb int(11) default NULL, fieldnb int(11) default NULL, fidesc varchar(15) default NULL, fitext text, level char(1) default NULL, sdesc text, checkn text, cd date default NULL, md date default NULL, fiefi1 text, fiefi2 text ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmFIELDDESC ( name varchar(15) NOT NULL default '', alephcode varchar(50) default NULL, marccode varchar(50) NOT NULL default '', type char(1) default NULL, size int(11) default NULL, rows int(11) default NULL, cols int(11) default NULL, maxlength int(11) default NULL, val text, fidesc text, cd date default NULL, md date default NULL, modifytext text, fddfi2 text, cookie int(11) default '0', PRIMARY KEY (name) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmFORMATEXTENSION ( FILE_FORMAT text NOT NULL, FILE_EXTENSION text NOT NULL ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmFUNCTIONS ( action varchar(10) NOT NULL default '', doctype varchar(10) NOT NULL default '', function varchar(40) NOT NULL default '', score int(11) NOT NULL default '0', step tinyint(4) NOT NULL default '1' ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmFUNDESC ( function varchar(40) NOT NULL default '', param varchar(40) default NULL ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmGFILERESULT ( FORMAT text NOT NULL, RESULT text NOT NULL ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmIMPLEMENT ( docname varchar(10) default NULL, actname char(3) default NULL, displayed char(1) default NULL, subname varchar(13) default NULL, nbpg int(11) default NULL, cd date default NULL, md date default NULL, buttonorder int(11) default NULL, statustext text, level char(1) NOT NULL default '', score int(11) NOT NULL default '0', stpage int(11) NOT NULL default '0', endtxt varchar(100) NOT NULL default '' ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmPARAMETERS ( doctype varchar(10) NOT NULL default '', name varchar(20) NOT NULL default '', value varchar(200) NOT NULL default '', PRIMARY KEY (doctype,name) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS sbmPUBLICATION ( doctype varchar(10) NOT NULL default '', categ varchar(50) NOT NULL default '', rn varchar(50) NOT NULL default '', status varchar(10) NOT NULL default '', dFirstReq datetime NOT NULL default '0000-00-00 00:00:00', dLastReq datetime NOT NULL default '0000-00-00 00:00:00', dAction datetime NOT NULL default '0000-00-00 00:00:00', accessref varchar(20) NOT NULL default '', accessedi varchar(20) NOT NULL default '', access varchar(20) NOT NULL default '', referees varchar(50) NOT NULL default '', authoremail varchar(50) NOT NULL default '', dRefSelection datetime NOT NULL default '0000-00-00 00:00:00', dRefRec datetime NOT NULL default '0000-00-00 00:00:00', dEdiRec datetime NOT NULL default '0000-00-00 00:00:00', accessspo varchar(20) NOT NULL default '', journal varchar(100) default NULL, PRIMARY KEY (doctype,categ,rn) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmPUBLICATIONCOMM ( id int(11) NOT NULL auto_increment, id_parent int(11) default '0', rn varchar(100) NOT NULL default '', firstname varchar(100) default NULL, secondname varchar(100) default NULL, email varchar(100) default NULL, date varchar(40) NOT NULL default '', synopsis varchar(255) NOT NULL default '', commentfulltext text, PRIMARY KEY (id) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmPUBLICATIONDATA ( doctype varchar(10) NOT NULL default '', editoboard varchar(250) NOT NULL default '', base varchar(10) NOT NULL default '', logicalbase varchar(10) NOT NULL default '', spokesperson varchar(50) NOT NULL default '', PRIMARY KEY (doctype) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmREFEREES ( doctype varchar(10) NOT NULL default '', categ varchar(10) NOT NULL default '', name varchar(50) NOT NULL default '', address varchar(50) NOT NULL default '', rid int(11) NOT NULL auto_increment, PRIMARY KEY (rid) ) TYPE=MyISAM PACK_KEYS=1; CREATE TABLE IF NOT EXISTS sbmSUBMISSIONS ( email varchar(50) NOT NULL default '', doctype varchar(10) NOT NULL default '', action varchar(10) NOT NULL default '', status varchar(10) NOT NULL default '', id varchar(30) NOT NULL default '', reference varchar(40) NOT NULL default '', cd datetime NOT NULL default '0000-00-00 00:00:00', md datetime NOT NULL default '0000-00-00 00:00:00' ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS sbmCOOKIES ( id int(15) unsigned NOT NULL auto_increment, name varchar(100) NOT NULL, value text, uid int(15) NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- Scheduler tables CREATE TABLE IF NOT EXISTS schTASK ( id int(15) unsigned NOT NULL auto_increment, proc varchar(20) NOT NULL, host varchar(255) NOT NULL, user varchar(50) NOT NULL, runtime datetime NOT NULL, sleeptime varchar(20), arguments mediumblob, status varchar(50), progress varchar(255), PRIMARY KEY (id), KEY status (status), KEY runtime (runtime) ) TYPE=MyISAM; -- External collections CREATE TABLE IF NOT EXISTS collection_externalcollection ( id_collection mediumint(9) unsigned NOT NULL default '0', id_externalcollection mediumint(9) unsigned NOT NULL default '0', type tinyint(4) unsigned NOT NULL default '0', PRIMARY KEY (id_collection, id_externalcollection) ) TYPE=MyISAM; CREATE TABLE IF NOT EXISTS externalcollection ( id mediumint(9) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL default '', PRIMARY KEY (id), UNIQUE KEY name (name) ) TYPE=MyISAM; -- end of file diff --git a/modules/miscutil/sql/tabdrop.sql b/modules/miscutil/sql/tabdrop.sql index f6544262c..5613fc29c 100644 --- a/modules/miscutil/sql/tabdrop.sql +++ b/modules/miscutil/sql/tabdrop.sql @@ -1,374 +1,375 @@ -- $Id$ -- This file is part of CDS Invenio. -- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. -- -- CDS Invenio is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of the -- License, or (at your option) any later version. -- -- CDS Invenio is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with CDS Invenio; if not, write to the Free Software Foundation, Inc., -- 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. DROP TABLE IF EXISTS bibrec; DROP TABLE IF EXISTS bib00x; DROP TABLE IF EXISTS bib01x; DROP TABLE IF EXISTS bib02x; DROP TABLE IF EXISTS bib03x; DROP TABLE IF EXISTS bib04x; DROP TABLE IF EXISTS bib05x; DROP TABLE IF EXISTS bib06x; DROP TABLE IF EXISTS bib07x; DROP TABLE IF EXISTS bib08x; DROP TABLE IF EXISTS bib09x; DROP TABLE IF EXISTS bib10x; DROP TABLE IF EXISTS bib11x; DROP TABLE IF EXISTS bib12x; DROP TABLE IF EXISTS bib13x; DROP TABLE IF EXISTS bib14x; DROP TABLE IF EXISTS bib15x; DROP TABLE IF EXISTS bib16x; DROP TABLE IF EXISTS bib17x; DROP TABLE IF EXISTS bib18x; DROP TABLE IF EXISTS bib19x; DROP TABLE IF EXISTS bib20x; DROP TABLE IF EXISTS bib21x; DROP TABLE IF EXISTS bib22x; DROP TABLE IF EXISTS bib23x; DROP TABLE IF EXISTS bib24x; DROP TABLE IF EXISTS bib25x; DROP TABLE IF EXISTS bib26x; DROP TABLE IF EXISTS bib27x; DROP TABLE IF EXISTS bib28x; DROP TABLE IF EXISTS bib29x; DROP TABLE IF EXISTS bib30x; DROP TABLE IF EXISTS bib31x; DROP TABLE IF EXISTS bib32x; DROP TABLE IF EXISTS bib33x; DROP TABLE IF EXISTS bib34x; DROP TABLE IF EXISTS bib35x; DROP TABLE IF EXISTS bib36x; DROP TABLE IF EXISTS bib37x; DROP TABLE IF EXISTS bib38x; DROP TABLE IF EXISTS bib39x; DROP TABLE IF EXISTS bib40x; DROP TABLE IF EXISTS bib41x; DROP TABLE IF EXISTS bib42x; DROP TABLE IF EXISTS bib43x; DROP TABLE IF EXISTS bib44x; DROP TABLE IF EXISTS bib45x; DROP TABLE IF EXISTS bib46x; DROP TABLE IF EXISTS bib47x; DROP TABLE IF EXISTS bib48x; DROP TABLE IF EXISTS bib49x; DROP TABLE IF EXISTS bib50x; DROP TABLE IF EXISTS bib51x; DROP TABLE IF EXISTS bib52x; DROP TABLE IF EXISTS bib53x; DROP TABLE IF EXISTS bib54x; DROP TABLE IF EXISTS bib55x; DROP TABLE IF EXISTS bib56x; DROP TABLE IF EXISTS bib57x; DROP TABLE IF EXISTS bib58x; DROP TABLE IF EXISTS bib59x; DROP TABLE IF EXISTS bib60x; DROP TABLE IF EXISTS bib61x; DROP TABLE IF EXISTS bib62x; DROP TABLE IF EXISTS bib63x; DROP TABLE IF EXISTS bib64x; DROP TABLE IF EXISTS bib65x; DROP TABLE IF EXISTS bib66x; DROP TABLE IF EXISTS bib67x; DROP TABLE IF EXISTS bib68x; DROP TABLE IF EXISTS bib69x; DROP TABLE IF EXISTS bib70x; DROP TABLE IF EXISTS bib71x; DROP TABLE IF EXISTS bib72x; DROP TABLE IF EXISTS bib73x; DROP TABLE IF EXISTS bib74x; DROP TABLE IF EXISTS bib75x; DROP TABLE IF EXISTS bib76x; DROP TABLE IF EXISTS bib77x; DROP TABLE IF EXISTS bib78x; DROP TABLE IF EXISTS bib79x; DROP TABLE IF EXISTS bib80x; DROP TABLE IF EXISTS bib81x; DROP TABLE IF EXISTS bib82x; DROP TABLE IF EXISTS bib83x; DROP TABLE IF EXISTS bib84x; DROP TABLE IF EXISTS bib85x; DROP TABLE IF EXISTS bib86x; DROP TABLE IF EXISTS bib87x; DROP TABLE IF EXISTS bib88x; DROP TABLE IF EXISTS bib89x; DROP TABLE IF EXISTS bib90x; DROP TABLE IF EXISTS bib91x; DROP TABLE IF EXISTS bib92x; DROP TABLE IF EXISTS bib93x; DROP TABLE IF EXISTS bib94x; DROP TABLE IF EXISTS bib95x; DROP TABLE IF EXISTS bib96x; DROP TABLE IF EXISTS bib97x; DROP TABLE IF EXISTS bib98x; DROP TABLE IF EXISTS bib99x; DROP TABLE IF EXISTS bibrec_bib00x; DROP TABLE IF EXISTS bibrec_bib01x; DROP TABLE IF EXISTS bibrec_bib02x; DROP TABLE IF EXISTS bibrec_bib03x; DROP TABLE IF EXISTS bibrec_bib04x; DROP TABLE IF EXISTS bibrec_bib05x; DROP TABLE IF EXISTS bibrec_bib06x; DROP TABLE IF EXISTS bibrec_bib07x; DROP TABLE IF EXISTS bibrec_bib08x; DROP TABLE IF EXISTS bibrec_bib09x; DROP TABLE IF EXISTS bibrec_bib10x; DROP TABLE IF EXISTS bibrec_bib11x; DROP TABLE IF EXISTS bibrec_bib12x; DROP TABLE IF EXISTS bibrec_bib13x; DROP TABLE IF EXISTS bibrec_bib14x; DROP TABLE IF EXISTS bibrec_bib15x; DROP TABLE IF EXISTS bibrec_bib16x; DROP TABLE IF EXISTS bibrec_bib17x; DROP TABLE IF EXISTS bibrec_bib18x; DROP TABLE IF EXISTS bibrec_bib19x; DROP TABLE IF EXISTS bibrec_bib20x; DROP TABLE IF EXISTS bibrec_bib21x; DROP TABLE IF EXISTS bibrec_bib22x; DROP TABLE IF EXISTS bibrec_bib23x; DROP TABLE IF EXISTS bibrec_bib24x; DROP TABLE IF EXISTS bibrec_bib25x; DROP TABLE IF EXISTS bibrec_bib26x; DROP TABLE IF EXISTS bibrec_bib27x; DROP TABLE IF EXISTS bibrec_bib28x; DROP TABLE IF EXISTS bibrec_bib29x; DROP TABLE IF EXISTS bibrec_bib30x; DROP TABLE IF EXISTS bibrec_bib31x; DROP TABLE IF EXISTS bibrec_bib32x; DROP TABLE IF EXISTS bibrec_bib33x; DROP TABLE IF EXISTS bibrec_bib34x; DROP TABLE IF EXISTS bibrec_bib35x; DROP TABLE IF EXISTS bibrec_bib36x; DROP TABLE IF EXISTS bibrec_bib37x; DROP TABLE IF EXISTS bibrec_bib38x; DROP TABLE IF EXISTS bibrec_bib39x; DROP TABLE IF EXISTS bibrec_bib40x; DROP TABLE IF EXISTS bibrec_bib41x; DROP TABLE IF EXISTS bibrec_bib42x; DROP TABLE IF EXISTS bibrec_bib43x; DROP TABLE IF EXISTS bibrec_bib44x; DROP TABLE IF EXISTS bibrec_bib45x; DROP TABLE IF EXISTS bibrec_bib46x; DROP TABLE IF EXISTS bibrec_bib47x; DROP TABLE IF EXISTS bibrec_bib48x; DROP TABLE IF EXISTS bibrec_bib49x; DROP TABLE IF EXISTS bibrec_bib50x; DROP TABLE IF EXISTS bibrec_bib51x; DROP TABLE IF EXISTS bibrec_bib52x; DROP TABLE IF EXISTS bibrec_bib53x; DROP TABLE IF EXISTS bibrec_bib54x; DROP TABLE IF EXISTS bibrec_bib55x; DROP TABLE IF EXISTS bibrec_bib56x; DROP TABLE IF EXISTS bibrec_bib57x; DROP TABLE IF EXISTS bibrec_bib58x; DROP TABLE IF EXISTS bibrec_bib59x; DROP TABLE IF EXISTS bibrec_bib60x; DROP TABLE IF EXISTS bibrec_bib61x; DROP TABLE IF EXISTS bibrec_bib62x; DROP TABLE IF EXISTS bibrec_bib63x; DROP TABLE IF EXISTS bibrec_bib64x; DROP TABLE IF EXISTS bibrec_bib65x; DROP TABLE IF EXISTS bibrec_bib66x; DROP TABLE IF EXISTS bibrec_bib67x; DROP TABLE IF EXISTS bibrec_bib68x; DROP TABLE IF EXISTS bibrec_bib69x; DROP TABLE IF EXISTS bibrec_bib70x; DROP TABLE IF EXISTS bibrec_bib71x; DROP TABLE IF EXISTS bibrec_bib72x; DROP TABLE IF EXISTS bibrec_bib73x; DROP TABLE IF EXISTS bibrec_bib74x; DROP TABLE IF EXISTS bibrec_bib75x; DROP TABLE IF EXISTS bibrec_bib76x; DROP TABLE IF EXISTS bibrec_bib77x; DROP TABLE IF EXISTS bibrec_bib78x; DROP TABLE IF EXISTS bibrec_bib79x; DROP TABLE IF EXISTS bibrec_bib80x; DROP TABLE IF EXISTS bibrec_bib81x; DROP TABLE IF EXISTS bibrec_bib82x; DROP TABLE IF EXISTS bibrec_bib83x; DROP TABLE IF EXISTS bibrec_bib84x; DROP TABLE IF EXISTS bibrec_bib85x; DROP TABLE IF EXISTS bibrec_bib86x; DROP TABLE IF EXISTS bibrec_bib87x; DROP TABLE IF EXISTS bibrec_bib88x; DROP TABLE IF EXISTS bibrec_bib89x; DROP TABLE IF EXISTS bibrec_bib90x; DROP TABLE IF EXISTS bibrec_bib91x; DROP TABLE IF EXISTS bibrec_bib92x; DROP TABLE IF EXISTS bibrec_bib93x; DROP TABLE IF EXISTS bibrec_bib94x; DROP TABLE IF EXISTS bibrec_bib95x; DROP TABLE IF EXISTS bibrec_bib96x; DROP TABLE IF EXISTS bibrec_bib97x; DROP TABLE IF EXISTS bibrec_bib98x; DROP TABLE IF EXISTS bibrec_bib99x; DROP TABLE IF EXISTS bibfmt; DROP TABLE IF EXISTS idxINDEX; DROP TABLE IF EXISTS idxINDEXNAME; DROP TABLE IF EXISTS idxINDEX_field; DROP TABLE IF EXISTS idxWORD01F; DROP TABLE IF EXISTS idxWORD02F; DROP TABLE IF EXISTS idxWORD03F; DROP TABLE IF EXISTS idxWORD04F; DROP TABLE IF EXISTS idxWORD05F; DROP TABLE IF EXISTS idxWORD06F; DROP TABLE IF EXISTS idxWORD07F; DROP TABLE IF EXISTS idxWORD08F; DROP TABLE IF EXISTS idxWORD09F; DROP TABLE IF EXISTS idxWORD10F; DROP TABLE IF EXISTS idxWORD01R; DROP TABLE IF EXISTS idxWORD02R; DROP TABLE IF EXISTS idxWORD03R; DROP TABLE IF EXISTS idxWORD04R; DROP TABLE IF EXISTS idxWORD05R; DROP TABLE IF EXISTS idxWORD06R; DROP TABLE IF EXISTS idxWORD07R; DROP TABLE IF EXISTS idxWORD08R; DROP TABLE IF EXISTS idxWORD09R; DROP TABLE IF EXISTS idxWORD10R; DROP TABLE IF EXISTS idxPHRASE01F; DROP TABLE IF EXISTS idxPHRASE02F; DROP TABLE IF EXISTS idxPHRASE03F; DROP TABLE IF EXISTS idxPHRASE04F; DROP TABLE IF EXISTS idxPHRASE05F; DROP TABLE IF EXISTS idxPHRASE06F; DROP TABLE IF EXISTS idxPHRASE07F; DROP TABLE IF EXISTS idxPHRASE08F; DROP TABLE IF EXISTS idxPHRASE09F; DROP TABLE IF EXISTS idxPHRASE10F; DROP TABLE IF EXISTS idxPHRASE01R; DROP TABLE IF EXISTS idxPHRASE02R; DROP TABLE IF EXISTS idxPHRASE03R; DROP TABLE IF EXISTS idxPHRASE04R; DROP TABLE IF EXISTS idxPHRASE05R; DROP TABLE IF EXISTS idxPHRASE06R; DROP TABLE IF EXISTS idxPHRASE07R; DROP TABLE IF EXISTS idxPHRASE08R; DROP TABLE IF EXISTS idxPHRASE09R; DROP TABLE IF EXISTS idxPHRASE10R; DROP TABLE IF EXISTS rnkMETHOD; DROP TABLE IF EXISTS rnkMETHODNAME; DROP TABLE IF EXISTS rnkMETHODDATA; DROP TABLE IF EXISTS rnkWORD01F; DROP TABLE IF EXISTS rnkWORD01R; DROP TABLE IF EXISTS rnkPAGEVIEWS; DROP TABLE IF EXISTS rnkDOWNLOADS; DROP TABLE IF EXISTS rnkCITATIONDATA; DROP TABLE IF EXISTS collection_rnkMETHOD; DROP TABLE IF EXISTS collection; DROP TABLE IF EXISTS collectionname; DROP TABLE IF EXISTS oaiARCHIVE; DROP TABLE IF EXISTS oaiHARVEST; DROP TABLE IF EXISTS collection_collection; DROP TABLE IF EXISTS collection_portalbox; DROP TABLE IF EXISTS portalbox; DROP TABLE IF EXISTS collection_example; DROP TABLE IF EXISTS example; DROP TABLE IF EXISTS collection_format; DROP TABLE IF EXISTS format; DROP TABLE IF EXISTS formatname; DROP TABLE IF EXISTS collection_field_fieldvalue; DROP TABLE IF EXISTS field; DROP TABLE IF EXISTS fieldname; DROP TABLE IF EXISTS fieldvalue; DROP TABLE IF EXISTS field_tag; DROP TABLE IF EXISTS tag; DROP TABLE IF EXISTS publreq; DROP TABLE IF EXISTS session; DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS accROLE; DROP TABLE IF EXISTS accMAILCOOKIE; DROP TABLE IF EXISTS user_accROLE; DROP TABLE IF EXISTS accACTION; DROP TABLE IF EXISTS accARGUMENT; DROP TABLE IF EXISTS accROLE_accACTION_accARGUMENT; DROP TABLE IF EXISTS user_query; DROP TABLE IF EXISTS query; DROP TABLE IF EXISTS user_basket; DROP TABLE IF EXISTS basket; DROP TABLE IF EXISTS basket_record; DROP TABLE IF EXISTS record; DROP TABLE IF EXISTS user_query_basket; DROP TABLE IF EXISTS cmtRECORDCOMMENT; DROP TABLE IF EXISTS fmtKNOWLEDGEBASES; DROP TABLE IF EXISTS fmtKNOWLEDGEBASEMAPPINGS; DROP TABLE IF EXISTS flxFORMATS; DROP TABLE IF EXISTS flxKBS; DROP TABLE IF EXISTS flxKBDBCOLLID2COLL; DROP TABLE IF EXISTS flxKBDBCOLLID2BIBTEX; DROP TABLE IF EXISTS flxKBEJOURNALS; DROP TABLE IF EXISTS flxLINKTYPES; DROP TABLE IF EXISTS flxLINKTYPECONDITIONS; DROP TABLE IF EXISTS flxLINKTYPECONDITIONSACTIONS; DROP TABLE IF EXISTS flxLINKTYPECONDITIONSFILEFORMATS; DROP TABLE IF EXISTS flxFILEFORMATS; DROP TABLE IF EXISTS flxLINKTYPEPARAMS; DROP TABLE IF EXISTS flxXMLMARCEXTRULES; DROP TABLE IF EXISTS flxXMLMARCEXTRULESUBFIELDS; DROP TABLE IF EXISTS flxBEHAVIORCONDITIONSACTIONS; DROP TABLE IF EXISTS flxBEHAVIORCONDITIONS; DROP TABLE IF EXISTS flxBEHAVIORS; DROP TABLE IF EXISTS flxUDFS; DROP TABLE IF EXISTS flxUDFPARAMS; DROP TABLE IF EXISTS flxUSERS; DROP TABLE IF EXISTS flxREFORMAT; DROP TABLE IF EXISTS sbmACTION; DROP TABLE IF EXISTS sbmALLFUNCDESCR; DROP TABLE IF EXISTS sbmAPPROVAL; DROP TABLE IF EXISTS sbmCOLLECTION; DROP TABLE IF EXISTS sbmCOLLECTION_sbmCOLLECTION; DROP TABLE IF EXISTS sbmCOLLECTION_sbmDOCTYPE; DROP TABLE IF EXISTS sbmCATEGORIES; DROP TABLE IF EXISTS sbmCHECKS; DROP TABLE IF EXISTS sbmCOOKIES; DROP TABLE IF EXISTS sbmDOCTYPE; DROP TABLE IF EXISTS sbmFIELD; DROP TABLE IF EXISTS sbmFIELDDESC; DROP TABLE IF EXISTS sbmFORMATEXTENSION; DROP TABLE IF EXISTS sbmFUNCTIONS; DROP TABLE IF EXISTS sbmFUNDESC; DROP TABLE IF EXISTS sbmGFILERESULT; DROP TABLE IF EXISTS sbmIMPLEMENT; DROP TABLE IF EXISTS sbmPARAMETERS; DROP TABLE IF EXISTS sbmPUBLICATION; DROP TABLE IF EXISTS sbmPUBLICATIONCOMM; DROP TABLE IF EXISTS sbmPUBLICATIONDATA; DROP TABLE IF EXISTS sbmREFEREES; DROP TABLE IF EXISTS sbmSUBMISSIONS; DROP TABLE IF EXISTS schTASK; DROP TABLE IF EXISTS bibdoc; DROP TABLE IF EXISTS bibdoc_bibdoc; DROP TABLE IF EXISTS bibrec_bibdoc; DROP TABLE IF EXISTS usergroup; DROP TABLE IF EXISTS user_usergroup; DROP TABLE IF EXISTS user_basket; DROP TABLE IF EXISTS msgMESSAGE; DROP TABLE IF EXISTS user_msgMESSAGE; DROP TABLE IF EXISTS bskBASKET; DROP TABLE IF EXISTS bskEXTREC; DROP TABLE IF EXISTS bskEXTFMT; DROP TABLE IF EXISTS bskREC; DROP TABLE IF EXISTS bskRECORDCOMMENT; DROP TABLE IF EXISTS cmtACTIONHISTORY; DROP TABLE IF EXISTS user_bskBASKET; DROP TABLE IF EXISTS usergroup_bskBASKET; DROP TABLE IF EXISTS collection_externalcollection; DROP TABLE IF EXISTS externalcollection; +DROP TABLE IF EXISTS collectiondetailedpagetabs; -- end of file diff --git a/modules/miscutil/sql/tabfill.sql.wml b/modules/miscutil/sql/tabfill.sql.wml index 30bdfea5f..b5c40994e 100644 --- a/modules/miscutil/sql/tabfill.sql.wml +++ b/modules/miscutil/sql/tabfill.sql.wml @@ -1,1351 +1,1355 @@ ## -*- mode: sql; coding: utf-8; -*- ## $Id$ ## Fills configuration tables with defaults. ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## read config variables: #include "config.wml" #include "configbis.wml" ## local defaults, i.e. WML config variables are to be used: INSERT INTO collection VALUES (1,"",NULL,NULL,NULL,NULL); INSERT INTO collectionname VALUES (1,'en','ln',""); INSERT INTO collectionname VALUES (1,'fr','ln',""); INSERT INTO collectionname VALUES (1,'de','ln',""); INSERT INTO collectionname VALUES (1,'es','ln',""); INSERT INTO collectionname VALUES (1,'ca','ln',""); INSERT INTO collectionname VALUES (1,'pl','ln',""); INSERT INTO collectionname VALUES (1,'pt','ln',""); INSERT INTO collectionname VALUES (1,'it','ln',""); INSERT INTO collectionname VALUES (1,'ja','ln',""); INSERT INTO collectionname VALUES (1,'ru','ln',""); INSERT INTO collectionname VALUES (1,'sk','ln',""); INSERT INTO collectionname VALUES (1,'cs','ln',""); INSERT INTO collectionname VALUES (1,'no','ln',""); INSERT INTO collectionname VALUES (1,'sv','ln',""); INSERT INTO collectionname VALUES (1,'el','ln',""); INSERT INTO collectionname VALUES (1,'uk','ln',""); INSERT INTO collectionname VALUES (1,'bg','ln',""); INSERT INTO collectionname VALUES (1,'hr','ln',""); INSERT INTO collectionname VALUES (1,'zh_CN','ln',""); INSERT INTO collectionname VALUES (1,'zh_TW','ln',""); INSERT INTO user VALUES (1, "", AES_ENCRYPT(email, ''), 1, NULL, 'admin', ''); INSERT INTO flxLINKTYPES VALUES ('AUTHOR_SEARCH','N','EXT','',''); INSERT INTO flxLINKTYPES VALUES ('KEYWORD_SEARCH','N','EXT','',''); INSERT INTO flxLINKTYPECONDITIONS VALUES ('AUTHOR_SEARCH',0,' \"\"=\"\" ','\"/search?f=author&p=\" urlencode($author)','EXT','',''); INSERT INTO flxLINKTYPECONDITIONS VALUES ('KEYWORD_SEARCH',0,' \"\"=\"\" ','\"/search?f=keyword&p=\" urlencode($keyword)','EXT','',''); INSERT INTO flxLINKTYPECONDITIONSACTIONS VALUES ('AUTHOR_SEARCH',0,0,'\"/search?f=author&p=\" urlencode($author)'); INSERT INTO flxLINKTYPECONDITIONSACTIONS VALUES ('KEYWORD_SEARCH',0,0,'\"/search?f=keyword&p=\" urlencode($keyword)'); INSERT INTO flxLINKTYPEPARAMS VALUES ('AUTHOR_SEARCH','AUTHOR',0); INSERT INTO flxLINKTYPEPARAMS VALUES ('KEYWORD_SEARCH','KEYWORD',0); ## generally suitable defaults: INSERT INTO rnkMETHOD (id,name,last_updated) VALUES (1,'wrd','0000-00-00 00:00:00'); INSERT INTO collection_rnkMETHOD (id_collection,id_rnkMETHOD,score) VALUES (1,1,100); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'en','ln','word similarity'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'fr','ln','similarité de mots'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'de','ln','Wortähnlichkeit'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'es','ln','similitud de palabras'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'ca','ln','semblança de paraules'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'pl','ln','word similarity'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'pt','ln','similaridade por palavra'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'it','ln','word similarity'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'ja','ln','word similarity'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'ru','ln','похожые слова'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'sk','ln','podobnosť slov'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'cs','ln','podobnost slov'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'no','ln','ord-likhet'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'sv','ln','ord-likhet'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'el','ln','ομοιότητα λέξης'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'uk','ln','подібні слова'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'bg','ln','word similarity'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'hr','ln','sličnost riječi'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'zh_CN','ln','相似字词'); INSERT INTO rnkMETHODNAME (id_rnkMETHOD,ln,type,value) VALUES (1,'zh_TW','ln','相似字詞'); INSERT INTO field VALUES (1,'any field','anyfield'); INSERT INTO field VALUES (2,'title','title'); INSERT INTO field VALUES (3,'author','author'); INSERT INTO field VALUES (4,'abstract','abstract'); INSERT INTO field VALUES (5,'keyword','keyword'); INSERT INTO field VALUES (6,'report number','reportnumber'); INSERT INTO field VALUES (7,'subject','subject'); INSERT INTO field VALUES (8,'reference','reference'); INSERT INTO field VALUES (9,'fulltext','fulltext'); INSERT INTO field VALUES (10,'collection','collection'); INSERT INTO field VALUES (11,'division','division'); INSERT INTO field VALUES (12,'year','year'); INSERT INTO field VALUES (13,'experiment','experiment'); INSERT INTO field VALUES (14,'record ID','recid'); INSERT INTO fieldname VALUES (1,'en','ln','any field'); INSERT INTO fieldname VALUES (1,'fr','ln','tous les champs'); INSERT INTO fieldname VALUES (1,'de','ln','alle Felder'); INSERT INTO fieldname VALUES (1,'es','ln','cualquier campo'); INSERT INTO fieldname VALUES (1,'ca','ln','qualsevol camp'); INSERT INTO fieldname VALUES (1,'pl','ln','dowolne pole'); INSERT INTO fieldname VALUES (1,'pt','ln','qualquer campo'); INSERT INTO fieldname VALUES (1,'it','ln','tutti i campi'); INSERT INTO fieldname VALUES (1,'ru','ln','любое поле'); INSERT INTO fieldname VALUES (1,'sk','ln','všetky polia'); INSERT INTO fieldname VALUES (1,'cs','ln','všechna pole'); INSERT INTO fieldname VALUES (1,'no','ln','alle felt'); INSERT INTO fieldname VALUES (1,'sv','ln','samtliga fält'); INSERT INTO fieldname VALUES (1,'el','ln','οποιοδήποτε πεδίο'); INSERT INTO fieldname VALUES (1,'uk','ln','всі поля'); INSERT INTO fieldname VALUES (1,'ja','ln','すべての分野'); INSERT INTO fieldname VALUES (1,'bg','ln','всички'); INSERT INTO fieldname VALUES (1,'hr','ln','bilo koje polje'); INSERT INTO fieldname VALUES (1,'zh_CN','ln','任何字段'); INSERT INTO fieldname VALUES (1,'zh_TW','ln','任何欄位'); INSERT INTO fieldname VALUES (2,'en','ln','title'); INSERT INTO fieldname VALUES (2,'fr','ln','titre'); INSERT INTO fieldname VALUES (2,'de','ln','Titel'); INSERT INTO fieldname VALUES (2,'es','ln','título'); INSERT INTO fieldname VALUES (2,'ca','ln','títol'); INSERT INTO fieldname VALUES (2,'pl','ln','tytuł'); INSERT INTO fieldname VALUES (2,'pt','ln','título'); INSERT INTO fieldname VALUES (2,'it','ln','titolo'); INSERT INTO fieldname VALUES (2,'ru','ln','название'); INSERT INTO fieldname VALUES (2,'sk','ln','názov'); INSERT INTO fieldname VALUES (2,'cs','ln','název'); INSERT INTO fieldname VALUES (2,'no','ln','tittel'); INSERT INTO fieldname VALUES (2,'sv','ln','titel'); INSERT INTO fieldname VALUES (2,'el','ln','τίτλος'); INSERT INTO fieldname VALUES (2,'uk','ln','назва'); INSERT INTO fieldname VALUES (2,'ja','ln','タイトル'); INSERT INTO fieldname VALUES (2,'bg','ln','заглавие'); INSERT INTO fieldname VALUES (2,'hr','ln','naslov'); INSERT INTO fieldname VALUES (2,'zh_CN','ln','标题'); INSERT INTO fieldname VALUES (2,'zh_TW','ln','標題'); INSERT INTO fieldname VALUES (3,'en','ln','author'); INSERT INTO fieldname VALUES (3,'fr','ln','auteur'); INSERT INTO fieldname VALUES (3,'de','ln','Autor'); INSERT INTO fieldname VALUES (3,'es','ln','autor'); INSERT INTO fieldname VALUES (3,'ca','ln','autor'); INSERT INTO fieldname VALUES (3,'pl','ln','autor'); INSERT INTO fieldname VALUES (3,'pt','ln','autor'); INSERT INTO fieldname VALUES (3,'it','ln','autore'); INSERT INTO fieldname VALUES (3,'ru','ln','автор'); INSERT INTO fieldname VALUES (3,'sk','ln','autor'); INSERT INTO fieldname VALUES (3,'cs','ln','autor'); INSERT INTO fieldname VALUES (3,'no','ln','forfatter'); INSERT INTO fieldname VALUES (3,'sv','ln','författare'); INSERT INTO fieldname VALUES (3,'el','ln','συγγραφέας'); INSERT INTO fieldname VALUES (3,'uk','ln','автор'); INSERT INTO fieldname VALUES (3,'ja','ln','著者'); INSERT INTO fieldname VALUES (3,'bg','ln','автор'); INSERT INTO fieldname VALUES (3,'hr','ln','autor'); INSERT INTO fieldname VALUES (3,'zh_CN','ln','作者'); INSERT INTO fieldname VALUES (3,'zh_TW','ln','作者'); INSERT INTO fieldname VALUES (4,'en','ln','abstract'); INSERT INTO fieldname VALUES (4,'fr','ln','abstract'); INSERT INTO fieldname VALUES (4,'de','ln','Abstrakt'); INSERT INTO fieldname VALUES (4,'es','ln','resumen'); INSERT INTO fieldname VALUES (4,'ca','ln','resum'); INSERT INTO fieldname VALUES (4,'pl','ln','abstrakt'); INSERT INTO fieldname VALUES (4,'pt','ln','resumo'); INSERT INTO fieldname VALUES (4,'it','ln','riassunto'); INSERT INTO fieldname VALUES (4,'ru','ln','абстракт'); INSERT INTO fieldname VALUES (4,'sk','ln','abstrakt'); INSERT INTO fieldname VALUES (4,'cs','ln','abstrakt'); INSERT INTO fieldname VALUES (4,'no','ln','sammendrag'); INSERT INTO fieldname VALUES (4,'sv','ln','sammanfattning'); INSERT INTO fieldname VALUES (4,'el','ln','περίληψη'); INSERT INTO fieldname VALUES (4,'uk','ln','резюме'); INSERT INTO fieldname VALUES (4,'ja','ln','概要'); INSERT INTO fieldname VALUES (4,'bg','ln','резюме'); INSERT INTO fieldname VALUES (4,'hr','ln','sažetak'); INSERT INTO fieldname VALUES (4,'zh_CN','ln','摘要'); INSERT INTO fieldname VALUES (4,'zh_TW','ln','摘要'); INSERT INTO fieldname VALUES (5,'en','ln','keyword'); INSERT INTO fieldname VALUES (5,'fr','ln','mot clé'); INSERT INTO fieldname VALUES (5,'de','ln','Kennwort'); INSERT INTO fieldname VALUES (5,'es','ln','palabra clave'); INSERT INTO fieldname VALUES (5,'ca','ln','paraula clau'); INSERT INTO fieldname VALUES (5,'pl','ln','słowo kluczowe'); INSERT INTO fieldname VALUES (5,'pt','ln','palavra chave'); INSERT INTO fieldname VALUES (5,'it','ln','parola chiave'); INSERT INTO fieldname VALUES (5,'ru','ln','ключевое слово'); INSERT INTO fieldname VALUES (5,'sk','ln','kľúčové slovo'); INSERT INTO fieldname VALUES (5,'cs','ln','klíčové slovo'); INSERT INTO fieldname VALUES (5,'no','ln','nøkkelord'); INSERT INTO fieldname VALUES (5,'sv','ln','nyckelord'); INSERT INTO fieldname VALUES (5,'el','ln','λέξη κλειδί'); INSERT INTO fieldname VALUES (5,'uk','ln','ключеве слово'); INSERT INTO fieldname VALUES (5,'ja','ln','キーワード'); INSERT INTO fieldname VALUES (5,'bg','ln','ключова дума'); INSERT INTO fieldname VALUES (5,'hr','ln','ključna riječ'); INSERT INTO fieldname VALUES (5,'zh_CN','ln','关键词'); INSERT INTO fieldname VALUES (5,'zh_TW','ln','關鍵詞'); INSERT INTO fieldname VALUES (6,'en','ln','report number'); INSERT INTO fieldname VALUES (6,'fr','ln','numéro de rapport'); INSERT INTO fieldname VALUES (6,'de','ln','Reportnummer'); INSERT INTO fieldname VALUES (6,'es','ln','número de reporte'); INSERT INTO fieldname VALUES (6,'ca','ln','número d\'informe'); INSERT INTO fieldname VALUES (6,'pl','ln','numer raportu'); INSERT INTO fieldname VALUES (6,'pt','ln','número de registro'); INSERT INTO fieldname VALUES (6,'it','ln','numero del rapporto'); INSERT INTO fieldname VALUES (6,'ru','ln','номер документа'); INSERT INTO fieldname VALUES (6,'sk','ln','číslo správy'); INSERT INTO fieldname VALUES (6,'cs','ln','číslo zprávy'); INSERT INTO fieldname VALUES (6,'no','ln','rapportnummer'); INSERT INTO fieldname VALUES (6,'sv','ln','rapportnummer'); INSERT INTO fieldname VALUES (6,'el','ln','αριθμός αναφοράς'); INSERT INTO fieldname VALUES (6,'uk','ln','номер документа'); INSERT INTO fieldname VALUES (6,'ja','ln','レポート数'); INSERT INTO fieldname VALUES (6,'bg','ln','номер на документа'); INSERT INTO fieldname VALUES (6,'hr','ln','broj izvještaja'); INSERT INTO fieldname VALUES (6,'zh_CN','ln','报告编号'); INSERT INTO fieldname VALUES (6,'zh_TW','ln','報告編號'); INSERT INTO fieldname VALUES (7,'en','ln','subject'); INSERT INTO fieldname VALUES (7,'fr','ln','sujet'); INSERT INTO fieldname VALUES (7,'de','ln','Thema'); INSERT INTO fieldname VALUES (7,'es','ln','materia'); INSERT INTO fieldname VALUES (7,'ca','ln','matèria'); INSERT INTO fieldname VALUES (7,'pl','ln','temat'); INSERT INTO fieldname VALUES (7,'pt','ln','assunto'); INSERT INTO fieldname VALUES (7,'it','ln','soggetto'); INSERT INTO fieldname VALUES (7,'ru','ln','предмет'); INSERT INTO fieldname VALUES (7,'sk','ln','predmet'); INSERT INTO fieldname VALUES (7,'cs','ln','předmět'); INSERT INTO fieldname VALUES (7,'no','ln','emne'); INSERT INTO fieldname VALUES (7,'sv','ln',''); INSERT INTO fieldname VALUES (7,'el','ln','θέμα'); INSERT INTO fieldname VALUES (7,'uk','ln','тема'); INSERT INTO fieldname VALUES (7,'ja','ln','ツ 主題'); INSERT INTO fieldname VALUES (7,'bg','ln','тема'); INSERT INTO fieldname VALUES (7,'hr','ln','predmetna odrednica'); INSERT INTO fieldname VALUES (7,'zh_CN','ln','主题'); INSERT INTO fieldname VALUES (7,'zh_TW','ln','主題'); INSERT INTO fieldname VALUES (8,'en','ln','reference'); INSERT INTO fieldname VALUES (8,'fr','ln','référence'); INSERT INTO fieldname VALUES (8,'de','ln','Referenz'); INSERT INTO fieldname VALUES (8,'es','ln','referencia'); INSERT INTO fieldname VALUES (8,'ca','ln','referència'); INSERT INTO fieldname VALUES (8,'pl','ln','odnośnik'); INSERT INTO fieldname VALUES (8,'pt','ln','referência'); INSERT INTO fieldname VALUES (8,'it','ln','referenza'); INSERT INTO fieldname VALUES (8,'ru','ln','ссылка'); INSERT INTO fieldname VALUES (8,'sk','ln','referencie'); INSERT INTO fieldname VALUES (8,'cs','ln','reference'); INSERT INTO fieldname VALUES (8,'no','ln','referanse'); INSERT INTO fieldname VALUES (8,'sv','ln','referens'); INSERT INTO fieldname VALUES (8,'el','ln','αναφορά'); INSERT INTO fieldname VALUES (8,'uk','ln','посилання'); INSERT INTO fieldname VALUES (8,'ja','ln','参照'); INSERT INTO fieldname VALUES (8,'bg','ln','препратка'); INSERT INTO fieldname VALUES (8,'hr','ln','referenca'); INSERT INTO fieldname VALUES (8,'zh_CN','ln','参考'); INSERT INTO fieldname VALUES (8,'zh_TW','ln','參考'); INSERT INTO fieldname VALUES (9,'en','ln','fulltext'); INSERT INTO fieldname VALUES (9,'fr','ln','fulltext'); INSERT INTO fieldname VALUES (9,'de','ln','Volltext'); INSERT INTO fieldname VALUES (9,'es','ln','texto completo'); INSERT INTO fieldname VALUES (9,'ca','ln','text complert'); INSERT INTO fieldname VALUES (9,'pl','ln','pełny tekst'); INSERT INTO fieldname VALUES (9,'pt','ln','texto completo'); INSERT INTO fieldname VALUES (9,'it','ln','testo completo'); INSERT INTO fieldname VALUES (9,'ru','ln','полный текст'); INSERT INTO fieldname VALUES (9,'sk','ln','plný text'); INSERT INTO fieldname VALUES (9,'cs','ln','plný text'); INSERT INTO fieldname VALUES (9,'no','ln','fulltekst'); INSERT INTO fieldname VALUES (9,'sv','ln','fulltext'); INSERT INTO fieldname VALUES (9,'el','ln','πλήρες κείμενο'); INSERT INTO fieldname VALUES (9,'uk','ln','повний текст'); INSERT INTO fieldname VALUES (9,'ja','ln','フルテキスト'); INSERT INTO fieldname VALUES (9,'bg','ln','пълен текст'); INSERT INTO fieldname VALUES (9,'hr','ln','cjeloviti tekst'); INSERT INTO fieldname VALUES (9,'zh_CN','ln','全文'); INSERT INTO fieldname VALUES (9,'zh_TW','ln','全文'); INSERT INTO fieldname VALUES (10,'en','ln','collection'); INSERT INTO fieldname VALUES (10,'fr','ln','collection'); INSERT INTO fieldname VALUES (10,'de','ln','Sammlung'); INSERT INTO fieldname VALUES (10,'es','ln','colección'); INSERT INTO fieldname VALUES (10,'ca','ln','col·lecció'); INSERT INTO fieldname VALUES (10,'pl','ln','zbiór'); INSERT INTO fieldname VALUES (10,'pt','ln','coleção'); INSERT INTO fieldname VALUES (10,'it','ln','collezione'); INSERT INTO fieldname VALUES (10,'ru','ln','набор'); INSERT INTO fieldname VALUES (10,'sk','ln','kolekcia'); INSERT INTO fieldname VALUES (10,'cs','ln','kolekce'); INSERT INTO fieldname VALUES (10,'no','ln','samling'); INSERT INTO fieldname VALUES (10,'sv','ln','samlingen'); INSERT INTO fieldname VALUES (10,'el','ln','συλλογή'); INSERT INTO fieldname VALUES (10,'uk','ln','розділ'); INSERT INTO fieldname VALUES (10,'ja','ln','コレクション'); INSERT INTO fieldname VALUES (10,'bg','ln','колекция'); INSERT INTO fieldname VALUES (10,'hr','ln','kolekcija'); INSERT INTO fieldname VALUES (10,'zh_CN','ln','汇集'); INSERT INTO fieldname VALUES (10,'zh_TW','ln','彙集'); INSERT INTO fieldname VALUES (11,'en','ln','division'); INSERT INTO fieldname VALUES (11,'fr','ln','division'); INSERT INTO fieldname VALUES (11,'de','ln','Abteilung'); INSERT INTO fieldname VALUES (11,'es','ln','división'); INSERT INTO fieldname VALUES (11,'ca','ln','divisió'); INSERT INTO fieldname VALUES (11,'pl','ln','podział'); INSERT INTO fieldname VALUES (11,'pt','ln','divisão'); INSERT INTO fieldname VALUES (11,'it','ln','divisione'); INSERT INTO fieldname VALUES (11,'ru','ln','разделение'); INSERT INTO fieldname VALUES (11,'sk','ln','oddelenie'); INSERT INTO fieldname VALUES (11,'cs','ln','oddělení'); INSERT INTO fieldname VALUES (11,'no','ln','divisjon'); INSERT INTO fieldname VALUES (11,'sv','ln',''); INSERT INTO fieldname VALUES (11,'el','ln','τμήμα'); INSERT INTO fieldname VALUES (11,'uk','ln','підрозділ'); INSERT INTO fieldname VALUES (11,'ja','ln','部'); INSERT INTO fieldname VALUES (11,'bg','ln','отдел'); INSERT INTO fieldname VALUES (11,'hr','ln','odjel'); INSERT INTO fieldname VALUES (11,'zh_CN','ln','分类'); INSERT INTO fieldname VALUES (11,'zh_TW','ln','分類'); INSERT INTO fieldname VALUES (12,'en','ln','year'); INSERT INTO fieldname VALUES (12,'fr','ln','année'); INSERT INTO fieldname VALUES (12,'de','ln','Jahr'); INSERT INTO fieldname VALUES (12,'es','ln','año'); INSERT INTO fieldname VALUES (12,'ca','ln','any'); INSERT INTO fieldname VALUES (12,'pl','ln','rok'); INSERT INTO fieldname VALUES (12,'pt','ln','ano'); INSERT INTO fieldname VALUES (12,'it','ln','anno'); INSERT INTO fieldname VALUES (12,'ru','ln','год'); INSERT INTO fieldname VALUES (12,'sk','ln','rok'); INSERT INTO fieldname VALUES (12,'cs','ln','rok'); INSERT INTO fieldname VALUES (12,'no','ln','år'); INSERT INTO fieldname VALUES (12,'sv','ln','år'); INSERT INTO fieldname VALUES (12,'el','ln','έτος'); INSERT INTO fieldname VALUES (12,'uk','ln','рік'); INSERT INTO fieldname VALUES (12,'ja','ln','年'); INSERT INTO fieldname VALUES (12,'bg','ln','година'); INSERT INTO fieldname VALUES (12,'hr','ln','godina'); INSERT INTO fieldname VALUES (12,'zh_CN','ln','年份'); INSERT INTO fieldname VALUES (12,'zh_TW','ln','年份'); INSERT INTO fieldname VALUES (13,'en','ln','experiment'); INSERT INTO fieldname VALUES (13,'fr','ln','expérience'); INSERT INTO fieldname VALUES (13,'de','ln','Experiment'); INSERT INTO fieldname VALUES (13,'es','ln','experimento'); INSERT INTO fieldname VALUES (13,'ca','ln','experiment'); INSERT INTO fieldname VALUES (13,'pl','ln','eksperyment'); INSERT INTO fieldname VALUES (13,'pt','ln','experimento'); INSERT INTO fieldname VALUES (13,'it','ln','esperimento'); INSERT INTO fieldname VALUES (13,'ru','ln','эксперимент'); INSERT INTO fieldname VALUES (13,'sk','ln','experiment'); INSERT INTO fieldname VALUES (13,'cs','ln','experiment'); INSERT INTO fieldname VALUES (13,'no','ln','eksperiment'); INSERT INTO fieldname VALUES (13,'sv','ln',''); INSERT INTO fieldname VALUES (13,'el','ln','πείραμα'); INSERT INTO fieldname VALUES (13,'uk','ln','експеримент'); INSERT INTO fieldname VALUES (13,'ja','ln','実験'); INSERT INTO fieldname VALUES (13,'bg','ln','експеримент'); INSERT INTO fieldname VALUES (13,'hr','ln','eksperiment'); INSERT INTO fieldname VALUES (13,'zh_CN','ln','实验'); INSERT INTO fieldname VALUES (13,'zh_TW','ln','實驗'); INSERT INTO fieldname VALUES (14,'en','ln','record ID'); INSERT INTO fieldname VALUES (14,'fr','ln','identificateur de notice'); INSERT INTO fieldname VALUES (14,'de','ln','Datensatz-ID'); INSERT INTO fieldname VALUES (14,'es','ln','registro núm.'); INSERT INTO fieldname VALUES (14,'ca','ln','registre núm.'); INSERT INTO fieldname VALUES (14,'pl','ln','ID rekordu'); INSERT INTO fieldname VALUES (14,'pt','ln','ID do registro'); INSERT INTO fieldname VALUES (14,'it','ln','ID della notizia'); INSERT INTO fieldname VALUES (14,'ru','ln','номер записи'); INSERT INTO fieldname VALUES (14,'sk','ln','ID záznamu'); INSERT INTO fieldname VALUES (14,'cs','ln','ID záznamu'); INSERT INTO fieldname VALUES (14,'no','ln','post ID'); INSERT INTO fieldname VALUES (14,'sv','ln',''); INSERT INTO fieldname VALUES (14,'el','ln','record ID'); INSERT INTO fieldname VALUES (14,'uk','ln','номер запису'); INSERT INTO fieldname VALUES (14,'ja','ln','記録的なID'); INSERT INTO fieldname VALUES (14,'bg','ln','ID на записа'); INSERT INTO fieldname VALUES (14,'hr','ln','ID unosa'); INSERT INTO fieldname VALUES (14,'zh_CN','ln','记录号'); INSERT INTO fieldname VALUES (14,'zh_TW','ln','記錄號'); INSERT INTO field_tag VALUES (1,100,10); INSERT INTO field_tag VALUES (1,101,10); INSERT INTO field_tag VALUES (1,102,10); INSERT INTO field_tag VALUES (1,103,10); INSERT INTO field_tag VALUES (1,104,10); INSERT INTO field_tag VALUES (1,105,10); INSERT INTO field_tag VALUES (1,106,10); INSERT INTO field_tag VALUES (1,107,10); INSERT INTO field_tag VALUES (1,108,10); INSERT INTO field_tag VALUES (1,109,10); INSERT INTO field_tag VALUES (1,110,10); INSERT INTO field_tag VALUES (1,111,10); INSERT INTO field_tag VALUES (1,112,10); INSERT INTO field_tag VALUES (1,113,10); INSERT INTO field_tag VALUES (1,114,10); INSERT INTO field_tag VALUES (1,16,10); INSERT INTO field_tag VALUES (1,17,10); INSERT INTO field_tag VALUES (1,18,10); INSERT INTO field_tag VALUES (1,19,10); INSERT INTO field_tag VALUES (1,20,10); INSERT INTO field_tag VALUES (1,21,10); INSERT INTO field_tag VALUES (1,22,10); INSERT INTO field_tag VALUES (1,23,10); INSERT INTO field_tag VALUES (1,24,10); INSERT INTO field_tag VALUES (1,25,10); INSERT INTO field_tag VALUES (1,26,10); INSERT INTO field_tag VALUES (1,27,10); INSERT INTO field_tag VALUES (1,28,10); INSERT INTO field_tag VALUES (1,29,10); INSERT INTO field_tag VALUES (1,30,10); INSERT INTO field_tag VALUES (1,31,10); INSERT INTO field_tag VALUES (1,32,10); INSERT INTO field_tag VALUES (1,33,10); INSERT INTO field_tag VALUES (1,34,10); INSERT INTO field_tag VALUES (1,35,10); INSERT INTO field_tag VALUES (1,36,10); INSERT INTO field_tag VALUES (1,37,10); INSERT INTO field_tag VALUES (1,38,10); INSERT INTO field_tag VALUES (1,39,10); INSERT INTO field_tag VALUES (1,40,10); INSERT INTO field_tag VALUES (1,41,10); INSERT INTO field_tag VALUES (1,42,10); INSERT INTO field_tag VALUES (1,43,10); INSERT INTO field_tag VALUES (1,44,10); INSERT INTO field_tag VALUES (1,45,10); INSERT INTO field_tag VALUES (1,46,10); INSERT INTO field_tag VALUES (1,47,10); INSERT INTO field_tag VALUES (1,48,10); INSERT INTO field_tag VALUES (1,49,10); INSERT INTO field_tag VALUES (1,50,10); INSERT INTO field_tag VALUES (1,51,10); INSERT INTO field_tag VALUES (1,52,10); INSERT INTO field_tag VALUES (1,53,10); INSERT INTO field_tag VALUES (1,54,10); INSERT INTO field_tag VALUES (1,55,10); INSERT INTO field_tag VALUES (1,56,10); INSERT INTO field_tag VALUES (1,57,10); INSERT INTO field_tag VALUES (1,58,10); INSERT INTO field_tag VALUES (1,59,10); INSERT INTO field_tag VALUES (1,60,10); INSERT INTO field_tag VALUES (1,61,10); INSERT INTO field_tag VALUES (1,62,10); INSERT INTO field_tag VALUES (1,63,10); INSERT INTO field_tag VALUES (1,64,10); INSERT INTO field_tag VALUES (1,65,10); INSERT INTO field_tag VALUES (1,66,10); INSERT INTO field_tag VALUES (1,67,10); INSERT INTO field_tag VALUES (1,68,10); INSERT INTO field_tag VALUES (1,69,10); INSERT INTO field_tag VALUES (1,70,10); INSERT INTO field_tag VALUES (1,71,10); INSERT INTO field_tag VALUES (1,72,10); INSERT INTO field_tag VALUES (1,73,10); INSERT INTO field_tag VALUES (1,74,10); INSERT INTO field_tag VALUES (1,75,10); INSERT INTO field_tag VALUES (1,76,10); INSERT INTO field_tag VALUES (1,77,10); INSERT INTO field_tag VALUES (1,78,10); INSERT INTO field_tag VALUES (1,79,10); INSERT INTO field_tag VALUES (1,80,10); INSERT INTO field_tag VALUES (1,81,10); INSERT INTO field_tag VALUES (1,82,10); INSERT INTO field_tag VALUES (1,83,10); INSERT INTO field_tag VALUES (1,84,10); INSERT INTO field_tag VALUES (1,85,10); INSERT INTO field_tag VALUES (1,86,10); INSERT INTO field_tag VALUES (1,87,10); INSERT INTO field_tag VALUES (1,88,10); INSERT INTO field_tag VALUES (1,89,10); INSERT INTO field_tag VALUES (1,90,10); INSERT INTO field_tag VALUES (1,91,10); INSERT INTO field_tag VALUES (1,92,10); INSERT INTO field_tag VALUES (1,93,10); INSERT INTO field_tag VALUES (1,94,10); INSERT INTO field_tag VALUES (1,95,10); INSERT INTO field_tag VALUES (1,96,10); INSERT INTO field_tag VALUES (1,97,10); INSERT INTO field_tag VALUES (1,98,10); INSERT INTO field_tag VALUES (1,99,10); INSERT INTO field_tag VALUES (10,11,100); INSERT INTO field_tag VALUES (11,14,100); INSERT INTO field_tag VALUES (12,15,10); INSERT INTO field_tag VALUES (13,116,10); INSERT INTO field_tag VALUES (2,3,100); INSERT INTO field_tag VALUES (2,4,90); INSERT INTO field_tag VALUES (3,1,100); INSERT INTO field_tag VALUES (3,2,90); INSERT INTO field_tag VALUES (4,5,100); INSERT INTO field_tag VALUES (5,6,100); INSERT INTO field_tag VALUES (6,7,30); INSERT INTO field_tag VALUES (6,8,10); INSERT INTO field_tag VALUES (6,9,20); INSERT INTO field_tag VALUES (7,12,100); INSERT INTO field_tag VALUES (7,13,90); INSERT INTO field_tag VALUES (8,10,100); INSERT INTO field_tag VALUES (9,115,100); INSERT INTO field_tag VALUES (14,117,100); INSERT INTO format VALUES (1,'HTML brief','hb', 'HTML brief output format, used for search results pages.', 'text/html'); INSERT INTO format VALUES (2,'HTML detailed','hd', 'HTML detailed output format, used for Detailed record pages.', 'text/html'); INSERT INTO format VALUES (6,'portfolio','hp', 'HTML portfolio-style output format for photos.', 'text/html'); INSERT INTO format VALUES (7,'photo captions only','hc', 'HTML caption-only output format for photos.', 'text/html'); INSERT INTO format VALUES (8,'BibTeX','hx', 'BibTeX.', 'text/html'); INSERT INTO format VALUES (4,'Dublin Core','xd', 'XML Dublin Core.', 'text/xml'); INSERT INTO format VALUES (3,'MARC','hm', 'HTML MARC.', 'text/html'); INSERT INTO format VALUES (5,'MARCXML','xm', 'XML MARC.', 'text/xml'); INSERT INTO format VALUES (9,'EndNote','xe', 'XML EndNote.', 'text/xml'); INSERT INTO format VALUES (10,'NLM','xn', 'XML NLM.', 'text/xml'); INSERT INTO tag VALUES (1,'first author','100__%'); INSERT INTO tag VALUES (2,'additional author','700__%'); INSERT INTO tag VALUES (3,'main title','245__%'); INSERT INTO tag VALUES (4,'additional title','246__%'); INSERT INTO tag VALUES (5,'abstract','520__%'); INSERT INTO tag VALUES (6,'keyword','6531_a'); INSERT INTO tag VALUES (7,'primary report number','037__a'); INSERT INTO tag VALUES (8,'additional report number','088__a'); INSERT INTO tag VALUES (9,'added report number','909C0r'); INSERT INTO tag VALUES (10,'reference','999C5%'); INSERT INTO tag VALUES (11,'collection identifier','980__%'); INSERT INTO tag VALUES (12,'main subject','65017a'); INSERT INTO tag VALUES (13,'additional subject','65027a'); INSERT INTO tag VALUES (14,'division','909C0p'); INSERT INTO tag VALUES (15,'year','909C0y'); INSERT INTO tag VALUES (16,'00x','00%'); INSERT INTO tag VALUES (17,'01x','01%'); INSERT INTO tag VALUES (18,'02x','02%'); INSERT INTO tag VALUES (19,'03x','03%'); INSERT INTO tag VALUES (20,'04x','04%'); INSERT INTO tag VALUES (21,'05x','05%'); INSERT INTO tag VALUES (22,'06x','06%'); INSERT INTO tag VALUES (23,'07x','07%'); INSERT INTO tag VALUES (24,'08x','08%'); INSERT INTO tag VALUES (25,'09x','09%'); INSERT INTO tag VALUES (26,'10x','10%'); INSERT INTO tag VALUES (27,'11x','11%'); INSERT INTO tag VALUES (28,'12x','12%'); INSERT INTO tag VALUES (29,'13x','13%'); INSERT INTO tag VALUES (30,'14x','14%'); INSERT INTO tag VALUES (31,'15x','15%'); INSERT INTO tag VALUES (32,'16x','16%'); INSERT INTO tag VALUES (33,'17x','17%'); INSERT INTO tag VALUES (34,'18x','18%'); INSERT INTO tag VALUES (35,'19x','19%'); INSERT INTO tag VALUES (36,'20x','20%'); INSERT INTO tag VALUES (37,'21x','21%'); INSERT INTO tag VALUES (38,'22x','22%'); INSERT INTO tag VALUES (39,'23x','23%'); INSERT INTO tag VALUES (40,'24x','24%'); INSERT INTO tag VALUES (41,'25x','25%'); INSERT INTO tag VALUES (42,'26x','26%'); INSERT INTO tag VALUES (43,'27x','27%'); INSERT INTO tag VALUES (44,'28x','28%'); INSERT INTO tag VALUES (45,'29x','29%'); INSERT INTO tag VALUES (46,'30x','30%'); INSERT INTO tag VALUES (47,'31x','31%'); INSERT INTO tag VALUES (48,'32x','32%'); INSERT INTO tag VALUES (49,'33x','33%'); INSERT INTO tag VALUES (50,'34x','34%'); INSERT INTO tag VALUES (51,'35x','35%'); INSERT INTO tag VALUES (52,'36x','36%'); INSERT INTO tag VALUES (53,'37x','37%'); INSERT INTO tag VALUES (54,'38x','38%'); INSERT INTO tag VALUES (55,'39x','39%'); INSERT INTO tag VALUES (56,'40x','40%'); INSERT INTO tag VALUES (57,'41x','41%'); INSERT INTO tag VALUES (58,'42x','42%'); INSERT INTO tag VALUES (59,'43x','43%'); INSERT INTO tag VALUES (60,'44x','44%'); INSERT INTO tag VALUES (61,'45x','45%'); INSERT INTO tag VALUES (62,'46x','46%'); INSERT INTO tag VALUES (63,'47x','47%'); INSERT INTO tag VALUES (64,'48x','48%'); INSERT INTO tag VALUES (65,'49x','49%'); INSERT INTO tag VALUES (66,'50x','50%'); INSERT INTO tag VALUES (67,'51x','51%'); INSERT INTO tag VALUES (68,'52x','52%'); INSERT INTO tag VALUES (69,'53x','53%'); INSERT INTO tag VALUES (70,'54x','54%'); INSERT INTO tag VALUES (71,'55x','55%'); INSERT INTO tag VALUES (72,'56x','56%'); INSERT INTO tag VALUES (73,'57x','57%'); INSERT INTO tag VALUES (74,'58x','58%'); INSERT INTO tag VALUES (75,'59x','59%'); INSERT INTO tag VALUES (76,'60x','60%'); INSERT INTO tag VALUES (77,'61x','61%'); INSERT INTO tag VALUES (78,'62x','62%'); INSERT INTO tag VALUES (79,'63x','63%'); INSERT INTO tag VALUES (80,'64x','64%'); INSERT INTO tag VALUES (81,'65x','65%'); INSERT INTO tag VALUES (82,'66x','66%'); INSERT INTO tag VALUES (83,'67x','67%'); INSERT INTO tag VALUES (84,'68x','68%'); INSERT INTO tag VALUES (85,'69x','69%'); INSERT INTO tag VALUES (86,'70x','70%'); INSERT INTO tag VALUES (87,'71x','71%'); INSERT INTO tag VALUES (88,'72x','72%'); INSERT INTO tag VALUES (89,'73x','73%'); INSERT INTO tag VALUES (90,'74x','74%'); INSERT INTO tag VALUES (91,'75x','75%'); INSERT INTO tag VALUES (92,'76x','76%'); INSERT INTO tag VALUES (93,'77x','77%'); INSERT INTO tag VALUES (94,'78x','78%'); INSERT INTO tag VALUES (95,'79x','79%'); INSERT INTO tag VALUES (96,'80x','80%'); INSERT INTO tag VALUES (97,'81x','81%'); INSERT INTO tag VALUES (98,'82x','82%'); INSERT INTO tag VALUES (99,'83x','83%'); INSERT INTO tag VALUES (100,'84x','84%'); INSERT INTO tag VALUES (101,'85x','85%'); INSERT INTO tag VALUES (102,'86x','86%'); INSERT INTO tag VALUES (103,'87x','87%'); INSERT INTO tag VALUES (104,'88x','88%'); INSERT INTO tag VALUES (105,'89x','89%'); INSERT INTO tag VALUES (106,'90x','90%'); INSERT INTO tag VALUES (107,'91x','91%'); INSERT INTO tag VALUES (108,'92x','92%'); INSERT INTO tag VALUES (109,'93x','93%'); INSERT INTO tag VALUES (110,'94x','94%'); INSERT INTO tag VALUES (111,'95x','95%'); INSERT INTO tag VALUES (112,'96x','96%'); INSERT INTO tag VALUES (113,'97x','97%'); INSERT INTO tag VALUES (114,'98x','98%'); INSERT INTO tag VALUES (115,'url','8564_u'); INSERT INTO tag VALUES (116,'experiment','909C0e'); INSERT INTO tag VALUES (117,'record ID','001'); INSERT INTO idxINDEX VALUES (1,'global','This index contains words/phrases from global fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (2,'collection','This index contains words/phrases from collection identifiers fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (3,'abstract','This index contains words/phrases from abstract fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (4,'author','This index contains words/phrases from author fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (5,'keyword','This index contains words/phrases from keyword fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (6,'reference','This index contains words/phrases from references fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (7,'reportnumber','This index contains words/phrases from report numbers fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (8,'title','This index contains words/phrases from title fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (9,'fulltext','This index contains words/phrases from fulltext fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX VALUES (10,'year','This index contains words/phrases from year fields.','0000-00-00 00:00:00'); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (1,1); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (2,10); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (3,4); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (4,3); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (5,5); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (6,8); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (7,6); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (8,2); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (9,9); INSERT INTO idxINDEX_field (id_idxINDEX, id_field) VALUES (10,12); INSERT INTO flxFORMATS VALUES ('DEFAULT_HTML_BRIEF','\"\" format(\"_DEFAULT_TITLE\") \" \"\r\nif(count($100.a)!=\"0\" || count($700.a)!=\"0\")\r\n{\r\n \" / \" format(\"_DEFAULT_AUTHORS\") \" \"\r\n}\r\nforall($088.a)\r\n{ \" [\" $088.a \"] \" }\r\nforall($037.a)\r\n{ \" [\" $037.a \"] \" }\r\nforall($520.a)\r\n{ \"
    \" format(\"_DEFAULT_ABSTRACT_FIRST_SENTENCE\") \"\" }\r\nforall($8564.u)\r\n{ \"
    \" format(\"_DEFAULT_URL\") \"\" }','This is the default brief HTML format.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:8:\"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"_DEFAULT_TITLE\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\" / \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:16:\"_DEFAULT_AUTHORS\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:26:\" [\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"] \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:26:\" [\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"] \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:32:\"_DEFAULT_ABSTRACT_FIRST_SENTENCE\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:8:\"\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"_DEFAULT_URL\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:8:\"\";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_DEFAULT_AUTHORS',' if(gt(sum( count($700.a), count($100.a) ),\"4\")!=\"\") \r\n{ \r\n if(count($100.a)!=\"0\") \r\n { \r\n link(\"author_search\", $100.a)\r\n {\r\n \"\" $100.a \"\"\r\n if($100.e!=\"\") { \" (\" $100.e \")\" }\r\n \" et al \" \r\n } \r\n } \r\n else \r\n { \r\n if(count($700.a)!=\"0\") \r\n { \r\n link(\"author_search\", $700.a)\r\n { \r\n \"\" $700.a \"\"\r\n if($700.e!=\"\") { \" (\" $700.e \")\" }\r\n \" et al.\" \r\n } \r\n } \r\n } \r\n} \r\nelse \r\n{ \r\n forall($100) \r\n { \r\n if($100.a!=\"\") \r\n { \r\n link(\"author_search\", $100.a){\"\" $100.a \"\" } \r\n separator(\"; \") \r\n } \r\n } \r\n if(count($100.a)!=\"0\") \r\n { \r\n if(count($700.a)!=\"0\") \r\n { \"; \" } \r\n } \r\n forall($700) \r\n { \r\n if($700.a!=\"\") \r\n { \r\n link(\"author_search\", $700.a){\"\" $700.a \"\" } \r\n separator(\"; \") \r\n } \r\n } \r\n} ','This is the default subformat to format author lists.','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:2:\"GT\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:3:\"SUM\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"4\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"author_search\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\")\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:17:\" et al \";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"author_search\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\")\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\" et al.\";s:4:\"sons\";a:0:{}}}}}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"author_search\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"author_search\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_DEFAULT_TITLE','$245.a \r\nif($245.b!=\"\"){ \" : \" $245.b } \r\nif($250.a!=\"\"){ \" ; \" $250.a } ','HTML for displaying the title in brief formats','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\" : \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"250\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\" ; \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"250\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_DEFAULT_ABSTRACT_FIRST_SENTENCE','limw_l($520.a, \".\") \". [...]\"','This is the default subformat to yield the first sentence of the abstract.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:6:\"LIMW_L\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\".\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\". [...]\";s:4:\"sons\";a:0:{}}}}'); INSERT INTO flxFORMATS VALUES ('DEFAULT_HTML_DETAILED','format(\"_full_topbanner\") \r\nformat(\"_full_title\") \r\n\"

    \" \r\nformat(\"_full_author\")\r\nformat(\"_full_affiliation\")\r\nformat(\"_full_datedoc\") \"
    \"\r\nformat(\"_full_imprint\")\r\n\"
    \"\r\n\r\n\"

    \"\r\n\r\nformat(\"_full_abstract\")\r\nformat(\"_full_daterec\")\r\n\r\nformat(\"_full_keyword\")\r\n\r\nformat(\"_full_note\") \r\nformat(\"_full_publiinfo\")\r\n\"
    \"\r\nformat(\"_full_url\")\r\nformat(\"_full_citedby\")\r\n\"

    \" \r\nformat(\"_full_references\")\r\n','This is the default HTML detailed format.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"_full_topbanner\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"_full_title\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"

    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"_full_author\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:17:\"_full_affiliation\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_datedoc\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_imprint\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:40:\"

    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"_full_abstract\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_daterec\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_keyword\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"_full_note\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"_full_publiinfo\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"_full_url\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_citedby\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"

    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:16:\"_full_references\";s:4:\"sons\";a:0:{}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_ABSTRACT','if($520.a!=\"\"||$520.b!=\"\"){\r\n \"\r\n Abstract: \"\r\n $520.a\"
    \"$520.b\" \"\r\n \"

    \r\n \"\r\n} \r\nif($590.a!=\"\"||$590.b!=\"\"){\r\n \"\r\n Texte: \"\r\n $590.a\"
    \"$590.b\r\n \"

    \r\n \"\r\n} ','HTML Abstract display','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:37:\"\r\n Abstract: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"

    \r\n \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"590\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"590\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:34:\"\r\n Texte: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"590\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"590\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"

    \r\n \";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_TITLE','if($245.a!=\"\"){\r\n \"

    \"\r\n $245.a\r\n if($245.b!=\"\"){ \": \" $245.b }\r\n \"
    \"\r\n}\r\n\r\nif($0248.a!=\"\"){\r\n \"
    \"\r\n $0248.a\r\n \"
    \"\r\n}\r\n\r\nif($246.a!=\"\"){\r\n \"
    \"\r\n $246.a\r\n \"
    \"\r\n}\r\n\r\nif($246_1.a!=\"\"){\r\n \"
    \"\r\n $246_1.a\r\n \"
    \"\r\n}\r\n\r\nif($210.a!=\"\"){\r\n \"(\"\r\n $210.a\r\n \") \"\r\n}\r\n','HTML Title display ','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:26:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\": \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:30:\"
    \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"0248\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:30:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"0248\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:30:\"
    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"246\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:30:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"246\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:30:\"
    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:33:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:34:\"
    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"210\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:8:\"(\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"210\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\") \";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('PICTURE_HTML_DETAILED','format(\"_full_topbanner\")\r\nformat(\"_full_title\")\r\n\r\nformat(\"_full_note\")\r\nif($260.c!=\"\"){\"
    \" $260.c \"
    \"}\r\nformat(\"_full_contact\")\r\nif($100.a!=\"\"){\r\n \"
    Photographer: \"\r\n format(\"_full_author\")\r\n \"
    \"\r\n}\r\n\r\n\"
    \"\r\n\r\nformat(\"_full_keyword\")\r\n\r\n\r\n\r\n\"\r\n\r\n\"\r\n\r\n\"\" \r\n\r\n\"\r\n\r\n\r\n\r\n\r\n
    \" \r\nif($909CP.s!=\"\"){\"
    Original ref.: \"$909CP.s\" \"}\r\nif($909CP.t!=\"\"){\"
    Available pictures: \"$909CP.t\" \"}\r\n\r\nif ($520.a!=\"\"){\r\n \"

    \r\n Caption
    \" \r\n \"\" \r\n $520.a\r\n \"

    \"\r\n}\r\nif ($590.a!=\"\"){\r\n \"

    \r\n Légende
    \" \r\n \"\" \r\n $590.a\r\n \"

    \"\r\n}\r\n\r\nif ($909C4!=\"\"){\r\n \"

    See also:
    \" \r\n}\r\nforall ($909C4){\r\n \"\" $909C4.p \"
    \"\r\n}\r\n\r\n\"
    \" \r\nformat(\"_full_photo_resources\")\r\n\"
    \r\n © CERN Geneva: \r\nThe use of photos requires prior authorization (from CERN copyright). \r\nThe words CERN Photo must be quoted for each use. \r\n
    \r\n

    \"','The detailed HTML format suitable for displaying pictures.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"_full_topbanner\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"_full_title\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"_full_note\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:8:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"
    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_contact\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:29:\"
    Photographer: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"_full_author\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:17:\"
    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"_full_keyword\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:46:\"\r\n\r\n\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:17:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:310:\"\r\n\r\n\r\n\r\n\r\n
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"S\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:37:\"
    Original ref.: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"S\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:41:\"
    Available pictures: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:67:\"

    \r\n Caption
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"

    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"590\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:68:\"

    \r\n Légende
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"590\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"

    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:64:\"

    See also:
    \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:16:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:16:\"
    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:21:\"_full_photo_resources\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \r\n © CERN Geneva: \r\nThe use of photos requires prior authorization (from CERN copyright). \r\nThe words CERN Photo must be quoted for each use. \r\n
    \r\n

    \";s:4:\"sons\";a:0:{}}}}'); INSERT INTO `flxFORMATS` VALUES ('PICTURE_HTML_BRIEF',' \"
    \r\n \r\n \r\n \r\n
    \"\r\n\"\" format(\"_DEFAULT_TITLE\") \"\"\r\nforall($246_1.a)\r\n{ \"
    \" $246_1.a\" \" } \r\nforall($260.c)\r\n{ \"
    \" $260.c }\r\nforall($520.a) {\r\n rep_prefix(\"

    Abstract: \")\r\n format(\"_DEFAULT_ABSTRACT_FIRST_SENTENCE\")\r\n \"

    \"\r\n}\r\nforall($6531.a)\r\n{ \r\n rep_prefix(\"
    Keyword: \") \r\n link(\"KEYWORD_SEARCH\", $6531.a)\r\n { \"\" $6531.a \"\" } separator(\", \")\r\n}\r\nforall($037.a)\r\n{\"
    Picture number: \" $037.a }\r\nforall($909CP.t)\r\n{ rep_prefix(\"
    Available picture(s):\") xml_text($909CP.t) }\r\n\r\n\"

    \"\r\nforall($8564)\r\n{ if(($8564.x=\"icon\")&&($8564.u=\"\"))\r\n { \"

    \" }\r\n}\r\n\r\n\"
    © CERN Geneva\" \r\n\"
    \" link(\"EXT\", $8564.u, $8564.z){ $link }\r\n\"

    \"','The brief HTML format suitable for displaying pictures.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:69:\"
    \r\n \r\n \r\n \r\n
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"_DEFAULT_TITLE\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"520\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"REP_PREFIX\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:20:\"

    Abstract: \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:32:\"_DEFAULT_ABSTRACT_FIRST_SENTENCE\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"

    \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"6531\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"REP_PREFIX\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:21:\"
    Keyword: \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"KEYWORD_SEARCH\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"6531\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"6531\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\", \";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:27:\"
    Picture number: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"REP_PREFIX\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:32:\"
    Available picture(s):\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"XML_TEXT\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:38:\"

    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:6;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"X\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"icon\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:20:\"

    \";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:56:\"
    © CERN Geneva\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"EXT\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Z\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"LINK\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:29:\"

    \";s:4:\"sons\";a:0:{}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_AUTHOR','if($700.a!=\"\"||$100.a!=\"\"||$270.p!=\"\"){\r\n\r\n forall($100){\r\n LINK(\"AUTHOR_SEARCH\",$100.a){\r\n \"\"$100.a\" \"\r\n if ($100.e!=\"\"){\" (\"$100.e\")\"}\r\n separator(\"; \")\r\n }\r\n }\r\n if(count($100.a)!=\"0\") \r\n { \r\n if(count($700.a)!=\"0\") \r\n { \"; \" } \r\n } \r\n forall($700){\r\n LINK(\"AUTHOR_SEARCH\",$700.a){\r\n \" \"$700.a\" \"\r\n if ($700.e!=\"\"){\" (\"$700.e\")\"}\r\n separator(\"; \")\r\n }\r\n } \r\n \r\n forall($270){\r\n LINK(\"AUTHOR_SEARCH\",$270.p){\r\n \" \"$270.p\" \"\r\n if ($270.g!=\"\"){\r\n \" (\"\r\n $270.g\r\n \")\"\r\n }\r\n separator(\"; \")\r\n }\r\n }\r\n \r\n} ','HTML linked author display','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"270\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"AUTHOR_SEARCH\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\")\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:17;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"AUTHOR_SEARCH\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\")\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"270\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"AUTHOR_SEARCH\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"270\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"270\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"270\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"G\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"270\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"G\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\")\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_AFFILIATION','if($909C1.u!=\"\"){\r\n \"
    \"\r\n forall($909C1){\r\n $909C1.u\" \"\r\n }\r\n} \r\n','HTML Affiliation display','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:5:\"909C1\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\" \";s:4:\"sons\";a:0:{}}}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_DATEDOC','if($260.c!=\"\"){\r\n \"
    \"\r\n $260.c\" \r\n \"\r\n} \r\n','HTML Imprint date','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\" \r\n \";s:4:\"sons\";a:0:{}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_IMPRINT','if($260.b!=\"\"){\r\n if($260.b!=\"sine nomine\"){\r\n \"\"\r\n $260.b\r\n if($260.a!=\"\"){\r\n if($260.a!=\"sine loco\"){\": \"$260.a}\r\n }\r\n \" \"\r\n }\r\n}\r\n','HTML Imprint display (not the date)','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"sine nomine\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"sine loco\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\": \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_DATEREC','if($909C1.c!=\"\"){\r\n \"
    Arrived: \"\r\n $909C1.c\" \"\r\n}\r\n','',NULL); INSERT INTO flxFORMATS VALUES ('_FULL_KEYWORD','forall($6531.a){\r\n REP_PREFIX(\"
    Keyword(s): \")\r\n \"\"\r\n LINK(\"KEYWORD_SEARCH\",$6531.a){ \r\n \"\"$6531.a\" \"\r\n separator(\";\")\r\n }\r\n \"\r\n \"\r\n} \r\n','HTML keyword display with search link','O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"6531\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"REP_PREFIX\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:48:\"
    Keyword(s): \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"KEYWORD_SEARCH\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"6531\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"6531\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\";\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"\r\n \";s:4:\"sons\";a:0:{}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_NOTE','if($594.p!=\"\"){\r\n \"
    Note: \"\r\n xml_text($594.p)\" \"\r\n}\r\nif($500.a!=\"\"){\r\n \"
    Note: \"\r\n forall($500){xml_text($500.a)\"; \"}\r\n \"\"\r\n} \r\nif($502.a!=\"\"||$909CC.r!=\"\"||$909CP.n!=\"\"||$711.a!=\"\"){\r\n \"
    Note: \"\r\n $502.a\" \"\r\n $909CC.r\" \"\r\n $909CC.d\" \"\r\n $909CP.n\" \"\r\n $711.a \" \"\r\n} \r\nif($596.a!=\"\"){\r\n \"
    Notes: \"\r\n $596.a \" \"\r\n} \r\n\r\n','HTML note display (various note fields)','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"594\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:34:\"
    Note: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"XML_TEXT\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"594\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"500\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:34:\"
    Note: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"500\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"XML_TEXT\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"500\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"; \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:8:\"\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CC\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"R\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"711\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:34:\"
    Note: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CC\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"R\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CC\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"D\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909CP\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"711\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"596\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:35:\"
    Notes: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"596\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_PUBLIINFO','if($909C4.p!=\"\"){ \r\n \"

    Published in: \"\r\n if (KB($909C4.p,\"ejournals\")!=\"\") {\r\n if ($909C4.v!=\"\") { \r\n \"\"$909C4.p\": \"\r\n $909C4.v \" (\"$909C4.y\") \"$909C4.c \r\n \" \" \r\n } else {\r\n $909C4.p\": \"\r\n if($909C4.y!=\"\"){\" (\"$909C4.y\") \"}\r\n if($909C4.n!=\"\"){\"no. \"$909C4.n\", \"}\r\n if($909C4.c!=\"\"){\"pp.\"$909C4.c }\r\n }\r\n } else {\r\n $909C4.p \": \"\r\n if($909C4.v!=\"\"){ $909C4.v }\r\n if($909C4.y!=\"\"){\" (\"$909C4.y\") \"}\r\n if($909C4.n!=\"\"){\"no. \"$909C4.n\", \"}\r\n if($909C4.c!=\"\"){\"pp.\"$909C4.c } \r\n }\r\n}\r\n','HTML publication information display possibly with link to ejournal','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:39:\"

    Published in: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"ejournals\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:61:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\": \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\") \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\": \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\") \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"no. \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\", \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"pp.\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\": \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\") \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"no. \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\", \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"pp.\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}}}}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_YEAR','if ($909C0.y!=\"\"){\"
    Year: \"\r\n $909C0.y\r\n}','HTML Year display','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C0\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:27:\"
    Year: \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C0\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_TOPBANNER','\" \r\n\" \r\nforall($088){\"\"} \r\nif($037.a!=\"\"){\"\"} \r\n\"
    \"KB($980.a,\"dbcollid2coll\")\" \"\r\nif($65017.a!=\"XX\"){\r\n \" / \" $65017.a\r\n}\r\n\" \"$65027.a\r\n\"\"$088.a\" \"$037.a\"

    \" ','HTML top page banner containing category, rep. number, etc','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:74:\" \r\n\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:19:\"\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:26:\"\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:17:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"dbcollid2coll\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"65017\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"XX\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\" / \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"65017\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"65027\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:23:\" \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"

    \";s:4:\"sons\";a:0:{}}}}'); INSERT INTO flxFORMATS VALUES ('_DEFAULT_URL','\"\" $8564.u \"\"','This is the default format for formatting URLs.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_URL','forall($8564)\r\n{\r\n\"
    \" $8564.z \" : \" $8564.u \"\"\r\n}','HTML URL display','O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Z\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:29:\" : \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"\";s:4:\"sons\";a:0:{}}}}}}'); INSERT INTO flxFORMATS VALUES ('DEFAULT_HTML_CAPTIONS','format(\"_default_title\")','HTML \"captions only\" format','O:7:\"aelnode\":3:{s:3:\"cat\";i:13;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"_default_title\";s:4:\"sons\";a:0:{}}}}'); INSERT INTO `flxFORMATS` VALUES ('DEFAULT_HTML_PORTFOLIO','forall($8564)\r\n{ if(($8564.x=\"icon\")&&($8564.u=\"\"))\r\n { \"

    \" }\r\n} ','HTML \"portfolio\" format','O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:6;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"X\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"icon\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:20:\"

    \";s:4:\"sons\";a:0:{}}}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_PHOTO_RESOURCES','\"
    Resources
    \"\r\n\r\nforall($8564)\r\n{ \r\n if(($8564.x=\"icon\")&&($8564.u=\"\")) { \r\n \"

    \" \r\n }\r\n if($8564.x=\"1\") {\r\n \"
    High resolution: \" $8564.q \"\"\r\n }\r\n \r\n}\r\n\r\n\"
    © CERN Geneva\" \r\n\"
    \" link(\"EXT\", $8564.u, $8564.z){ $link } \r\n','Prints image and link to photo resources.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:60:\"
    Resources
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:6;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"X\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"icon\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"

    \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"X\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"1\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:42:\"
    High resolution: \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Q\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:47:\"
    © CERN Geneva\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:14;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"EXT\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:15;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"U\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"8564\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Z\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:4:\"LINK\";s:4:\"sons\";a:0:{}}}}}}'); INSERT INTO `flxFORMATS` VALUES ('_FULL_CITEDBY','if($037.a!=\"\" || $088.a!=\"\") {\r\n \"

    Cited by: try citation search for \"\r\n forall($037.a) {\r\n \"\" $037.a \"\"\r\n separator(\";\")\r\n }\r\n if($037.a!=\"\" && $088.a!=\"\") {\r\n \" ; \"\r\n }\r\n forall($088.a) {\r\n \"\" $088.a \"\"\r\n separator(\";\")\r\n }\r\n}','HTML \"cited by\" link creation, based on report numbers.','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:59:\"

    Cited by: try citation search for \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:33:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\";\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:6;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\" ; \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:33:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"SEPARATOR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\";\";s:4:\"sons\";a:0:{}}}}}}}}}}}}'); INSERT INTO `flxFORMATS` VALUES ('_FULL_REFERENCES','if ($999C5!=\"\") {\r\n\"

    \"\r\n\"References:\"\r\n\"
      \" \r\nforall($999C5){ \r\n\r\nif($999C5.o!=\"\")\r\n {\"
    • \"$999C5.o \" \"} \r\n\r\nif ($999C5.m!=\"\")\r\n {\" \" $999C5.m \" \"}\r\n\r\nif ($999C5.r!=\"\")\r\n {\" [\"$999C5.r\"]
      \"} \r\n\r\nif ($999C5.t!=\"\")\r\n {if (KB($999C5.t,\"ejournals\")!=\"\")\r\n { \r\n \" \"$999C5.t\": \"$999C5.v\" (\"$999C5.y\") \"$999C5.p \r\n \"
      \"\r\n } \r\n else\r\n {\" \" $999C5.t\" \"$999C5.v\" \"$999C5.y\" \"$999C5.p \"
      \"\r\n }\r\n }\r\n\r\n} \r\n\"
    \"\r\n\r\n\"

    Warning: references are automatically extracted and standardized from the PDF document and may therefore contain errors. If you think they are incorrect or incomplete, look at the fulltext document itself.
    \"\r\n\"

    \"\r\n}','HTML references','O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:28:\"References:\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"
      \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"O\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:12:\"
    • \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"O\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\" \";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"M\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"M\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\" \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"R\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:46:\" [\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"R\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:20:\"]
      \";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"ejournals\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:70:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\": \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\" (\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\") \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:18:\"
      \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\" \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"T\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\" \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"999C5\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:14:\"
      \";s:4:\"sons\";a:0:{}}}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:241:\"

    Warning: references are automatically extracted and standardized from the PDF document and may therefore contain errors. If you think they are incorrect or incomplete, look at the fulltext document itself.
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"

    \";s:4:\"sons\";a:0:{}}}}}}'); INSERT INTO flxFORMATS VALUES ('_FULL_BIBTEX','\"
    \"\r\n\"@\" \r\n\r\nif (kb($980.a, \"DBCOLLID2BIBTEX\") = \"\"){\r\n    \"article\"\r\n}else{\r\n    kb($980.a, \"DBCOLLID2BIBTEX\")\r\n}\r\n\r\n\"{\"\r\n\r\nif($100.a != \"\"){\r\n    GET_NAME($100.a) \":\" $001 \",
    \"\r\n}else{\r\n if($700.a != \"\"){\r\n GET_NAME($700.a) \":\" $001 \",
    \"\r\n }else{\r\n if($037.a != \"\"){\r\n $037.a \",
    \"\r\n }else{\r\n if($088.a != \"\"){\r\n $088.a \",
    \"\r\n }else{\r\n if($245.a != \"\"){\r\n GET_NAME($245.a) \":\" $001 \",
    \"\r\n }else{\r\n $001 \",
    \"\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"article\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"book\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"inproceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"misc\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"phdthesis\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"techreport\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"unpublished\"){\r\n if ($100.a != \"\" || $700.a != \"\" || $110.b != \"\" || $110.a != \"\" || $710.a != \"\"){\r\n STR_BUFFER(\"add\",\" author = \\\"\", \"0\", \"0\")\r\n\r\n if($100.a != \"\"){\r\n STR_BUFFER(\"add\", $100.a \" and \", \"0\", \"0\")\r\n }\r\n\r\n forall($700.a){\r\n if ($700.e != \"ed.\"){\r\n STR_BUFFER(\"add\", $700.a \" and \", \"0\", \"0\")\r\n }\r\n }\r\n\r\n forall($110.b){\r\n STR_BUFFER(\"add\", $110.b \" and \", \"0\", \"0\")\r\n }\r\n\r\n forall($110.a){\r\n STR_BUFFER(\"add\", $110.a \" and \", \"0\", \"0\")\r\n }\r\n\r\n forall($710.a){\r\n STR_BUFFER(\"add\", $710.a \" and \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"5\", \"22\"), \"72\", \"22\")\r\n }else{\r\n SPLIT_LINE(\" key = \\\"\" $001 \"\\\",
    \", \"72\", \"22\")\r\n }\r\n}\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"inproceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"proceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"phdthesis\"){\r\n if ($700.a != \"\"){\r\n STR_BUFFER(\"add\", \" editor = \\\"\", \"0\", \"0\")\r\n\r\n forall($700){\r\n if ($700.e = \"ed.\"){\r\n STR_BUFFER(\"add\", $700.a \" and \", \"0\", \"0\")\r\n }\r\n }\r\n \r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"5\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif ($245.a != \"\" || $245.b != \"\" || $246.a != \"\" || $246_1.a != \"\"){\r\n\r\n STR_BUFFER(\"add\", \" title = \\\"\", \"0\", \"0\")\r\n\r\n if($245.a != \"\"){\r\n STR_BUFFER(\"add\", $245.a \". \", \"0\", \"0\")\r\n }\r\n\r\n if($245.b != \"\"){\r\n STR_BUFFER(\"add\", $245.b \". \", \"0\", \"0\")\r\n }\r\n\r\n if($246.a != \"\"){\r\n STR_BUFFER(\"add\", $246.a \". \", \"0\", \"0\")\r\n }\r\n\r\n if($246_1.a != \"\"){\r\n STR_BUFFER(\"add\", $246_1.a \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n}\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"techreport\"){\r\n if ($269.b != \"\"){\r\n SPLIT_LINE(\" institution = \\\"\" $269.b \"\\\",
    \", \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"inproceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"proceedings\"){\r\n if ($260.b != \"\" || $269.b != \"\"){\r\n\r\n STR_BUFFER(\"add\", \" organization = \\\"\", \"0\", \"0\")\r\n\r\n if($260.b != \"\"){\r\n STR_BUFFER(\"add\", $260.b \". \", \"0\", \"0\")\r\n }\r\n\r\n if($269.b != \"\"){\r\n STR_BUFFER(\"add\", $269.b \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"book\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"inproceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"proceedings\"){\r\n if ($260.b != \"\" || $269.b != \"\" || $933.b != \"\" || $934.b != \"\"){\r\n\r\n STR_BUFFER(\"add\", \" publisher = \\\"\", \"0\", \"0\")\r\n\r\n if($260.b != \"\"){\r\n STR_BUFFER(\"add\", $260.b \". \", \"0\", \"0\")\r\n }\r\n\r\n if($269.b != \"\"){\r\n STR_BUFFER(\"add\", $269.b \". \", \"0\", \"0\")\r\n }\r\n\r\n if($933.b != \"\"){\r\n STR_BUFFER(\"add\", $933.b \". \", \"0\", \"0\")\r\n }\r\n\r\n if($934.b != \"\"){\r\n STR_BUFFER(\"add\", $934.b \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"article\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"\"){\r\n if ($773.p != \"\" || $909C4.p != \"\"){\r\n STR_BUFFER(\"add\", \" journal = \\\"\", \"0\", \"0\")\r\n\r\n if($909C4.p != \"\"){\r\n STR_BUFFER(\"add\", $909C4.p \". \", \"0\", \"0\")\r\n }\r\n\r\n if($773.p != \"\"){\r\n STR_BUFFER(\"add\", $773.p \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n\r\n }\r\n}\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"phdthesis\"){\r\n if ($502.b != \"\"){\r\n SPLIT_LINE(\" school = \\\"\" $502.b \"\\\",
    \", \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"book\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"inproceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"proceedings\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"phdthesis\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"techreport\"){\r\n if ($260.a != \"\" || $269.a != \"\" || $933.a != \"\" || $934.a != \"\"){\r\n STR_BUFFER(\"add\", \" address = \\\"\", \"0\", \"0\")\r\n\r\n if($260.a != \"\"){\r\n STR_BUFFER(\"add\", $260.a \". \", \"0\", \"0\")\r\n }\r\n\r\n forall($269.a){\r\n STR_BUFFER(\"add\", $269.a \". \", \"0\", \"0\")\r\n }\r\n\r\n forall($933.a){\r\n STR_BUFFER(\"add\", $933.a \". \", \"0\", \"0\")\r\n }\r\n\r\n forall($934.a){\r\n STR_BUFFER(\"add\", $934.a \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"article\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"techreport\"){\r\n if ($037.a != \"\" || $088.a != \"\" || $773.n != \"\" || $909C4.n){\r\n\r\n STR_BUFFER(\"add\", \" number = \\\"\", \"0\", \"0\")\r\n\r\n if($037.a != \"\"){\r\n STR_BUFFER(\"add\", $037.a \". \", \"0\", \"0\")\r\n }\r\n\r\n forall($088.a) {\r\n if($088.a != \"\"){\r\n STR_BUFFER(\"add\", $088.a \". \", \"0\", \"0\")\r\n }\r\n }\r\n\r\n if($773.n != \"\"){\r\n STR_BUFFER(\"add\", $773.n \". \", \"0\", \"0\")\r\n }\r\n\r\n if($909C4.n != \"\"){\r\n STR_BUFFER(\"add\", $909C4.n \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"article\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"book\"){\r\n if ($773.v != \"\" || $909C4.v != \"\"){\r\n\r\n STR_BUFFER(\"add\",\" volume = \\\"\", \"0\", \"0\")\r\n\r\n if($909C4.v != \"\"){\r\n STR_BUFFER(\"add\", $909C4.v \". \", \"0\", \"0\")\r\n }\r\n\r\n if($773.v != \"\"){\r\n STR_BUFFER(\"add\", $773.v \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"book\"){\r\n if ($490.a != \"\"){\r\n SPLIT_LINE(\" series = \\\"\" $490.a \"\\\",
    \", \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\nif (KB($980.a, \"DBCOLLID2BIBTEX\") = \"article\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"\" || KB($980.a, \"DBCOLLID2BIBTEX\") = \"inproceedings\"){\r\n if ($773.c != \"\" || $909C4.c != \"\" || $300.a != \"\"){\r\n\r\n STR_BUFFER(\"add\", \" pages = \\\"\", \"0\", \"0\")\r\n\r\n if($773.c != \"\"){\r\n STR_BUFFER(\"add\", $773.c \". \", \"0\", \"0\")\r\n }\r\n\r\n if($909C4.c != \"\"){\r\n STR_BUFFER(\"add\", $909C4.c \". \", \"0\", \"0\")\r\n }\r\n\r\n if($300.a != \"\"){\r\n STR_BUFFER(\"add\", $300.a \". \", \"0\", \"0\")\r\n }\r\n\r\n SPLIT_LINE(STR_BUFFER(\"print\", \"\\\",
    \", \"2\", \"22\"), \"72\", \"22\")\r\n }\r\n}\r\n\r\n\r\n\r\nSTR_BUFFER(\"add\", \" month = \\\"\", \"0\", \"0\")\r\nif($269.c != \"\"){\r\n STR_BUFFER(\"add\", GET_MONTH($269.c), \"0\", \"0\")\r\n}else{\r\n if($260.c != \"\"){\r\n STR_BUFFER(\"add\", GET_MONTH($260.c), \"0\", \"0\")\r\n }else{\r\n if($502.c != \"\"){\r\n STR_BUFFER(\"add\", GET_MONTH($502.c), \"0\", \"0\")\r\n }\r\n }\r\n}\r\nSTR_BUFFER(\"print\", \"\\\",
    \", \"0\", \"22\")\r\n\r\n\r\nSTR_BUFFER(\"add\", \" year = \\\"\", \"0\", \"0\")\r\nif($269.c != \"\"){\r\n STR_BUFFER(\"add\", GET_YEAR($269.c), \"0\", \"0\")\r\n}else{\r\n if($260.c != \"\"){\r\n STR_BUFFER(\"add\", GET_YEAR($260.c), \"0\", \"0\")\r\n }else{\r\n if($502.c != \"\"){\r\n STR_BUFFER(\"add\", GET_YEAR($502.c), \"0\", \"0\")\r\n }else{\r\n if($909C0.y != \"\"){\r\n STR_BUFFER(\"add\", GET_YEAR($909C0.y), \"0\", \"0\") \r\n }\r\n }\r\n }\r\n}\r\nSTR_BUFFER(\"print\", \"\\\",
    \", \"0\", \"22\")\r\n\r\n\r\n\r\nif ($500.a != \"\"){\r\n SPLIT_LINE(\" note = \\\"\" $500.a \"\\\",
    \", \"72\", \"22\")\r\n}\r\n\r\n\"}\"\r\n\"
    \"','Creates BibTeX format for a record.','O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"
    \";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"@\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"article\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"{\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_NAME\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\":\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"001\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\",
    \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_NAME\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\":\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"001\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\",
    \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\",
    \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\",
    \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_NAME\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\":\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"001\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\",
    \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"001\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\",
    \";s:4:\"sons\";a:0:{}}}}}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"article\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"book\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"inproceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"misc\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"phdthesis\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"techreport\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"unpublished\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"110\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"110\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"710\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" author = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"100\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" and \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"ed.\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" and \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"110\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"110\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" and \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"110\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"110\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" and \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"710\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"710\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" and \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"5\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" key = \"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"001\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"inproceedings\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"proceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"phdthesis\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" editor = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:3:{i:0;N;i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"E\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"ed.\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"700\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\" and \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"5\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"246\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" title = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"245\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"246\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"246\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"246_1\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"techreport\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" institution = \"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"inproceedings\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"proceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" organization = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"book\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"inproceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"proceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"933\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"934\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" publisher = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"933\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"933\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"934\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"934\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"article\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" journal = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"P\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"phdthesis\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" school = \"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"B\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"book\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"inproceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:11:\"proceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:9:\"phdthesis\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"techreport\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"933\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"934\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" address = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"933\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"933\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"934\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"934\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"article\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:10:\"techreport\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" number = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"037\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:3;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}i:1;N;i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"088\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"N\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"article\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"book\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" volume = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"V\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:4:\"book\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"490\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" series = \"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"490\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:7:\"article\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:7;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:16;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:15:\"DBCOLLID2BIBTEX\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"980\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:13:\"inproceedings\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:5;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"300\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" pages = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"773\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C4\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"300\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"300\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\". \";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"2\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" month = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"GET_MONTH\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"GET_MONTH\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:9:\"GET_MONTH\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" year = \"\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_YEAR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"269\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_YEAR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"260\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_YEAR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"502\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"C\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C0\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:3:\"add\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:8:\"GET_YEAR\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:5:\"909C0\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"Y\";s:4:\"sons\";a:0:{}}}}}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}}}}}}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"STR_BUFFER\";s:4:\"sons\";a:4:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:5:\"print\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"0\";s:4:\"sons\";a:0:{}}i:3;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:4;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:8;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"500\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:2;s:3:\"lex\";s:10:\"SPLIT_LINE\";s:4:\"sons\";a:3:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:11;s:3:\"lex\";s:0:\"\";s:4:\"sons\";a:2:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:22:\" note = \"\";s:4:\"sons\";a:0:{}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:0;s:3:\"lex\";s:3:\"500\";s:4:\"sons\";a:1:{i:0;O:7:\"aelnode\":3:{s:3:\"cat\";i:12;s:3:\"lex\";s:1:\"A\";s:4:\"sons\";a:0:{}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"\",
    \";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"72\";s:4:\"sons\";a:0:{}}i:2;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:2:\"22\";s:4:\"sons\";a:0:{}}}}}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:1:\"}\";s:4:\"sons\";a:0:{}}}}i:1;O:7:\"aelnode\":3:{s:3:\"cat\";i:1;s:3:\"lex\";s:6:\"
    \";s:4:\"sons\";a:0:{}}}}'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CD','909','C','D','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','520','520','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','590','590','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909C0','909','C','0','N','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','110','110','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','583','583','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','270','270','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909C1','909','C','1','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CL','909','C','L','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','700','700','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','100','100','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','506','506','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CE','909','C','E','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CI','909','C','I','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','710','710','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','030','030','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CZ','909','C','Z','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CA','909','C','A','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','111','111','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','711','711','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','524','524','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909C4','909','C','4','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CP','909','C','P','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CM','909','C','M','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','8560','856','0','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','037','037','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','8564','856','4','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','866','866','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','260','260','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','300','300','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','690C','690','C','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','020','020','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','022','022','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','654','654','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','6531','653','1','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','6532','653','2','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CK','909','C','K','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','041','041','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','852','852','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','340','340','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','600','600','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','595','595','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','500','500','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','502','502','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CC','909','C','C','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','596','596','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','591','591','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CO','909','C','O','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','594','594','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','856','856','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','598','598','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CR','909','C','R','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CH','909','C','H','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CF','909','C','F','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','088','088','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','246','246','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','770','770','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','772','772','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','780','780','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','785','785','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','787','787','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','541','541','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','0248','024','8','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','490','490','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','65017','650','1','7','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','65027','650','2','7','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909CS','909','C','S','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','044','044','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','310','310','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','909C2','909','C','2','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','655','655','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','245','245','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','250','250','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','130','130','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','246_1','246','','1','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','246_3','246','','3','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','210','210','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','85642','856','4','2','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','080','080','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','999C5','999','C','5','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','040','040','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','980','980','','','S','DATAFIELD'); INSERT INTO flxXMLMARCEXTRULES VALUES ('DEFAULT','001','001','','','S','CONTROLFIELD'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','','',''); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','z','z'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','520','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','520','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','590','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','590','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','110','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','583','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C1','u','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','700','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','700','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','700','u','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','100','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','100','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','506','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','506','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','m','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CE','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','l','l'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','m','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','710','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','110','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C1','o','o'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C1','l','l'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C1','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C1','m','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','030','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CZ','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CZ','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CZ','m','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CZ','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CZ','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CZ','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909Cz','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','9','9'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','111','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','9','9'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','711','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','524','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','v','v'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','y','y'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','710','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','P','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CP','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','l','l'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','k','k'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','z','z'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','583','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CM','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','110','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CM','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8560','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8560','x','x'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','037','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8564','z','z'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8564','u','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8564','q','q'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8564','x','x'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CM','h','h'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','866','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','866','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','866','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','866','z','z'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','866','x','x'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','866','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CM','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','260','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','300','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','260','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','260','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','260','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','V','v'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','690C','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','020','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','022','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','654','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','6531','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','6532','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C','$','$'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CK','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CK','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CK','k','k'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CK','l','l'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CK','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','041','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','852','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','852','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','m','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','8564','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','340','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','600','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','595','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','500','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','502','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CP','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CC','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CC','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CC','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CC','h','h'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CC','l','l'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','596','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','591','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','o','o'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','o','o'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CO','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CP','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CO','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CP','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','594','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','594','c','c'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','594','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','856','k','k'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','u','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','598','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CR','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CR','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CR','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CR','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CR','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CR','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CP','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CF','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CF','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CH','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CF','g','g'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CF','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CF','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','088','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','246','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','770','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','772','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','780','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','785','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','787','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CA','q','q'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','246','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','770','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','772','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','780','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','785','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','787','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','541','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','541','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','541','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','0248','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CI','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CE','m','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','490','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','490','v','v'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CE','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CE','d','d'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','65017','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','65017','2','2'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','6502','$','$'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','65027','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CS','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','044','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','310','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C2','i','i'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C2','f','f'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C2','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CS','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CS','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CS','y','y'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','o','o'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','655','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','245','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','250','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','245','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','130','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','130','s','s'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','130','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','246','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','246_1','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','246_3','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','210','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CP','t','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','85642','r','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','85642','z','z'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','85642','u','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','b','b'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','270','e','e'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','v','v'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CD','x','x'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','080','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','u','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','245','n','n'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','245','p','p'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CM','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CM','l','l'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909CL','x','x'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C1','y','y'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C0','y','y'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','T','t'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','040','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','770','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','772','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','780','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','785','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','787','w','w'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','M','m'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','Y','y'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','R','r'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','U','u'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','Z','z'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','999C5','O','o'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','980','a','a'); INSERT INTO flxXMLMARCEXTRULESUBFIELDS VALUES ('DEFAULT','909C4','D','d'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('DEFAULT',100,0,'record','\" \r\n hb \r\n \" \r\nxml_text(format(\"DEFAULT_HTML_BRIEF\"))\r\n\" \r\n \r\n \r\n hd \r\n \" \r\nxml_text(format(\"DEFAULT_HTML_DETAILED\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HB',100,0,'','\"\r\n \" $001 \"\r\n \r\n hb \r\n \" \r\nxml_text(format(\"DEFAULT_HTML_BRIEF\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HP',0,0,'','\"\r\n \" $001 \"\r\n \r\n hp \r\n \" \r\nxml_text(format(\"DEFAULT_HTML_PORTFOLIO\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HC',0,0,'','\"\r\n \" $001 \"\r\n \r\n hc \r\n \" \r\nxml_text(format(\"DEFAULT_HTML_CAPTIONS\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HD',100,100,'','\"\r\n \" $001 \"\r\n \r\n hd \r\n \" \r\nxml_text(format(\"DEFAULT_HTML_DETAILED\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HB',0,0,'','\"\r\n \" $001 \"\r\n \r\n hb \r\n \" \r\nxml_text(format(\"PICTURE_HTML_BRIEF\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HD',90,0,'','\"\r\n \" $001 \"\r\n \r\n hd \r\n \" \r\nxml_text(format(\"PICTURE_HTML_DETAILED\"))\r\n\" \r\n \r\n\"'); INSERT INTO flxBEHAVIORCONDITIONSACTIONS VALUES ('HX',0,0,'','format(\"_FULL_BIBTEX\")'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('DEFAULT',100,'\"\"=\"\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HB',0,'$980.a=\"PICTURE\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HB',100,'\"\"=\"\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HP',0,'\"\"=\"\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HC',0,'\"\"=\"\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HD',100,'\"\"=\"\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HD',90,'$980.a=\"PICTURE\"'); INSERT INTO flxBEHAVIORCONDITIONS VALUES ('HX',0,'\"\"=\"\"'); INSERT INTO flxBEHAVIORS VALUES ('DEFAULT','IENRICH','Creates DEFAULT formats and includes them in the input XML OAI MARC record in the \"FMT\" element'); INSERT INTO flxBEHAVIORS VALUES ('HB','NORMAL','Produces HTML brief format. Useful for reformatting records existing in the database.'); INSERT INTO flxBEHAVIORS VALUES ('HP','NORMAL','PRODUCES HTML PORTFOLIO FORMAT. USEFUL FOR REFORMATTING RECORDS EXISTING IN THE DATABASE.'); INSERT INTO flxBEHAVIORS VALUES ('HC','NORMAL','PRODUCES HTML CAPTIONS FORMAT. USEFUL FOR REFORMATTING RECORDS\r\nEXISTING IN THE DATABASE.'); INSERT INTO flxBEHAVIORS VALUES ('HD','NORMAL','PRODUCES HTML DETAILED FORMAT. USEFUL FOR REFORMATTING RECORDS EXISTING IN THE DATABASE.'); INSERT INTO flxBEHAVIORS VALUES ('HX','NORMAL','PRODUCES HTML BibTeX format.'); INSERT INTO flxUDFS VALUES ('URLENCODE','return urlencode($url);','STRING',NULL); INSERT INTO flxUDFS VALUES ('UPPER','return strtoupper($s);','STRING','Purpose: Returns characters of string s into uppercase characters\r\nExample: upper(\"test12\") gives as result \"TEST12\"'); INSERT INTO flxUDFS VALUES ('SUBSTR','return substr($s, $start, $end-$start+1);','STRING','Purpose: Returns substring between position start and end from the string s\r\nExample: substr(\"test\", 2, 3) gives as result \"st\"'); INSERT INTO flxUDFS VALUES ('ADD','if($prefix!=\"\")\r\n $value=$prefix.$value;\r\nif($postfix!=\"\")\r\n $value=$value.$postfix;\r\nreturn $value;\r\n','STRING','Purpose: This function adds prefix at the begining and postfix at the end, of value\r\nExample: add(\"test\",\"pre\",\"post\") gives as result \"pretestpost\"\r\nNote: Defined to keep compatibility with uploader\'s languaje'); INSERT INTO flxUDFS VALUES ('MINFO','return \"More Info\";','STRING',''); INSERT INTO flxUDFS VALUES ('RNETC','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('EXT','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('MARK','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('SEPARATOR','if(!$LAST_ITERATION)\r\n return $str;\r\nreturn \"\";','STRING',NULL); INSERT INTO flxUDFS VALUES ('TIONE','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('BRBER','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('MINFA','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('INDIS','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('INHLD','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('LKR','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('NIUCO','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('HOL','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('SNLNK','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('AUFU','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('LKRFU','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('SP','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('HO','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('SREF','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('QUOT','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('MARKF','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('LATEX','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('DI','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('REP_PREFIX','if($FIRST_ITERATION) return $str; return \"\";','STRING',NULL); INSERT INTO flxUDFS VALUES ('XML_TEXT','return htmlspecialchars($str,ENT_QUOTES); \r\n\r\n','STRING',''); INSERT INTO flxUDFS VALUES ('REP','return str_replace($search, $replacement, $str); \r\n\r\n','STRING','Purpose: Replaces any occurence of string search inside string str by the \r\nreplacement one.\r\nExample: rep(\"test12test\", \"12\", \"-\") gives as result \"test-test\"'); INSERT INTO flxUDFS VALUES ('SAVETOFILE','$fh=fopen($filename, \"w\"); if(!$fh) return \"ERROR OPENING FILE \'$filename\'\"; fwrite($fh, $code); fclose($fh); return \"\"; ','STRING',NULL); INSERT INTO flxUDFS VALUES ('FORMAT_EXIST','$format_name=strtoupper(trim($format_name)); \r\n$res=\"\"; \r\n$db=mysql_pconnect(\"cdsdb.cern.ch\", \"flexelink\", \"2flexible\"); \r\nmysql_selectdb(\"flexelink\"); \r\n$qry=\"select name from FORMATS where name=\'$format_name\'\"; \r\n$qh=mysql_query($qry); \r\nif(mysql_num_rows($qh)==1) \r\n $res=\"Y\"; \r\nreturn $res; ','STRING','Purpose: Tells if a format exists in the FlexElink formats database. Returns non-empty string when a format called format_name doesn\'t exist in the format db, empty string in\r\n other case\r\nNote: To be migrated to FlexElink EL internal fuction'); INSERT INTO flxUDFS VALUES ('TOC','return \"\";','STRING','Temporary defined for \"automatic format migration\" compatibility. Gives empty string.'); INSERT INTO flxUDFS VALUES ('DATE','return date(\"j M Y H:i:s\");','STRING','Purpose: Gives the current date in the following format \"day month_name year2k hh:mm:ss\"'); INSERT INTO flxUDFS VALUES ('FILTER_PAGENR','$temp=explode(\"-\", $str);\r\nreturn $temp[0];','STRING',''); INSERT INTO flxUDFS VALUES ('LOWER','return strtolower($str);','STRING','Purpose: Returns characters of string s into lowercase characters \r\nExample: lower(\"TEsT12\") gives as result \"test12\"'); INSERT INTO flxUDFS VALUES ('SUBSTR_END','return substr($str, $start);','STRING','Purpose: Returns a substring from the string s, from position start to the end of the string. \r\nNote that characters into a string are always numerated starting in 0\r\nExample: substr(\"test\", 2) gives as result \"st\"'); INSERT INTO flxUDFS VALUES ('LIMW_L','$temp=explode($token, $str, 2);\r\nreturn $temp[0];','STRING','Purpose: Returns a substring from the string str, containing all characters found in it\r\nbefore the first occurrence of string token.\r\nExample: substr_bef_token(\"test1@test2@test3\", \"@\") gives as result \"test1\"'); INSERT INTO flxUDFS VALUES ('LIMW_R','$temp=explode($token, $str, 2); \r\nreturn $temp[1];','STRING','Purpose: Returns a substring from the string str, containing all characters found in it\r\nafter the first acourrence of string token.\r\nExample: substr_bef_token(\"test1@test2@test3\", \"@\") gives as result \"test2@test3\"'); INSERT INTO flxUDFS VALUES ('FILE_EXISTS','$fh=@fopen($url, \"r\");\r\n$res=\"\";\r\nif($fh)\r\n $res=$url;\r\nreturn $res;','STRING','Purpose: Checks if the given url exists. If so it returns the url, if not it gives back an empty string.\r\nExample: file_exists(\"/not/exists\") gives \"\" as far as file \"/not/exists\" doesn\'t exist'); INSERT INTO flxUDFS VALUES ('CUT_FILE','$fh=@fopen($url, \"r\");\r\n$res=\"\";\r\nif($fh)\r\n{\r\n $found=false;\r\n if($start_token==\"\")\r\n {\r\n $found=true;\r\n }\r\n while(!feof($fh))\r\n {\r\n if(!$found)\r\n {\r\n $line=fgets($fh, 4096);\r\n $pos=strpos($line, $start_token);\r\n if($pos === false)\r\n continue;\r\n $res=substr($line, $pos, strlen($start_tag));\r\n $line=substr($line, $pos+strlen($start_tag));\r\n $found=true;\r\n }\r\n else\r\n {\r\n $pos=strpos($line, $end_token);\r\n if($pos === false)\r\n {\r\n $res.=$line;\r\n $line=fgets($fh, 4096);\r\n }\r\n else\r\n {\r\n $res.=substr($line, 0, $pos+strlen($end_token));\r\n break;\r\n }\r\n }\r\n }\r\n fclose($fh);\r\n}\r\n\r\nreturn $res;','STRING','Purpose: This function opens the file pointed by the URL url. If it\'s accessible, it parses it and \r\nreturns all characters between first occurence of string start_token and first occurrence of \r\nstring end_token.\r\nExample: cut_file(\"/local/pp.txt\", \"PEPE\", \"JOSE\") and \"/local/pp.txt\" file contains the\r\n following text \r\n\"In spanish PEPE means JOSE and PACO means FRANCISCO\", \r\nwould give as result \"PEPE means JOSE\"'); INSERT INTO flxUDFS VALUES ('STRPOS','$pos=strpos($str, $substr);\r\nif($pos === false)\r\n{\r\n return \"\";\r\n}\r\nelse\r\n{\r\n return \"$pos\";\r\n}','STRING',''); INSERT INTO flxUDFS VALUES ('GET_FROM_SETLINKURL','$url=parse_url( $url );\r\n$res=\"\";\r\nif(trim($url[query])!=\"\")\r\n{\r\n $params=explode(\"&\", $url[query]);\r\n foreach($params as $param)\r\n {\r\n $param=explode(\"=\", $param);\r\n if(trim($param[0])==$field)\r\n {\r\n $res=trim($param[1]);\r\n break;\r\n }\r\n } \r\n}\r\nreturn $res;','STRING',''); INSERT INTO flxUDFS VALUES ('FILTER_CDS_ID','$temp=explode(\"-\", $str, 2); \r\nreturn $temp[0];','STRING',''); INSERT INTO flxUDFS VALUES ('COPY','return substr($str, $start, $length);','STRING','Purpose: Returns a substring from string str, that starts in position start\r\n and that is length characters long from there\r\nExample: copy(\"test\", \"1\", \"2\") gives as result \"es\"'); INSERT INTO flxUDFS VALUES ('TERMINATOR','if($LAST_ITERATION)\r\n return $str;','STRING',''); INSERT INTO flxUDFS VALUES ('SUM','return $v1+$v2;','STRING','Purpose: Gives the result of adding v1 to v2 (v1+v2)\r\nExample: add(\"3\", \"4\") gives as result \"7\"'); INSERT INTO flxUDFS VALUES ('GT','if($v1>$v2)\r\n return \"1\";\r\nreturn \"\";','STRING','Purpose: \"Greater than\" function; returns \"1\" if v1>v2, \"\" in other case\r\nExample: gt(\"3\", \"4\") gives as result \"\"'); INSERT INTO flxUDFS VALUES ('EXTRACT_EMAIL','if(ereg(\"([^ <\\t\\n]+@[^ >\\t\\n]+)\", $str, $res))\r\n{\r\n return $res[1];\r\n}\r\nelse\r\n return \"\";\r\n','STRING','Purpose: Returns the first valid (filtered) email address found in string str. \r\nIf there\'s no valid email address in it, it returns \"\"\r\nExample: extract_email(\"Hector Sanchez \") gives \"Hector.Sanchez@cern.ch\".'); INSERT INTO flxUDFS VALUES ('GE','if($v1>=$v2)\r\n return \"1\";\r\nreturn \"\";','STRING','Purpose: \"Greater or equal than\" function; returns \"1\" if v1>=v2, \"\" in other case\r\nExample: ge(\"3\", \"4\") gives as result \"\"'); INSERT INTO flxUDFS VALUES ('LE','if($v1<=$v2)\r\n return \"1\";\r\nreturn \"\";','STRING','Purpose: \"Lower or equal than\" function; returns \"1\" if v1<=v2, \"\" in other case\r\nExample: ge(\"3\", \"4\") gives as result \"\"'); INSERT INTO flxUDFS VALUES ('ISO_NUM','$iso=substr($str, strlen($str_iso));\r\n$temp=explode(\"-\", $iso, 2);\r\n$isonum=$temp[0]; \r\nreturn $isonum;\r\n','STRING',''); INSERT INTO flxUDFS VALUES ('ISO_PART','$iso=substr($str, strlen($str_iso)); \r\n$temp=explode(\"-\", $iso, 2); \r\n$isopart=\"\";\r\nif(count($temp)>1)\r\n{\r\n $isopart=$temp[1]; \r\n}\r\nreturn $isopart; \r\n','STRING',''); INSERT INTO flxUDFS VALUES ('ISO_NUMPART_LINK','$iso=substr($str, strlen($str_iso));\r\n$temp=explode(\"-\", $iso, 2);\r\n$isolink=$temp[0]; \r\nif(count($temp)>1)\r\n{\r\n if(strlen($temp[1])>0)\r\n {\r\n $isolink.=\"&part=\";\r\n $isolink.=str_replace(\"-\", \"&se=\", $temp[1]);\r\n }\r\n}\r\nreturn $isolink;\r\n','STRING',''); INSERT INTO flxUDFS VALUES ('STRIP_SPACES','return str_replace(\" \", \"\", $str);','STRING',''); INSERT INTO flxUDFS VALUES ('LFILL','if(strlen($char)==0) return $str;\r\nif(strlen($str)>$digits) \r\n $str=substr($str, strlen($str)-$digits);\r\nelse\r\n $str=sprintf(\"%0\".$digits.\"u\", $str);\r\nreturn $str;','STRING','Purpose: Returns a string consisting in the string str with the character char \r\nadded to its left the numer of times needed until the lenght digits is reached. If the length\r\nof str is bigger than digits, a left truncated string to length digit is returned.\r\nExample: lfill(\"12\", \"0\", \"5\") gives as result \"00012\", while lfill(\"12345\", \"0\", \"3\") gives as result \"345\", while'); INSERT INTO flxUDFS VALUES ('STR_BUFFER','return add_text($action, $str_to_add, $remove_end_before_print, $min_length_for_print);\r\n\r\nfunction add_text($action, $str_to_add, $remove_end_before_print, $min_length_for_print) {\r\n static $whole_str_buffer = \'\';\r\n\r\n if($action === \'print\') {\r\n if (strlen($whole_str_buffer) > $min_length_for_print){ \r\n $retrn_val = substr($whole_str_buffer, 0, strlen($whole_str_buffer) - $remove_end_before_print) . $str_to_add;\r\n $whole_str_buffer = \'\';\r\n \r\n return $retrn_val;\r\n }\r\n $whole_str_buffer = \'\';\r\n return \'\';\r\n }elseif($action === \'add\'){\r\n $whole_str_buffer .= $str_to_add;\r\n return \'\';\r\n }elseif($action ===\'reset\'){\r\n $whole_str_buffer = \'\';\r\n return \'\';\r\n }else{\r\n return \'\';\r\n }\r\n}','','Purpose:Concatenates strings into static buffer without printing it out before you say so.\r\nParameters:\r\naction: If action is \"add\", then it adds the string to the buffer, if the action is \"print\", then it first removes the end of the string, then adds str_to_add, then prints out. If action is \"reset\", then it resets the buffer to \"\". When you do a \"print\", it also resets the buffer.\r\nstr_to_add: The string you want to add to the already stored string. If action is \"print\" then this part will be added after the function has taken away the end of the string.\r\nremove_end_before_print: Only works when action is \"print\", then it removes the number of chars you have specified before adding the rest of the string, and prints out.\r\nmin_length_for_print: If string is shorter then this when action is \"print\", then it will return \"\". This parameter is only in use when action is \"print\".\r\nExample:\r\nSTR_BUFFER(\"add\", \"\\\"Øyvind and \", \"0\", \"0\");\r\nSTR_BUFFER(\"print\", \"\\\"\", \"5\", \"3\");\r\noutputs: \"Øyvind\"'); INSERT INTO flxUDFS VALUES ('GET_NAME','$pos=strpos($names, \',\');\r\n\r\nif($pos === false){\r\n $name_ar = preg_split(\"/[\\s+]+/\", $names);\r\n $names = \"\";\r\n\r\n for($i = 0; $i < count($name_ar); $i++){\r\n if(strlen($name_ar[$i]) >= strlen($names)){\r\n $names = $name_ar[$i];\r\n }\r\n }\r\n return $names;\r\n}\r\n\r\n$newname = substr($names, 0, $pos);\r\n\r\nreturn str_replace(\" \", \"\", $newname);','','Purpose: Tryes to find the last name in a string, and returns it.\r\nExample: GET_NAME(\"Østlund, Øyvind B\"); returns \"Østlund\".'); INSERT INTO flxUDFS VALUES ('SPLIT_LINE','$start_index = 0;\r\n$result_string;\r\n$done = false;\r\n$firstline = true;\r\n\r\nwhile (!$done){\r\n\r\n if($start_index + $str_len >= strlen($split_str)){\r\n $done = true;\r\n $split = strlen($split_str) - $start_index;\r\n $result_string .= substr($split_str, $start_index);\r\n }else{\r\n $found = false;\r\n\r\n if($firstline == true){\r\n $split = $str_len + $indentation;\r\n $firstline = false;\r\n }else{\r\n $split = $str_len;\r\n }\r\n\r\n while ($split > 0 && $found == false){\r\n if($split_str[$start_index + $split] == \' \'){\r\n $found = true;\r\n }else{\r\n $split --;\r\n }\r\n }\r\n\r\n $result_string .= substr($split_str, $start_index, $split) . \'
    \' . str_repeat(\' \', $indentation);\r\n $start_index += $split + 1;\r\n }\r\n}\r\n\r\n\r\nreturn $result_string;\r\n\r\n\r\n\r\n','','Purpose: Splits a line after a certain amount of letters. Does not split a word in two, but finds the nearest word break. \r\nNotice: Indentation is only for line 2->n, not line 1.\r\nNotice: First line will be the length of str_len + indentation.\r\nNotice: If there is HTML tags in the string, they will be counted too.\r\nExample: SPLIT_LINE(\"title = Nuclear matter with off-shell propagation\", \"35\", \"15\");\r\nReturns:
    title        = Nuclear matter with\r\n               off-shell propagation
    '); INSERT INTO flxUDFS VALUES ('GET_MONTH','if(eregi(\'jan\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'feb\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'mar\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'apr\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'may\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'jun\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'jul\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'aug\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'sep\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'oct\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'nov\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(eregi(\'dec\', $date, $res)){\r\n return ucfirst(strtolower($res[0]));\r\n}elseif(preg_match(\'/(?<=[-\\/])\\n\\n(?=[-\\/])/i\', $date, $res)){\r\n if($res[0] === \'01\' || $res[0] === \'1\'){\r\n return \'Jan\';\r\n }elseif($res[0] === \'02\' || $res[0] === \'2\'){\r\n return \'Feb\';\r\n }elseif($res[0] === \'03\' || $res[0] === \'3\'){\r\n return \'Mar\';\r\n }elseif($res[0] === \'04\' || $res[0] === \'4\'){\r\n return \'Apr\';\r\n }elseif($res[0] === \'05\' || $res[0] === \'5\'){\r\n return \'May\';\r\n }elseif($res[0] === \'06\' || $res[0] === \'6\'){\r\n return \'Jun\';\r\n }elseif($res[0] === \'07\' || $res[0] === \'7\'){\r\n return \'Jul\';\r\n }elseif($res[0] === \'08\' || $res[0] === \'8\'){\r\n return \'Aug\';\r\n }elseif($res[0] === \'09\' || $res[0] === \'9\'){\r\n return \'Sep\';\r\n }elseif($res[0] === \'10\'){\r\n return \'Oct\';\r\n }elseif($res[0] === \'11\'){\r\n return \'Nov\';\r\n }elseif($res[0] === \'12\'){\r\n return \'Dec\';\r\n }\r\n}\r\n\r\nreturn \"\";','','Purpose: Takes a string as input, and returns a 3 letter abrivation of the month if the string contains it.\r\nExample: Accepted string format is e.g. 17 February 2004, 2004/02/17, 17-Feb-2004, etc. (Almost any English date format!)'); INSERT INTO flxUDFS VALUES ('GET_YEAR','if(ereg(\'[[:digit:]][[:digit:]][[:digit:]][[:digit:]]\', $date, $res)){\r\n return $res[0];\r\n}elseif(ereg(\'[[:digit:]][[:digit:]][[:digit:]][[:digit:]]\', $date, $res)){\r\n return $res[0];\r\n}','','Purpose: Takes a string as input, and returns a 4 digit year if the string contains it.'); INSERT INTO flxUDFPARAMS VALUES ('URLENCODE','url',0); INSERT INTO flxUDFPARAMS VALUES ('ADD','postfix',2); INSERT INTO flxUDFPARAMS VALUES ('SUBSTR','end',2); INSERT INTO flxUDFPARAMS VALUES ('UPPER','s',0); INSERT INTO flxUDFPARAMS VALUES ('SUBSTR','s',0); INSERT INTO flxUDFPARAMS VALUES ('SUBSTR','start',1); INSERT INTO flxUDFPARAMS VALUES ('MINFO','sysno',0); INSERT INTO flxUDFPARAMS VALUES ('SEPARATOR','str',0); INSERT INTO flxUDFPARAMS VALUES ('REP_PREFIX','str',0); INSERT INTO flxUDFPARAMS VALUES ('XML_TEXT','str',0); INSERT INTO flxUDFPARAMS VALUES ('REP','search',1); INSERT INTO flxUDFPARAMS VALUES ('REP','str',0); INSERT INTO flxUDFPARAMS VALUES ('SAVETOFILE','filename',0); INSERT INTO flxUDFPARAMS VALUES ('SAVETOFILE','code',1); INSERT INTO flxUDFPARAMS VALUES ('REP','replacement',2); INSERT INTO flxUDFPARAMS VALUES ('FORMAT_EXIST','format_name',0); INSERT INTO flxUDFPARAMS VALUES ('FILTER_PAGENR','str',0); INSERT INTO flxUDFPARAMS VALUES ('LOWER','str',0); INSERT INTO flxUDFPARAMS VALUES ('ADD','value',0); INSERT INTO flxUDFPARAMS VALUES ('ADD','prefix',1); INSERT INTO flxUDFPARAMS VALUES ('STRPOS','substr',1); INSERT INTO flxUDFPARAMS VALUES ('STRPOS','str',0); INSERT INTO flxUDFPARAMS VALUES ('CUT_FILE','end_token',2); INSERT INTO flxUDFPARAMS VALUES ('CUT_FILE','start_token',1); INSERT INTO flxUDFPARAMS VALUES ('CUT_FILE','url',0); INSERT INTO flxUDFPARAMS VALUES ('FILE_EXISTS','url',0); INSERT INTO flxUDFPARAMS VALUES ('SUBSTR_END','str',0); INSERT INTO flxUDFPARAMS VALUES ('SUBSTR_END','start',1); INSERT INTO flxUDFPARAMS VALUES ('LIMW_R','str',0); INSERT INTO flxUDFPARAMS VALUES ('LIMW_L','str',0); INSERT INTO flxUDFPARAMS VALUES ('LIMW_L','token',1); INSERT INTO flxUDFPARAMS VALUES ('LIMW_R','token',1); INSERT INTO flxUDFPARAMS VALUES ('GET_FROM_SETLINKURL','url',0); INSERT INTO flxUDFPARAMS VALUES ('GET_FROM_SETLINKURL','field',1); INSERT INTO flxUDFPARAMS VALUES ('FILTER_CDS_ID','str',0); INSERT INTO flxUDFPARAMS VALUES ('COPY','str',0); INSERT INTO flxUDFPARAMS VALUES ('COPY','start',1); INSERT INTO flxUDFPARAMS VALUES ('TERMINATOR','str',0); INSERT INTO flxUDFPARAMS VALUES ('SUM','v1',0); INSERT INTO flxUDFPARAMS VALUES ('GT','v1',0); INSERT INTO flxUDFPARAMS VALUES ('SUM','v2',1); INSERT INTO flxUDFPARAMS VALUES ('EXTRACT_EMAIL','str',0); INSERT INTO flxUDFPARAMS VALUES ('GT','v2',1); INSERT INTO flxUDFPARAMS VALUES ('GE','v2',1); INSERT INTO flxUDFPARAMS VALUES ('GE','v1',0); INSERT INTO flxUDFPARAMS VALUES ('LE','v1',0); INSERT INTO flxUDFPARAMS VALUES ('LE','v2',1); INSERT INTO flxUDFPARAMS VALUES ('ISO_NUM','str_iso',0); INSERT INTO flxUDFPARAMS VALUES ('ISO_NUM','str',1); INSERT INTO flxUDFPARAMS VALUES ('ISO_PART','str_iso',0); INSERT INTO flxUDFPARAMS VALUES ('ISO_PART','str',1); INSERT INTO flxUDFPARAMS VALUES ('ISO_NUMPART_LINK','str_iso',0); INSERT INTO flxUDFPARAMS VALUES ('ISO_NUMPART_LINK','str',1); INSERT INTO flxUDFPARAMS VALUES ('STRIP_SPACES','str',0); INSERT INTO flxUDFPARAMS VALUES ('LFILL','digits',2); INSERT INTO flxUDFPARAMS VALUES ('LFILL','char',1); INSERT INTO flxUDFPARAMS VALUES ('LFILL','str',0); INSERT INTO flxUDFPARAMS VALUES ('COPY','length',2); INSERT INTO flxUDFPARAMS VALUES ('STR_BUFFER','action',0); INSERT INTO flxUDFPARAMS VALUES ('STR_BUFFER','str_to_add',1); INSERT INTO flxUDFPARAMS VALUES ('STR_BUFFER','min_length_for_print',3); INSERT INTO flxUDFPARAMS VALUES ('STR_BUFFER','remove_end_before_print',2); INSERT INTO flxUDFPARAMS VALUES ('GET_YEAR','date',0); INSERT INTO flxUDFPARAMS VALUES ('GET_MONTH','date',0); INSERT INTO flxUDFPARAMS VALUES ('GET_NAME','names',0); INSERT INTO flxUDFPARAMS VALUES ('SPLIT_LINE','indentation',2); INSERT INTO flxUDFPARAMS VALUES ('SPLIT_LINE','split_str',0); INSERT INTO flxUDFPARAMS VALUES ('SPLIT_LINE','str_len',1); INSERT INTO flxUSERS VALUES (1); INSERT INTO oaiARCHIVE VALUES (1,'','global','','','',NULL,'','','','','','','','',''); INSERT INTO sbmACTION VALUES ('Submit New Record','SBI','running','1998-08-17','2001-08-08','','Submit New Record'); INSERT INTO sbmACTION VALUES ('Modify Record','MBI','modify','1998-08-17','2001-11-07','','Modify Record'); INSERT INTO sbmACTION VALUES ('Submit New File','SRV','revise','0000-00-00','2001-11-07','','Submit New File'); INSERT INTO sbmACTION VALUES ('Approve Record','APP','approve','2001-11-08','2002-06-11','','Approve Record'); INSERT INTO sbmALLFUNCDESCR VALUES ('CaseEDS',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Create_Modify_Interface',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Create_Recid',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Finish_Submission',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Get_Info',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Get_Recid', 'This function gets the recid for a document with a given report-number (as stored in the global variable rn).'); INSERT INTO sbmALLFUNCDESCR VALUES ('Get_Report_Number',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Get_Sysno',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Insert_Modify_Record',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Insert_Record',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Is_Original_Submitter',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Is_Referee','This function checks whether the logged user is a referee for the current document'); INSERT INTO sbmALLFUNCDESCR VALUES ('Mail_Submitter',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Make_Modify_Record',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Make_Record',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Move_From_Pending',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Move_to_Done',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Move_to_Pending',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Print_Success',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Print_Success_APP',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Print_Success_MBI',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Print_Success_SRV',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Report_Number_Generation',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Send_Approval_Request',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Send_APP_Mail',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Send_Modify_Mail',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Send_SRV_Mail',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Test_Status',''); INSERT INTO sbmALLFUNCDESCR VALUES ('Update_Approval_DB',NULL); INSERT INTO sbmALLFUNCDESCR VALUES ('Upload_Files',''); INSERT INTO sbmCHECKS VALUES ('AUCheck','function AUCheck(txt) {\r\n var res=1;\r\n tmp=txt.indexOf(\"\\015\");\r\n while (tmp != -1) {\r\n left=txt.substring(0,tmp);\r\n right=txt.substring(tmp+2,txt.length);\r\n txt=left + \"\\012\" + right;\r\n tmp=txt.indexOf(\"\\015\");\r\n }\r\n tmp=txt.indexOf(\"\\012\");\r\n if (tmp==-1){\r\n line=txt;\r\n txt=\'\';}\r\n else{\r\n line=txt.substring(0,tmp);\r\n txt=txt.substring(tmp+1,txt.length);}\r\n while (line != \"\"){\r\n coma=line.indexOf(\",\");\r\n left=line.substring(0,coma);\r\n right=line.substring(coma+1,line.length);\r\n coma2=right.indexOf(\",\");\r\n space=right.indexOf(\" \");\r\n if ((coma==-1)||(left==\"\")||(right==\"\")||(space!=0)||(coma2!=-1)){\r\n res=0;\r\n error_log=line;\r\n }\r\n tmp=txt.indexOf(\"\\012\");\r\n if (tmp==-1){\r\n line=txt;\r\n txt=\'\';}\r\n else{\r\n line=txt.substring(0,tmp-1);\r\n txt=txt.substring(tmp+1,txt.length);}\r\n }\r\n if (res == 0){\r\n alert(\"This author name cannot be managed \\: \\012\\012\" + error_log + \" \\012\\012It is not in the required format!\\012Put one author per line and a comma (,) between the name and the firstname initial letters. \\012The name is going first, followed by the firstname initial letters.\\012Don\'t forget the whitespace after the comma!!!\\012\\012Example \\: Put\\012\\012Le Meur, J Y \\012Baron, T \\012\\012for\\012\\012Le Meur Jean-Yves & Baron Thomas.\");\r\n return 0;\r\n } \r\n return 1; \r\n}','1998-08-18','0000-00-00','',''); INSERT INTO sbmCHECKS VALUES ('DatCheckNew','function DatCheckNew(txt) {\r\n var res=1;\r\n if (txt.length != 10){res=0;}\r\n if (txt.indexOf(\"/\") != 2){res=0;}\r\n if (txt.lastIndexOf(\"/\") != 5){res=0;}\r\n tmp=parseInt(txt.substring(0,2),10);\r\n if ((tmp > 31)||(tmp < 1)||(isNaN(tmp))){res=0;}\r\n tmp=parseInt(txt.substring(3,5),10);\r\n if ((tmp > 12)||(tmp < 1)||(isNaN(tmp))){res=0;}\r\n tmp=parseInt(txt.substring(6,10),10);\r\n if ((tmp < 1)||(isNaN(tmp))){res=0;}\r\n if (txt.length == 0){res=1;}\r\n if (res == 0){\r\n alert(\"Please enter a correct Date \\012Format: dd/mm/yyyy\");\r\n return 0;\r\n }\r\n return 1; \r\n}','0000-00-00','0000-00-00','',''); INSERT INTO sbmFORMATEXTENSION VALUES ('WORD','.doc'); INSERT INTO sbmFORMATEXTENSION VALUES ('PostScript','.ps'); INSERT INTO sbmFORMATEXTENSION VALUES ('PDF','.pdf'); INSERT INTO sbmFORMATEXTENSION VALUES ('JPEG','.jpg'); INSERT INTO sbmFORMATEXTENSION VALUES ('JPEG','.jpeg'); INSERT INTO sbmFORMATEXTENSION VALUES ('GIF','.gif'); INSERT INTO sbmFORMATEXTENSION VALUES ('PPT','.ppt'); INSERT INTO sbmFORMATEXTENSION VALUES ('HTML','.htm'); INSERT INTO sbmFORMATEXTENSION VALUES ('HTML','.html'); INSERT INTO sbmFORMATEXTENSION VALUES ('Latex','.tex'); INSERT INTO sbmFORMATEXTENSION VALUES ('Compressed PostScript','.ps.gz'); INSERT INTO sbmFORMATEXTENSION VALUES ('Tarred Tex (.tar)','.tar'); INSERT INTO sbmFORMATEXTENSION VALUES ('Text','.txt'); INSERT INTO sbmFUNDESC VALUES ('Get_Report_Number','edsrn'); INSERT INTO sbmFUNDESC VALUES ('Send_Modify_Mail','addressesMBI'); INSERT INTO sbmFUNDESC VALUES ('Send_Modify_Mail','sourceDoc'); INSERT INTO sbmFUNDESC VALUES ('Report_Number_Generation','edsrn'); INSERT INTO sbmFUNDESC VALUES ('Report_Number_Generation','autorngen'); INSERT INTO sbmFUNDESC VALUES ('Report_Number_Generation','rnin'); INSERT INTO sbmFUNDESC VALUES ('Report_Number_Generation','counterpath'); INSERT INTO sbmFUNDESC VALUES ('Report_Number_Generation','rnformat'); INSERT INTO sbmFUNDESC VALUES ('Report_Number_Generation','yeargen'); INSERT INTO sbmFUNDESC VALUES ('Mail_Submitter','authorfile'); INSERT INTO sbmFUNDESC VALUES ('Mail_Submitter','status'); INSERT INTO sbmFUNDESC VALUES ('Send_Approval_Request','authorfile'); INSERT INTO sbmFUNDESC VALUES ('Create_Modify_Interface','fieldnameMBI'); INSERT INTO sbmFUNDESC VALUES ('Send_Modify_Mail','fieldnameMBI'); INSERT INTO sbmFUNDESC VALUES ('Update_Approval_DB','categformatDAM'); INSERT INTO sbmFUNDESC VALUES ('Send_SRV_Mail','categformatDAM'); INSERT INTO sbmFUNDESC VALUES ('Send_SRV_Mail','addressesSRV'); INSERT INTO sbmFUNDESC VALUES ('Send_Approval_Request','directory'); INSERT INTO sbmFUNDESC VALUES ('Send_Approval_Request','categformatDAM'); INSERT INTO sbmFUNDESC VALUES ('Send_Approval_Request','addressesDAM'); INSERT INTO sbmFUNDESC VALUES ('Send_Approval_Request','titleFile'); INSERT INTO sbmFUNDESC VALUES ('Send_APP_Mail','edsrn'); INSERT INTO sbmFUNDESC VALUES ('Mail_Submitter','titleFile'); INSERT INTO sbmFUNDESC VALUES ('Send_Modify_Mail','emailFile'); INSERT INTO sbmFUNDESC VALUES ('Get_Info','authorFile'); INSERT INTO sbmFUNDESC VALUES ('Get_Info','emailFile'); INSERT INTO sbmFUNDESC VALUES ('Get_Info','titleFile'); INSERT INTO sbmFUNDESC VALUES ('Make_Modify_Record','modifyTemplate'); INSERT INTO sbmFUNDESC VALUES ('Send_APP_Mail','addressesAPP'); INSERT INTO sbmFUNDESC VALUES ('Send_APP_Mail','categformatAPP'); INSERT INTO sbmFUNDESC VALUES ('Send_APP_Mail','newrnin'); INSERT INTO sbmFUNDESC VALUES ('CaseEDS','casevariable'); INSERT INTO sbmFUNDESC VALUES ('CaseEDS','casevalues'); INSERT INTO sbmFUNDESC VALUES ('CaseEDS','casesteps'); INSERT INTO sbmFUNDESC VALUES ('CaseEDS','casedefault'); INSERT INTO sbmFUNDESC VALUES ('Send_SRV_Mail','noteFile'); INSERT INTO sbmFUNDESC VALUES ('Send_SRV_Mail','emailFile'); INSERT INTO sbmFUNDESC VALUES ('Mail_Submitter','emailFile'); INSERT INTO sbmFUNDESC VALUES ('Mail_Submitter','edsrn'); INSERT INTO sbmFUNDESC VALUES ('Mail_Submitter','newrnin'); INSERT INTO sbmFUNDESC VALUES ('Upload_Files','maxsize'); INSERT INTO sbmFUNDESC VALUES ('Upload_Files','minsize'); INSERT INTO sbmFUNDESC VALUES ('Upload_Files','iconsize'); INSERT INTO sbmFUNDESC VALUES ('Upload_Files','type'); INSERT INTO sbmFUNDESC VALUES ('Make_Record','sourceTemplate'); INSERT INTO sbmFUNDESC VALUES ('Make_Record','createTemplate'); INSERT INTO sbmFUNDESC VALUES ('Print_Success','edsrn'); INSERT INTO sbmFUNDESC VALUES ('Print_Success','newrnin'); INSERT INTO sbmFUNDESC VALUES ('Print_Success','status'); INSERT INTO sbmFUNDESC VALUES ('Make_Modify_Record','sourceTemplate'); INSERT INTO sbmGFILERESULT VALUES ('HTML','HTML document'); INSERT INTO sbmGFILERESULT VALUES ('WORD','data'); INSERT INTO sbmGFILERESULT VALUES ('PDF','PDF document'); INSERT INTO sbmGFILERESULT VALUES ('PostScript','PostScript document'); INSERT INTO sbmGFILERESULT VALUES ('PostScript','data '); INSERT INTO sbmGFILERESULT VALUES ('PostScript','HP Printer Job Language data'); INSERT INTO sbmGFILERESULT VALUES ('jpg','JPEG image'); INSERT INTO sbmGFILERESULT VALUES ('Compressed PostScript','gzip compressed data'); INSERT INTO sbmGFILERESULT VALUES ('Tarred Tex (.tar)','tar archive'); INSERT INTO sbmGFILERESULT VALUES ('JPEG','JPEG image'); INSERT INTO sbmGFILERESULT VALUES ('GIF','GIF'); INSERT INTO accROLE VALUES (1,'superadmin','superuser with all rights', NULL, NULL); INSERT INTO accROLE VALUES (2,'photoadmin','Photo collection administrator', NULL, NULL); INSERT INTO accROLE VALUES (3,'webaccessadmin','WebAccess administrator', NULL, NULL); INSERT INTO user_accROLE VALUES (1,1,'9999-12-31 23:59:59'); INSERT INTO user_accROLE VALUES (1,3,'9999-12-31 23:59:59'); INSERT INTO accACTION VALUES (1,'cfgwebsearch','configure WebSearch','','no'); INSERT INTO accACTION VALUES (2,'cfgbibformat','configure BibFormat','','no'); INSERT INTO accACTION VALUES (3,'runbibindex','run BibIndex','','no'); INSERT INTO accACTION VALUES (4,'runbibupload','run BibUpload','','no'); INSERT INTO accACTION VALUES (5,'runwebcoll','run webcoll','collection','yes'); INSERT INTO accACTION VALUES (6,'runbibformat','run BibFormat','format','yes'); INSERT INTO accACTION VALUES (7,'cfgwebaccess','configure WebAccess','','no'); INSERT INTO accACTION VALUES (8,'accdelegaterole','delegate subroles inside WebAccess','role','no'); INSERT INTO accACTION VALUES (9,'runbibtaskex','run BibTaskEx example', '','no'); INSERT INTO accACTION VALUES (11,'submit','use webSubmit','doctype,act','no'); INSERT INTO accACTION VALUES (12,'cfgwebsubmit','configure webSubmit','','no'); INSERT INTO accACTION VALUES (13,'referee','referee document type doctype','doctype,categ','yes'); INSERT INTO accACTION VALUES (14,'runbibrank','run BibRank','','no'); INSERT INTO accACTION VALUES (15,'cfgbibrank','configure BibRank','','no'); INSERT INTO accACTION VALUES (16,'cfgbibindex','configure BibIndex','','no'); INSERT INTO accACTION VALUES (17,'cfgbibharvest','configure BibHarvest','','no'); INSERT INTO accACTION VALUES (18,'runoaiharvest','run BibHarvest oaiharvest','','no'); INSERT INTO accACTION VALUES (19,'cfgwebcomment','configure WebComment','','no'); INSERT INTO accACTION VALUES (20,'runoaiarchive','run BibHarvest oaiarchive','','no'); INSERT INTO accACTION VALUES (21,'runbibedit','run BibEdit','','no'); INSERT INTO accACTION VALUES (22,'accrestrcoll','view restricted collection','collection','no'); INSERT INTO accACTION VALUES (23,'runsessiongc','run SessionGC','','no'); INSERT INTO accARGUMENT VALUES (1,'collection','Pictures'); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,1, 0, 0); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,2, 0, 0); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,3, 0, 0); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,4, 0, 0); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,6,-1,-1); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,7, 0, 0); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (2,5, 1, 1); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (3,7, 0, 0); INSERT INTO accROLE_accACTION_accARGUMENT VALUES (1,9, 0, 0); +INSERT INTO collectiondetailedpagetabs VALUES (8, 'statistics;comments;metadata'), +INSERT INTO collectiondetailedpagetabs VALUES (19, 'statistics;comments;metadata'), +INSERT INTO collectiondetailedpagetabs VALUES (18, 'statistics;comments;metadata'), +INSERT INTO collectiondetailedpagetabs VALUES (17, 'statistics;comments;metadata'),
    diff --git a/modules/webcomment/lib/webcomment.py b/modules/webcomment/lib/webcomment.py index 60f44aac6..3d2d7ff8a 100644 --- a/modules/webcomment/lib/webcomment.py +++ b/modules/webcomment/lib/webcomment.py @@ -1,999 +1,1022 @@ # -*- coding: utf-8 -*- ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """ Comments and reviews for records """ __revision__ = "$Id$" # non CDS Invenio imports: import time import math # CDS Invenio imports: from invenio.dbquery import run_sql from invenio.config import cdslang, \ alertengineemail,\ adminemail,\ weburl,\ cdsname,\ CFG_WEBCOMMENT_ALLOW_REVIEWS,\ + CFG_WEBCOMMENT_ALLOW_SHORT_REVIEWS,\ CFG_WEBCOMMENT_ALLOW_COMMENTS,\ CFG_WEBCOMMENT_ADMIN_NOTIFICATION_LEVEL,\ - CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW,\ CFG_WEBCOMMENT_NB_REPORTS_BEFORE_SEND_EMAIL_TO_ADMIN,\ - CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW,\ CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_COMMENTS_IN_SECONDS,\ CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_REVIEWS_IN_SECONDS from invenio.webmessage_mailutils import email_quote_txt from invenio.webuser import get_user_info from invenio.dateutils import convert_datetext_to_dategui, \ datetext_default, \ convert_datestruct_to_datetext from invenio.mailutils import send_email from invenio.messages import wash_language, gettext_set_language from invenio.urlutils import wash_url_argument from invenio.webuser import isGuestUser from invenio.webcomment_config import CFG_WEBCOMMENT_ACTION_CODE try: import invenio.template webcomment_templates = invenio.template.load('webcomment') except: pass -def perform_request_display_comments_or_remarks(recID, ln=cdslang, display_order='od', display_since='all', nb_per_page=100, page=1, voted=-1, reported=-1, reviews=0): +def perform_request_display_comments_or_remarks(recID, ln=cdslang, display_order='od', display_since='all', nb_per_page=100, page=1, voted=-1, reported=-1, reviews=0, uid=-1): """ Returns all the comments (reviews) of a specific internal record or external basket record. @param recID: record id where (internal record IDs > 0) or (external basket record IDs < -100) @param display_order: hh = highest helpful score, review only lh = lowest helpful score, review only hs = highest star score, review only ls = lowest star score, review only od = oldest date nd = newest date @param display_since: all= no filtering by date nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit integer between 0 and 9 @param nb_per_page: number of results per page @param page: results page @param voted: boolean, active if user voted for a review, see perform_request_vote function @param reported: boolean, active if user reported a certain comment/review, perform_request_report function @param reviews: boolean, enabled if reviews, disabled for comments + @param uid: the id of the user who is reading comments @return html body. """ errors = [] warnings = [] - + nb_reviews = 0 + nb_comments = 0 + # wash arguments recID = wash_url_argument(recID, 'int') ln = wash_language(ln) display_order = wash_url_argument(display_order, 'str') display_since = wash_url_argument(display_since, 'str') nb_per_page = wash_url_argument(nb_per_page, 'int') page = wash_url_argument(page, 'int') voted = wash_url_argument(voted, 'int') reported = wash_url_argument(reported, 'int') reviews = wash_url_argument(reviews, 'int') # vital argument check (valid, error_body) = check_recID_is_in_range(recID, warnings, ln) if not(valid): return (error_body, errors, warnings) # Query the database and filter results res = query_retrieve_comments_or_remarks(recID, display_order, display_since, reviews) - nb_res = len(res) + res2 = query_retrieve_comments_or_remarks(recID, display_order, display_since, not reviews) + nb_res = len(res) + if reviews: + nb_reviews = nb_res + nb_comments = len(res2) + else: + nb_reviews = len(res2) + nb_comments = nb_res + # checking non vital arguemnts - will be set to default if wrong #if page <= 0 or page.lower() != 'all': if page < 0: page = 1 warnings.append(('WRN_WEBCOMMENT_INVALID_PAGE_NB',)) if nb_per_page < 0: nb_per_page = 100 warnings.append(('WRN_WEBCOMMENT_INVALID_NB_RESULTS_PER_PAGE',)) if CFG_WEBCOMMENT_ALLOW_REVIEWS and reviews: if display_order not in ['od', 'nd', 'hh', 'lh', 'hs', 'ls']: display_order = 'hh' warnings.append(('WRN_WEBCOMMENT_INVALID_REVIEW_DISPLAY_ORDER',)) else: if display_order not in ['od', 'nd']: display_order = 'od' warnings.append(('WRN_WEBCOMMENT_INVALID_DISPLAY_ORDER',)) # filter results according to page and number of reults per page if nb_per_page > 0: if nb_res > 0: last_page = int(math.ceil(nb_res / float(nb_per_page))) else: last_page = 1 if page > last_page: page = 1 warnings.append(("WRN_WEBCOMMENT_INVALID_PAGE_NB",)) if nb_res > nb_per_page: # if more than one page of results if page < last_page: res = res[(page-1)*(nb_per_page) : (page*nb_per_page)] else: res = res[(page-1)*(nb_per_page) : ] else: # one page of results pass else: last_page = 1 # Send to template avg_score = 0.0 if not CFG_WEBCOMMENT_ALLOW_COMMENTS and not CFG_WEBCOMMENT_ALLOW_REVIEWS: # comments not allowed by admin errors.append(('ERR_WEBCOMMENT_COMMENTS_NOT_ALLOWED',)) if reported > 0: warnings.append(('WRN_WEBCOMMENT_FEEDBACK_RECORDED',)) elif reported == 0: warnings.append(('WRN_WEBCOMMENT_ALREADY_REPORTED',)) if CFG_WEBCOMMENT_ALLOW_REVIEWS and reviews: avg_score = calculate_avg_score(res) if voted > 0: warnings.append(('WRN_WEBCOMMENT_FEEDBACK_RECORDED',)) elif voted == 0: warnings.append(('WRN_WEBCOMMENT_ALREADY_VOTED',)) + body = webcomment_templates.tmpl_get_comments(recID, ln, nb_per_page, page, last_page, display_order, display_since, CFG_WEBCOMMENT_ALLOW_REVIEWS, - res, nb_res, avg_score, + res, nb_comments, avg_score, warnings, border=0, - reviews=reviews) + reviews=reviews, + total_nb_reviews=nb_reviews, + uid=uid) return (body, errors, warnings) def perform_request_vote(cmt_id, client_ip_address, value, uid=-1): """ Vote positively or negatively for a comment/review @param cmt_id: review id @param value: +1 for voting positively -1 for voting negatively @return integer 1 if successful, integer 0 if not """ cmt_id = wash_url_argument(cmt_id, 'int') client_ip_address = wash_url_argument(client_ip_address, 'str') value = wash_url_argument(value, 'int') uid = wash_url_argument(uid, 'int') if cmt_id > 0 and value in [-1, 1] and check_user_can_vote(cmt_id, client_ip_address, uid): action_date = convert_datestruct_to_datetext(time.localtime()) action_code = CFG_WEBCOMMENT_ACTION_CODE['VOTE'] query = """INSERT INTO cmtACTIONHISTORY VALUES (%i, NULL ,%i, inet_aton('%s'), '%s', '%s')""" query %= (cmt_id, uid, client_ip_address, action_date, action_code) run_sql(query) return query_record_useful_review(cmt_id, value) else: return 0 def check_user_can_comment(recID, client_ip_address, uid=-1): """ Check if a user hasn't already commented within the last seconds time limit: CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_COMMENTS_IN_SECONDS @param recID: record id @param client_ip_address: IP => use: str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) @param uid: user id, as given by invenio.webuser.getUid(req) """ recID = wash_url_argument(recID, 'int') client_ip_address = wash_url_argument(client_ip_address, 'str') uid = wash_url_argument(uid, 'int') max_action_time = time.time() - CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_COMMENTS_IN_SECONDS max_action_time = convert_datestruct_to_datetext(time.localtime(max_action_time)) action_code = CFG_WEBCOMMENT_ACTION_CODE['ADD_COMMENT'] query = """SELECT id_bibrec FROM cmtACTIONHISTORY WHERE id_bibrec=%i AND action_code='%s' AND action_time>'%s' """ % (recID, action_code, max_action_time) if uid < 0: query += " AND client_host=inet_aton('%s')" % client_ip_address else: query += " AND id_user=%i" % uid res = run_sql(query) return len(res) == 0 def check_user_can_review(recID, client_ip_address, uid=-1): """ Check if a user hasn't already reviewed within the last seconds time limit: CFG_WEBCOMMENT_TIMELIMIT_PROCESSING_REVIEWS_IN_SECONDS @param cmt_id: comment id @param client_ip_address: IP => use: str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) @param uid: user id, as given by invenio.webuser.getUid(req) """ action_code = CFG_WEBCOMMENT_ACTION_CODE['ADD_REVIEW'] query = """SELECT id_bibrec FROM cmtACTIONHISTORY WHERE id_bibrec=%i AND action_code='%s' """ % (recID, action_code) if uid < 0: query += " AND client_host=inet_aton('%s')" % client_ip_address else: query += " AND id_user=%i" % uid res = run_sql(query) return len(res) == 0 def check_user_can_vote(cmt_id, client_ip_address, uid=-1): """ Checks if a user hasn't already voted @param cmt_id: comment id @param client_ip_address: IP => use: str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) @param uid: user id, as given by invenio.webuser.getUid(req) """ cmt_id = wash_url_argument(cmt_id, 'int') client_ip_address = wash_url_argument(client_ip_address, 'str') uid = wash_url_argument(uid, 'int') query = """SELECT id_cmtRECORDCOMMENT FROM cmtACTIONHISTORY WHERE id_cmtRECORDCOMMENT=%i""" % cmt_id if uid < 0: query += " AND client_host=inet_aton('%s')" % client_ip_address else: query += " AND id_user=%i" % uid res = run_sql(query) return (len(res) == 0) def perform_request_report(cmt_id, client_ip_address, uid=-1): """ Report a comment/review for inappropriate content. Will send an email to the administrator if number of reports is a multiple of CFG_WEBCOMMENT_NB_REPORTS_BEFORE_SEND_EMAIL_TO_ADMIN @param cmt_id: comment id @return integer 1 if successful, integer 0 if not """ cmt_id = wash_url_argument(cmt_id, 'int') if cmt_id <= 0: return 0 (query_res, nb_abuse_reports) = query_record_report_this(cmt_id) if query_res == 0: return 0 if not(check_user_can_report(cmt_id, client_ip_address, uid)): return 0 action_date = convert_datestruct_to_datetext(time.localtime()) action_code = CFG_WEBCOMMENT_ACTION_CODE['REPORT_ABUSE'] query = """INSERT INTO cmtACTIONHISTORY VALUES (%i, NULL, %i, inet_aton('%s'), '%s', '%s')""" query %= (cmt_id, uid, client_ip_address, action_date, action_code) run_sql(query) if nb_abuse_reports % CFG_WEBCOMMENT_NB_REPORTS_BEFORE_SEND_EMAIL_TO_ADMIN == 0: (cmt_id2, id_bibrec, id_user, cmt_body, cmt_date, cmt_star, cmt_vote, cmt_nb_votes_total, cmt_title, cmt_reported) = query_get_comment(cmt_id) (user_nb_abuse_reports, user_votes, user_nb_votes_total) = query_get_user_reports_and_votes(int(id_user)) (nickname, user_email, last_login) = query_get_user_contact_info(id_user) from_addr = '%s Alert Engine <%s>' % (cdsname, alertengineemail) to_addr = adminemail subject = "An error report has been sent from a user" body = ''' The following comment has been reported a total of %(cmt_reported)s times. Author: nickname = %(nickname)s email = %(user_email)s user_id = %(uid)s This user has: total number of reports = %(user_nb_abuse_reports)s %(votes)s Comment: comment_id = %(cmt_id)s record_id = %(id_bibrec)s date written = %(cmt_date)s nb reports = %(cmt_reported)s %(review_stuff)s body = ---start body--- %(cmt_body)s ---end body--- Please go to the WebComment Admin interface %(comment_admin_link)s to delete this message if necessary. A warning will be sent to the user in question.''' % \ { 'cfg-report_max' : CFG_WEBCOMMENT_NB_REPORTS_BEFORE_SEND_EMAIL_TO_ADMIN, 'nickname' : nickname, 'user_email' : user_email, 'uid' : id_user, 'user_nb_abuse_reports' : user_nb_abuse_reports, 'user_votes' : user_votes, 'votes' : CFG_WEBCOMMENT_ALLOW_REVIEWS and \ "total number of positive votes\t= %s\n\t\t\t\ttotal number of negative votes\t= %s" % \ (user_votes, (user_nb_votes_total - user_votes)) or "\n", 'cmt_id' : cmt_id, 'id_bibrec' : id_bibrec, 'cmt_date' : cmt_date, 'cmt_reported' : cmt_reported, 'review_stuff' : CFG_WEBCOMMENT_ALLOW_REVIEWS and \ "star score\t\t= %s\n\t\t\treview title\t\t= %s" % (cmt_star, cmt_title) or "", 'cmt_body' : cmt_body, 'comment_admin_link' : weburl + "/admin/webcomment/", 'user_admin_link' : "user_admin_link" #! FIXME } #FIXME to be added to email when websession module is over: #If you wish to ban the user, you can do so via the User Admin Panel %(user_admin_link)s. send_email(from_addr, to_addr, subject, body) return 1 def check_user_can_report(cmt_id, client_ip_address, uid=-1): """ Checks if a user hasn't already reported a comment @param cmt_id: comment id @param client_ip_address: IP => use: str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) @param uid: user id, as given by invenio.webuser.getUid(req) """ cmt_id = wash_url_argument(cmt_id, 'int') client_ip_address = wash_url_argument(client_ip_address, 'str') uid = wash_url_argument(uid, 'int') query = """SELECT id_cmtRECORDCOMMENT FROM cmtACTIONHISTORY WHERE id_cmtRECORDCOMMENT=%i""" % cmt_id if uid < 0: query += " AND client_host=inet_aton('%s')" % client_ip_address else: query += " AND id_user=%i" % uid res = run_sql(query) return (len(res) == 0) def query_get_user_contact_info(uid): """ Get the user contact information @return tuple (nickname, email, last_login), if none found return () Note: for the moment, if no nickname, will return email address up to the '@' """ query1 = """SELECT nickname, email, DATE_FORMAT(last_login, '%%Y-%%m-%%d %%H:%%i:%%s') FROM user WHERE id=%s""" params1 = (uid,) res1 = run_sql(query1, params1) if res1: return res1[0] else: return () def query_get_user_reports_and_votes(uid): """ Retrieve total number of reports and votes of a particular user @param uid: user id @return tuple (total_nb_reports, total_nb_votes_yes, total_nb_votes_total) if none found return () """ query1 = """SELECT nb_votes_yes, nb_votes_total, nb_abuse_reports FROM cmtRECORDCOMMENT WHERE id_user=%s""" params1 = (uid,) res1 = run_sql(query1, params1) if len(res1) == 0: return () nb_votes_yes = nb_votes_total = nb_abuse_reports = 0 for cmt_tuple in res1: nb_votes_yes += int(cmt_tuple[0]) nb_votes_total += int(cmt_tuple[1]) nb_abuse_reports += int(cmt_tuple[2]) return (nb_abuse_reports, nb_votes_yes, nb_votes_total) def query_get_comment(comID): """ Get all fields of a comment @param comID: comment id @return tuple (comID, id_bibrec, id_user, body, date_creation, star_score, nb_votes_yes, nb_votes_total, title, nb_abuse_reports) if none found return () """ query1 = """SELECT id, id_bibrec, id_user, body, DATE_FORMAT(date_creation, '%%Y-%%m-%%d %%H:%%i:%%s'), star_score, nb_votes_yes, nb_votes_total, title, nb_abuse_reports FROM cmtRECORDCOMMENT WHERE id=%s""" params1 = (comID,) res1 = run_sql(query1, params1) if len(res1)>0: return res1[0] else: return () def query_record_report_this(comID): """ Increment the number of reports for a comment @param comID: comment id @return tuple (success, new_total_nb_reports_for_this_comment) where success is integer 1 if success, integer 0 if not if none found, return () """ #retrieve nb_abuse_reports query1 = "SELECT nb_abuse_reports FROM cmtRECORDCOMMENT WHERE id=%s" params1 = (comID,) res1 = run_sql(query1, params1) if len(res1)==0: return () #increment and update nb_abuse_reports = int(res1[0][0]) + 1 query2 = "UPDATE cmtRECORDCOMMENT SET nb_abuse_reports=%s WHERE id=%s" params2 = (nb_abuse_reports, comID) res2 = run_sql(query2, params2) return (int(res2), nb_abuse_reports) def query_record_useful_review(comID, value): """ private funciton Adjust the number of useful votes and number of total votes for a comment. @param comID: comment id @param value: +1 or -1 @return integer 1 if successful, integer 0 if not """ # retrieve nb_useful votes query1 = "SELECT nb_votes_total, nb_votes_yes FROM cmtRECORDCOMMENT WHERE id=%s" params1 = (comID,) res1 = run_sql(query1, params1) if len(res1)==0: return 0 # modify and insert new nb_useful votes nb_votes_yes = int(res1[0][1]) if value >= 1: nb_votes_yes = int(res1[0][1]) + 1 nb_votes_total = int(res1[0][0]) + 1 query2 = "UPDATE cmtRECORDCOMMENT SET nb_votes_total=%s, nb_votes_yes=%s WHERE id=%s" params2 = (nb_votes_total, nb_votes_yes, comID) res2 = run_sql(query2, params2) return int(res2) -def query_retrieve_comments_or_remarks (recID, display_order='od', display_since='0000-00-00 00:00:00', ranking=0): +def query_retrieve_comments_or_remarks (recID, display_order='od', display_since='0000-00-00 00:00:00', + ranking=0): """ Private function Retrieve tuple of comments or remarks from the database @param recID: record id @param display_order: hh = highest helpful score lh = lowest helpful score hs = highest star score ls = lowest star score od = oldest date nd = newest date @param display_since: datetime, e.g. 0000-00-00 00:00:00 @param ranking: boolean, enabled if reviews, disabled for comments + @param full_reviews_p: boolean, filter out empty reviews (with score only) if False @return tuple of comment where comment is tuple (nickname, date_creation, body, id) if ranking disabled or tuple (nickname, date_creation, body, nb_votes_yes, nb_votes_total, star_score, title, id) Note: for the moment, if no nickname, will return email address up to '@' """ display_since = calculate_start_date(display_since) order_dict = { 'hh' : "cmt.nb_votes_yes/(cmt.nb_votes_total+1) DESC, cmt.date_creation DESC ", 'lh' : "cmt.nb_votes_yes/(cmt.nb_votes_total+1) ASC, cmt.date_creation ASC ", 'ls' : "cmt.star_score ASC, cmt.date_creation DESC ", 'hs' : "cmt.star_score DESC, cmt.date_creation DESC ", 'od' : "cmt.date_creation ASC ", 'nd' : "cmt.date_creation DESC " } # Ranking only done for comments and when allowed if ranking and recID > 0: try: display_order = order_dict[display_order] except: display_order = order_dict['od'] else: # in case of recID > 0 => external record => no ranking! ranking = 0 try: if display_order[-1] == 'd': display_order = order_dict[display_order] else: display_order = order_dict['od'] except: display_order = order_dict['od'] query = """SELECT user.nickname, cmt.id_user, DATE_FORMAT(cmt.date_creation, '%%Y-%%m-%%d %%H:%%i:%%s'), cmt.body, %(ranking)s cmt.id FROM %(table)s cmt LEFT JOIN user ON user.id=cmt.id_user WHERE %(id_bibrec)s=%(recID)i %(ranking_only)s %(display_since)s ORDER BY %(display_order)s""" params = { 'ranking' : ranking and ' cmt.nb_votes_yes, cmt.nb_votes_total, cmt.star_score, cmt.title, ' or '', 'ranking_only' : ranking and ' AND cmt.star_score>0 ' or ' AND cmt.star_score=0 ', 'id_bibrec' : recID > 0 and 'cmt.id_bibrec' or 'cmt.id_bibrec_or_bskEXTREC', 'table' : recID > 0 and 'cmtRECORDCOMMENT' or 'bskRECORDCOMMENT', 'recID' : recID, 'display_since' : display_since=='0000-00-00 00:00:00' and ' ' or 'AND cmt.date_creation>=\'%s\' ' % display_since, 'display_order' : display_order } res = run_sql(query % params) if res: return res return () def query_add_comment_or_remark(reviews=0, recID=0, uid=-1, msg="", note="", score=0, priority=0, client_ip_address=''): """ Private function Insert a comment/review or remarkinto the database @param recID: record id @param uid: user id @param msg: comment body @param note: comment title @param score: review star score @param priority: remark priority #!FIXME @return integer >0 representing id if successful, integer 0 if not """ current_date = calculate_start_date('0d') #change utf-8 message into general unicode msg = msg.decode('utf-8') note = note.decode('utf-8') #change general unicode back to utf-8 msg = msg.encode('utf-8') note = note.encode('utf-8') query = """INSERT INTO cmtRECORDCOMMENT (id_bibrec, id_user, body, date_creation, star_score, nb_votes_total, title) VALUES (%s, %s, %s, %s, %s, %s, %s)""" params = (recID, uid, msg, current_date, score, 0, note) res = run_sql(query, params) if res: action_code = CFG_WEBCOMMENT_ACTION_CODE[reviews and 'ADD_REVIEW' or 'ADD_COMMENT'] action_time = convert_datestruct_to_datetext(time.localtime()) query2 = """INSERT INTO cmtACTIONHISTORY values ('', %i, %i, inet_aton('%s'), '%s', '%s')""" params2 = (recID, uid, client_ip_address, action_time, action_code) run_sql(query2%params2) return int(res) def calculate_start_date(display_since): """ Private function Returns the datetime of display_since argument in MYSQL datetime format calculated according to the local time. @param display_since = all= no filtering nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit number @return string of wanted datetime. If 'all' given as argument, will return datetext_default datetext_default is defined in miscutils/lib/dateutils and equals 0000-00-00 00:00:00 => MySQL format If bad arguement given, will return datetext_default """ # time type and seconds coefficients time_types = {'d':0, 'w':0, 'm':0, 'y':0} ## verify argument # argument wrong size if (display_since==(None or 'all')) or (len(display_since) > 2): return datetext_default try: nb = int(display_since[0]) except: return datetext_default if str(display_since[1]) in time_types: time_type = str(display_since[1]) else: return datetext_default ## calculate date # initialize the coef if time_type == 'w': time_types[time_type] = 7 else: time_types[time_type] = 1 start_time = time.localtime() start_time = (start_time[0] - nb*time_types['y'], start_time[1] - nb*time_types['m'], start_time[2] - nb*time_types['d'] - nb*time_types['w'], start_time[3], start_time[4], start_time[5], start_time[6], start_time[7], start_time[8]) return convert_datestruct_to_datetext(start_time) def get_first_comments_or_remarks(recID=-1, ln=cdslang, nb_comments='all', nb_reviews='all', voted=-1, reported=-1): """ Gets nb number comments/reviews or remarks. In the case of comments, will get both comments and reviews Comments and remarks sorted by most recent date, reviews sorted by highest helpful score @param recID: record id @param ln: language @param nb: number of comment/reviews or remarks to get @param voted: 1 if user has voted for a remark @param reported: 1 if user has reported a comment or review @return if comment, tuple (comments, reviews) both being html of first nb comments/reviews if remark, tuple (remakrs, None) """ warnings = [] errors = [] voted = wash_url_argument(voted, 'int') reported = wash_url_argument(reported, 'int') ## check recID argument if type(recID) is not int: return () if recID >= 1: #comment or review. NB: suppressed reference to basket (handled in webbasket) if CFG_WEBCOMMENT_ALLOW_REVIEWS: res_reviews = query_retrieve_comments_or_remarks(recID=recID, display_order="hh", ranking=1) nb_res_reviews = len(res_reviews) ## check nb argument if type(nb_reviews) is int and nb_reviews < len(res_reviews): first_res_reviews = res_reviews[:nb_reviews] else: - if nb_res_reviews > CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW: - first_res_reviews = res_reviews[:CFG_WEBCOMMENT_NB_REPORTS_BEFORE_SEND_EMAIL_TO_ADMIN] - else: - first_res_reviews = res_reviews + first_res_reviews = res_reviews if CFG_WEBCOMMENT_ALLOW_COMMENTS: res_comments = query_retrieve_comments_or_remarks(recID=recID, display_order="od", ranking=0) nb_res_comments = len(res_comments) ## check nb argument if type(nb_comments) is int and nb_comments < len(res_comments): first_res_comments = res_comments[:nb_comments] else: - if nb_res_comments > CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW: - first_res_comments = res_comments[:CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW] - else: - first_res_comments = res_comments + first_res_comments = res_comments else: #error errors.append(('ERR_WEBCOMMENT_RECID_INVALID', recID)) #!FIXME dont return error anywhere since search page # comment if recID >= 1: comments = reviews = "" if reported > 0: warnings.append(('WRN_WEBCOMMENT_FEEDBACK_RECORDED_GREEN_TEXT',)) elif reported == 0: warnings.append(('WRN_WEBCOMMENT_FEEDBACK_NOT_RECORDED_RED_TEXT',)) if CFG_WEBCOMMENT_ALLOW_COMMENTS: # normal comments comments = webcomment_templates.tmpl_get_first_comments_without_ranking(recID, ln, first_res_comments, nb_res_comments, warnings) if CFG_WEBCOMMENT_ALLOW_REVIEWS: # ranked comments #calculate average score avg_score = calculate_avg_score(res_reviews) if voted > 0: warnings.append(('WRN_WEBCOMMENT_FEEDBACK_RECORDED_GREEN_TEXT',)) elif voted == 0: warnings.append(('WRN_WEBCOMMENT_FEEDBACK_NOT_RECORDED_RED_TEXT',)) reviews = webcomment_templates.tmpl_get_first_comments_with_ranking(recID, ln, first_res_reviews, nb_res_reviews, avg_score, warnings) return (comments, reviews) # remark else: return(webcomment_templates.tmpl_get_first_remarks(first_res_comments, ln, nb_res_comments), None) def calculate_avg_score(res): """ private function Calculate the avg score of reviews present in res @param res: tuple of tuple returned from query_retrieve_comments_or_remarks @return a float of the average score rounded to the closest 0.5 """ c_star_score = 6 avg_score = 0.0 nb_reviews = 0 for comment in res: if comment[c_star_score] > 0: avg_score += comment[c_star_score] nb_reviews += 1 if nb_reviews == 0: return 0.0 avg_score = avg_score / nb_reviews avg_score_unit = avg_score - math.floor(avg_score) if avg_score_unit < 0.25: avg_score = math.floor(avg_score) elif avg_score_unit > 0.75: avg_score = math.floor(avg_score) + 1 else: avg_score = math.floor(avg_score) + 0.5 if avg_score > 5: avg_score = 5.0 return avg_score def perform_request_add_comment_or_remark(recID=0, uid=-1, action='DISPLAY', ln=cdslang, msg=None, score=None, note=None, priority=None, reviews=0, comID=-1, client_ip_address=None): """ Add a comment/review or remark @param recID: record id @param uid: user id @param action: 'DISPLAY' to display add form 'SUBMIT' to submit comment once form is filled 'REPLY' to reply to an existing comment @param ln: language @param msg: the body of the comment/review or remark @param score: star score of the review @param note: title of the review @param priority: priority of remark (int) @param reviews: boolean, if enabled will add a review, if disabled will add a comment @param comID: if replying, this is the comment id of the commetn are replying to @return html add form if action is display or reply html successful added form if action is submit """ warnings = [] errors = [] actions = ['DISPLAY', 'REPLY', 'SUBMIT'] _ = gettext_set_language(ln) ## check arguments check_recID_is_in_range(recID, warnings, ln) if uid <= 0: errors.append(('ERR_WEBCOMMENT_UID_INVALID', uid)) return ('', errors, warnings) user_contact_info = query_get_user_contact_info(uid) nickname = '' if user_contact_info: if user_contact_info[0]: nickname = user_contact_info[0] # show the form if action == 'DISPLAY': if reviews and CFG_WEBCOMMENT_ALLOW_REVIEWS: return (webcomment_templates.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, msg, score, note, warnings), errors, warnings) elif not reviews and CFG_WEBCOMMENT_ALLOW_COMMENTS: return (webcomment_templates.tmpl_add_comment_form(recID, uid, nickname, ln, msg, warnings), errors, warnings) else: errors.append(('ERR_WEBCOMMENT_COMMENTS_NOT_ALLOWED',)) elif action == 'REPLY': if reviews and CFG_WEBCOMMENT_ALLOW_REVIEWS: errors.append(('ERR_WEBCOMMENT_REPLY_REVIEW',)) return (webcomment_templates.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, msg, score, note, warnings), errors, warnings) elif not reviews and CFG_WEBCOMMENT_ALLOW_COMMENTS: if comID > 0: comment = query_get_comment(comID) if comment: user_info = get_user_info(comment[2]) if user_info: date_creation = convert_datetext_to_dategui(str(comment[4])) msg = _("%(x_name)s wrote on %(x_date)s:")% {'x_name': user_info[2], 'x_date': date_creation} msg += "\n\n" + comment[3] msg = email_quote_txt(text=msg) return (webcomment_templates.tmpl_add_comment_form(recID, uid, nickname, ln, msg, warnings), errors, warnings) else: errors.append(('ERR_WEBCOMMENT_COMMENTS_NOT_ALLOWED',)) # check before submitting form elif action == 'SUBMIT': if reviews and CFG_WEBCOMMENT_ALLOW_REVIEWS: - if note.strip() in ["", "None"]: + if note.strip() in ["", "None"] and not CFG_WEBCOMMENT_ALLOW_SHORT_REVIEWS: warnings.append(('WRN_WEBCOMMENT_ADD_NO_TITLE',)) if score == 0 or score > 5: warnings.append(("WRN_WEBCOMMENT_ADD_NO_SCORE",)) - if msg.strip() in ["", "None"]: + if msg.strip() in ["", "None"] and not CFG_WEBCOMMENT_ALLOW_SHORT_REVIEWS: warnings.append(('WRN_WEBCOMMENT_ADD_NO_BODY',)) # if no warnings, submit if len(warnings) == 0: if reviews: if check_user_can_review(recID, client_ip_address, uid): success = query_add_comment_or_remark(reviews, recID=recID, uid=uid, msg=msg, note=note, score=score, priority=0, client_ip_address=client_ip_address) else: warnings.append('WRN_WEBCOMMENT_CANNOT_REVIEW_TWICE') success = 1 else: if check_user_can_comment(recID, client_ip_address, uid): success = query_add_comment_or_remark(reviews, recID=recID, uid=uid, msg=msg, note=note, score=score, priority=0, client_ip_address=client_ip_address) else: warnings.append('WRN_WEBCOMMENT_TIMELIMIT') success = 1 if success > 0: if CFG_WEBCOMMENT_ADMIN_NOTIFICATION_LEVEL > 0: notify_admin_of_new_comment(comID=success) return (webcomment_templates.tmpl_add_comment_successful(recID, ln, reviews, warnings), errors, warnings) else: errors.append(('ERR_WEBCOMMENT_DB_INSERT_ERROR')) # if are warnings or if inserting comment failed, show user where warnings are if reviews and CFG_WEBCOMMENT_ALLOW_REVIEWS: return (webcomment_templates.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, msg, score, note, warnings), errors, warnings) else: return (webcomment_templates.tmpl_add_comment_form(recID, uid, nickname, ln, msg, warnings), errors, warnings) # unknown action send to display else: warnings.append(('WRN_WEBCOMMENT_ADD_UNKNOWN_ACTION',)) if reviews and CFG_WEBCOMMENT_ALLOW_REVIEWS: return (webcomment_templates.tmpl_add_comment_form_with_ranking(recID, uid, ln, msg, score, note, warnings), errors, warnings) else: return (webcomment_templates.tmpl_add_comment_form(recID, uid, ln, msg, warnings), errors, warnings) return ('', errors, warnings) def notify_admin_of_new_comment(comID): """ Sends an email to the admin with details regarding comment with ID = comID """ comment = query_get_comment(comID) if len(comment) > 0: (comID2, id_bibrec, id_user, body, date_creation, star_score, nb_votes_yes, nb_votes_total, title, nb_abuse_reports) = comment else: return user_info = query_get_user_contact_info(id_user) if len(user_info) > 0: (nickname, email, last_login) = user_info if not len(nickname) > 0: nickname = email.split('@')[0] else: nickname = email = last_login = "ERROR: Could not retrieve" from invenio.search_engine import print_record record = print_record(recID=id_bibrec, format='hs') review_stuff = ''' Star score = %s Title = %s''' % (star_score, title) out = ''' The following %(comment_or_review)s has just been posted (%(date)s). AUTHOR: Nickname = %(nickname)s Email = %(email)s User ID = %(uid)s RECORD CONCERNED: Record ID = %(recID)s Record = %(record_details)s %(comment_or_review_caps)s: %(comment_or_review)s ID = %(comID)s %(review_stuff)s Body = %(body)s ADMIN OPTIONS: To delete comment go to %(weburl)s/admin/webcomment/webcommentadmin.py/delete?comid=%(comID)s ''' % \ { 'comment_or_review' : star_score>0 and 'review' or 'comment', 'comment_or_review_caps': star_score>0 and 'REVIEW' or 'COMMENT', 'date' : date_creation, 'nickname' : nickname, 'email' : email, 'uid' : id_user, 'recID' : id_bibrec, 'record_details' : record, 'comID' : comID2, 'review_stuff' : star_score>0 and review_stuff or "", 'body' : body.replace('
    ','\n'), 'weburl' : weburl } from_addr = '%s WebComment <%s>' % (cdsname, alertengineemail) to_addr = adminemail subject = "A new comment/review has just been posted" send_email(from_addr, to_addr, subject, out) def check_recID_is_in_range(recID, warnings=[], ln=cdslang): """ Check that recID is >= 0 Append error messages to errors listi @param recID: record id @param warnings: the warnings list of the calling function @return tuple (boolean, html) where boolean (1=true, 0=false) and html is the body of the page to display if there was a problem """ # Make errors into a list if needed if type(warnings) is not list: errors = [warnings] try: recID = int(recID) except: pass if type(recID) is int: if recID > 0: from invenio.search_engine import record_exists success = record_exists(recID) if success == 1: return (1,"") else: warnings.append(('ERR_WEBCOMMENT_RECID_INEXISTANT', recID)) return (0, webcomment_templates.tmpl_record_not_found(status='inexistant', recID=recID, ln=ln)) elif recID == 0: warnings.append(('ERR_WEBCOMMENT_RECID_MISSING',)) return (0, webcomment_templates.tmpl_record_not_found(status='missing', recID=recID, ln=ln)) else: warnings.append(('ERR_WEBCOMMENT_RECID_INVALID', recID)) return (0, webcomment_templates.tmpl_record_not_found(status='invalid', recID=recID, ln=ln)) else: warnings.append(('ERR_WEBCOMMENT_RECID_NAN', recID)) return (0, webcomment_templates.tmpl_record_not_found(status='nan', recID=recID, ln=ln)) def check_int_arg_is_in_range(value, name, errors, gte_value, lte_value=None): """ Check that variable with name 'name' >= gte_value and optionally <= lte_value Append error messages to errors list @param value: variable value @param name: variable name @param errors: list of error tuples (error_id, value) @param gte_value: greater than or equal to value @param lte_value: less than or equal to value @return boolean (1=true, 0=false) """ # Make errors into a list if needed if type(errors) is not list: errors = [errors] if type(value) is not int or type(gte_value) is not int: errors.append(('ERR_WEBCOMMENT_PROGRAMNING_ERROR',)) return 0 if type(value) is not int: errors.append(('ERR_WEBCOMMENT_ARGUMENT_NAN', value)) return 0 if value < gte_value: errors.append(('ERR_WEBCOMMENT_ARGUMENT_INVALID', value)) return 0 if lte_value: if type(lte_value) is not int: errors.append(('ERR_WEBCOMMENT_PROGRAMNING_ERROR',)) return 0 if value > lte_value: errors.append(('ERR_WEBCOMMENT_ARGUMENT_INVALID', value)) return 0 return 1 + + +def get_mini_reviews(recid, ln=cdslang): + + if CFG_WEBCOMMENT_ALLOW_SHORT_REVIEWS: + action = 'SUBMIT' + else: + action = 'DISPLAY' + + reviews = query_retrieve_comments_or_remarks(recid, ranking=1) + + return webcomment_templates.tmpl_mini_review(recid, ln, action=action, + avg_score=calculate_avg_score(reviews), + nb_comments_total=len(reviews)) diff --git a/modules/webcomment/lib/webcomment_templates.py b/modules/webcomment/lib/webcomment_templates.py index 2286b9c1b..4f0ab4fc7 100644 --- a/modules/webcomment/lib/webcomment_templates.py +++ b/modules/webcomment/lib/webcomment_templates.py @@ -1,1342 +1,1399 @@ # -*- coding: utf-8 -*- ## $Id$ ## Comments and reviews for records. ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """HTML Templates for commenting features """ __revision__ = "$Id$" # non CDS Invenio imports import string # CDS Invenio imports from invenio.webuser import get_user_info from invenio.dateutils import convert_datetext_to_dategui from invenio.webmessage_mailutils import email_quoted_txt2html from invenio.config import weburl, \ sweburl, \ cdslang, \ cdsname, \ cdsnameintl,\ - CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW, \ CFG_WEBCOMMENT_ALLOW_REVIEWS, \ - CFG_WEBCOMMENT_ALLOW_COMMENTS, \ - CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW + CFG_WEBCOMMENT_ALLOW_COMMENTS from invenio.messages import gettext_set_language from invenio.textutils import indent_text class Template: """templating class, refer to webcomment.py for examples of call""" def tmpl_get_first_comments_without_ranking(self, recID, ln, comments, nb_comments_total, warnings): """ @param recID: record id @param ln: language @param comments: tuple as returned from webcomment.py/query_retrieve_comments_or_remarks @param nb_comments_total: total number of comments for this record @param warnings: list of warning tuples (warning_msg, arg1, arg2, ...) @return html of comments """ # load the right message language _ = gettext_set_language(ln) # naming data fields of comments c_nickname = 0 c_user_id = 1 c_date_creation = 2 c_body = 3 c_id = 4 warnings = self.tmpl_warnings(warnings, ln) # comments comment_rows = '' for comment in comments: if comment[c_nickname]: nickname = comment[c_nickname] display = nickname else: (uid, nickname, display) = get_user_info(comment[c_user_id]) messaging_link = self.create_messaging_link(nickname, display, ln) comment_rows += """ """ - report_link = '%s/comments/report?recid=%s&ln=%s&comid=%s&reviews=0' % (weburl, recID, ln, comment[c_id]) - reply_link='%s/comments/add?recid=%s&ln=%s&comid=%s&action=REPLY' % (weburl, recID, ln, comment[c_id]) + report_link = '%s/record/%s/comments/report?ln=%s&comid=%s' % (weburl, recID, ln, comment[c_id]) + reply_link='%s/record/%s/comments/add?ln=%s&comid=%s&action=REPLY' % (weburl, recID, ln, comment[c_id]) comment_rows += self.tmpl_get_comment_without_ranking(ln=ln, nickname=messaging_link, date_creation=comment[c_date_creation], body=comment[c_body], report_link=report_link, reply_link=reply_link) comment_rows += """

    """ # write button write_button_label = _("Write a comment") - write_button_link = '%s/comments/add' % (weburl,) - write_button_form = """ - - """ % (recID, ln) + write_button_link = '%s/record/%s/comments/add' % (weburl, recID) + write_button_form = '' % ln write_button_form = self.createhiddenform(action=write_button_link, method="get", text=write_button_form, button=write_button_label) # output if nb_comments_total > 0: out = warnings - comments_label = CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW and \ - CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW>1 and \ - _("Showing the latest %i comments:")% CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW or "" + comments_label = len(comments) > 1 and _("Showing the latest %i comments:") % len(comments) \ + or "" out += """
    %(comment_title)s
    %(comments_label)s
    %(comment_rows)s
    %(view_all_comments_link)s

    %(write_button_form)s
    """ % \ {'comment_title': _("Discuss this document"), 'comments_label': comments_label, 'nb_comments_total' : nb_comments_total, 'recID': recID, 'comment_rows': comment_rows, 'tab': ' '*4, 'weburl': weburl, - 's': CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW>1 and 's' or "", - 'view_all_comments_link': nb_comments_total>0 and '''View all %s comments''' \ + 's': nb_comments_total>1 and 's' or "", + 'view_all_comments_link': nb_comments_total>0 and '''View all %s comments''' \ % (weburl, recID, nb_comments_total) or "", 'write_button_form': write_button_form, - 'nb_comments': CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW>1 and CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW or "" + 'nb_comments': len(comments) } else: out = """
    %(discuss_label)s:
    %(detailed_info)s
    %(form)s
    """ % {'form': write_button_form, 'discuss_label': _("Discuss this document"), 'detailed_info': _("Start a discussion about any aspect of this document.") } return out def tmpl_record_not_found(self, status='missing', recID="", ln=cdslang): """ Displays a page when bad or missing record ID was given. @param status: 'missing' : no recID was given 'inexistant': recID doesn't have an entry in the database 'nan' : recID is not a number 'invalid' : recID is an error code, i.e. in the interval [-99,-1] @param return: body of the page """ _ = gettext_set_language(ln) if status == 'inexistant': body = _("Sorry, the record %s does not seem to exist.") % (recID,) elif status in ('nan', 'invalid'): body = _("Sorry, %s is not a valid ID value.") % (recID,) else: body = _("Sorry, no record ID was provided.") body += "

    " link = "%s." % (weburl, ln, cdsnameintl.get(ln, cdsname)) body += _("You may want to start browsing from %s") % link return body def tmpl_get_first_comments_with_ranking(self, recID, ln, comments=None, nb_comments_total=None, avg_score=None, warnings=[]): """ @param recID: record id @param ln: language @param comments: tuple as returned from webcomment.py/query_retrieve_comments_or_remarks @param nb_comments_total: total number of comments for this record @param avg_score: average score of all reviews @param warnings: list of warning tuples (warning_msg, arg1, arg2, ...) @return html of comments """ # load the right message language _ = gettext_set_language(ln) # naming data fields of comments c_nickname = 0 c_user_id = 1 c_date_creation = 2 c_body = 3 c_nb_votes_yes = 4 c_nb_votes_total = 5 c_star_score = 6 c_title = 7 c_id = 8 warnings = self.tmpl_warnings(warnings, ln) #stars if avg_score > 0: avg_score_img = 'stars-' + str(avg_score).split('.')[0] + '-' + str(avg_score).split('.')[1] + '.png' else: avg_score_img = "stars-0-0.png" # voting links useful_dict = { 'weburl' : weburl, 'recID' : recID, 'ln' : ln, 'yes_img' : 'smchk_gr.gif', #'yes.gif', 'no_img' : 'iconcross.gif' #'no.gif' } - link = '' + _("Yes") + '' useful_no = link + '&com_value=-1">' + _("No") + '' #comment row comment_rows = ' ' for comment in comments: if comment[c_nickname]: nickname = comment[c_nickname] display = nickname else: (uid, nickname, display) = get_user_info(comment[c_user_id]) messaging_link = self.create_messaging_link(nickname, display, ln) comment_rows += ''' ''' - report_link = '%s/comments/report?recid=%s&ln=%s&comid=%s&reviews=0' % (weburl, recID, ln, comment[c_id]) + report_link = '%s/record/%s/reviews/report?ln=%s&comid=%s' % (weburl, recID, ln, comment[c_id]) comment_rows += self.tmpl_get_comment_with_ranking(ln=ln, nickname=messaging_link, date_creation=comment[c_date_creation], body=comment[c_body], nb_votes_total=comment[c_nb_votes_total], nb_votes_yes=comment[c_nb_votes_yes], star_score=comment[c_star_score], title=comment[c_title], report_link=report_link) comment_rows += ''' %s %s / %s
    ''' % (_("Was this review helpful?"), useful_yes % {'comid':comment[c_id]}, useful_no % {'comid':comment[c_id]}) comment_rows += '''
    ''' # write button - write_button_link = '''%s/comments/add''' % (weburl,) - write_button_form = ''' - - ''' % (recID, ln ) + write_button_link = '''%s/record/%s/reviews/add''' % (weburl, recID) + write_button_form = ' ' % ln write_button_form = self.createhiddenform(action=write_button_link, method="get", text=write_button_form, button=_("Write a review")) if nb_comments_total > 0: avg_score_img = str(avg_score_img) avg_score = str(avg_score) nb_comments_total = str(nb_comments_total) score = '' score += _("Average review score: %(x_nb_score)s based on %(x_nb_reviews)s reviews") %\ {'x_nb_score': '' + avg_score + '', 'x_nb_reviews': nb_comments_total} useful_label = _("Readers found the following %s reviews to be most helpful.") - useful_label %= CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW > 1 and CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW or "" - view_all_comments_link ='' % (weburl, recID, ln) + useful_label %= len(comments) > 1 and len(comments) or "" + view_all_comments_link ='' % (weburl, recID, ln) view_all_comments_link += _("View all %s reviews") % nb_comments_total view_all_comments_link += '
    ' out = warnings + """
    %(comment_title)s:
    %(score_label)s
    %(useful_label)s %(comment_rows)s
    %(view_all_comments_link)s %(write_button_form)s
    """ % \ { 'comment_title' : _("Rate this document"), 'score_label' : score, 'useful_label' : useful_label, 'recID' : recID, 'view_all_comments' : _("View all %s reviews") % (nb_comments_total,), 'write_comment' : _("Write a review"), 'comment_rows' : comment_rows, 'tab' : ' '*4, 'weburl' : weburl, 'view_all_comments_link': nb_comments_total>0 and view_all_comments_link or "", 'write_button_form' : write_button_form } else: out = '''
    %s:
    %s
    %s
    ''' % (_("Rate this document"), _("Be the first to review this document."), write_button_form) return out def tmpl_get_comment_without_ranking(self, ln, nickname, date_creation, body, reply_link=None, report_link=None): """ private function @param ln: language @param nickname: nickname @param date_creation: date comment was written @param body: comment body @param reply_link: if want reply and report, give the http links @param repot_link: if want reply and report, give the http links @return html table of comment """ # load the right message language _ = gettext_set_language(ln) date_creation = convert_datetext_to_dategui(date_creation) out = '' final_body = email_quoted_txt2html(body) - title = _("%(x_name)s wrote on %(x_date)s:") % {'x_name': nickname, + title = _('%(x_name)s wrote on %(x_date)s:') % {'x_name': nickname, 'x_date': '' + date_creation + ''} links = '' if reply_link: links += '' + _("Reply") +'' if report_link: links += ' | ' if report_link: links += '' + _("Report abuse") + '' out += """ -
    %(title)s
    +
    %(title)s
    %(body)s

    -%(links)s +
    %(links)s
    """ % \ - {'title' : title, + {'title' : '
     %s
    ' % (weburl, title), 'body' : final_body, 'links' : links} return out def tmpl_get_comment_with_ranking(self, ln, nickname, date_creation, body, nb_votes_total, nb_votes_yes, star_score, title, report_link=None): """ private function @param ln: language @param nickname: nickname @param date_creation: date comment was written @param body: comment body @param nb_votes_total: total number of votes for this review @param nb_votes_yes: number of positive votes for this record @param star_score: star score for this record @param title: title of review @return html table of review """ # load the right message language _ = gettext_set_language(ln) if star_score > 0: star_score_img = 'stars-' + str(star_score) + '-0.png' else: star_score_img = 'stars-0-0.png' out = "" date_creation = convert_datetext_to_dategui(date_creation) reviewed_label = _("Reviewed by %(x_nickname)s on %(x_date)s") % {'x_nickname': nickname, 'x_date':date_creation} useful_label = _("%(x_nb_people)i out of %(x_nb_total)i people found this review useful") % {'x_nb_people': nb_votes_yes, 'x_nb_total': nb_votes_total} links = '' if report_link: links += '' + _("Report abuse") + '' - out += """ - - - - - - - - - - -
    + _body = '' + if body != '': + _body = ''' +
    +%s +
    ''' % email_quoted_txt2html(body) + + out += ''' +
    +
    %(star_score)s%(title)s
    %(reviewed_label)s
    %(useful_label)s -
    -
    -%(body)s -
    -
    %(abuse)s
    """ % {'weburl' : weburl, +
    + %(body)s + +%(abuse)s''' % {'weburl' : weburl, 'star_score_img': star_score_img, 'star_score' : star_score, 'title' : title, 'reviewed_label': reviewed_label, 'useful_label' : useful_label, - 'body' : email_quoted_txt2html(body), + 'body' : _body, 'abuse' : links } return out def tmpl_get_comments(self, recID, ln, nb_per_page, page, nb_pages, display_order, display_since, CFG_WEBCOMMENT_ALLOW_REVIEWS, comments, total_nb_comments, avg_score, warnings, - border=0, reviews=0): + border=0, reviews=0, + total_nb_reviews=0, + nickname='', uid=-1, note='',score=5): """ Get table of all comments @param recID: record id @param ln: language @param nb_per_page: number of results per page @param page: page number @param display_order: hh = highest helpful score, review only lh = lowest helpful score, review only hs = highest star score, review only ls = lowest star score, review only od = oldest date nd = newest date @param display_since: all= no filtering by date nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit integer between 0 and 9 @param CFG_WEBCOMMENT_ALLOW_REVIEWS: is ranking enable, get from config.py/CFG_WEBCOMMENT_ALLOW_REVIEWS @param comments: tuple as returned from webcomment.py/query_retrieve_comments_or_remarks @param total_nb_comments: total number of comments for this record @param avg_score: average score of reviews for this record @param warnings: list of warning tuples (warning_msg, color) @param border: boolean, active if want to show border around each comment/review @param reviews: booelan, enabled for reviews, disabled for comments """ # load the right message language _ = gettext_set_language(ln) # naming data fields of comments if reviews: c_nickname = 0 c_user_id = 1 c_date_creation = 2 c_body = 3 c_nb_votes_yes = 4 c_nb_votes_total = 5 c_star_score = 6 c_title = 7 c_id = 8 + discussion = 'reviews' + comments_link = '%s (%i)' % (weburl, recID, _('Comments'), total_nb_comments) + reviews_link = '%s (%i)' % (_('Reviews'), total_nb_reviews) + add_comment_or_review = self.tmpl_add_comment_form_with_ranking(recID, uid, nickname, ln, '', score ,note, warnings, show_title_p=True) else: c_nickname = 0 c_user_id = 1 c_date_creation = 2 c_body = 3 c_id = 4 + discussion = 'comments' + comments_link = '%s (%i)' % (_('Comments'), total_nb_comments) + reviews_link = '%s (%i)' % (weburl, recID, _('Reviews'), total_nb_reviews) + add_comment_or_review = self.tmpl_add_comment_form(recID, uid, nickname, ln, note, warnings) # voting links useful_dict = { 'weburl' : weburl, 'recID' : recID, 'ln' : ln, 'do' : display_order, 'ds' : display_since, 'nb' : nb_per_page, 'p' : page, - 'reviews' : reviews + 'reviews' : reviews, + 'discussion' : discussion } - useful_yes = '' + _("Yes") + '' + useful_yes = '' + _("Yes") + '' useful_yes %= useful_dict - useful_no = '' + _("No") + '' + useful_no = '' + _("No") + '' useful_no %= useful_dict warnings = self.tmpl_warnings(warnings, ln) ## record details - from search_engine import print_record - record_details = print_record(recID=recID, format='hb', ln=ln) + from invenio.bibformat import format_record + record_details = format_record(recID=recID, of='hs', ln=ln) link_dic = { 'weburl' : weburl, 'module' : 'comments', 'function' : 'index', - 'arguments' : 'recid=%s&do=%s&ds=%s&nb=%s&reviews=%s' % (recID, display_order, display_since, nb_per_page, reviews), + 'discussion': discussion, + 'arguments' : 'do=%s&ds=%s&nb=%s' % (display_order, display_since, nb_per_page), 'arg_page' : '&p=%s' % page, - 'page' : page } + 'page' : page, + 'rec_id' : recID} + ## comments table comments_rows = '' for comment in comments: if comment[c_nickname]: - nickname = comment[c_nickname] - display = nickname + _nickname = comment[c_nickname] + display = _nickname else: - (uid, nickname, display) = get_user_info(comment[c_user_id]) - messaging_link = self.create_messaging_link(nickname, display, ln) + (uid, _nickname, display) = get_user_info(comment[c_user_id]) + messaging_link = self.create_messaging_link(_nickname, display, ln) # do NOT delete the HTML comment below. It is used for parsing... (I plead unguilty!) comments_rows += """ """ if not reviews: - report_link = '%(weburl)s/comments/report?recid=%(recID)s&ln=%(ln)s&comid=%%(comid)s&do=%(do)s&ds=%(ds)s&nb=%(nb)s&p=%(p)s&reviews=%(reviews)s&referer=%(weburl)s/comments/display' % useful_dict % {'comid':comment[c_id]} - reply_link = '%(weburl)s/comments/add?recid=%(recID)s&ln=%(ln)s&action=REPLY&comid=%%(comid)s' % useful_dict % {'comid':comment[c_id]} + report_link = '%(weburl)s/record/%(recID)s/comments/report?ln=%(ln)s&comid=%%(comid)s&do=%(do)s&ds=%(ds)s&nb=%(nb)s&p=%(p)s&referer=%(weburl)s/record/%(recID)s/comments/display' % useful_dict % {'comid':comment[c_id]} + reply_link = '%(weburl)s/record/%(recID)s/comments/add?ln=%(ln)s&action=REPLY&comid=%%(comid)s' % useful_dict % {'comid':comment[c_id]} comments_rows += indent_text(self.tmpl_get_comment_without_ranking(ln, messaging_link, comment[c_date_creation], comment[c_body], reply_link, report_link), 2) else: - report_link = '%(weburl)s/comments/report?recid=%(recID)s&ln=%(ln)s&comid=%%(comid)s&do=%(do)s&ds=%(ds)s&nb=%(nb)s&p=%(p)s&reviews=%(reviews)s&referer=%(weburl)s/comments/display' % useful_dict % {'comid': comment[c_id]} + report_link = '%(weburl)s/record/%(recID)s/reviews/report?ln=%(ln)s&comid=%%(comid)s&do=%(do)s&ds=%(ds)s&nb=%(nb)s&p=%(p)s&referer=%(weburl)s/record/%(recID)s/reviews/display' % useful_dict % {'comid': comment[c_id]} comments_rows += indent_text(self.tmpl_get_comment_with_ranking(ln, messaging_link, comment[c_date_creation], comment[c_body], comment[c_nb_votes_total], comment[c_nb_votes_yes], comment[c_star_score], comment[c_title]), 2) helpful_label = _("Was this review helpful?") report_abuse_label = "(" + _("Report abuse") + ")" comments_rows += """
    %(helpful_label)s %(tab)s %(yes)s / %(no)s %(tab)s%(tab)s%(report_abuse_label)s
    """ \ % {'helpful_label': helpful_label, 'yes' : useful_yes % {'comid':comment[c_id]}, 'no' : useful_no % {'comid':comment[c_id]}, 'report' : report_link % {'comid':comment[c_id]}, 'report_abuse_label': report_abuse_label, 'tab' : ' '*2} # do NOT remove HTML comment below. It is used for parsing... comments_rows += """ """ ## page links page_links = '' # Previous if page != 1: link_dic['arg_page'] = 'p=%s' % (page - 1) - page_links += '<< ' % link_dic + page_links += '<< ' % link_dic else: page_links += ' %s ' % (' '*(len(_('Previous'))+7)) # Page Numbers for i in range(1, nb_pages+1): link_dic['arg_page'] = 'p=%s' % i link_dic['page'] = '%s' % i if i != page: page_links += ''' - %(page)s ''' % link_dic + %(page)s ''' % link_dic else: page_links += ''' %s ''' % i # Next if page != nb_pages: link_dic['arg_page'] = 'p=%s' % (page + 1) page_links += ''' - >> ''' % link_dic + >> ''' % link_dic else: page_links += '%s' % (' '*(len(_('Next'))+7)) ## stuff for ranking if enabled if reviews: if avg_score > 0: avg_score_img = 'stars-' + str(avg_score).split('.')[0] + '-' + str(avg_score).split('.')[1] + '.png' else: avg_score_img = "stars-0-0.png" ranking_average = '
    ' ranking_average += _("Average review score: %(x_nb_score)s based on %(x_nb_reviews)s reviews") %\ {'x_nb_score': '' + str(avg_score) + '', - 'x_nb_reviews': str(total_nb_comments)} + 'x_nb_reviews': str(total_nb_reviews)} ranking_average += '
    ' else: ranking_average = "" - write_button_link = '''%s/comments/add''' % (weburl, ) - write_button_form = ''' - - ''' % (recID, ln, reviews) + write_button_link = '''%s/record/%s/%s/add''' % (weburl, recID, discussion) + write_button_form = '' write_button_form = self.createhiddenform(action=write_button_link, method="get", text=write_button_form, button = reviews and _('Write a review') or _('Write a comment')) if reviews: total_label = _("There is a total of %s reviews") else: total_label = _("There is a total of %s comments") total_label %= total_nb_comments # do NOT remove the HTML comments below. Used for parsing - body = """ - - - - - -
    -

    %(record_label)s %(recid)s

    -
    - %(back_label)s -
    -
    + body = ''' +
    +
     
    +
    %(record_details)s -

    %(comments_or_reviews_title)s

    -%(total_label)s %(ranking_avg)s
    -%(write_button_form)s
    +
    +
    +
     
    +%(comments_and_review_tabs)s - +
    %(comments_rows)s
    - - - - - -
    %(write_button_form_again)s - %(back_label)s -
    -
    """ % \ +%(review_or_comment_first)s +
    ''' % \ { 'record_label': _("Record"), 'back_label': _("Back to search results"), 'total_label': total_label, 'record_details': record_details, 'write_button_form' : write_button_form, 'write_button_form_again' : total_nb_comments>3 and write_button_form or "", 'comments_rows' : indent_text(comments_rows, 1), 'total_nb_comments' : total_nb_comments, 'comments_or_reviews' : reviews and _('review') or _('comment'), 'comments_or_reviews_title' : reviews and _('Review') or _('Comment'), 'weburl' : weburl, 'module' : "comments", 'recid' : recID, 'ln' : ln, 'border' : border, - 'ranking_avg' : ranking_average } + 'ranking_avg' : ranking_average, + 'comments_and_review_tabs' : CFG_WEBCOMMENT_ALLOW_REVIEWS and \ + CFG_WEBCOMMENT_ALLOW_COMMENTS and \ + '%s | %s
    ' % \ + (comments_link, reviews_link) or '', + 'review_or_comment_first' : total_nb_comments > 0 and ' ' or \ + (reviews==1 and _("Be the first to review this document.") or \ + _("Start a discussion about any aspect of this document.")) + } + # form is not currently used. reserved for an eventual purpose #form = """ # Display # comments per page that are # and sorted by # """ % \ # (reviews==1 and ''' # # # # # ''' or ''' # ''') # #form_link = "%(weburl)s/%(module)s/%(function)s" % link_dic #form = self.createhiddenform(action=form_link, method="get", text=form, button='Go', recid=recID, p=1) pages = """ -
    +
    %(v_label)s %(comments_or_reviews)s %(results_nb_lower)s-%(results_nb_higher)s
    -%(page_links)s
    +%(page_links)s +
    """ % \ {'v_label': _("Viewing"), 'page_links': _("Page:") + page_links , 'comments_or_reviews': reviews and _('review') or _('comment'), 'results_nb_lower': len(comments)>0 and ((page-1) * nb_per_page)+1 or 0, - 'results_nb_higher': page == nb_pages and (((page-1) * nb_per_page) + len(comments)) or (page * nb_per_page) } + 'results_nb_higher': page == nb_pages and (((page-1) * nb_per_page) + len(comments)) or (page * nb_per_page)} if nb_pages > 1: #body = warnings + body + form + pages - body = warnings + body + pages + body = warnings + body + pages + add_comment_or_review else: - body = warnings + body + body = warnings + body + add_comment_or_review - return body + return '
    ' + body + '
    ' def create_messaging_link(self, to, display_name, ln=cdslang): """prints a link to the messaging system""" link = "%s/yourmessages/write?msg_to=%s&ln=%s" % (weburl, to, ln) if to: return '%s' % (link, display_name) else: return display_name def createhiddenform(self, action="", method="get", text="", button="confirm", cnfrm='', **hidden): """ create select with hidden values and submit button @param action: name of the action to perform on submit @param method: 'get' or 'post' @param text: additional text, can also be used to add non hidden input @param button: value/caption on the submit button @param cnfrm: if given, must check checkbox to confirm @param **hidden: dictionary with name=value pairs for hidden input @return html form """ output = """
    """ % (action, string.lower(method).strip() in ['get','post'] and method or 'get') output += """ - +
    """ output += text + '\n' if cnfrm: output += """ """ for key in hidden.keys(): if type(hidden[key]) is list: for value in hidden[key]: output += """ """ % (key, value) else: output += """ """ % (key, hidden[key]) output += """
    """ output += """ """ % (button, ) output += """
    """ return output def tmpl_warnings(self, warnings, ln=cdslang): """ Prepare the warnings list @param warnings: list of warning tuples (warning_msg, arg1, arg2, etc) @return html string of warnings """ red_text_warnings = ['WRN_WEBCOMMENT_FEEDBACK_NOT_RECORDED', 'WRN_WEBCOMMENT_ALREADY_VOTED'] green_text_warnings = ['WRN_WEBCOMMENT_FEEDBACK_RECORDED'] from invenio.errorlib import get_msgs_for_code_list span_class = 'important' out = "" if type(warnings) is not list: warnings = [warnings] if len(warnings) > 0: warnings_parsed = get_msgs_for_code_list(warnings, 'warning', ln) for (warning_code, warning_text) in warnings_parsed: if not warning_code.startswith('WRN'): #display only warnings that begin with WRN to user continue if warning_code in red_text_warnings: span_class = 'important' elif warning_code in green_text_warnings: span_class = 'exampleleader' else: span_class = 'important' out += ''' %(warning)s
    ''' % \ { 'span_class' : span_class, 'warning' : warning_text } return out else: return "" def tmpl_add_comment_form(self, recID, uid, nickname, ln, msg, warnings): """ Add form for comments @param recID: record id @param uid: user id @param ln: language @param msg: comment body contents for when refreshing due to warning @param warnings: list of warning tuples (warning_msg, color) @return html add comment form """ _ = gettext_set_language(ln) link_dic = { 'weburl' : weburl, 'module' : 'comments', 'function' : 'add', - 'arguments' : 'recid=%s&ln=%s&action=%s&reviews=0' % (recID, ln, 'SUBMIT') } + 'arguments' : 'ln=%s&action=%s' % (ln, 'SUBMIT'), + 'recID' : recID} if nickname: note = _("Note: Your nickname, %s, will be displayed as author of this comment") % ('' + nickname + '') else: (uid, nickname, display) = get_user_info(uid) link = '' % sweburl note = _("Note: you have not %(x_url_open)sdefined your nickname%(x_url_close)s. %(x_nickname)s will be displayed as the author of this comment.") %\ {'x_url_open': link, 'x_url_close': '', 'x_nickname': '
    ' + display + ''} - from invenio.search_engine import print_record - record_details = print_record(recID=recID, format='hb', ln=ln) + #from invenio.search_engine import print_record + #record_details = print_record(recID=recID, format='hb', ln=ln) warnings = self.tmpl_warnings(warnings, ln) - form = """ - - - - - - -
    %(record_label)s
    %(record)s

    %(comment_label)s
    - -
    %(note)s
    -

    """ % {'msg': msg, + form = """

    %(add_comment)s

    + + +
    + %(note)s +
    + """ % {'msg': msg, 'note': note, - 'record': record_details, + #'record': record_details, 'record_label': _("Article") + ":", - 'comment_label': _("Comment") + ":"} - form_link = "%(weburl)s/%(module)s/%(function)s?%(arguments)s" % link_dic - form = self.createhiddenform(action=form_link, method="POST", text=form, button='Add comment') + 'comment_label': _("Comment") + ":", + 'add_comment': _('Add comment')} + form_link = "%(weburl)s/record/%(recID)s/comments/%(function)s?%(arguments)s" % link_dic + form = self.createhiddenform(action=form_link, method="post", text=form, button='Add comment') return warnings + form - def tmpl_add_comment_form_with_ranking(self, recID, uid, nickname, ln, msg, score, note, warnings): + def tmpl_add_comment_form_with_ranking(self, recID, uid, nickname, ln, msg, score, note, + warnings, show_title_p=False): """ Add form for reviews @param recID: record id @param uid: user id @param ln: language @param msg: comment body contents for when refreshing due to warning @param score: review score @param note: review title @param warnings: list of warning tuples (warning_msg, color) + @param show_title_p: if True, prefix the form with "Add Review" as title @return html add review form """ _ = gettext_set_language(ln) link_dic = { 'weburl' : weburl, 'module' : 'comments', 'function' : 'add', - 'arguments' : 'recid=%s&ln=%s&action=%s&reviews=1' % (recID, ln, 'SUBMIT') } + 'arguments' : 'ln=%s&action=%s' % (ln, 'SUBMIT'), + 'recID' : recID} warnings = self.tmpl_warnings(warnings, ln) - from search_engine import print_record - record_details = print_record(recID=recID, format='hb', ln=ln) + #from search_engine import print_record + #record_details = print_record(recID=recID, format='hb', ln=ln) + if nickname: + note_label = _("Note: Your nickname, %s, will be displayed as the author of this review.") + note_label %= ('' + nickname + '') + else: + (uid, nickname, display) = get_user_info(uid) + link = '' % sweburl + note_label = _("Note: you have not %(x_url_open)sdefined your nickname%(x_url_close)s. %(x_nickname)s will be displayed as the author of this comment.") %\ + {'x_url_open': link, + 'x_url_close': '', + 'x_nickname': '
    ' + display + ''} - note_label = _("Note: Your nickname, %s, will be displayed as the author of this review.") - note_label %= ('' + nickname + '') - form = """ + selected0 = '' + selected1 = '' + selected2 = '' + selected3 = '' + selected4 = '' + selected5 = '' + if score == 0: + selected0 = ' selected="selected"' + elif score == 1: + selected1 = ' selected="selected"' + elif score == 2: + selected2 = ' selected="selected"' + elif score == 3: + selected3 = ' selected="selected"' + elif score == 4: + selected4 = ' selected="selected"' + elif score == 5: + selected5 = ' selected="selected"' + form = """%(add_review)s - - - - - -
    %(article_label)s:
    -
    %(record)s
    -
    -
    -
    %(rate_label)s:
    %(title_label)s:
    - +
    %(write_label)s:
    - +
    %(note_label)s
    -

    """ % {'article_label': _('Article'), 'rate_label': _("Rate this article"), 'select_label': _("Select a score"), 'title_label': _("Give a title to your review"), 'write_label': _("Write your review"), 'note_label': note_label, 'note' : note!='' and note or "", 'msg' : msg!='' and msg or "", - 'record' : record_details } - form_link = "%(weburl)s/%(module)s/%(function)s?%(arguments)s" % link_dic + #'record' : record_details + 'add_review': show_title_p and ('

    '+_('Add review')+'

    ') or '', + 'selected0': selected0, + 'selected1': selected1, + 'selected2': selected2, + 'selected3': selected3, + 'selected4': selected4, + 'selected5': selected5 + } + form_link = "%(weburl)s/record/%(recID)s/reviews/%(function)s?%(arguments)s" % link_dic form = self.createhiddenform(action=form_link, method="post", text=form, button=_('Add Review')) return warnings + form def tmpl_add_comment_successful(self, recID, ln, reviews, warnings): """ @param recID: record id @param ln: language @return html page of successfully added comment/review """ _ = gettext_set_language(ln) link_dic = { 'weburl' : weburl, 'module' : 'comments', 'function' : 'display', - 'arguments' : 'recid=%s&ln=%s&do=od&reviews=%s' % (recID, ln, reviews) } - link = "%(weburl)s/%(module)s/%(function)s?%(arguments)s" % link_dic + 'arguments' : 'ln=%s&do=od' % ln, + 'recID' : recID, + 'discussion': reviews==1 and 'reviews' or 'comments'} + link = "%(weburl)s/record/%(recID)s/%(discussion)s/%(function)s?%(arguments)s" % link_dic if warnings: out = self.tmpl_warnings(warnings, ln) + '

    ' else: if reviews: out = _("Your review was successfully added.") + '

    ' else: out = _("Your comment was successfully added.") + '

    ' out += '' % link out += _('Back to record') + '' return out def tmpl_create_multiple_actions_form(self, form_name="", form_action="", - method="GET", + method="get", action_display={}, action_field_name="", button_label="", button_name="", content="", **hidden): """ Creates an HTML form with a multiple choice of actions and a button to select it. @param form_action: link to the receiver of the formular @param form_name: name of the HTML formular @param method: either 'GET' or 'POST' @param action_display: dictionary of actions. action is HTML name (name of action) display is the string provided in the popup @param action_field_name: html name of action field @param button_label: what's written on the button @param button_name: html name of the button @param content: what's inside te formular @param **hidden: dictionary of name/value pairs of hidden fields. """ output = """
    """ % (form_action, method) output += """
    """ output += content + '\n' for key in hidden.keys(): if type(hidden[key]) is list: for value in hidden[key]: output += """ """ % (key, value) else: output += """ """ % (key, hidden[key]) output += """
    """ if type(action_display) is dict and len(action_display.keys()): output += """ """ output += """ """ % (button_label, button_name) output += """
    """ return output def tmpl_admin_index(self, ln): """ """ # load the right message language _ = gettext_set_language(ln) out = '
      ' if CFG_WEBCOMMENT_ALLOW_COMMENTS or CFG_WEBCOMMENT_ALLOW_REVIEWS: if CFG_WEBCOMMENT_ALLOW_COMMENTS: out += '
    1. %(reported_cmt_label)s
    2. ' %\ {'weburl': weburl, 'ln': ln, 'reported_cmt_label': _("View all reported comments")} if CFG_WEBCOMMENT_ALLOW_REVIEWS: out += '
    3. %(reported_rev_label)s
    4. ' %\ {'weburl': weburl, 'ln': ln, 'reported_rev_label': _("View all reported reviews")} out += """
    5. %(delete_label)s
    6. %(view_users)s
    7. """ % {'weburl' : weburl, 'delete_label': _("Delete a specific comment/review (by ID)"), 'view_users': _("View all users who have been reported"), 'ln' : ln} else: out += _("Comments and reviews are disabled") + '
      ' out += '
    ' from invenio.bibrankadminlib import addadminbox return addadminbox('%s'%_("Menu"), [out]) def tmpl_admin_delete_form(self, ln, warnings): """ @param warnings: list of warning_tuples where warning_tuple is (warning_message, text_color) see tmpl_warnings, color is optional """ # load the right message language _ = gettext_set_language(ln) warnings = self.tmpl_warnings(warnings, ln) out = '''
    %s

    '''%_("Please enter the ID of the comment/review so that you can view it before deciding whether to delete it or not") form = '''
    %s


    ''' %_("Comment ID:") form_link = "%s/admin/webcomment/webcommentadmin.py/delete?ln=%s" % (weburl, ln) form = self.createhiddenform(action=form_link, method="get", text=form, button=_('View Comment')) return warnings + out + form def tmpl_admin_users(self, ln, users_data): """ @param users_data: tuple of ct, i.e. (ct, ct, ...) where ct is a tuple (total_number_reported, total_comments_reported, total_reviews_reported, total_nb_votes_yes_of_reported, total_nb_votes_total_of_reported, user_id, user_email, user_nickname) sorted by order of ct having highest total_number_reported """ _ = gettext_set_language(ln) u_reports = 0 u_comment_reports = 1 u_reviews_reports = 2 u_nb_votes_yes = 3 u_nb_votes_total = 4 u_uid = 5 u_email = 6 u_nickname = 7 if not users_data: return self.tmpl_warnings([(_("There have been no reports so far."), 'green')]) user_rows = "" for utuple in users_data: com_label = _("View all %s reported comments") % utuple[u_comment_reports] com_link = '''%s
    ''' % \ (weburl, ln, utuple[u_uid], com_label) rev_label = _("View all %s reported reviews") % utuple[u_reviews_reports] rev_link = '''%s''' % \ (weburl, ln, utuple[u_uid], rev_label) if not utuple[u_nickname]: user_info = get_user_info(utuple[u_uid]) nickname = user_info[2] else: nickname = utuple[u_nickname] if CFG_WEBCOMMENT_ALLOW_REVIEWS: review_row = """ %s %s %s""" review_row %= (utuple[u_nb_votes_yes], utuple[u_nb_votes_total] - utuple[u_nb_votes_yes], utuple[u_nb_votes_total]) review_row = indent_text(review_row, 1) else: review_row = '' user_rows += """ %(nickname)s %(email)s %(uid)s%(review_row)s %(reports)s %(com_link)s%(rev_link)s """ % { 'nickname' : nickname, 'email' : utuple[u_email], 'uid' : utuple[u_uid], 'reports' : utuple[u_reports], 'review_row': review_row, 'weburl' : weburl, 'ln' : ln, 'com_link' : CFG_WEBCOMMENT_ALLOW_COMMENTS and com_link or "", 'rev_link' : CFG_WEBCOMMENT_ALLOW_REVIEWS and rev_link or "" } out = "
    " out += _("Here is a list, sorted by total number of reports, of all users who have had a comment reported at least once.") out += """

    \n' out += indent_text('\n', 3) out += indent_text('\n', 3) if CFG_WEBCOMMENT_ALLOW_REVIEWS > 0: out += indent_text('\n', 3) out += indent_text('\n', 3) out += indent_text('\n', 3) out += indent_text('\n', 3) out += indent_text('\n', 3) out += """ %s
    """ out += _("Nickname") + '' + _("Email") + '' + _("User ID") + '' + _("Number positive votes") + '' + _("Number negative votes") + '' + _("Total number votes") + '' + _("Total number of reports") + '' + _("View all user's reported comments/reviews") + '
    """ % indent_text(user_rows, 2) return out def tmpl_admin_select_comment_checkbox(self, cmt_id): """ outputs a checkbox named "comidXX" where XX is cmt_id """ return '' % int(cmt_id) def tmpl_admin_user_info(self, ln, nickname, uid, email): """ prepares informations about a user""" _ = gettext_set_language(ln) out = """ %(nickname_label)s: %(messaging)s
    %(uid_label)s: %(uid)i
    %(email_label)s: %(email)s""" out %= {'nickname_label': _("Nickname"), 'messaging': self.create_messaging_link(uid, nickname, ln), 'uid_label': _("User ID"), 'uid': int(uid), 'email_label': _("Email"), 'email': email} return out def tmpl_admin_review_info(self, ln, reviews, nb_reports, cmt_id, rec_id): """ outputs information about a review """ _ = gettext_set_language(ln) if reviews: reported_label = _("This review has been reported %i times") else: reported_label = _("This comment has been reported %i times") reported_label %= int(nb_reports) out = """ %(reported_label)s
    %(rec_id_label)s
    %(cmt_id_label)s""" out %= {'reported_label': reported_label, 'rec_id_label': _("Record") + ' #' + str(rec_id), 'weburl': weburl, 'rec_id': int(rec_id), 'cmt_id_label': _("Comment") + ' #' + str(cmt_id), 'ln': ln} return out def tmpl_admin_comments(self, ln, uid, comID, comment_data, reviews): """ @param comment_data: same type of tuple as that which is returned by webcomment.py/query_retrieve_comments_or_remarks i.e. tuple of comment where comment is tuple (nickname, date_creation, body, id) if ranking disabled or tuple (nickname, date_creation, body, nb_votes_yes, nb_votes_total, star_score, title, id) """ _ = gettext_set_language(ln) comments = [] comments_info = [] checkboxes = [] users = [] for (cmt_tuple, meta_data) in comment_data: if reviews: comments.append(self.tmpl_get_comment_with_ranking(ln, cmt_tuple[0],#nickname cmt_tuple[2],#date_creation cmt_tuple[3],#body cmt_tuple[5],#nb_votes_total cmt_tuple[4],#nb_votes_yes cmt_tuple[6],#star_score cmt_tuple[7]))#title else: comments.append(self.tmpl_get_comment_without_ranking(ln, cmt_tuple[0],#nickname cmt_tuple[2],#date_creation cmt_tuple[3],#body None, #reply_link None)) #report_link users.append(self.tmpl_admin_user_info(ln, meta_data[0], #nickname meta_data[1], #uid meta_data[2]))#email comments_info.append(self.tmpl_admin_review_info(ln, reviews, meta_data[5], # nb abuse reports meta_data[3], # cmt_id meta_data[4]))# rec_id checkboxes.append(self.tmpl_admin_select_comment_checkbox(meta_data[3])) form_link = "%s/admin/webcomment/webcommentadmin.py/del_com?ln=%s" % (weburl, ln) out = """ """ % {'review_label': reviews and _("Review") or _("Comment"), 'written_by_label': _("Written by"), 'review_info_label': _("General informations"), 'select_label': _("Select")} for i in range (0, len(comments)): out += """ """ % (comments[i], users[i], comments_info[i], checkboxes[i]) out += """
    %(review_label)s %(written_by_label)s %(review_info_label)s %(select_label)s
    %s %s %s %s
    """ if reviews: action_display = { 'delete': _('Delete selected reviews'), 'unreport': _('Suppress selected abuse report') } else: action_display = { 'delete': _('Delete selected comments'), 'unreport': _('Suppress selected abuse report') } form = self.tmpl_create_multiple_actions_form(form_name="admin_comment", form_action=form_link, - method="POST", + method="post", action_display=action_display, action_field_name='action', button_label=_("OK"), button_name="okbutton", content=out) if uid > 0: header = '
    ' if reviews: header += _("Here are the reported reviews of user %s") % uid else: header += _("Here are the reported comments of user %s") % uid header += '

    ' if comID > 0: header = '
    ' +_("Here is comment/review %s")% comID + '

    ' if uid > 0 and comID > 0: header = '
    ' + _("Here is comment/review %(x_cmtID)s written by user %(x_user)s") % {'x_cmtID': comID, 'x_user': uid} header += '

    ' if uid == 0 and comID == 0: header = '
    ' if reviews: header += _("Here are all reported reviews sorted by the most reported") else: header += _("Here are all reported comments sorted by the most reported") header += "

    " return header + form def tmpl_admin_del_com(self, del_res, ln=cdslang): """ @param del_res: list of the following tuple (comment_id, was_successfully_deleted), was_successfully_deleted is boolean (0=false, >0=true """ _ = gettext_set_language(ln) table_rows = '' for deltuple in del_res: table_rows += """ %s %s """ % (deltuple[0], deltuple[1]>0 and _("Yes") or "" +_("No") + "") out = """ %s
    %s %s
    """ % (_("comment ID"), _("successfully deleted"), table_rows) return out def tmpl_admin_suppress_abuse_report(self, del_res, ln=cdslang): """ @param del_res: list of the following tuple (comment_id, was_successfully_deleted), was_successfully_deleted is boolean (0=false, >0=true """ _ = gettext_set_language(ln) table_rows = '' for deltuple in del_res: table_rows += """ """ % (deltuple[0], deltuple[1]>0 and _("Yes") or "" +_("No") + "") out = """
    %s %s
    %s
    %s %s
    """ % (_("comment ID"), _("successfully suppressed abuse report"), table_rows) return out + + def tmpl_mini_review(self, recID, ln=cdslang, action='SUBMIT', + avg_score=0, nb_comments_total=0): + """Display the mini version of reviews (only the grading part)""" + + _ = gettext_set_language(ln) + + url = '%s/record/%s/reviews/add?ln=%s&action=%s' % (weburl, recID, ln, action) + + if avg_score > 0: + score = _("Average review score: %(x_nb_score)s based on %(x_nb_reviews)s reviews") %\ + {'x_nb_score': '%.1f' % avg_score, + 'x_nb_reviews': nb_comments_total} + else: + score = '(' +_("No yet reviewed") + ')' + + out = ''' +%(rate)s:

    +
    +Rate this document: +
    1 +
    2 +
    3 +
    4 +
    +
     
    +
    +%(score)s +''' % {'url': url, + 'score': score, + 'rate': _("Rate this document") + } + return out diff --git a/modules/webcomment/lib/webcomment_webinterface.py b/modules/webcomment/lib/webcomment_webinterface.py index 9ff1f7847..0c797870f 100644 --- a/modules/webcomment/lib/webcomment_webinterface.py +++ b/modules/webcomment/lib/webcomment_webinterface.py @@ -1,347 +1,377 @@ # -*- coding: utf-8 -*- ## $Id$ ## Comments and reviews for records. ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """ Comments and reviews for records: web interface """ +__lastupdated__ = """$Date$""" + __revision__ = """$Id$""" import urllib from invenio.webcomment import check_recID_is_in_range, \ perform_request_display_comments_or_remarks,\ perform_request_add_comment_or_remark,\ perform_request_vote,\ perform_request_report from invenio.config import cdslang, \ weburl, \ sweburl, \ CFG_WEBCOMMENT_ALLOW_COMMENTS,\ CFG_WEBCOMMENT_ALLOW_REVIEWS from invenio.webuser import getUid, page_not_authorized, isGuestUser -from invenio.webpage import page -from invenio.search_engine import create_navtrail_links, guess_primary_collection_of_a_record +from invenio.webpage import page, pageheaderonly, pagefooteronly +from invenio.search_engine import create_navtrail_links, \ + guess_primary_collection_of_a_record, \ + get_colID from invenio.urlutils import get_client_ip_address, \ redirect_to_url, \ wash_url_argument from invenio.messages import wash_language, gettext_set_language from invenio.webinterface_handler import wash_urlargd, WebInterfaceDirectory +from invenio.websearchadminlib import get_detailed_page_tabs +import invenio.template +webstyle_templates = invenio.template.load('webstyle') +websearch_templates = invenio.template.load('websearch') class WebInterfaceCommentsPages(WebInterfaceDirectory): """Defines the set of /comments pages.""" - _exports = ['', 'display', 'add', 'vote', 'report'] + _exports = ['', 'display', 'add', 'vote', 'report', 'index'] + + def __init__(self, recid=-1, reviews=0): + self.recid = recid + self.discussion = reviews # 0:comments, 1:reviews def index(self, req, form): """ Redirects to display function """ - redirect_to_url(req, "%s/comments/display?%s" % (weburl, req.args)) - + return self.display(req, form) + def display(self, req, form): """ Display comments (reviews if enabled) associated with record having id recid where recid>0. This function can also be used to display remarks associated with basket having id recid where recid<-99. @param ln: language @param recid: record id, integer @param do: display order hh = highest helpful score, review only lh = lowest helpful score, review only hs = highest star score, review only ls = lowest star score, review only od = oldest date nd = newest date @param ds: display since all= no filtering by date nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit integer between 0 and 9 @param nb: number of results per page @param p: results page @param voted: boolean, active if user voted for a review, see vote function @param reported: boolean, active if user reported a certain comment/review, see report function @param reviews: boolean, enabled for reviews, disabled for comments @return the full html page. """ - argd = wash_urlargd(form, {'recid': (int, -1), - 'do': (str, "od"), + argd = wash_urlargd(form, {'do': (str, "od"), 'ds': (str, "all"), 'nb': (int, 100), 'p': (int, 1), 'voted': (int, -1), 'reported': (int, -1), - 'reviews': (int, 0), }) _ = gettext_set_language(argd['ln']) uid = getUid(req) check_warnings = [] - (ok, problem) = check_recID_is_in_range(argd['recid'], check_warnings, argd['ln']) + (ok, problem) = check_recID_is_in_range(self.recid, check_warnings, argd['ln']) if ok: - (body, errors, warnings) = perform_request_display_comments_or_remarks(recID=argd['recid'], + (body, errors, warnings) = perform_request_display_comments_or_remarks(recID=self.recid, display_order=argd['do'], display_since=argd['ds'], nb_per_page=argd['nb'], page=argd['p'], ln=argd['ln'], voted=argd['voted'], reported=argd['reported'], - reviews=argd['reviews']) - - navtrail = create_navtrail_links(cc=guess_primary_collection_of_a_record(argd['recid'])) - navtrail += '> '% (weburl, argd['recid'], argd['ln']) - navtrail += _("Detailed record") + " #%s" % argd['recid'] + reviews=self.discussion, + uid=uid) + + unordered_tabs = get_detailed_page_tabs(get_colID(guess_primary_collection_of_a_record(self.recid)), + self.recid) + ordered_tabs_id = [(tab_id, values['order']) for (tab_id, values) in unordered_tabs.iteritems()] + ordered_tabs_id.sort(lambda x,y: cmp(x[1],y[1])) + tabs = [(unordered_tabs[tab_id]['label'], \ + '%s/record/%s/%s' % (weburl, self.recid, tab_id), \ + tab_id in ['comments', 'reviews'], + unordered_tabs[tab_id]['enabled']) \ + for (tab_id, order) in ordered_tabs_id + if unordered_tabs[tab_id]['visible'] == True] + body = webstyle_templates.detailed_record_container(body, + self.recid, + tabs, + argd['ln']) + + title, description, keywords = websearch_templates.tmpl_record_page_header_content(req, self.recid, argd['ln']) + navtrail = create_navtrail_links(cc=guess_primary_collection_of_a_record(self.recid), ln=argd['ln']) + navtrail += ' > '% (weburl, self.recid, argd['ln']) + navtrail += title navtrail += '' - navtrail += ' > %s' % (argd['reviews']==1 and _("Reviews") or _("Comments")) + navtrail += ' > %s' % (self.discussion==1 and _("Reviews") or _("Comments")) - return page(title="", - body=body, + return pageheaderonly(title=title, navtrail=navtrail, uid=uid, verbose=1, req=req, language=argd['ln'], - errors=errors, warnings=warnings, - navmenuid='search') + navmenuid='search', + navtrail_append_title_p=0) + \ + websearch_templates.tmpl_search_pagestart(argd['ln']) + \ + body + \ + websearch_templates.tmpl_search_pageend(argd['ln']) + \ + pagefooteronly(lastupdated=__lastupdated__, language=argd['ln'], req=req) else: return page(title=_("Record Not Found"), body=problem, uid=uid, verbose=1, req=req, language=argd['ln'], warnings=check_warnings, errors=[], navmenuid='search') - + + # Return the same page wether we ask for /record/123 or /record/123/ + __call__ = index + def add(self, req, form): """ Add a comment (review) to record with id recid where recid>0 Also works for adding a remark to basket with id recid where recid<-99 @param ln: languange @param recid: record id @param action: 'DISPLAY' to display add form 'SUBMIT' to submit comment once form is filled 'REPLY' to reply to an already existing comment @param msg: the body of the comment/review or remark @param score: star score of the review @param note: title of the review @param comid: comment id, needed for replying @return the full html page. """ - argd = wash_urlargd(form, {'recid': (int, -1), - 'action': (str, "DISPLAY"), + argd = wash_urlargd(form, {'action': (str, "DISPLAY"), 'msg': (str, ""), 'note': (str, ''), 'score': (int, 0), - 'reviews': (int, 0), 'comid': (int, -1), }) _ = gettext_set_language(argd['ln']) actions = ['DISPLAY', 'REPLY', 'SUBMIT'] uid = getUid(req) client_ip_address = get_client_ip_address(req) check_warnings = [] - (ok, problem) = check_recID_is_in_range(argd['recid'], check_warnings, argd['ln']) + (ok, problem) = check_recID_is_in_range(self.recid, check_warnings, argd['ln']) if ok: - navtrail = create_navtrail_links(cc=guess_primary_collection_of_a_record(argd['recid'])) - navtrail += ' > '% (weburl, argd['recid'], argd['ln']) - navtrail += _("Detailed record") + " #%s" % argd['recid'] + title, description, keywords = websearch_templates.tmpl_record_page_header_content(req, + self.recid, + argd['ln']) + navtrail = create_navtrail_links(cc=guess_primary_collection_of_a_record(self.recid)) + navtrail += ' > '% (weburl, self.recid, argd['ln']) + navtrail += title navtrail += '' - navtrail += '> %s' % (weburl, - argd['recid'], - argd['ln'], - argd['reviews']==1 and _('Reviews') or _('Comments')) + navtrail += '> %s' % (weburl, + self.recid, + self.discussion==1 and 'reviews' or 'comments', + argd['ln'], + self.discussion==1 and _('Reviews') or _('Comments')) if argd['action'] not in actions: argd['action'] = 'DISPLAY' # is page allowed to be viewed if uid == -1 or (not CFG_WEBCOMMENT_ALLOW_COMMENTS and not CFG_WEBCOMMENT_ALLOW_REVIEWS): return page_not_authorized(req, "../comments/add", navmenuid='search') # if guest, must log in first if isGuestUser(uid): - referer = "%s/comments/add?recid=%s&ln=%s&reviews=%s&comid=%s&action=%s" % (weburl, - argd['recid'], - argd['ln'], - argd['reviews'], - argd['comid'], - argd['action']) + referer = "%s/record/%s/%s/add?ln=%s&comid=%s&action=%s" % (weburl, + self.recid, + self.discussion == 1 and 'reviews' or 'comments', + argd['ln'], + argd['comid'], + argd['action']) msg = _("Before you add your comment, you need to %(x_url_open)slogin%(x_url_close)s first.") % { 'x_url_open': '' % \ (sweburl, urllib.quote(referer)), 'x_url_close': ''} return page(title=_("Login"), body=msg, navtrail=navtrail, uid=uid, language=cdslang, verbose=1, req=req, navmenuid='search') # user logged in else: - (body, errors, warnings) = perform_request_add_comment_or_remark(recID=argd['recid'], + (body, errors, warnings) = perform_request_add_comment_or_remark(recID=self.recid, ln=argd['ln'], uid=uid, action=argd['action'], msg=argd['msg'], note=argd['note'], score=argd['score'], - reviews=argd['reviews'], + reviews=self.discussion, comID=argd['comid'], client_ip_address=client_ip_address) - if argd['reviews']: + if self.discussion: title = _("Add Review") else: title = _("Add Comment") return page(title=title, body=body, navtrail=navtrail, uid=uid, language=cdslang, verbose=1, errors=errors, warnings=warnings, req=req, navmenuid='search') # id not in range else: return page(title=_("Record Not Found"), body=problem, uid=uid, verbose=1, req=req, warnings=check_warnings, errors=[], navmenuid='search') def vote(self, req, form): """ Vote positively or negatively for a comment/review. @param comid: comment/review id @param com_value: +1 to vote positively -1 to vote negatively @param recid: the id of the record the comment/review is associated with @param ln: language @param do: display order hh = highest helpful score, review only lh = lowest helpful score, review only hs = highest star score, review only ls = lowest star score, review only od = oldest date nd = newest date @param ds: display since all= no filtering by date nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit integer between 0 and 9 @param nb: number of results per page @param p: results page @param referer: http address of the calling function to redirect to (refresh) @param reviews: boolean, enabled for reviews, disabled for comments """ argd = wash_urlargd(form, {'comid': (int, -1), 'com_value': (int, 0), 'recid': (int, -1), 'do': (str, "od"), 'ds': (str, "all"), 'nb': (int, 100), 'p': (int, 1), - 'referer': (str, None), - 'reviews': (int, 0), + 'referer': (str, None) }) client_ip_address = get_client_ip_address(req) uid = getUid(req) success = perform_request_vote(argd['comid'], client_ip_address, argd['com_value'], uid) if argd['referer']: - argd['referer'] += "?recid=%s&ln=%s&do=%s&ds=%s&nb=%s&p=%s&voted=%s&reviews=%s" % (argd['recid'], - argd['ln'], - argd['do'], - argd['ds'], - argd['nb'], - argd['p'], - success, - argd['reviews']) + argd['referer'] += "?ln=%s&do=%s&ds=%s&nb=%s&p=%s&voted=%s&" % (argd['ln'], + argd['do'], + argd['ds'], + argd['nb'], + argd['p'], + success) redirect_to_url(req, argd['referer']) else: #Note: sent to comments display - referer = "%s/comments/display?recid=%s&ln=%s&reviews=1&voted=1" - referer %= (weburl, argd['recid'], argd['ln']) + referer = "%s/%s/display?amp;ln=%s&voted=1" + referer %= (weburl, self.discussion == 1 and 'reviews' or 'comments', self.recid, argd['ln']) redirect_to_url(req, referer) def report(self, req, form): """ Report a comment/review for inappropriate content @param comid: comment/review id @param recid: the id of the record the comment/review is associated with @param ln: language @param do: display order hh = highest helpful score, review only lh = lowest helpful score, review only hs = highest star score, review only ls = lowest star score, review only od = oldest date nd = newest date @param ds: display since all= no filtering by date nd = n days ago nw = n weeks ago nm = n months ago ny = n years ago where n is a single digit integer between 0 and 9 @param nb: number of results per page @param p: results page @param referer: http address of the calling function to redirect to (refresh) @param reviews: boolean, enabled for reviews, disabled for comments """ argd = wash_urlargd(form, {'comid': (int, -1), 'recid': (int, -1), 'do': (str, "od"), 'ds': (str, "all"), 'nb': (int, 100), 'p': (int, 1), - 'referer': (str, None), - 'reviews': (int, 0), + 'referer': (str, None) }) client_ip_address = get_client_ip_address(req) uid = getUid(req) success = perform_request_report(argd['comid'], client_ip_address, uid) if argd['referer']: - argd['referer'] += "?recid=%s&ln=%s&do=%s&ds=%s&nb=%s&p=%s&reported=%s&reviews=%s" % (argd['recid'], - argd['ln'], - argd['do'], - argd['ds'], - argd['nb'], - argd['p'], - str(success), - argd['reviews']) + argd['referer'] += "?ln=%s&do=%s&ds=%s&nb=%s&p=%s&reported=%s&" % (argd['ln'], + argd['do'], + argd['ds'], + argd['nb'], + argd['p'], + str(success)) + redirect_to_url(req, argd['referer']) else: #Note: sent to comments display - referer = "%s/comments/display?recid=%s&ln=%s&reviews=1&voted=1" - referer %= (weburl, argd['recid'], argd['ln']) + referer = "%s/record/%s/%s/display?ln=%s&voted=1" + referer %= (weburl, self.recid, self.discussion==1 and 'reviews' or 'comments', argd['ln']) redirect_to_url(req, referer) diff --git a/modules/websearch/lib/search_engine.py b/modules/websearch/lib/search_engine.py index 32075c67f..d6d946283 100644 --- a/modules/websearch/lib/search_engine.py +++ b/modules/websearch/lib/search_engine.py @@ -1,3792 +1,3853 @@ # -*- coding: utf-8 -*- ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # pylint: disable-msg=C0301 """CDS Invenio Search Engine in mod_python.""" __lastupdated__ = """$Date$""" __revision__ = "$Id$" ## import general modules: import cgi import copy import string import os import re import time import urllib import zlib import Numeric ## import CDS Invenio stuff: from invenio.config import \ CFG_CERN_SITE, \ CFG_MAX_RECID, \ CFG_OAI_ID_FIELD, \ CFG_WEBCOMMENT_ALLOW_COMMENTS, \ CFG_WEBCOMMENT_ALLOW_REVIEWS, \ - CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW, \ - CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW, \ + CFG_WEBCOMMENT_ALLOW_SHORT_REVIEWS, \ CFG_WEBSEARCH_CALL_BIBFORMAT, \ CFG_WEBSEARCH_CREATE_SIMILARLY_NAMED_AUTHORS_LINK_BOX, \ CFG_WEBSEARCH_FIELDS_CONVERT, \ CFG_WEBSEARCH_NB_RECORDS_TO_SORT, \ CFG_WEBSEARCH_SEARCH_CACHE_SIZE, \ CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS, \ cdslang, \ cdsname, \ cdsnameintl, \ logdir, \ weburl from invenio.search_engine_config import CFG_EXPERIMENTAL_FEATURES, InvenioWebSearchUnknownCollectionError from invenio.bibrank_record_sorter import get_bibrank_methods, rank_records from invenio.bibrank_downloads_similarity import register_page_view_event, calculate_reading_similarity_list from invenio.bibindex_engine_stemmer import stem from invenio.bibformat import format_record, format_records, get_output_format_content_type, create_excel from invenio.bibformat_config import CFG_BIBFORMAT_USE_OLD_BIBFORMAT from invenio.bibrank_downloads_grapher import create_download_history_graph_and_box from invenio.data_cacher import DataCacher from invenio.websearch_external_collections import print_external_results_overview, perform_external_collection_search from invenio.access_control_admin import acc_get_action_id from invenio.access_control_config import VIEWRESTRCOLL +from invenio.websearchadminlib import get_detailed_page_tabs -if CFG_EXPERIMENTAL_FEATURES: - from invenio.bibrank_citation_searcher import calculate_cited_by_list, calculate_co_cited_with_list - from invenio.bibrank_citation_grapher import create_citation_history_graph_and_box +import invenio.template +webstyle_templates = invenio.template.load('webstyle') +webcomment_templates = invenio.template.load('webcomment') + +#if CFG_EXPERIMENTAL_FEATURES: +from invenio.bibrank_citation_searcher import calculate_cited_by_list, calculate_co_cited_with_list +from invenio.bibrank_citation_grapher import create_citation_history_graph_and_box from invenio.dbquery import run_sql, get_table_update_time, escape_string, Error try: from mod_python import apache from invenio.webuser import getUid from invenio.webpage import page, pageheaderonly, pagefooteronly, create_error_box except ImportError, e: pass # ignore user personalisation, needed e.g. for command-line from invenio.messages import gettext_set_language try: import invenio.template websearch_templates = invenio.template.load('websearch') except: pass ## global vars: search_cache = {} # will cache results of previous searches cfg_nb_browse_seen_records = 100 # limit of the number of records to check when browsing certain collection cfg_nicely_ordered_collection_list = 0 # do we propose collection list nicely ordered or alphabetical? collection_reclist_cache_timestamp = 0 field_i18nname_cache_timestamp = 0 collection_i18nname_cache_timestamp = 0 ## precompile some often-used regexp for speed reasons: re_word = re.compile('[\s]') re_quotes = re.compile('[\'\"]') re_doublequote = re.compile('\"') re_equal = re.compile('\=') re_logical_and = re.compile('\sand\s', re.I) re_logical_or = re.compile('\sor\s', re.I) re_logical_not = re.compile('\snot\s', re.I) re_operators = re.compile(r'\s([\+\-\|])\s') re_pattern_wildcards_at_beginning = re.compile(r'(\s)[\*\%]+') re_pattern_single_quotes = re.compile("'(.*?)'") re_pattern_double_quotes = re.compile("\"(.*?)\"") re_pattern_regexp_quotes = re.compile("\/(.*?)\/") re_pattern_short_words = re.compile(r'([\s\"]\w{1,3})[\*\%]+') re_pattern_space = re.compile("__SPACE__") re_pattern_today = re.compile("\$TODAY\$") re_unicode_lowercase_a = re.compile(unicode(r"(?u)[áàäâãå]", "utf-8")) re_unicode_lowercase_ae = re.compile(unicode(r"(?u)[æ]", "utf-8")) re_unicode_lowercase_e = re.compile(unicode(r"(?u)[éèëê]", "utf-8")) re_unicode_lowercase_i = re.compile(unicode(r"(?u)[íìïî]", "utf-8")) re_unicode_lowercase_o = re.compile(unicode(r"(?u)[óòöôõø]", "utf-8")) re_unicode_lowercase_u = re.compile(unicode(r"(?u)[úùüû]", "utf-8")) re_unicode_lowercase_y = re.compile(unicode(r"(?u)[ýÿ]", "utf-8")) re_unicode_lowercase_c = re.compile(unicode(r"(?u)[çć]", "utf-8")) re_unicode_lowercase_n = re.compile(unicode(r"(?u)[ñ]", "utf-8")) re_unicode_uppercase_a = re.compile(unicode(r"(?u)[ÁÀÄÂÃÅ]", "utf-8")) re_unicode_uppercase_ae = re.compile(unicode(r"(?u)[Æ]", "utf-8")) re_unicode_uppercase_e = re.compile(unicode(r"(?u)[ÉÈËÊ]", "utf-8")) re_unicode_uppercase_i = re.compile(unicode(r"(?u)[ÍÌÏÎ]", "utf-8")) re_unicode_uppercase_o = re.compile(unicode(r"(?u)[ÓÒÖÔÕØ]", "utf-8")) re_unicode_uppercase_u = re.compile(unicode(r"(?u)[ÚÙÜÛ]", "utf-8")) re_unicode_uppercase_y = re.compile(unicode(r"(?u)[Ý]", "utf-8")) re_unicode_uppercase_c = re.compile(unicode(r"(?u)[ÇĆ]", "utf-8")) re_unicode_uppercase_n = re.compile(unicode(r"(?u)[Ñ]", "utf-8")) class RestrictedCollectionDataCacher(DataCacher): def __init__(self): def cache_filler(): ret = [] try: viewcollid = acc_get_action_id(VIEWRESTRCOLL) res = run_sql("""SELECT DISTINCT ar.value FROM accROLE_accACTION_accARGUMENT raa JOIN accARGUMENT ar ON raa.id_accARGUMENT = ar.id WHERE ar.keyword = 'collection' AND raa.id_accACTION = %s""", (viewcollid,)) except Exception: # database problems, return empty cache return [] for coll in res: ret.append(coll[0]) return ret def timestamp_getter(): return max(get_table_update_time('accROLE_accACTION_accARGUMENT'), get_table_update_time('accARGUMENT')) DataCacher.__init__(self, cache_filler, timestamp_getter) def collection_restricted_p(collection): cache = restricted_collection_cache.get_cache() return collection in cache try: restricted_collection_cache.is_ok_p except Exception: restricted_collection_cache = RestrictedCollectionDataCacher() class FieldI18nNameDataCacher(DataCacher): def __init__(self): def cache_filler(): ret = {} try: res = run_sql("SELECT f.name,fn.ln,fn.value FROM fieldname AS fn, field AS f WHERE fn.id_field=f.id AND fn.type='ln'") # ln=long name except Exception: # database problems, return empty cache return {} for f, ln, i18nname in res: if i18nname: if not ret.has_key(f): ret[f] = {} ret[f][ln] = i18nname return ret def timestamp_getter(): return get_table_update_time('fieldname') DataCacher.__init__(self, cache_filler, timestamp_getter) def get_field_i18nname(self, f, ln=cdslang): out = f try: out = self.get_cache()[f][ln] except KeyError: pass # translation in LN does not exist return out try: if not field_i18n_name_cache.is_ok_p: raise Exception except Exception: field_i18n_name_cache = FieldI18nNameDataCacher() class CollectionRecListDataCacher(DataCacher): def __init__(self): def cache_filler(): ret = {} try: res = run_sql("SELECT name,reclist FROM collection") except Exception: # database problems, return empty cache return {} for name, reclist in res: ret[name] = None # this will be filled later during runtime by calling get_collection_reclist(coll) return ret def timestamp_getter(): return get_table_update_time('collection') DataCacher.__init__(self, cache_filler, timestamp_getter) def get_collection_reclist(self, coll): cache = self.get_cache() if not cache[coll]: # not yet it the cache, so calculate it and fill the cache: set = HitSet() query = "SELECT nbrecs,reclist FROM collection WHERE name='%s'" % coll res = run_sql(query, None, 1) if res: try: set._nbhits, set._set = res[0][0], Numeric.loads(zlib.decompress(res[0][1])) except: set._nbhits = 0 self.cache[coll] = set cache[coll] = set # finally, return reclist: return cache[coll] try: if not collection_reclist_cache.is_ok_p: raise Exception except Exception: collection_reclist_cache = CollectionRecListDataCacher() class CollectionI18nDataCacher(DataCacher): def __init__(self): def cache_filler(): ret = {} try: res = run_sql("SELECT c.name,cn.ln,cn.value FROM collectionname AS cn, collection AS c WHERE cn.id_collection=c.id AND cn.type='ln'") # ln=long name except Exception: # database problems, return {} for c, ln, i18nname in res: if i18nname: if not ret.has_key(c): ret[c] = {} ret[c][ln] = i18nname return ret def timestamp_getter(): return get_table_update_time('collectionname') DataCacher.__init__(self, cache_filler, timestamp_getter) def get_coll_i18nname(self, c, ln=cdslang): """Return nicely formatted collection name (of name type 'ln', 'long name') for collection C in language LN.""" cache = self.get_cache() out = c try: out = cache[c][ln] except KeyError: pass # translation in LN does not exist return out try: if not collection_i18n_name_cache.is_ok_p: raise Exception except Exception: collection_i18n_name_cache = CollectionI18nDataCacher() def get_alphabetically_ordered_collection_list(level=0, ln=cdslang): """Returns nicely ordered (score respected) list of collections, more exactly list of tuples (collection name, printable collection name). Suitable for create_search_box().""" out = [] query = "SELECT id,name FROM collection ORDER BY name ASC" res = run_sql(query) for c_id, c_name in res: # make a nice printable name (e.g. truncate c_printable for # long collection names in given language): c_printable = get_coll_i18nname(c_name, ln) if len(c_printable)>30: c_printable = c_printable[:30] + "..." if level: c_printable = " " + level * '-' + " " + c_printable out.append([c_name, c_printable]) return out def get_nicely_ordered_collection_list(collid=1, level=0, ln=cdslang): """Returns nicely ordered (score respected) list of collections, more exactly list of tuples (collection name, printable collection name). Suitable for create_search_box().""" colls_nicely_ordered = [] query = "SELECT c.name,cc.id_son FROM collection_collection AS cc, collection AS c "\ " WHERE c.id=cc.id_son AND cc.id_dad='%s' ORDER BY score DESC" % collid res = run_sql(query) for c, cid in res: # make a nice printable name (e.g. truncate c_printable for # long collection names in given language): c_printable = get_coll_i18nname(c, ln) if len(c_printable)>30: c_printable = c_printable[:30] + "..." if level: c_printable = " " + level * '-' + " " + c_printable colls_nicely_ordered.append([c, c_printable]) colls_nicely_ordered = colls_nicely_ordered + get_nicely_ordered_collection_list(cid, level+1, ln=ln) return colls_nicely_ordered def get_index_id(field): """Returns first index id where the field code FIELD is indexed. Returns zero in case there is no table for this index. Example: field='author', output=4.""" out = 0 query = """SELECT w.id FROM idxINDEX AS w, idxINDEX_field AS wf, field AS f WHERE f.code='%s' AND wf.id_field=f.id AND w.id=wf.id_idxINDEX LIMIT 1""" % escape_string(field) res = run_sql(query, None, 1) if res: out = res[0][0] return out def get_words_from_pattern(pattern): "Returns list of whitespace-separated words from pattern." words = {} for word in string.split(pattern): if not words.has_key(word): words[word] = 1; return words.keys() def create_basic_search_units(req, p, f, m=None, of='hb'): """Splits search pattern and search field into a list of independently searchable units. - A search unit consists of '(operator, pattern, field, type, hitset)' tuples where 'operator' is set union (|), set intersection (+) or set exclusion (-); 'pattern' is either a word (e.g. muon*) or a phrase (e.g. 'nuclear physics'); 'field' is either a code like 'title' or MARC tag like '100__a'; 'type' is the search type ('w' for word file search, 'a' for access file search). - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this kind of matching. If it is not set, then a guess is made. 'm' can have values: 'a'='all of the words', 'o'='any of the words', 'p'='phrase/substring', 'r'='regular expression', 'e'='exact value'. - Warnings are printed on req (when not None) in case of HTML output formats.""" opfts = [] # will hold (o,p,f,t,h) units ## check arguments: if matching type phrase/string/regexp, do we have field defined? if (m=='p' or m=='r' or m=='e') and not f: m = 'a' if of.startswith("h"): print_warning(req, "This matching type cannot be used within any field. I will perform a word search instead." ) print_warning(req, "If you want to phrase/substring/regexp search in a specific field, e.g. inside title, then please choose within title search option.") ## is desired matching type set? if m: ## A - matching type is known; good! if m == 'e': # A1 - exact value: opfts.append(['+', p, f, 'a']) # '+' since we have only one unit elif m == 'p': # A2 - phrase/substring: opfts.append(['+', "%" + p + "%", f, 'a']) # '+' since we have only one unit elif m == 'r': # A3 - regular expression: opfts.append(['+', p, f, 'r']) # '+' since we have only one unit elif m == 'a' or m == 'w': # A4 - all of the words: p = strip_accents(p) # strip accents for 'w' mode, FIXME: delete when not needed for word in get_words_from_pattern(p): opfts.append(['+', word, f, 'w']) # '+' in all units elif m == 'o': # A5 - any of the words: p = strip_accents(p) # strip accents for 'w' mode, FIXME: delete when not needed for word in get_words_from_pattern(p): if len(opfts)==0: opfts.append(['+', word, f, 'w']) # '+' in the first unit else: opfts.append(['|', word, f, 'w']) # '|' in further units else: if of.startswith("h"): print_warning(req, "Matching type '%s' is not implemented yet." % m, "Warning") opfts.append(['+', "%" + p + "%", f, 'a']) else: ## B - matching type is not known: let us try to determine it by some heuristics if f and p[0] == '"' and p[-1] == '"': ## B0 - does 'p' start and end by double quote, and is 'f' defined? => doing ACC search opfts.append(['+', p[1:-1], f, 'a']) elif f and p[0] == "'" and p[-1] == "'": ## B0bis - does 'p' start and end by single quote, and is 'f' defined? => doing ACC search opfts.append(['+', '%' + p[1:-1] + '%', f, 'a']) elif f and p[0] == "/" and p[-1] == "/": ## B0ter - does 'p' start and end by a slash, and is 'f' defined? => doing regexp search opfts.append(['+', p[1:-1], f, 'r']) elif f and string.find(p, ',') >= 0: ## B1 - does 'p' contain comma, and is 'f' defined? => doing ACC search opfts.append(['+', p, f, 'a']) elif f and str(f[0:2]).isdigit(): ## B2 - does 'f' exist and starts by two digits? => doing ACC search opfts.append(['+', p, f, 'a']) else: ## B3 - doing WRD search, but maybe ACC too # search units are separated by spaces unless the space is within single or double quotes # so, let us replace temporarily any space within quotes by '__SPACE__' p = re_pattern_single_quotes.sub(lambda x: "'"+string.replace(x.group(1), ' ', '__SPACE__')+"'", p) p = re_pattern_double_quotes.sub(lambda x: "\""+string.replace(x.group(1), ' ', '__SPACE__')+"\"", p) p = re_pattern_regexp_quotes.sub(lambda x: "/"+string.replace(x.group(1), ' ', '__SPACE__')+"/", p) # wash argument: p = re_equal.sub(":", p) p = re_logical_and.sub(" ", p) p = re_logical_or.sub(" |", p) p = re_logical_not.sub(" -", p) p = re_operators.sub(r' \1', p) for pi in string.split(p): # iterate through separated units (or items, as "pi" stands for "p item") pi = re_pattern_space.sub(" ", pi) # replace back '__SPACE__' by ' ' # firstly, determine set operator if pi[0] == '+' or pi[0] == '-' or pi[0] == '|': oi = pi[0] pi = pi[1:] else: # okay, there is no operator, so let us decide what to do by default oi = '+' # by default we are doing set intersection... # secondly, determine search pattern and field: if string.find(pi, ":") > 0: fi, pi = string.split(pi, ":", 1) else: fi, pi = f, pi # look also for old ALEPH field names: if fi and CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(fi)): fi = CFG_WEBSEARCH_FIELDS_CONVERT[string.lower(fi)] # wash 'pi' argument: if re_quotes.match(pi): # B3a - quotes are found => do ACC search (phrase search) if fi: if pi[0] == '"' and pi[-1] == '"': pi = string.replace(pi, '"', '') # remove quote signs opfts.append([oi, pi, fi, 'a']) elif pi[0] == "'" and pi[-1] == "'": pi = string.replace(pi, "'", "") # remove quote signs opfts.append([oi, "%" + pi + "%", fi, 'a']) else: # unbalanced quotes, so do WRD query: opfts.append([oi, pi, fi, 'w']) else: # fi is not defined, look at where we are doing exact or subphrase search (single/double quotes): if pi[0] == '"' and pi[-1] == '"': opfts.append([oi, pi[1:-1], "anyfield", 'a']) if of.startswith("h"): print_warning(req, "Searching for an exact match inside any field may be slow. You may want to search for words instead, or choose to search within specific field.") else: # nope, subphrase in global index is not possible => change back to WRD search pi = strip_accents(pi) # strip accents for 'w' mode, FIXME: delete when not needed for pii in get_words_from_pattern(pi): # since there may be '-' and other chars that we do not index in WRD opfts.append([oi, pii, fi, 'w']) if of.startswith("h"): print_warning(req, "The partial phrase search does not work in any field. I'll do a boolean AND searching instead.") print_warning(req, "If you want to do a partial phrase search in a specific field, e.g. inside title, then please choose 'within title' search option.", "Tip") print_warning(req, "If you want to do exact phrase matching, then please use double quotes.", "Tip") elif fi and str(fi[0]).isdigit() and str(fi[0]).isdigit(): # B3b - fi exists and starts by two digits => do ACC search opfts.append([oi, pi, fi, 'a']) elif fi and not get_index_id(fi): # B3c - fi exists but there is no words table for fi => try ACC search opfts.append([oi, pi, fi, 'a']) elif fi and pi.startswith('/') and pi.endswith('/'): # B3d - fi exists and slashes found => try regexp search opfts.append([oi, pi[1:-1], fi, 'r']) else: # B3e - general case => do WRD search pi = strip_accents(pi) # strip accents for 'w' mode, FIXME: delete when not needed for pii in get_words_from_pattern(pi): opfts.append([oi, pii, fi, 'w']) ## sanity check: for i in range(0, len(opfts)): try: pi = opfts[i][1] if pi == '*': if of.startswith("h"): print_warning(req, "Ignoring standalone wildcard word.", "Warning") del opfts[i] if pi == '' or pi == ' ': fi = opfts[i][2] if fi: if of.startswith("h"): print_warning(req, "Ignoring empty %s search term." % fi, "Warning") del opfts[i] except: pass ## return search units: return opfts def page_start(req, of, cc, as, ln, uid, title_message=None, - description='', keywords=''): + description='', keywords='', recID=-1, tab=''): "Start page according to given output format." _ = gettext_set_language(ln) if not title_message: title_message = _("Search Results") if not req: return # we were called from CLI content_type = get_output_format_content_type(of) if of.startswith('x'): if of == 'xr': # we are doing RSS output req.content_type = "application/rss+xml" req.send_http_header() req.write("""\n""") else: # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": pass # nothing to do, we shall only return list of recIDs elif content_type == 'text/html': # we are doing HTML output: req.content_type = "text/html" req.send_http_header() if not description: description = "%s %s." % (cc, _("Search Results")) if not keywords: keywords = "%s, WebSearch, %s" % (cdsnameintl.get(ln, cdsname), cc) + navtrail = create_navtrail_links(cc, as, ln) + navtrail_append_title_p=1 + if tab != '': + tab_label = get_detailed_page_tabs(cc)[tab]['label'] + navtrail += ' > %s > %s' % (weburl, recID, title_message, _(tab_label)) + navtrail_append_title_p=0 + req.write(pageheaderonly(req=req, title=title_message, - navtrail=create_navtrail_links(cc, as, ln), + navtrail=navtrail, description=description, keywords=keywords, uid=uid, language=ln, - navmenuid='search')) + navmenuid='search', + navtrail_append_title_p=\ + navtrail_append_title_p)) req.write(websearch_templates.tmpl_search_pagestart(ln=ln)) #else: # req.send_http_header() def page_end(req, of="hb", ln=cdslang): "End page according to given output format: e.g. close XML tags, add HTML footer, etc." if of == "id": return [] # empty recID list if not req: return # we were called from CLI if of.startswith('h'): req.write(websearch_templates.tmpl_search_pageend(ln = ln)) # pagebody end req.write(pagefooteronly(lastupdated=__lastupdated__, language=ln, req=req)) return "\n" def create_inputdate_box(name="d1", selected_year=0, selected_month=0, selected_day=0, ln=cdslang): "Produces 'From Date', 'Until Date' kind of selection box. Suitable for search options." _ = gettext_set_language(ln) box = "" # day box += """""" # month box += """""" # year box += """""" return box def create_search_box(cc, colls, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, jrec, ec, action=""): """Create search box for 'search again in the results page' functionality.""" # load the right message language _ = gettext_set_language(ln) # some computations if cc == cdsname: cc_intl = cdsnameintl.get(ln, cdsname) else: cc_intl = get_coll_i18nname(cc, ln) colls_nicely_ordered = [] if cfg_nicely_ordered_collection_list: colls_nicely_ordered = get_nicely_ordered_collection_list(ln=ln) else: colls_nicely_ordered = get_alphabetically_ordered_collection_list(ln=ln) colls_nice = [] for (cx, cx_printable) in colls_nicely_ordered: if not cx.startswith("Unnamed collection"): colls_nice.append({ 'value' : cx, 'text' : cx_printable }) coll_selects = [] if colls and colls[0] != cdsname: # some collections are defined, so print these first, and only then print 'add another collection' heading: for c in colls: if c: temp = [] temp.append({ 'value' : '', 'text' : '*** %s ***' % _("any collection") }) for val in colls_nice: # print collection: if not cx.startswith("Unnamed collection"): temp.append({ 'value' : val['value'], 'text' : val['text'], 'selected' : (c == re.sub("^[\s\-]*","", val['value'])) }) coll_selects.append(temp) coll_selects.append([{ 'value' : '', 'text' : '*** %s ***' % _("add another collection") }] + colls_nice) else: # we searched in CDSNAME, so print 'any collection' heading coll_selects.append([{ 'value' : '', 'text' : '*** %s ***' % _("any collection") }] + colls_nice) sort_formats = [{ 'value' : '', 'text' : _("latest first") }] query = """SELECT DISTINCT(f.code),f.name FROM field AS f, collection_field_fieldvalue AS cff WHERE cff.type='soo' AND cff.id_field=f.id ORDER BY cff.score DESC, f.name ASC""" res = run_sql(query) for code, name in res: sort_formats.append({ 'value' : code, 'text' : name, }) ## ranking methods ranks = [{ 'value' : '', 'text' : "- %s %s -" % (_("OR").lower (), _("rank by")), }] for (code, name) in get_bibrank_methods(get_colID(cc), ln): # propose found rank methods: ranks.append({ 'value' : code, 'text' : name, }) formats = [] query = """SELECT code,name FROM format ORDER BY name ASC""" res = run_sql(query) if res: # propose found formats: for code, name in res: formats.append({ 'value' : code, 'text' : name }) else: formats.append({'value' : 'hb', 'text' : _("HTML brief") }) return websearch_templates.tmpl_search_box( ln = ln, as = as, cc_intl = cc_intl, cc = cc, ot = ot, sp = sp, action = action, fieldslist = get_searchwithin_fields(ln = ln), f1 = f1, f2 = f2, f3 = f3, m1 = m1, m2 = m2, m3 = m3, p1 = p1, p2 = p2, p3 = p3, op1 = op1, op2 = op2, rm = rm, p = p, f = f, coll_selects = coll_selects, d1y = d1y, d2y = d2y, d1m = d1m, d2m = d2m, d1d = d1d, d2d = d2d, sort_formats = sort_formats, sf = sf, so = so, ranks = ranks, sc = sc, rg = rg, formats = formats, of = of, pl = pl, jrec = jrec, ec = ec, ) -def create_navtrail_links(cc=cdsname, as=0, ln=cdslang, self_p=1): +def create_navtrail_links(cc=cdsname, as=0, ln=cdslang, self_p=1, tab=''): """Creates navigation trail links, i.e. links to collection ancestors (except Home collection). If as==1, then links to Advanced Search interfaces; otherwise Simple Search. """ dads = [] for dad in get_coll_ancestors(cc): if dad != cdsname: # exclude Home collection dads.append ((dad, get_coll_i18nname (dad, ln))) if self_p and cc != cdsname: dads.append((cc, get_coll_i18nname(cc, ln))) return websearch_templates.tmpl_navtrail_links( as=as, ln=ln, dads=dads) def create_searchwithin_selection_box(fieldname='f', value='', ln='en'): """Produces 'search within' selection box for the current collection.""" out = "" out += """""" return out def get_searchwithin_fields(ln='en'): """Retrieves the fields name used in the 'search within' selection box for the current collection.""" query = "SELECT code,name FROM field ORDER BY name ASC" res = run_sql(query) fields = [{ 'value' : '', 'text' : get_field_i18nname("any field", ln) }] for field_code, field_name in res: if field_code and field_code != "anyfield": fields.append({ 'value' : field_code, 'text' : get_field_i18nname(field_name, ln) }) return fields def create_andornot_box(name='op', value='', ln='en'): "Returns HTML code for the AND/OR/NOT selection box." _ = gettext_set_language(ln) out = """ """ % (name, is_selected('a', value), _("AND"), is_selected('o', value), _("OR"), is_selected('n', value), _("AND NOT")) return out def create_matchtype_box(name='m', value='', ln='en'): "Returns HTML code for the 'match type' selection box." _ = gettext_set_language(ln) out = """ """ % (name, is_selected('a', value), _("All of the words:"), is_selected('o', value), _("Any of the words:"), is_selected('e', value), _("Exact phrase:"), is_selected('p', value), _("Partial phrase:"), is_selected('r', value), _("Regular expression:")) return out def is_selected(var, fld): "Checks if the two are equal, and if yes, returns ' selected'. Useful for select boxes." if type(var) is int and type(fld) is int: if var == fld: return " selected" elif str(var) == str(fld): return " selected" elif fld and len(fld)==3 and fld[0] == "w" and var == fld[1:]: return " selected" return "" class HitSet: """Class describing set of records, implemented as bit vectors of recIDs. Using Numeric arrays for speed (1 value = 8 bits), can use later "real" bit vectors to save space.""" def __init__(self, init_set=None): self._nbhits = -1 if init_set: self._set = init_set else: self._set = Numeric.zeros(CFG_MAX_RECID+1, Numeric.Int0) def __repr__(self, join=string.join): return "%s(%s)" % (self.__class__.__name__, join(map(repr, self._set), ', ')) def add(self, recID): "Adds a record to the set." self._set[recID] = 1 def addmany(self, recIDs): "Adds several recIDs to the set." for recID in recIDs: self._set[recID] = 1 def addlist(self, arr): "Adds an array of recIDs to the set." Numeric.put(self._set, arr, 1) def remove(self, recID): "Removes a record from the set." self._set[recID] = 0 def removemany(self, recIDs): "Removes several records from the set." for recID in recIDs: self.remove(recID) def intersect(self, other): "Does a set intersection with other. Keep result in self." self._set = Numeric.bitwise_and(self._set, other._set) def union(self, other): "Does a set union with other. Keep result in self." self._set = Numeric.bitwise_or(self._set, other._set) def difference(self, other): "Does a set difference with other. Keep result in self." #self._set = Numeric.bitwise_not(self._set, other._set) for recID in Numeric.nonzero(other._set): self.remove(recID) def contains(self, recID): "Checks whether the set contains recID." return self._set[recID] __contains__ = contains # Higher performance member-test for python 2.0 and above def __getitem__(self, index): "Support for the 'for item in set:' protocol." return Numeric.nonzero(self._set)[index] def calculate_nbhits(self): "Calculates the number of records set in the hitset." self._nbhits = Numeric.sum(self._set.copy().astype(Numeric.Int)) def items(self): "Return an array containing all recID." return Numeric.nonzero(self._set) def tolist(self): "Return an array containing all recID." return Numeric.nonzero(self._set).tolist() # speed up HitSet operations by ~20% if Psyco is installed: try: import psyco psyco.bind(HitSet) except: pass def wash_colls(cc, c, split_colls=0): """Wash collection list by checking whether user has deselected anything under 'Narrow search'. Checks also if cc is a list or not. Return list of cc, colls_to_display, colls_to_search since the list of collections to display is different from that to search in. This is because users might have chosen 'split by collection' functionality. The behaviour of "collections to display" depends solely whether user has deselected a particular collection: e.g. if it started from 'Articles and Preprints' page, and deselected 'Preprints', then collection to display is 'Articles'. If he did not deselect anything, then collection to display is 'Articles & Preprints'. The behaviour of "collections to search in" depends on the 'split_colls' parameter: * if is equal to 1, then we can wash the colls list down and search solely in the collection the user started from; * if is equal to 0, then we are splitting to the first level of collections, i.e. collections as they appear on the page we started to search from; The function raises exception InvenioWebSearchUnknownCollectionError if cc or one of c collections is not known. """ colls_out = [] colls_out_for_display = [] # check what type is 'cc': if type(cc) is list: for ci in cc: if collection_reclist_cache.has_key(ci): # yes this collection is real, so use it: cc = ci break else: # check once if cc is real: if not collection_reclist_cache.has_key(cc): if cc: raise InvenioWebSearchUnknownCollectionError(cc) else: cc = cdsname # cc is not set, so replace it with Home collection # check type of 'c' argument: if type(c) is list: colls = c else: colls = [c] # remove all 'unreal' collections: colls_real = [] for coll in colls: if collection_reclist_cache.has_key(coll): colls_real.append(coll) else: if coll: raise InvenioWebSearchUnknownCollectionError(coll) colls = colls_real # check if some real collections remain: if len(colls)==0: colls = [cc] # then let us check the list of non-restricted "real" sons of 'cc' and compare it to 'coll': query = "SELECT c.name FROM collection AS c, collection_collection AS cc, collection AS ccc WHERE c.id=cc.id_son AND cc.id_dad=ccc.id AND ccc.name='%s' AND cc.type='r' AND c.restricted IS NULL" % escape_string(cc) res = run_sql(query) l_cc_nonrestricted_sons = [] l_c = colls for row in res: l_cc_nonrestricted_sons.append(row[0]) l_c.sort() l_cc_nonrestricted_sons.sort() if l_cc_nonrestricted_sons == l_c: colls_out_for_display = [cc] # yep, washing permitted, it is sufficient to display 'cc' else: colls_out_for_display = colls # nope, we need to display all 'colls' successively # remove duplicates: colls_out_for_display_nondups=filter(lambda x, colls_out_for_display=colls_out_for_display: colls_out_for_display[x-1] not in colls_out_for_display[x:], range(1, len(colls_out_for_display)+1)) colls_out_for_display = map(lambda x, colls_out_for_display=colls_out_for_display:colls_out_for_display[x-1], colls_out_for_display_nondups) # second, let us decide on collection splitting: if split_colls == 0: # type A - no sons are wanted colls_out = colls_out_for_display # elif split_colls == 1: else: # type B - sons (first-level descendants) are wanted for coll in colls_out_for_display: coll_sons = get_coll_sons(coll) if coll_sons == []: colls_out.append(coll) else: colls_out = colls_out + coll_sons # remove duplicates: colls_out_nondups=filter(lambda x, colls_out=colls_out: colls_out[x-1] not in colls_out[x:], range(1, len(colls_out)+1)) colls_out = map(lambda x, colls_out=colls_out:colls_out[x-1], colls_out_nondups) return (cc, colls_out_for_display, colls_out) def strip_accents(x): """Strip accents in the input phrase X (assumed in UTF-8) by replacing accented characters with their unaccented cousins (e.g. é by e). Return such a stripped X.""" # convert input into Unicode string: try: y = unicode(x, "utf-8") except: return x # something went wrong, probably the input wasn't UTF-8 # asciify Latin-1 lowercase characters: y = re_unicode_lowercase_a.sub("a", y) y = re_unicode_lowercase_ae.sub("ae", y) y = re_unicode_lowercase_e.sub("e", y) y = re_unicode_lowercase_i.sub("i", y) y = re_unicode_lowercase_o.sub("o", y) y = re_unicode_lowercase_u.sub("u", y) y = re_unicode_lowercase_y.sub("y", y) y = re_unicode_lowercase_c.sub("c", y) y = re_unicode_lowercase_n.sub("n", y) # asciify Latin-1 uppercase characters: y = re_unicode_uppercase_a.sub("A", y) y = re_unicode_uppercase_ae.sub("AE", y) y = re_unicode_uppercase_e.sub("E", y) y = re_unicode_uppercase_i.sub("I", y) y = re_unicode_uppercase_o.sub("O", y) y = re_unicode_uppercase_u.sub("U", y) y = re_unicode_uppercase_y.sub("Y", y) y = re_unicode_uppercase_c.sub("C", y) y = re_unicode_uppercase_n.sub("N", y) # return UTF-8 representation of the Unicode string: return y.encode("utf-8") def wash_pattern(p): """Wash pattern passed by URL. Check for sanity of the wildcard by removing wildcards if they are appended to extremely short words (1-3 letters). TODO: instead of this approximative treatment, it will be much better to introduce a temporal limit, e.g. to kill a query if it does not finish in 10 seconds.""" # strip accents: # p = strip_accents(p) # FIXME: when available, strip accents all the time # add leading/trailing whitespace for the two following wildcard-sanity checking regexps: p = " " + p + " " # get rid of wildcards at the beginning of words: p = re_pattern_wildcards_at_beginning.sub("\\1", p) # replace spaces within quotes by __SPACE__ temporarily: p = re_pattern_single_quotes.sub(lambda x: "'"+string.replace(x.group(1), ' ', '__SPACE__')+"'", p) p = re_pattern_double_quotes.sub(lambda x: "\""+string.replace(x.group(1), ' ', '__SPACE__')+"\"", p) p = re_pattern_regexp_quotes.sub(lambda x: "/"+string.replace(x.group(1), ' ', '__SPACE__')+"/", p) # get rid of extremely short words (1-3 letters with wildcards): p = re_pattern_short_words.sub("\\1", p) # replace back __SPACE__ by spaces: p = re_pattern_space.sub(" ", p) # replace special terms: p = re_pattern_today.sub(time.strftime("%Y-%m-%d", time.localtime()), p) # remove unnecessary whitespace: p = string.strip(p) return p def wash_field(f): """Wash field passed by URL.""" # get rid of unnecessary whitespace: f = string.strip(f) # wash old-style CDS Invenio/ALEPH 'f' field argument, e.g. replaces 'wau' and 'au' by 'author' if CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(f)): f = CFG_WEBSEARCH_FIELDS_CONVERT[f] return f def wash_dates(d1y=0, d1m=0, d1d=0, d2y=0, d2m=0, d2d=0): """Take user-submitted washed date arguments (D1Y, D1M, D1Y) and (D2Y, D2M, D2Y) and return (YYY1-M1-D2, YYY2-M2-D2) strings in the YYYY-MM-DD format suitable for time restricted searching. I.e. pay attention when months are not there to put 01 or 12 according to whether it's the starting or the ending date, etc. """ day1, day2 = "", "" # sanity checking: if d1y == 0 and d1m == 0 and d1d == 0 and d2y == 0 and d2m == 0 and d2d == 0: return ("", "") # nothing selected, so return empty values # construct day1 (from): if d1y: day1 += "%04d" % d1y else: day1 += "0000" if d1m: day1 += "-%02d" % d1m else: day1 += "-01" if d1d: day1 += "-%02d" % d1d else: day1 += "-01" # construct day2 (until): if d2y: day2 += "%04d" % d2y else: day2 += "9999" if d2m: day2 += "-%02d" % d2m else: day2 += "-12" if d2d: day2 += "-%02d" % d2d else: day2 += "-31" # NOTE: perhaps we should add max(datenumber) in # given month, but for our quering it's not # needed, 31 will always do # okay, return constructed YYYY-MM-DD dates return (day1, day2) def get_colID(c): "Return collection ID for collection name C. Return None if no match found." colID = None res = run_sql("SELECT id FROM collection WHERE name=%s", (c,), 1) if res: colID = res[0][0] return colID def get_coll_i18nname(c, ln=cdslang): """Return nicely formatted collection name (of name type 'ln', 'long name') for collection C in language LN.""" global collection_i18nname_cache global collection_i18nname_cache_timestamp # firstly, check whether the collectionname table was modified: if get_table_update_time('collectionname') > collection_i18nname_cache_timestamp: # yes it was, cache clear-up needed: collection_i18nname_cache = create_collection_i18nname_cache() # secondly, read i18n name from either the cache or return common name: out = c try: out = collection_i18nname_cache[c][ln] except KeyError: pass # translation in LN does not exist return out def get_field_i18nname(f, ln=cdslang): """Return nicely formatted field name (of type 'ln', 'long name') for field F in language LN.""" global field_i18nname_cache global field_i18nname_cache_timestamp # firstly, check whether the fieldname table was modified: if get_table_update_time('fieldname') > field_i18nname_cache_timestamp: # yes it was, cache clear-up needed: field_i18nname_cache = create_field_i18nname_cache() # secondly, read i18n name from either the cache or return common name: out = f try: out = field_i18nname_cache[f][ln] except KeyError: pass # translation in LN does not exist return out def get_coll_ancestors(coll): "Returns a list of ancestors for collection 'coll'." coll_ancestors = [] coll_ancestor = coll while 1: query = "SELECT c.name FROM collection AS c "\ "LEFT JOIN collection_collection AS cc ON c.id=cc.id_dad "\ "LEFT JOIN collection AS ccc ON ccc.id=cc.id_son "\ "WHERE ccc.name='%s' ORDER BY cc.id_dad ASC LIMIT 1" \ % escape_string(coll_ancestor) res = run_sql(query, None, 1) if res: coll_name = res[0][0] coll_ancestors.append(coll_name) coll_ancestor = coll_name else: break # ancestors found, return reversed list: coll_ancestors.reverse() return coll_ancestors def get_coll_sons(coll, type='r', public_only=1): """Return a list of sons (first-level descendants) of type 'type' for collection 'coll'. If public_only, then return only non-restricted son collections. """ coll_sons = [] query = "SELECT c.name FROM collection AS c "\ "LEFT JOIN collection_collection AS cc ON c.id=cc.id_son "\ "LEFT JOIN collection AS ccc ON ccc.id=cc.id_dad "\ "WHERE cc.type='%s' AND ccc.name='%s'" \ % (escape_string(type), escape_string(coll)) if public_only: query += " AND c.restricted IS NULL " query += " ORDER BY cc.score DESC" res = run_sql(query) for name in res: coll_sons.append(name[0]) return coll_sons def get_coll_real_descendants(coll): """Return a list of all descendants of collection 'coll' that are defined by a 'dbquery'. IOW, we need to decompose compound collections like "A & B" into "A" and "B" provided that "A & B" has no associated database query defined. """ coll_sons = [] query = "SELECT c.name,c.dbquery FROM collection AS c "\ "LEFT JOIN collection_collection AS cc ON c.id=cc.id_son "\ "LEFT JOIN collection AS ccc ON ccc.id=cc.id_dad "\ "WHERE ccc.name='%s' ORDER BY cc.score DESC" \ % escape_string(coll) res = run_sql(query) for name, dbquery in res: if dbquery: # this is 'real' collection, so return it: coll_sons.append(name) else: # this is 'composed' collection, so recurse: coll_sons.extend(get_coll_real_descendants(name)) return coll_sons def get_collection_reclist(coll): """Return hitset of recIDs that belong to the collection 'coll'. But firstly check the last updated date of the collection table. If it's newer than the cache timestamp, then empty the cache, since new records could have been added.""" global collection_reclist_cache global collection_reclist_cache_timestamp # firstly, check whether the collection table was modified: if get_table_update_time('collection') > collection_reclist_cache_timestamp: # yes it was, cache clear-up needed: collection_reclist_cache = create_collection_reclist_cache() # secondly, read reclist from either the cache or the database: if not collection_reclist_cache[coll]: # not yet it the cache, so calculate it and fill the cache: set = HitSet() query = "SELECT nbrecs,reclist FROM collection WHERE name='%s'" % coll res = run_sql(query, None, 1) if res: try: set._nbhits, set._set = res[0][0], Numeric.loads(zlib.decompress(res[0][1])) except: set._nbhits = 0 collection_reclist_cache[coll] = set # finally, return reclist: return collection_reclist_cache[coll] def coll_restricted_p(coll): "Predicate to test if the collection coll is restricted or not." if not coll: return 0 query = "SELECT restricted FROM collection WHERE name='%s'" % escape_string(coll) res = run_sql(query, None, 1) if res and res[0][0] is not None: return 1 else: return 0 def coll_restricted_group(coll): "Return Apache group to which the collection is restricted. Return None if it's public." if not coll: return None query = "SELECT restricted FROM collection WHERE name='%s'" % escape_string(coll) res = run_sql(query, None, 1) if res: return res[0][0] else: return None def create_collection_reclist_cache(): """Creates list of records belonging to collections. Called on startup and used later for intersecting search results with collection universe.""" global collection_reclist_cache_timestamp # populate collection reclist cache: collrecs = {} try: res = run_sql("SELECT name,reclist FROM collection") except Error: # database problems, set timestamp to zero and return empty cache collection_reclist_cache_timestamp = 0 return collrecs for name, reclist in res: collrecs[name] = None # this will be filled later during runtime by calling get_collection_reclist(coll) # update timestamp: try: collection_reclist_cache_timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) except NameError: collection_reclist_cache_timestamp = 0 return collrecs try: collection_reclist_cache.has_key(cdsname) except: try: collection_reclist_cache = create_collection_reclist_cache() except: collection_reclist_cache = {} def create_collection_i18nname_cache(): """Create cache of I18N collection names of type 'ln' (=long name). Called on startup and used later during the search time.""" global collection_i18nname_cache_timestamp # populate collection I18N name cache: names = {} try: res = run_sql("SELECT c.name,cn.ln,cn.value FROM collectionname AS cn, collection AS c WHERE cn.id_collection=c.id AND cn.type='ln'") # ln=long name except Error: # database problems, set timestamp to zero and return empty cache collection_i18nname_cache_timestamp = 0 return names for c, ln, i18nname in res: if i18nname: if not names.has_key(c): names[c] = {} names[c][ln] = i18nname # update timestamp: try: collection_i18nname_cache_timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) except NameError: collection_i18nname_cache_timestamp = 0 return names try: collection_i18nname_cache.has_key(cdsname) except: try: collection_i18nname_cache = create_collection_i18nname_cache() except: collection_i18nname_cache = {} def create_field_i18nname_cache(): """Create cache of I18N field names of type 'ln' (=long name). Called on startup and used later during the search time.""" global field_i18nname_cache_timestamp # populate field I18 name cache: names = {} try: res = run_sql("SELECT f.name,fn.ln,fn.value FROM fieldname AS fn, field AS f WHERE fn.id_field=f.id AND fn.type='ln'") # ln=long name except Error: # database problems, set timestamp to zero and return empty cache field_i18nname_cache_timestamp = 0 return names for f, ln, i18nname in res: if i18nname: if not names.has_key(f): names[f] = {} names[f][ln] = i18nname # update timestamp: try: field_i18nname_cache_timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) except NameError: field_i18nname_cache_timestamp = 0 return names try: field_i18nname_cache.has_key(cdsname) except: try: field_i18nname_cache = create_field_i18nname_cache() except: field_i18nname_cache = {} def browse_pattern(req, colls, p, f, rg, ln=cdslang): """Browse either biliographic phrases or words indexes, and display it.""" # load the right message language _ = gettext_set_language(ln) ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) p_orig = p ## okay, "real browse" follows: browsed_phrases = get_nearest_terms_in_bibxxx(p, f, rg, 1) while not browsed_phrases: # try again and again with shorter and shorter pattern: try: p = p[:-1] browsed_phrases = get_nearest_terms_in_bibxxx(p, f, rg, 1) except: # probably there are no hits at all: req.write(_("No values found.")) return ## try to check hits in these particular collection selection: browsed_phrases_in_colls = [] if 0: for phrase in browsed_phrases: phrase_hitset = HitSet() phrase_hitsets = search_pattern("", phrase, f, 'e') for coll in colls: phrase_hitset.union(phrase_hitsets[coll]) phrase_hitset.calculate_nbhits() if phrase_hitset._nbhits > 0: # okay, this phrase has some hits in colls, so add it: browsed_phrases_in_colls.append([phrase, phrase_hitset._nbhits]) ## were there hits in collections? if browsed_phrases_in_colls == []: if browsed_phrases != []: #print_warning(req, """

    No match close to %s found in given collections. #Please try different term.

    Displaying matches in any collection...""" % p_orig) ## try to get nbhits for these phrases in any collection: for phrase in browsed_phrases: browsed_phrases_in_colls.append([phrase, get_nbhits_in_bibxxx(phrase, f)]) ## display results now: out = websearch_templates.tmpl_browse_pattern( f=get_field_i18nname(f, ln), ln=ln, browsed_phrases_in_colls=browsed_phrases_in_colls, colls=colls, ) req.write(out) return def browse_in_bibwords(req, p, f, ln=cdslang): """Browse inside words indexes.""" if not p: return _ = gettext_set_language(ln) urlargd = {} urlargd.update(req.argd) urlargd['action'] = 'search' nearest_box = create_nearest_terms_box(urlargd, p, f, 'w', ln=ln, intro_text_p=0) req.write(websearch_templates.tmpl_search_in_bibwords( p = p, f = f, ln = ln, nearest_box = nearest_box )) return def search_pattern(req=None, p=None, f=None, m=None, ap=0, of="id", verbose=0, ln=cdslang): """Search for complex pattern 'p' within field 'f' according to matching type 'm'. Return hitset of recIDs. The function uses multi-stage searching algorithm in case of no exact match found. See the Search Internals document for detailed description. The 'ap' argument governs whether an alternative patterns are to be used in case there is no direct hit for (p,f,m). For example, whether to replace non-alphanumeric characters by spaces if it would give some hits. See the Search Internals document for detailed description. (ap=0 forbits the alternative pattern usage, ap=1 permits it.) The 'of' argument governs whether to print or not some information to the user in case of no match found. (Usually it prints the information in case of HTML formats, otherwise it's silent). The 'verbose' argument controls the level of debugging information to be printed (0=least, 9=most). All the parameters are assumed to have been previously washed. This function is suitable as a mid-level API. """ _ = gettext_set_language(ln) hitset_empty = HitSet() hitset_empty._nbhits = 0 # sanity check: if not p: hitset_full = HitSet(Numeric.ones(CFG_MAX_RECID+1, Numeric.Int0)) hitset_full._nbhits = CFG_MAX_RECID # no pattern, so return all universe return hitset_full # search stage 1: break up arguments into basic search units: if verbose and of.startswith("h"): t1 = os.times()[4] basic_search_units = create_basic_search_units(req, p, f, m, of) if verbose and of.startswith("h"): t2 = os.times()[4] print_warning(req, "Search stage 1: basic search units are: %s" % basic_search_units) print_warning(req, "Search stage 1: execution took %.2f seconds." % (t2 - t1)) # search stage 2: do search for each search unit and verify hit presence: if verbose and of.startswith("h"): t1 = os.times()[4] basic_search_units_hitsets = [] for idx_unit in range(0, len(basic_search_units)): bsu_o, bsu_p, bsu_f, bsu_m = basic_search_units[idx_unit] basic_search_unit_hitset = search_unit(bsu_p, bsu_f, bsu_m) if verbose >= 9 and of.startswith("h"): print_warning(req, "Search stage 1: pattern %s gave hitlist %s" % (bsu_p, Numeric.nonzero(basic_search_unit_hitset._set))) if basic_search_unit_hitset._nbhits > 0 or \ ap==0 or \ bsu_o=="|" or \ ((idx_unit+1) 0: # we retain the new unit instead if of.startswith('h'): print_warning(req, _("No exact match found for %(x_query1)s, using %(x_query2)s instead...") % {'x_query1': "" + cgi.escape(bsu_p) + "", 'x_query2': "" + cgi.escape(bsu_pn) + ""}) basic_search_units[idx_unit][1] = bsu_pn basic_search_units_hitsets.append(basic_search_unit_hitset) else: # stage 2-3: no hits found either, propose nearest indexed terms: if of.startswith('h'): if req: if bsu_f == "recid": print_warning(req, "Requested record does not seem to exist.") else: print_warning(req, create_nearest_terms_box(req.argd, bsu_p, bsu_f, bsu_m, ln=ln)) return hitset_empty else: # stage 2-3: no hits found either, propose nearest indexed terms: if of.startswith('h'): if req: if bsu_f == "recid": print_warning(req, "Requested record does not seem to exist.") else: print_warning(req, create_nearest_terms_box(req.argd, bsu_p, bsu_f, bsu_m, ln=ln)) return hitset_empty if verbose and of.startswith("h"): t2 = os.times()[4] for idx_unit in range(0, len(basic_search_units)): print_warning(req, "Search stage 2: basic search unit %s gave %d hits." % (basic_search_units[idx_unit][1:], basic_search_units_hitsets[idx_unit]._nbhits)) print_warning(req, "Search stage 2: execution took %.2f seconds." % (t2 - t1)) # search stage 3: apply boolean query for each search unit: if verbose and of.startswith("h"): t1 = os.times()[4] # let the initial set be the complete universe: hitset_in_any_collection = HitSet(Numeric.ones(CFG_MAX_RECID+1, Numeric.Int0)) for idx_unit in range(0, len(basic_search_units)): this_unit_operation = basic_search_units[idx_unit][0] this_unit_hitset = basic_search_units_hitsets[idx_unit] if this_unit_operation == '+': hitset_in_any_collection.intersect(this_unit_hitset) elif this_unit_operation == '-': hitset_in_any_collection.difference(this_unit_hitset) elif this_unit_operation == '|': hitset_in_any_collection.union(this_unit_hitset) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % this_unit_operation, "Error") hitset_in_any_collection.calculate_nbhits() if hitset_in_any_collection._nbhits == 0: # no hits found, propose alternative boolean query: if of.startswith('h'): nearestterms = [] for idx_unit in range(0, len(basic_search_units)): bsu_o, bsu_p, bsu_f, bsu_m = basic_search_units[idx_unit] if bsu_p.startswith("%") and bsu_p.endswith("%"): bsu_p = "'" + bsu_p[1:-1] + "'" bsu_nbhits = basic_search_units_hitsets[idx_unit]._nbhits # create a similar query, but with the basic search unit only argd = {} argd.update(req.argd) argd['p'] = bsu_p argd['f'] = bsu_f nearestterms.append((bsu_p, bsu_nbhits, argd)) text = websearch_templates.tmpl_search_no_boolean_hits( ln=ln, nearestterms=nearestterms) print_warning(req, text) if verbose and of.startswith("h"): t2 = os.times()[4] print_warning(req, "Search stage 3: boolean query gave %d hits." % hitset_in_any_collection._nbhits) print_warning(req, "Search stage 3: execution took %.2f seconds." % (t2 - t1)) return hitset_in_any_collection def search_unit(p, f=None, m=None): """Search for basic search unit defined by pattern 'p' and field 'f' and matching type 'm'. Return hitset of recIDs. All the parameters are assumed to have been previously washed. 'p' is assumed to be already a ``basic search unit'' so that it is searched as such and is not broken up in any way. Only wildcard and span queries are being detected inside 'p'. This function is suitable as a low-level API. """ ## create empty output results set: set = HitSet() if not p: # sanity checking return set if m == 'a' or m == 'r': # we are doing either direct bibxxx search or phrase search or regexp search set = search_unit_in_bibxxx(p, f, m) else: # we are doing bibwords search by default set = search_unit_in_bibwords(p, f) set.calculate_nbhits() return set def search_unit_in_bibwords(word, f, decompress=zlib.decompress): """Searches for 'word' inside bibwordsX table for field 'f' and returns hitset of recIDs.""" set = HitSet() # will hold output result set set_used = 0 # not-yet-used flag, to be able to circumvent set operations # deduce into which bibwordsX table we will search: bibwordsX = "idxWORD%02dF" % get_index_id("anyfield") if f: index_id = get_index_id(f) if index_id: bibwordsX = "idxWORD%02dF" % index_id else: return HitSet() # word index f does not exist # wash 'word' argument and construct query: word = string.replace(word, '*', '%') # we now use '*' as the truncation character words = string.split(word, "->", 1) # check for span query if len(words) == 2: word0 = re_word.sub('', words[0]) word1 = re_word.sub('', words[1]) word0 = stem(word0) word1 = stem(word1) query = "SELECT term,hitlist FROM %s WHERE term BETWEEN '%s' AND '%s'" % (bibwordsX, escape_string(word0[:50]), escape_string(word1[:50])) else: word = re_word.sub('', word) word = stem(word) if string.find(word, '%') >= 0: # do we have wildcard in the word? query = "SELECT term,hitlist FROM %s WHERE term LIKE '%s'" % (bibwordsX, escape_string(word[:50])) else: query = "SELECT term,hitlist FROM %s WHERE term='%s'" % (bibwordsX, escape_string(word[:50])) # launch the query: res = run_sql(query) # fill the result set: for word, hitlist in res: hitset_bibwrd = HitSet(Numeric.loads(decompress(hitlist))) # add the results: if set_used: set.union(hitset_bibwrd) else: set = hitset_bibwrd set_used = 1 # okay, return result set: return set def search_unit_in_bibxxx(p, f, type): """Searches for pattern 'p' inside bibxxx tables for field 'f' and returns hitset of recIDs found. The search type is defined by 'type' (e.g. equals to 'r' for a regexp search).""" p_orig = p # saving for eventual future 'no match' reporting # wash arguments: f = string.replace(f, '*', '%') # replace truncation char '*' in field definition if type == 'r': pattern = "REGEXP '%s'" % escape_string(p) else: p = string.replace(p, '*', '%') # we now use '*' as the truncation character ps = string.split(p, "->", 1) # check for span query: if len(ps) == 2: pattern = "BETWEEN '%s' AND '%s'" % (escape_string(ps[0]), escape_string(ps[1])) else: if string.find(p, '%') > -1: pattern = "LIKE '%s'" % escape_string(ps[0]) else: pattern = "='%s'" % escape_string(ps[0]) # construct 'tl' which defines the tag list (MARC tags) to search in: tl = [] if str(f[0]).isdigit() and str(f[1]).isdigit(): tl.append(f) # 'f' seems to be okay as it starts by two digits else: # convert old ALEPH tag names, if appropriate: (TODO: get rid of this before entering this function) if CFG_WEBSEARCH_FIELDS_CONVERT.has_key(string.lower(f)): f = CFG_WEBSEARCH_FIELDS_CONVERT[string.lower(f)] # deduce desired MARC tags on the basis of chosen 'f' tl = get_field_tags(f) if not tl: # f index does not exist, nevermind pass # okay, start search: l = [] # will hold list of recID that matched for t in tl: # deduce into which bibxxx table we will search: digit1, digit2 = int(t[0]), int(t[1]) bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) # construct query: if t == "001": query = "SELECT id FROM bibrec WHERE id %s" % pattern else: if len(t) != 6 or t[-1:]=='%': # only the beginning of field 't' is defined, so add wildcard character: query = "SELECT bibx.id_bibrec FROM %s AS bx LEFT JOIN %s AS bibx ON bx.id=bibx.id_bibxxx WHERE bx.value %s AND bx.tag LIKE '%s%%'" % \ (bx, bibx, pattern, t) else: query = "SELECT bibx.id_bibrec FROM %s AS bx LEFT JOIN %s AS bibx ON bx.id=bibx.id_bibxxx WHERE bx.value %s AND bx.tag='%s'" % \ (bx, bibx, pattern, t) # launch the query: res = run_sql(query) # fill the result set: for id_bibrec in res: if id_bibrec[0]: l.append(id_bibrec[0]) # check no of hits found: nb_hits = len(l) # okay, return result set: set = HitSet() set.addlist(Numeric.array(l)) return set def search_unit_in_bibrec(day1, day2, type='creation_date'): """Return hitset of recIDs found that were either created or modified (see 'type' arg) from day1 until day2, inclusive. Does not pay attention to pattern, collection, anything. Useful to intersect later on with the 'real' query.""" set = HitSet() if type != "creation_date" and type != "modification_date": # type argument is invalid, so search for creation dates by default type = "creation_date" res = run_sql("SELECT id FROM bibrec WHERE %s>=%s AND %s<=%s" % (type, "%s", type, "%s"), (day1, day2)) l = [] for row in res: l.append(row[0]) set.addlist(Numeric.array(l)) return set def intersect_results_with_collrecs(req, hitset_in_any_collection, colls, ap=0, of="hb", verbose=0, ln=cdslang): """Return dict of hitsets given by intersection of hitset with the collection universes.""" _ = gettext_set_language(ln) # search stage 4: intersect with the collection universe: if verbose and of.startswith("h"): t1 = os.times()[4] results = {} results_nbhits = 0 for coll in colls: results[coll] = HitSet() results[coll]._set = Numeric.bitwise_and(hitset_in_any_collection._set, get_collection_reclist(coll)._set) results[coll].calculate_nbhits() results_nbhits += results[coll]._nbhits if results_nbhits == 0: # no hits found, try to search in Home: results_in_Home = HitSet() results_in_Home._set = Numeric.bitwise_and(hitset_in_any_collection._set, get_collection_reclist(cdsname)._set) results_in_Home.calculate_nbhits() if results_in_Home._nbhits > 0: # some hits found in Home, so propose this search: if of.startswith("h"): url = websearch_templates.build_search_url(req.argd, cc=cdsname, c=[]) print_warning(req, _("No match found in collection %(x_collection)s. Other public collections gave %(x_url_open)s%(x_nb_hits)d hits%(x_url_close)s.") %\ {'x_collection': '' + string.join([get_coll_i18nname(coll, ln) for coll in colls], ', ') + '', 'x_url_open': '' % (url), 'x_nb_hits': results_in_Home._nbhits, 'x_url_close': ''}) results = {} else: # no hits found in Home, recommend different search terms: if of.startswith("h"): print_warning(req, _("No public collection matched your query. " "If you were looking for a non-public document, please choose " "the desired restricted collection first.")) results = {} if verbose and of.startswith("h"): t2 = os.times()[4] print_warning(req, "Search stage 4: intersecting with collection universe gave %d hits." % results_nbhits) print_warning(req, "Search stage 4: execution took %.2f seconds." % (t2 - t1)) return results def intersect_results_with_hitset(req, results, hitset, ap=0, aptext="", of="hb"): """Return intersection of search 'results' (a dict of hitsets with collection as key) with the 'hitset', i.e. apply 'hitset' intersection to each collection within search 'results'. If the final 'results' set is to be empty, and 'ap' (approximate pattern) is true, and then print the `warningtext' and return the original 'results' set unchanged. If 'ap' is false, then return empty results set. """ if ap: results_ap = copy.deepcopy(results) else: results_ap = {} # will return empty dict in case of no hits found nb_total = 0 for coll in results.keys(): results[coll].intersect(hitset) results[coll].calculate_nbhits() nb_total += results[coll]._nbhits if nb_total == 0: if of.startswith("h"): print_warning(req, aptext) results = results_ap return results def create_similarly_named_authors_link_box(author_name, ln=cdslang): """Return a box similar to ``Not satisfied...'' one by proposing author searches for similar names. Namely, take AUTHOR_NAME and the first initial of the firstame (after comma) and look into author index whether authors with e.g. middle names exist. Useful mainly for CERN Library that sometimes contains name forms like Ellis-N, Ellis-Nick, Ellis-Nicolas all denoting the same person. The box isn't proposed if no similarly named authors are found to exist. """ # return nothing if not configured: if CFG_WEBSEARCH_CREATE_SIMILARLY_NAMED_AUTHORS_LINK_BOX == 0: return "" # return empty box if there is no initial: if re.match(r'[^ ,]+, [^ ]', author_name) is None: return "" # firstly find name comma initial: author_name_to_search = re.sub(r'^([^ ,]+, +[^ ,]).*$', '\\1', author_name) # secondly search for similar name forms: similar_author_names = {} for name in author_name_to_search, strip_accents(author_name_to_search): for tag in get_field_tags("author"): # deduce into which bibxxx table we will search: digit1, digit2 = int(tag[0]), int(tag[1]) bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) if len(tag) != 6 or tag[-1:]=='%': # only the beginning of field 't' is defined, so add wildcard character: query = "SELECT bx.value FROM %s AS bx WHERE bx.value LIKE '%s%%' AND bx.tag LIKE '%s%%'" \ % (bx, escape_string(name), tag) else: query = "SELECT bx.value FROM %s AS bx WHERE bx.value LIKE '%s%%' AND bx.tag='%s'" \ % (bx, escape_string(name), tag) res = run_sql(query) for row in res: similar_author_names[row[0]] = 1 # remove the original name and sort the list: try: del similar_author_names[author_name] except KeyError: pass # thirdly print the box: out = "" if similar_author_names: out_authors = similar_author_names.keys() out_authors.sort() tmp_authors = [] for out_author in out_authors: nbhits = get_nbhits_in_bibxxx(out_author, "author") if nbhits: tmp_authors.append((out_author, nbhits)) out += websearch_templates.tmpl_similar_author_names( authors=tmp_authors, ln=ln) return out def create_nearest_terms_box(urlargd, p, f, t='w', n=5, ln=cdslang, intro_text_p=True): """Return text box containing list of 'n' nearest terms above/below 'p' for the field 'f' for matching type 't' (words/phrases) in language 'ln'. Propose new searches according to `urlargs' with the new words. If `intro_text_p' is true, then display the introductory message, otherwise print only the nearest terms in the box content. """ # load the right message language _ = gettext_set_language(ln) out = "" nearest_terms = [] if not p: # sanity check p = "." # look for nearest terms: if t == 'w': nearest_terms = get_nearest_terms_in_bibwords(p, f, n, n) if not nearest_terms: return "%s %s." % (_("No words index available for"), get_field_i18nname(f, ln)) else: nearest_terms = get_nearest_terms_in_bibxxx(p, f, n, n) if not nearest_terms: return "%s %s." % (_("No phrase index available for"), get_field_i18nname(f, ln)) terminfo = [] for term in nearest_terms: if t == 'w': hits = get_nbhits_in_bibwords(term, f) else: hits = get_nbhits_in_bibxxx(term, f) argd = {} argd.update(urlargd) # check which fields contained the requested parameter, and replace it. for (px, fx) in ('p', 'f'), ('p1', 'f1'), ('p2', 'f2'), ('p3', 'f3'): if px in argd: if f == argd[fx] or f == "anyfield" or f == "": if string.find(argd[px], p) > -1: argd[px] = string.replace(argd[px], p, term) break else: if string.find(argd[px], f+':'+p) > -1: argd[px] = string.replace(argd[px], f+':'+p, f+':'+term) break elif string.find(argd[px], f+':"'+p+'"') > -1: argd[px] = string.replace(argd[px], f+':"'+p+'"', f+':"'+term+'"') break terminfo.append((term, hits, argd)) intro = "" if intro_text_p: # add full leading introductory text if f: intro = _("Search term %(x_term)s inside index %(x_index)s did not match any record. Nearest terms in any collection are:") % \ {'x_term': "" + cgi.escape(p.startswith("%") and p.endswith("%") and p[1:-1] or p) + "", 'x_index': "" + cgi.escape(get_field_i18nname(f, ln)) + ""} else: intro = _("Search term %s did not match any record. Nearest terms in any collection are:") % \ ("" + cgi.escape(p.startswith("%") and p.endswith("%") and p[1:-1] or p) + "") return websearch_templates.tmpl_nearest_term_box(p=p, ln=ln, f=f, terminfo=terminfo, intro=intro) def get_nearest_terms_in_bibwords(p, f, n_below, n_above): """Return list of +n -n nearest terms to word `p' in index for field `f'.""" nearest_words = [] # will hold the (sorted) list of nearest words to return # deduce into which bibwordsX table we will search: bibwordsX = "idxWORD%02dF" % get_index_id("anyfield") if f: index_id = get_index_id(f) if index_id: bibwordsX = "idxWORD%02dF" % index_id else: return nearest_words # firstly try to get `n' closest words above `p': query = "SELECT term FROM %s WHERE term<'%s' ORDER BY term DESC LIMIT %d" % (bibwordsX, escape_string(p), n_above) res = run_sql(query) for row in res: nearest_words.append(row[0]) nearest_words.reverse() # secondly insert given word `p': nearest_words.append(p) # finally try to get `n' closest words below `p': query = "SELECT term FROM %s WHERE term>'%s' ORDER BY term ASC LIMIT %d" % (bibwordsX, escape_string(p), n_below) res = run_sql(query) for row in res: nearest_words.append(row[0]) return nearest_words def get_nearest_terms_in_bibxxx(p, f, n_below, n_above): """Browse (-n_above, +n_below) closest bibliographic phrases for the given pattern p in the given field f, regardless of collection. Return list of [phrase1, phrase2, ... , phrase_n].""" ## determine browse field: if not f and string.find(p, ":") > 0: # does 'p' contain ':'? f, p = string.split(p, ":", 1) ## We are going to take max(n_below, n_above) as the number of ## values to ferch from bibXXx. This is needed to work around ## MySQL UTF-8 sorting troubles in 4.0.x. Proper solution is to ## use MySQL 4.1.x or our own idxPHRASE in the future. n_fetch = 2*max(n_below, n_above) ## construct 'tl' which defines the tag list (MARC tags) to search in: tl = [] if str(f[0]).isdigit() and str(f[1]).isdigit(): tl.append(f) # 'f' seems to be okay as it starts by two digits else: # deduce desired MARC tags on the basis of chosen 'f' tl = get_field_tags(f) ## start browsing to fetch list of hits: browsed_phrases = {} # will hold {phrase1: 1, phrase2: 1, ..., phraseN: 1} dict of browsed phrases (to make them unique) # always add self to the results set: browsed_phrases[p.startswith("%") and p.endswith("%") and p[1:-1] or p] = 1 for t in tl: # deduce into which bibxxx table we will search: digit1, digit2 = int(t[0]), int(t[1]) bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) # firstly try to get `n' closest phrases above `p': if len(t) != 6 or t[-1:]=='%': # only the beginning of field 't' is defined, so add wildcard character: query = "SELECT bx.value FROM %s AS bx WHERE bx.value<'%s' AND bx.tag LIKE '%s%%' ORDER BY bx.value DESC LIMIT %d" \ % (bx, escape_string(p), t, n_fetch) else: query = "SELECT bx.value FROM %s AS bx WHERE bx.value<'%s' AND bx.tag='%s' ORDER BY bx.value DESC LIMIT %d" \ % (bx, escape_string(p), t, n_fetch) res = run_sql(query) for row in res: browsed_phrases[row[0]] = 1 # secondly try to get `n' closest phrases equal to or below `p': if len(t) != 6 or t[-1:]=='%': # only the beginning of field 't' is defined, so add wildcard character: query = "SELECT bx.value FROM %s AS bx WHERE bx.value>='%s' AND bx.tag LIKE '%s%%' ORDER BY bx.value ASC LIMIT %d" \ % (bx, escape_string(p), t, n_fetch) else: query = "SELECT bx.value FROM %s AS bx WHERE bx.value>='%s' AND bx.tag='%s' ORDER BY bx.value ASC LIMIT %d" \ % (bx, escape_string(p), t, n_fetch) res = run_sql(query) for row in res: browsed_phrases[row[0]] = 1 # select first n words only: (this is needed as we were searching # in many different tables and so aren't sure we have more than n # words right; this of course won't be needed when we shall have # one ACC table only for given field): phrases_out = browsed_phrases.keys() phrases_out.sort(lambda x, y: cmp(string.lower(strip_accents(x)), string.lower(strip_accents(y)))) # find position of self: try: idx_p = phrases_out.index(p) except: idx_p = len(phrases_out)/2 # return n_above and n_below: return phrases_out[max(0, idx_p-n_above):idx_p+n_below] def get_nbhits_in_bibwords(word, f): """Return number of hits for word 'word' inside words index for field 'f'.""" out = 0 # deduce into which bibwordsX table we will search: bibwordsX = "idxWORD%02dF" % get_index_id("anyfield") if f: index_id = get_index_id(f) if index_id: bibwordsX = "idxWORD%02dF" % index_id else: return 0 if word: query = "SELECT hitlist FROM %s WHERE term='%s'" % (bibwordsX, escape_string(word)) res = run_sql(query) for hitlist in res: out += Numeric.sum(Numeric.loads(zlib.decompress(hitlist[0])).copy().astype(Numeric.Int)) return out def get_nbhits_in_bibxxx(p, f): """Return number of hits for word 'word' inside words index for field 'f'.""" ## determine browse field: if not f and string.find(p, ":") > 0: # does 'p' contain ':'? f, p = string.split(p, ":", 1) ## construct 'tl' which defines the tag list (MARC tags) to search in: tl = [] if str(f[0]).isdigit() and str(f[1]).isdigit(): tl.append(f) # 'f' seems to be okay as it starts by two digits else: # deduce desired MARC tags on the basis of chosen 'f' tl = get_field_tags(f) # start searching: recIDs = {} # will hold dict of {recID1: 1, recID2: 1, ..., } (unique recIDs, therefore) for t in tl: # deduce into which bibxxx table we will search: digit1, digit2 = int(t[0]), int(t[1]) bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) if len(t) != 6 or t[-1:]=='%': # only the beginning of field 't' is defined, so add wildcard character: query = """SELECT bibx.id_bibrec FROM %s AS bibx, %s AS bx WHERE bx.value='%s' AND bx.tag LIKE '%s%%' AND bibx.id_bibxxx=bx.id""" \ % (bibx, bx, escape_string(p), t) else: query = """SELECT bibx.id_bibrec FROM %s AS bibx, %s AS bx WHERE bx.value='%s' AND bx.tag='%s' AND bibx.id_bibxxx=bx.id""" \ % (bibx, bx, escape_string(p), t) res = run_sql(query) for row in res: recIDs[row[0]] = 1 return len(recIDs) def get_mysql_recid_from_aleph_sysno(sysno): """Returns DB's recID for ALEPH sysno passed in the argument (e.g. "002379334CER"). Returns None in case of failure.""" out = None query = "SELECT bb.id_bibrec FROM bibrec_bib97x AS bb, bib97x AS b WHERE b.value='%s' AND b.tag='970__a' AND bb.id_bibxxx=b.id" % \ (escape_string(sysno)) res = run_sql(query, None, 1) if res: out = res[0][0] return out def guess_primary_collection_of_a_record(recID): """Return primary collection name a record recid belongs to, by testing 980 identifier. May lead to bad guesses when a collection is defined dynamically bia dbquery. In that case, return 'cdsname'.""" out = cdsname dbcollids = get_fieldvalues(recID, "980__a") if dbcollids: dbquery = "collection:" + dbcollids[0] res = run_sql("SELECT name FROM collection WHERE dbquery=%s", (dbquery,)) if res: out = res[0][0] return out def get_tag_name(tag_value, prolog="", epilog=""): """Return tag name from the known tag value, by looking up the 'tag' table. Return empty string in case of failure. Example: input='100__%', output=first author'.""" out = "" res = run_sql("SELECT name FROM tag WHERE value=%s", (tag_value,)) if res: out = prolog + res[0][0] + epilog return out def get_fieldcodes(): """Returns a list of field codes that may have been passed as 'search options' in URL. Example: output=['subject','division'].""" out = [] res = run_sql("SELECT DISTINCT(code) FROM field") for row in res: out.append(row[0]) return out def get_field_tags(field): """Returns a list of MARC tags for the field code 'field'. Returns empty list in case of error. Example: field='author', output=['100__%','700__%'].""" out = [] query = """SELECT t.value FROM tag AS t, field_tag AS ft, field AS f WHERE f.code='%s' AND ft.id_field=f.id AND t.id=ft.id_tag ORDER BY ft.score DESC""" % field res = run_sql(query) for val in res: out.append(val[0]) return out def get_fieldvalues(recID, tag): """Return list of field values for field TAG inside record RECID.""" out = [] if tag == "001___": # we have asked for recID that is not stored in bibXXx tables out.append(str(recID)) else: # we are going to look inside bibXXx tables digits = tag[0:2] try: intdigits = int(digits) if intdigits < 0 or intdigits > 99: raise ValueError except ValueError: # invalid tag value asked for return [] bx = "bib%sx" % digits bibx = "bibrec_bib%sx" % digits query = "SELECT bx.value FROM %s AS bx, %s AS bibx " \ " WHERE bibx.id_bibrec='%s' AND bx.id=bibx.id_bibxxx AND bx.tag LIKE '%s' " \ " ORDER BY bibx.field_number, bx.tag ASC" % (bx, bibx, recID, tag) res = run_sql(query) for row in res: out.append(row[0]) return out def get_fieldvalues_alephseq_like(recID, tags_in): """Return buffer of ALEPH sequential-like textual format with fields found in the list TAGS_IN for record RECID.""" out = "" if type(tags_in) is not list: tags_in = [tags_in,] if len(tags_in) == 1 and len(tags_in[0]) == 6: ## case A: one concrete subfield asked, so print its value if found ## (use with care: can false you if field has multiple occurrences) out += string.join(get_fieldvalues(recID, tags_in[0]),"\n") else: ## case B: print our "text MARC" format; works safely all the time # find out which tags to output: dict_of_tags_out = {} if not tags_in: for i in range(0, 10): for j in range(0, 10): dict_of_tags_out["%d%d%%" % (i, j)] = 1 else: for tag in tags_in: if len(tag) == 0: for i in range(0, 10): for j in range(0, 10): dict_of_tags_out["%d%d%%" % (i, j)] = 1 elif len(tag) == 1: for j in range(0, 10): dict_of_tags_out["%s%d%%" % (tag, j)] = 1 elif len(tag) < 5: dict_of_tags_out["%s%%" % tag] = 1 elif tag >= 6: dict_of_tags_out[tag[0:5]] = 1 tags_out = dict_of_tags_out.keys() tags_out.sort() # search all bibXXx tables as needed: for tag in tags_out: digits = tag[0:2] try: intdigits = int(digits) if intdigits < 0 or intdigits > 99: raise ValueError except ValueError: # invalid tag value asked for continue if tag.startswith("001") or tag.startswith("00%"): if out: out += "\n" out += "%09d %s %d" % (recID, "001__", recID) bx = "bib%sx" % digits bibx = "bibrec_bib%sx" % digits query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, tag) res = run_sql(query) # go through fields: field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_": ind1 = "" if ind2 == "_": ind2 = "" # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if out: out += "\n" out += "%09d %s " % (recID, field[:5]) field_number_old = field_number field_old = field # print subfield value if field[0:2] == "00" and field[-1:] == "_": out += value else: out += "$$%s%s" % (field[-1:], value) return out def record_exists(recID): """Return 1 if record RECID exists. Return 0 if it doesn't exist. Return -1 if it exists but is marked as deleted.""" out = 0 query = "SELECT id FROM bibrec WHERE id='%s'" % recID res = run_sql(query, None, 1) if res: # record exists; now check whether it isn't marked as deleted: dbcollids = get_fieldvalues(recID, "980__%") if ("DELETED" in dbcollids) or (CFG_CERN_SITE and "DUMMY" in dbcollids): out = -1 # exists, but marked as deleted else: out = 1 # exists fine return out def record_public_p(recID): """Return 1 if the record is public, i.e. if it can be found in the Home collection. Return 0 otherwise. """ return get_collection_reclist(cdsname).contains(recID) def get_creation_date(recID, fmt="%Y-%m-%d"): "Returns the creation date of the record 'recID'." out = "" res = run_sql("SELECT DATE_FORMAT(creation_date,%s) FROM bibrec WHERE id=%s", (fmt, recID), 1) if res: out = res[0][0] return out def get_modification_date(recID, fmt="%Y-%m-%d"): "Returns the date of last modification for the record 'recID'." out = "" res = run_sql("SELECT DATE_FORMAT(modification_date,%s) FROM bibrec WHERE id=%s", (fmt, recID), 1) if res: out = res[0][0] return out def print_warning(req, msg, type='', prologue='
    ', epilogue='
    '): "Prints warning message and flushes output." if req and msg: req.write(websearch_templates.tmpl_print_warning( msg = msg, type = type, prologue = prologue, epilogue = epilogue, )) return def print_search_info(p, f, sf, so, sp, rm, of, ot, collection=cdsname, nb_found=-1, jrec=1, rg=10, as=0, ln=cdslang, p1="", p2="", p3="", f1="", f2="", f3="", m1="", m2="", m3="", op1="", op2="", sc=1, pl_in_url="", d1y=0, d1m=0, d1d=0, d2y=0, d2m=0, d2d=0, cpu_time=-1, middle_only=0): """Prints stripe with the information on 'collection' and 'nb_found' results and CPU time. Also, prints navigation links (beg/next/prev/end) inside the results set. If middle_only is set to 1, it will only print the middle box information (beg/netx/prev/end/etc) links. This is suitable for displaying navigation links at the bottom of the search results page.""" out = "" # sanity check: if jrec < 1: jrec = 1 if jrec > nb_found: jrec = max(nb_found-rg+1, 1) return websearch_templates.tmpl_print_search_info( ln = ln, weburl = weburl, collection = collection, as = as, collection_name = get_coll_i18nname(collection, ln), collection_id = get_colID(collection), middle_only = middle_only, rg = rg, nb_found = nb_found, sf = sf, so = so, rm = rm, of = of, ot = ot, p = p, f = f, p1 = p1, p2 = p2, p3 = p3, f1 = f1, f2 = f2, f3 = f3, m1 = m1, m2 = m2, m3 = m3, op1 = op1, op2 = op2, pl_in_url = pl_in_url, d1y = d1y, d1m = d1m, d1d = d1d, d2y = d2y, d2m = d2m, d2d = d2d, jrec = jrec, sc = sc, sp = sp, all_fieldcodes = get_fieldcodes(), cpu_time = cpu_time, ) def print_results_overview(req, colls, results_final_nb_total, results_final_nb, cpu_time, ln=cdslang, ec=[]): """Prints results overview box with links to particular collections below.""" out = "" new_colls = [] for coll in colls: new_colls.append({ 'id': get_colID(coll), 'code': coll, 'name': get_coll_i18nname(coll, ln), }) return websearch_templates.tmpl_print_results_overview( ln = ln, weburl = weburl, results_final_nb_total = results_final_nb_total, results_final_nb = results_final_nb, cpu_time = cpu_time, colls = new_colls, ec = ec, ) def sort_records(req, recIDs, sort_field='', sort_order='d', sort_pattern='', verbose=0, of='hb', ln=cdslang): """Sort records in 'recIDs' list according sort field 'sort_field' in order 'sort_order'. If more than one instance of 'sort_field' is found for a given record, try to choose that that is given by 'sort pattern', for example "sort by report number that starts by CERN-PS". Note that 'sort_field' can be field code like 'author' or MARC tag like '100__a' directly.""" _ = gettext_set_language(ln) ## check arguments: if not sort_field: return recIDs if len(recIDs) > CFG_WEBSEARCH_NB_RECORDS_TO_SORT: if of.startswith('h'): print_warning(req, _("Sorry, sorting is allowed on sets of up to %d records only. Using default sort order.") % CFG_WEBSEARCH_NB_RECORDS_TO_SORT, "Warning") return recIDs sort_fields = string.split(sort_field, ",") recIDs_dict = {} recIDs_out = [] ## first deduce sorting MARC tag out of the 'sort_field' argument: tags = [] for sort_field in sort_fields: if sort_field and str(sort_field[0:2]).isdigit(): # sort_field starts by two digits, so this is probably a MARC tag already tags.append(sort_field) else: # let us check the 'field' table query = """SELECT DISTINCT(t.value) FROM tag AS t, field_tag AS ft, field AS f WHERE f.code='%s' AND ft.id_field=f.id AND t.id=ft.id_tag ORDER BY ft.score DESC""" % sort_field res = run_sql(query) if res: for row in res: tags.append(row[0]) else: if of.startswith('h'): print_warning(req, _("Sorry, %s does not seem to be a valid sort option. Choosing title sort instead.") % sort_field, "Error") tags.append("245__a") if verbose >= 3: print_warning(req, "Sorting by tags %s." % tags) if sort_pattern: print_warning(req, "Sorting preferentially by %s." % sort_pattern) ## check if we have sorting tag defined: if tags: # fetch the necessary field values: for recID in recIDs: val = "" # will hold value for recID according to which sort vals = [] # will hold all values found in sorting tag for recID for tag in tags: vals.extend(get_fieldvalues(recID, tag)) if sort_pattern: # try to pick that tag value that corresponds to sort pattern bingo = 0 for v in vals: if v.lower().startswith(sort_pattern.lower()): # bingo! bingo = 1 val = v break if not bingo: # sort_pattern not present, so add other vals after spaces val = sort_pattern + " " + string.join(vals) else: # no sort pattern defined, so join them all together val = string.join(vals) val = strip_accents(val.lower()) # sort values regardless of accents and case if recIDs_dict.has_key(val): recIDs_dict[val].append(recID) else: recIDs_dict[val] = [recID] # sort them: recIDs_dict_keys = recIDs_dict.keys() recIDs_dict_keys.sort() # now that keys are sorted, create output array: for k in recIDs_dict_keys: for s in recIDs_dict[k]: recIDs_out.append(s) # ascending or descending? if sort_order == 'a': recIDs_out.reverse() # okay, we are done return recIDs_out else: # good, no sort needed return recIDs -def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=cdslang, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True, verbose=0): +def print_records(req, recIDs, jrec=1, rg=10, format='hb', ot='', ln=cdslang, relevances=[], relevances_prologue="(", relevances_epilogue="%%)", decompress=zlib.decompress, search_pattern='', print_records_prologue_p=True, print_records_epilogue_p=True, verbose=0, tab=''): """ Prints list of records 'recIDs' formatted accoding to 'format' in groups of 'rg' starting from 'jrec'. Assumes that the input list 'recIDs' is sorted in reverse order, so it counts records from tail to head. A value of 'rg=-9999' means to print all records: to be used with care. Print also list of RELEVANCES for each record (if defined), in between RELEVANCE_PROLOGUE and RELEVANCE_EPILOGUE. Print prologue and/or epilogue specific to 'format' if 'print_records_prologue_p' and/or print_records_epilogue_p' are True. """ # load the right message language _ = gettext_set_language(ln) # sanity checking: if req is None: return # get user id (for formatting based on priviledge) uid = getUid(req) if len(recIDs): nb_found = len(recIDs) if rg == -9999: # print all records rg = nb_found else: rg = abs(rg) if jrec < 1: # sanity checks jrec = 1 if jrec > nb_found: jrec = max(nb_found-rg+1, 1) # will print records from irec_max to irec_min excluded: irec_max = nb_found - jrec irec_min = nb_found - jrec - rg if irec_min < 0: irec_min = -1 if irec_max >= nb_found: irec_max = nb_found - 1 #req.write("%s:%d-%d" % (recIDs, irec_min, irec_max)) if format.startswith('x'): # print header if needed if print_records_prologue_p: print_records_prologue(req, format) # print records recIDs_to_print = [recIDs[x] for x in range(irec_max, irec_min, -1)] req.write(format_records(recIDs_to_print, format, ln=ln, search_pattern=search_pattern, record_separator="\n", uid=uid)) # print footer if needed if print_records_epilogue_p: print_records_epilogue(req, format) elif format.startswith('t') or str(format[0:3]).isdigit(): # we are doing plain text output: for irec in range(irec_max, irec_min, -1): x = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) req.write(x) if x: req.write('\n') elif format == 'excel': recIDs_to_print = [recIDs[x] for x in range(irec_max, irec_min, -1)] create_excel(recIDs=recIDs_to_print, req=req, ln=ln) else: # we are doing HTML output: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): # portfolio and on-the-fly formats: for irec in range(irec_max, irec_min, -1): req.write(print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid, verbose=verbose)) elif format.startswith("hb"): # HTML brief format: rows = [] for irec in range(irec_max, irec_min, -1): temp = { 'number' : jrec+irec_max-irec, 'recid' : recIDs[irec], } if relevances and relevances[irec]: temp['relevance'] = relevances[irec] else: temp['relevance'] = '' temp['record'] = print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) rows.append(temp) req.write(websearch_templates.tmpl_records_format_htmlbrief( ln = ln, weburl = weburl, rows = rows, relevances_prologue = relevances_prologue, relevances_epilogue = relevances_epilogue, )) else: # HTML detailed format: - # print other formatting choices: rows = [] for irec in range(irec_max, irec_min, -1): - temp = { - 'record' : print_record(recIDs[irec], format, ot, ln, search_pattern=search_pattern, uid=uid, verbose=verbose), - 'recid' : recIDs[irec], - 'creationdate': '', - 'modifydate' : '', - } - if record_exists(recIDs[irec])==1: - temp['creationdate'] = get_creation_date(recIDs[irec]) - temp['modifydate'] = get_modification_date(recIDs[irec]) - - if CFG_EXPERIMENTAL_FEATURES: + unordered_tabs = get_detailed_page_tabs(get_colID(guess_primary_collection_of_a_record(recIDs[irec])), + recIDs[irec]) + ordered_tabs_id = [(tab_id, values['order']) for (tab_id, values) in unordered_tabs.iteritems()] + ordered_tabs_id.sort(lambda x,y: cmp(x[1],y[1])) + tabs = [(unordered_tabs[tab_id]['label'], \ + '%s/record/%s/%s' % (weburl, recIDs[irec], tab_id), \ + tab_id == tab, + unordered_tabs[tab_id]['enabled']) \ + for (tab_id, order) in ordered_tabs_id + if unordered_tabs[tab_id]['visible'] == True] + + content = '' + # load content + if tab == 'statistics': + citinglist = None + citationhistory = None r = calculate_cited_by_list(recIDs[irec]) if r: - temp ['citinglist'] = r - temp ['citationhistory'] = create_citation_history_graph_and_box(recIDs[irec], ln) - + citinglist = r + citationhistory = create_citation_history_graph_and_box(recIDs[irec], ln) + r = calculate_co_cited_with_list(recIDs[irec]) + cociting = None if r: - temp ['cociting'] = r - - if CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS: + cociting = r r = calculate_reading_similarity_list(recIDs[irec], "downloads") - if r: - temp ['downloadsimilarity'] = r - temp ['downloadhistory'] = create_download_history_graph_and_box(recIDs[irec], ln) - - # Get comments and reviews for this record if exist - # FIXME: templatize me - if CFG_WEBCOMMENT_ALLOW_COMMENTS or CFG_WEBCOMMENT_ALLOW_REVIEWS: - from invenio.webcomment import get_first_comments_or_remarks - (comments, reviews) = get_first_comments_or_remarks(recID=recIDs[irec], ln=ln, - nb_comments=CFG_WEBCOMMENT_NB_COMMENTS_IN_DETAILED_VIEW, - nb_reviews=CFG_WEBCOMMENT_NB_REVIEWS_IN_DETAILED_VIEW) - temp['comments'] = comments - temp['reviews'] = reviews - - r = calculate_reading_similarity_list(recIDs[irec], "pageviews") - if r: temp ['viewsimilarity'] = r - - rows.append(temp) + downloadsimilarity = None + downloadhistory = None + #if r: + # downloadsimilarity = r + if CFG_BIBRANK_SHOW_DOWNLOAD_GRAPHS: + downloadhistory = create_download_history_graph_and_box(recIDs[irec], ln) + + r = calculate_reading_similarity_list(recIDs[irec], "pageviews") + viewsimilarity = None + if r: viewsimilarity = r + content = websearch_templates.tmpl_detailed_record_statistics(recIDs[irec], + ln, + citinglist=citinglist, + citationhistory=citationhistory, + cociting=cociting, + downloadsimilarity=downloadsimilarity, + downloadhistory=downloadhistory, + viewsimilarity=viewsimilarity) + req.write(webstyle_templates.detailed_record_container(content, + recIDs[irec], + tabs, + ln)) + elif tab == 'references': + content = format_record(recIDs[irec], 'HDREF', ln=ln, uid=uid, verbose=verbose) + req.write(webstyle_templates.detailed_record_container(content, + recIDs[irec], + tabs, + ln)) + else: + # Metadata tab + content = print_record(recIDs[irec], format, ot, ln, + search_pattern=search_pattern, + uid=uid, verbose=verbose) + + creationdate = None + modifydate = None + if record_exists(recIDs[irec]) == 1: + creationdate = get_creation_date(recIDs[irec]) + modifydate = get_modification_date(recIDs[irec]) + + content = websearch_templates.tmpl_detailed_record_metadata( + recID = recIDs[irec], + ln = ln, + format = format, + creationdate = creationdate, + modifydate = modifydate, + content = content) + + req.write(webstyle_templates.detailed_record_container(content, + recIDs[irec], + tabs, + ln, + creationdate, + modifydate)) + + if len(tabs) > 0: + # Add the mini box at bottom of the page + if CFG_WEBCOMMENT_ALLOW_REVIEWS: + from invenio.webcomment import get_mini_reviews + reviews = get_mini_reviews(recid = recIDs[irec], ln=ln) + else: + reviews = '' + actions = format_record(recIDs[irec], 'HDACT', ln=ln, uid=uid, verbose=verbose) + files = format_record(recIDs[irec], 'HDFILE', ln=ln, uid=uid, verbose=verbose) + req.write(webstyle_templates.detailed_record_mini_panel(recIDs[irec], + ln, + format, + files=files, + reviews=reviews, + actions=actions)) - req.write(websearch_templates.tmpl_records_format_other( - ln = ln, - weburl = weburl, - url_argd = req.argd, - rows = rows, - format = format, - )) else: print_warning(req, _("Use different search terms.")) def print_records_prologue(req, format): """ Print the appropriate prologue for list of records in the given format. """ prologue = "" # no prologue needed for HTML or Text formats if format.startswith('xm'): prologue = websearch_templates.tmpl_xml_marc_prologue() elif format.startswith('xn'): prologue = websearch_templates.tmpl_xml_nlm_prologue() elif format.startswith('xr'): prologue = websearch_templates.tmpl_xml_rss_prologue() elif format.startswith('x'): prologue = websearch_templates.tmpl_xml_default_prologue() req.write(prologue) def print_records_epilogue(req, format): """ Print the appropriate epilogue for list of records in the given format. """ epilogue = "" # no epilogue needed for HTML or Text formats if format.startswith('xm'): epilogue = websearch_templates.tmpl_xml_marc_epilogue() elif format.startswith('xn'): epilogue = websearch_templates.tmpl_xml_nlm_epilogue() elif format.startswith('xr'): epilogue = websearch_templates.tmpl_xml_rss_epilogue() elif format.startswith('x'): epilogue = websearch_templates.tmpl_xml_default_epilogue() req.write(epilogue) def print_record(recID, format='hb', ot='', ln=cdslang, decompress=zlib.decompress, search_pattern=None, uid=None, verbose=0): """Prints record 'recID' formatted accoding to 'format'.""" _ = gettext_set_language(ln) out = "" # sanity check: record_exist_p = record_exists(recID) if record_exist_p == 0: # doesn't exist return out # New Python BibFormat procedure for formatting # Old procedure follows further below # We must still check some special formats, but these # should disappear when BibFormat improves. if not (CFG_BIBFORMAT_USE_OLD_BIBFORMAT \ or format.lower().startswith('t') \ or format.lower().startswith('hm') \ or str(format[0:3]).isdigit() \ or ot): # Unspecified format is hd if format == '': format = 'hd' if record_exist_p == -1 and get_output_format_content_type(format) == 'text/html': # HTML output displays a default value for deleted records. # Other format have to deal with it. out += _("The record has been deleted.") else: out += call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) # at the end of HTML brief mode, print the "Detailed record" functionality: if format.lower().startswith('hb') and \ format.lower() != 'hb_p': out += websearch_templates.tmpl_print_record_brief_links( ln = ln, recID = recID, weburl = weburl ) return out # Old PHP BibFormat procedure for formatting # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " \n" out += "

    \n" for oai_id in get_fieldvalues(recID, CFG_OAI_ID_FIELD): out += " %s\n" % oai_id out += " %s\n" % get_modification_date(recID) out += "
    \n" out += " \n" if format.startswith("xm") or format == "marcxml": # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res and record_exist_p == 1: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format' -- they are not in "bibfmt" table; so fetch all the data from "bibXXx" tables: if format == "marcxml": out += """ \n""" out += " %d\n" % int(recID) elif format.startswith("xm"): out += """ \n""" out += " %d\n" % int(recID) if record_exist_p == -1: # deleted record, so display only OAI ID and 980: oai_ids = get_fieldvalues(recID, CFG_OAI_ID_FIELD) if oai_ids: out += "%s\n" % \ (CFG_OAI_ID_FIELD[0:3], CFG_OAI_ID_FIELD[3:4], CFG_OAI_ID_FIELD[4:5], CFG_OAI_ID_FIELD[5:6], oai_ids[0]) out += "DELETED\n" else: # controlfields query = "SELECT b.tag,b.value,bb.field_number FROM bib00x AS b, bibrec_bib00x AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '00%%' "\ "ORDER BY bb.field_number, b.tag ASC" % recID res = run_sql(query) for row in res: field, value = row[0], row[1] value = encode_for_xml(value) out += """ %s\n""" % \ (encode_for_xml(field[0:3]), value) # datafields i = 1 # Do not process bib00x and bibrec_bib00x, as # they are controlfields. So start at bib01x and # bibrec_bib00x (and set i = 0 at the end of # first loop) for digit1 in range(0, 10): for digit2 in range(i, 10): bx = "bib%d%dx" % (digit1, digit2) bibx = "bibrec_bib%d%dx" % (digit1, digit2) query = "SELECT b.tag,b.value,bb.field_number FROM %s AS b, %s AS bb "\ "WHERE bb.id_bibrec='%s' AND b.id=bb.id_bibxxx AND b.tag LIKE '%s%%' "\ "ORDER BY bb.field_number, b.tag ASC" % (bx, bibx, recID, str(digit1)+str(digit2)) res = run_sql(query) field_number_old = -999 field_old = "" for row in res: field, value, field_number = row[0], row[1], row[2] ind1, ind2 = field[3], field[4] if ind1 == "_" or ind1 == "": ind1 = " " if ind2 == "_" or ind2 == "": ind2 = " " # print field tag if field_number != field_number_old or field[:-1] != field_old[:-1]: if field_number_old != -999: out += """ \n""" out += """ \n""" % \ (encode_for_xml(field[0:3]), encode_for_xml(ind1), encode_for_xml(ind2)) field_number_old = field_number field_old = field # print subfield value value = encode_for_xml(value) out += """ %s\n""" % \ (encode_for_xml(field[-1:]), value) # all fields/subfields printed in this run, so close the tag: if field_number_old != -999: out += """ \n""" i = 0 # Next loop should start looking at bib%0 and bibrec_bib00x # we are at the end of printing the record: out += " \n" elif format == "xd" or format == "oai_dc": # XML Dublin Core format, possibly OAI -- select only some bibXXx fields: out += """ \n""" if record_exist_p == -1: out += "" else: for f in get_fieldvalues(recID, "041__a"): out += " %s\n" % f for f in get_fieldvalues(recID, "100__a"): out += " %s\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "700__a"): out += " %s\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "245__a"): out += " %s\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "65017a"): out += " %s\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "8564_u"): out += " %s\n" % encode_for_xml(f) for f in get_fieldvalues(recID, "520__a"): out += " %s\n" % encode_for_xml(f) out += " %s\n" % get_creation_date(recID) out += " \n" elif str(format[0:3]).isdigit(): # user has asked to print some fields only if format == "001": out += "%s\n" % (format, recID, format) else: vals = get_fieldvalues(recID, format) for val in vals: out += "%s\n" % (format, val, format) elif format.startswith('t'): ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += get_fieldvalues_alephseq_like(recID, ["001", CFG_OAI_ID_FIELD, "980"]) else: out += get_fieldvalues_alephseq_like(recID, ot) elif format == "hm": if record_exist_p == -1: out += "
    " + cgi.escape(get_fieldvalues_alephseq_like(recID, ["001", CFG_OAI_ID_FIELD, "980"])) + "
    " else: out += "
    " + cgi.escape(get_fieldvalues_alephseq_like(recID, ot)) + "
    " elif format.startswith("h") and ot: ## user directly asked for some tags to be displayed only if record_exist_p == -1: out += "
    " + get_fieldvalues_alephseq_like(recID, ["001", CFG_OAI_ID_FIELD, "980"]) + "
    " else: out += "
    " + get_fieldvalues_alephseq_like(recID, ot) + "
    " elif format == "hd": # HTML detailed format if record_exist_p == -1: out += _("The record has been deleted.") else: # look for detailed format existence: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query, None, 1) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly or use default format: out_record_in_format = call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) if out_record_in_format: out += out_record_in_format else: out += websearch_templates.tmpl_print_record_detailed( ln = ln, recID = recID, weburl = weburl, ) elif format.startswith("hb_") or format.startswith("hd_"): # underscore means that HTML brief/detailed formats should be called on-the-fly; suitable for testing formats if record_exist_p == -1: out += _("The record has been deleted.") else: out += call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) elif format.startswith("hx"): # BibTeX format, called on the fly: if record_exist_p == -1: out += _("The record has been deleted.") else: out += call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) elif format.startswith("hs"): # for citation/download similarity navigation links: if record_exist_p == -1: out += _("The record has been deleted.") else: out += '' % websearch_templates.build_search_url(recid=recID, ln=ln) # firstly, title: titles = get_fieldvalues(recID, "245__a") if titles: for title in titles: out += "%s" % title else: # usual title not found, try conference title: titles = get_fieldvalues(recID, "111__a") if titles: for title in titles: out += "%s" % title else: # just print record ID: out += "%s %d" % (get_field_i18nname("record ID", ln), recID) out += "" # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += " - %s" % authors[0] if len(authors) > 1: out += " et al" # thirdly publication info: publinfos = get_fieldvalues(recID, "773__s") if not publinfos: publinfos = get_fieldvalues(recID, "909C4s") if not publinfos: publinfos = get_fieldvalues(recID, "037__a") if not publinfos: publinfos = get_fieldvalues(recID, "088__a") if publinfos: out += " - %s" % publinfos[0] else: # fourthly publication year (if not publication info): years = get_fieldvalues(recID, "773__y") if not years: years = get_fieldvalues(recID, "909C4y") if not years: years = get_fieldvalues(recID, "260__c") if years: out += " (%s)" % years[0] else: # HTML brief format by default if record_exist_p == -1: out += _("The record has been deleted.") else: query = "SELECT value FROM bibfmt WHERE id_bibrec='%s' AND format='%s'" % (recID, format) res = run_sql(query) if res: # record 'recID' is formatted in 'format', so print it out += "%s" % decompress(res[0][0]) else: # record 'recID' is not formatted in 'format', so try to call BibFormat on the fly: or use default format: if CFG_WEBSEARCH_CALL_BIBFORMAT: out_record_in_format = call_bibformat(recID, format, ln, search_pattern=search_pattern, uid=uid, verbose=verbose) if out_record_in_format: out += out_record_in_format else: out += websearch_templates.tmpl_print_record_brief( ln = ln, recID = recID, weburl = weburl, ) else: out += websearch_templates.tmpl_print_record_brief( ln = ln, recID = recID, weburl = weburl, ) # at the end of HTML brief mode, print the "Detailed record" functionality: if format == 'hp' or format.startswith("hb_") or format.startswith("hd_"): pass # do nothing for portfolio and on-the-fly formats else: out += websearch_templates.tmpl_print_record_brief_links( ln = ln, recID = recID, weburl = weburl, ) # print record closing tags, if needed: if format == "marcxml" or format == "oai_dc": out += "
    \n" out += " \n" return out def encode_for_xml(s): "Encode special chars in string so that it would be XML-compliant." s = string.replace(s, '&', '&') s = string.replace(s, '<', '<') return s def call_bibformat(recID, format="HD", ln=cdslang, search_pattern=None, uid=None, verbose=0): """ Calls BibFormat and returns formatted record. BibFormat will decide by itself if old or new BibFormat must be used. """ keywords = [] if search_pattern is not None: units = create_basic_search_units(None, str(search_pattern), None) keywords = [unit[1] for unit in units if unit[0] != '-'] return format_record(recID, of=format, ln=ln, search_pattern=keywords, uid=uid, verbose=verbose) def log_query(hostname, query_args, uid=-1): """ Log query into the query and user_query tables. Return id_query or None in case of problems. """ id_query = None if uid > 0: # log the query only if uid is reasonable res = run_sql("SELECT id FROM query WHERE urlargs=%s", (query_args,), 1) try: id_query = res[0][0] except: id_query = run_sql("INSERT INTO query (type, urlargs) VALUES ('r', %s)", (query_args,)) if id_query: run_sql("INSERT INTO user_query (id_user, id_query, hostname, date) VALUES (%s, %s, %s, %s)", (uid, id_query, hostname, time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))) return id_query def log_query_info(action, p, f, colls, nb_records_found_total=-1): """Write some info to the log file for later analysis.""" try: log = open(logdir + "/search.log", "a") log.write(time.strftime("%Y%m%d%H%M%S#", time.localtime())) log.write(action+"#") log.write(p+"#") log.write(f+"#") for coll in colls[:-1]: log.write("%s," % coll) log.write("%s#" % colls[-1]) log.write("%d" % nb_records_found_total) log.write("\n") log.close() except: pass return def wash_url_argument(var, new_type): """Wash list argument into 'new_type', that can be 'list', 'str', or 'int'. Useful for washing mod_python passed arguments, that are all lists of strings (URL args may be multiple), but we sometimes want only to take the first value, and sometimes to represent it as string or numerical value.""" out = [] if new_type == 'list': # return lst if type(var) is list: out = var else: out = [var] elif new_type == 'str': # return str if type(var) is list: try: out = "%s" % var[0] except: out = "" elif type(var) is str: out = var else: out = "%s" % var elif new_type == 'int': # return int if type(var) is list: try: out = string.atoi(var[0]) except: out = 0 elif type(var) is int: out = var elif type(var) is str: try: out = string.atoi(var) except: out = 0 else: out = 0 return out ### CALLABLES def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg=10, sf="", so="d", sp="", rm="", of="id", ot="", as=0, p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc=0, jrec=0, recid=-1, recidb=-1, sysno="", id=-1, idb=-1, sysnb="", action="", - d1y=0, d1m=0, d1d=0, d2y=0, d2m=0, d2d=0, verbose=0, ap=0, ln=cdslang, ec = None): + d1y=0, d1m=0, d1d=0, d2y=0, d2m=0, d2d=0, verbose=0, ap=0, ln=cdslang, ec = None, tab=''): """Perform search or browse request, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page. The arguments are as follows: req - mod_python Request class instance. cc - current collection (e.g. "ATLAS"). The collection the user started to search/browse from. c - collectin list (e.g. ["Theses", "Books"]). The collections user may have selected/deselected when starting to search from 'cc'. p - pattern to search for (e.g. "ellis and muon or kaon"). f - field to search within (e.g. "author"). rg - records in groups of (e.g. "10"). Defines how many hits per collection in the search results page are displayed. sf - sort field (e.g. "title"). so - sort order ("a"=ascending, "d"=descending). sp - sort pattern (e.g. "CERN-") -- in case there are more values in a sort field, this argument tells which one to prefer rm - ranking method (e.g. "jif"). Defines whether results should be ranked by some known ranking method. of - output format (e.g. "hb"). Usually starting "h" means HTML output (and "hb" for HTML brief, "hd" for HTML detailed), "x" means XML output, "t" means plain text output, "id" means no output at all but to return list of recIDs found. (Suitable for high-level API.) ot - output only these MARC tags (e.g. "100,700,909C0b"). Useful if only some fields are to be shown in the output, e.g. for library to control some fields. as - advanced search ("0" means no, "1" means yes). Whether search was called from within the advanced search interface. p1 - first pattern to search for in the advanced search interface. Much like 'p'. f1 - first field to search within in the advanced search interface. Much like 'f'. m1 - first matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). op1 - first operator, to join the first and the second unit in the advanced search interface. ("a" add, "o" or, "n" not). p2 - second pattern to search for in the advanced search interface. Much like 'p'. f2 - second field to search within in the advanced search interface. Much like 'f'. m2 - second matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). op2 - second operator, to join the second and the third unit in the advanced search interface. ("a" add, "o" or, "n" not). p3 - third pattern to search for in the advanced search interface. Much like 'p'. f3 - third field to search within in the advanced search interface. Much like 'f'. m3 - third matching type in the advanced search interface. ("a" all of the words, "o" any of the words, "e" exact phrase, "p" partial phrase, "r" regular expression). sc - split by collection ("0" no, "1" yes). Governs whether we want to present the results in a single huge list, or splitted by collection. jrec - jump to record (e.g. "234"). Used for navigation inside the search results. recid - display record ID (e.g. "20000"). Do not search/browse but go straight away to the Detailed record page for the given recID. recidb - display record ID bis (e.g. "20010"). If greater than 'recid', then display records from recid to recidb. Useful for example for dumping records from the database for reformatting. sysno - display old system SYS number (e.g. ""). If you migrate to CDS Invenio from another system, and store your old SYS call numbers, you can use them instead of recid if you wish so. id - the same as recid, in case recid is not set. For backwards compatibility. idb - the same as recid, in case recidb is not set. For backwards compatibility. sysnb - the same as sysno, in case sysno is not set. For backwards compatibility. action - action to do. "SEARCH" for searching, "Browse" for browsing. Default is to search. d1y - first date year (e.g. "1998"). Useful for search limits on creation date. d1m - first date month (e.g. "08"). Useful for search limits on creation date. d1d - first date day (e.g. "23"). Useful for search limits on creation date. d2y - second date year (e.g. "1998"). Useful for search limits on creation date. d2m - second date month (e.g. "09"). Useful for search limits on creation date. d2d - second date day (e.g. "02"). Useful for search limits on creation date. verbose - verbose level (0=min, 9=max). Useful to print some internal information on the searching process in case something goes wrong. ap - alternative patterns (0=no, 1=yes). In case no exact match is found, the search engine can try alternative patterns e.g. to replace non-alphanumeric characters by a boolean query. ap defines if this is wanted. ln - language of the search interface (e.g. "en"). Useful for internationalization. ec - List of external search engines enabled. """ selected_external_collections_infos = None # wash all arguments requiring special care try: (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) # which colls to search and to display? except InvenioWebSearchUnknownCollectionError, exc: colname = exc.colname if of.startswith("h"): page_start(req, of, cc, as, ln, getUid(req), websearch_templates.tmpl_collection_not_found_page_title(colname, ln)) req.write(websearch_templates.tmpl_collection_not_found_page_body(colname, ln)) return page_end(req, of, ln) elif of == "id": return [] else: return page_end(req, of, ln) p = wash_pattern(p) f = wash_field(f) p1 = wash_pattern(p1) f1 = wash_field(f1) p2 = wash_pattern(p2) f2 = wash_field(f2) p3 = wash_pattern(p3) f3 = wash_field(f3) day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) _ = gettext_set_language(ln) # backwards compatibility: id, idb, sysnb -> recid, recidb, sysno (if applicable) if sysnb != "" and sysno == "": sysno = sysnb if id > 0 and recid == -1: recid = id if idb > 0 and recidb == -1: recidb = idb # TODO deduce passed search limiting criterias (if applicable) pl, pl_in_url = "", "" # no limits by default if action != "browse" and req and req.args: # we do not want to add options while browsing or while calling via command-line fieldargs = cgi.parse_qs(req.args) for fieldcode in get_fieldcodes(): if fieldargs.has_key(fieldcode): for val in fieldargs[fieldcode]: pl += "+%s:\"%s\" " % (fieldcode, val) pl_in_url += "&%s=%s" % (urllib.quote(fieldcode), urllib.quote(val)) # deduce recid from sysno argument (if applicable): if sysno: # ALEPH SYS number was passed, so deduce DB recID for the record: recid = get_mysql_recid_from_aleph_sysno(sysno) # deduce collection we are in (if applicable): if recid > 0: cc = guess_primary_collection_of_a_record(recid) # deduce user id (if applicable): try: uid = getUid(req) except: uid = 0 ## 0 - start output if recid > 0: ## 1 - detailed record display title, description, keywords = \ websearch_templates.tmpl_record_page_header_content(req, recid, ln) - page_start(req, of, cc, as, ln, uid, title, description, keywords) + page_start(req, of, cc, as, ln, uid, title, description, keywords, recid, tab) # Default format is hb but we are in detailed -> change 'of' if of == "hb": of = "hd" if record_exists(recid): if recidb <= recid: # sanity check recidb = recid + 1 if of == "id": return [recidx for recidx in range(recid, recidb) if record_exists(recidx)] else: - print_records(req, range(recid, recidb), -1, -9999, of, ot, ln, search_pattern=p, verbose=verbose) + print_records(req, range(recid, recidb), -1, -9999, of, ot, ln, search_pattern=p, verbose=verbose, tab=tab) if req and of.startswith("h"): # register detailed record page view event client_ip_address = str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) register_page_view_event(recid, uid, client_ip_address) else: # record does not exist if of == "id": return [] elif of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") elif action == "browse": ## 2 - browse needed page_start(req, of, cc, as, ln, uid, _("Browse")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, jrec, ec, action)) try: if as == 1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else: browse_pattern(req, colls_to_search, p, f, rg) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) return page_end(req, of, ln) elif rm and p.startswith("recid:"): ## 3-ter - similarity search needed page_start(req, of, cc, as, ln, uid, _("Search Results")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, jrec, ec, action)) if record_exists(p[6:]) != 1: # record does not exist if of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") if of == "id": return [] else: # record well exists, so find similar ones to it t1 = os.times()[4] results_similar_recIDs, results_similar_relevances, results_similar_relevances_prologue, results_similar_relevances_epilogue, results_similar_comments = \ rank_records(rm, 0, get_collection_reclist(cdsname), string.split(p), verbose) if results_similar_recIDs: t2 = os.times()[4] cpu_time = t2 - t1 if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, rm, of, ot, cdsname, len(results_similar_recIDs), jrec, rg, as, ln, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, sc, pl_in_url, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) print_warning(req, results_similar_comments) print_records(req, results_similar_recIDs, jrec, rg, of, ot, ln, results_similar_relevances, results_similar_relevances_prologue, results_similar_relevances_epilogue, search_pattern=p, verbose=verbose) elif of=="id": return results_similar_recIDs else: # rank_records failed and returned some error message to display: if of.startswith("h"): print_warning(req, results_similar_relevances_prologue) print_warning(req, results_similar_relevances_epilogue) print_warning(req, results_similar_comments) if of == "id": return [] elif CFG_EXPERIMENTAL_FEATURES and p.startswith("cocitedwith:"): ## 3-terter - cited by search needed page_start(req, of, cc, as, ln, uid, _("Search Results")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, jrec, ec, action)) recID = p[12:] if record_exists(recID) != 1: # record does not exist if of.startswith("h"): print_warning(req, "Requested record does not seem to exist.") if of == "id": return [] else: # record well exists, so find co-cited ones: t1 = os.times()[4] results_cocited_recIDs = map(lambda x: x[0], calculate_co_cited_with_list(int(recID))) if results_cocited_recIDs: t2 = os.times()[4] cpu_time = t2 - t1 if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, rm, of, ot, cdsname, len(results_cocited_recIDs), jrec, rg, as, ln, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, sc, pl_in_url, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) print_records(req, results_cocited_recIDs, jrec, rg, of, ot, ln, search_pattern=p, verbose=verbose) elif of=="id": return results_cocited_recIDs else: # cited rank_records failed and returned some error message to display: if of.startswith("h"): print_warning(req, "nothing found") if of == "id": return [] else: ## 3 - common search needed page_start(req, of, cc, as, ln, uid, _("Search Results")) if of.startswith("h"): req.write(create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, jrec, ec, action)) t1 = os.times()[4] results_in_any_collection = HitSet() if as == 1 or (p1 or p2 or p3): ## 3A - advanced search try: results_in_any_collection = search_pattern(req, p1, f1, m1, ap=ap, of=of, verbose=verbose, ln=ln) if results_in_any_collection._nbhits == 0: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if p2: results_tmp = search_pattern(req, p2, f2, m2, ap=ap, of=of, verbose=verbose, ln=ln) if op1 == "a": # add results_in_any_collection.intersect(results_tmp) elif op1 == "o": # or results_in_any_collection.union(results_tmp) elif op1 == "n": # not results_in_any_collection.difference(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op1, "Error") results_in_any_collection.calculate_nbhits() if results_in_any_collection._nbhits == 0: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if p3: results_tmp = search_pattern(req, p3, f3, m3, ap=ap, of=of, verbose=verbose, ln=ln) if op2 == "a": # add results_in_any_collection.intersect(results_tmp) elif op2 == "o": # or results_in_any_collection.union(results_tmp) elif op2 == "n": # not results_in_any_collection.difference(results_tmp) else: if of.startswith("h"): print_warning(req, "Invalid set operation %s." % op2, "Error") results_in_any_collection.calculate_nbhits() except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) else: ## 3B - simple search try: results_in_any_collection = search_pattern(req, p, f, ap=ap, of=of, verbose=verbose, ln=ln) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if results_in_any_collection._nbhits == 0: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) # search_cache_key = p+"@"+f+"@"+string.join(colls_to_search,",") # if search_cache.has_key(search_cache_key): # is the result in search cache? # results_final = search_cache[search_cache_key] # else: # results_final = search_pattern(req, p, f, colls_to_search) # search_cache[search_cache_key] = results_final # if len(search_cache) > CFG_WEBSEARCH_SEARCH_CACHE_SIZE: # is the cache full? (sanity cleaning) # search_cache.clear() # search stage 4: intersection with collection universe: try: results_final = intersect_results_with_collrecs(req, results_in_any_collection, colls_to_search, ap, of, verbose, ln) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if results_final == {}: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) # search stage 5: apply search option limits and restrictions: if day1 != "": try: results_final = intersect_results_with_hitset(req, results_final, search_unit_in_bibrec(day1, day2), ap, aptext= _("No match within your time limits, " "discarding this condition..."), of=of) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if results_final == {}: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if pl: pl = wash_pattern(pl) try: results_final = intersect_results_with_hitset(req, results_final, search_pattern(req, pl, ap=0, ln=ln), ap, aptext=_("No match within your search limits, " "discarding this condition..."), of=of) except: if of.startswith("h"): req.write(create_error_box(req, verbose=verbose, ln=ln)) perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) if results_final == {}: if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) t2 = os.times()[4] cpu_time = t2 - t1 ## search stage 6: display results: results_final_nb_total = 0 results_final_nb = {} # will hold number of records found in each collection # (in simple dict to display overview more easily) for coll in results_final.keys(): results_final_nb[coll] = results_final[coll]._nbhits #results_final_nb_total += results_final_nb[coll] # Now let us calculate results_final_nb_total more precisely, # in order to get the total number of "distinct" hits across # searched collections; this is useful because a record might # have been attributed to more than one primary collection; so # we have to avoid counting it multiple times. The price to # pay for this accuracy of results_final_nb_total is somewhat # increased CPU time. if results_final.keys() == 1: # only one collection; no need to union them results_final_for_all_selected_colls = results_final.values()[0] results_final_nb_total = results_final_nb.values()[0] else: # okay, some work ahead to union hits across collections: results_final_for_all_selected_colls = HitSet() for coll in results_final.keys(): results_final_for_all_selected_colls.union(results_final[coll]) results_final_for_all_selected_colls.calculate_nbhits() results_final_nb_total = results_final_for_all_selected_colls._nbhits if results_final_nb_total == 0: if of.startswith('h'): print_warning(req, "No match found, please enter different search terms.") else: # yes, some hits found: good! # collection list may have changed due to not-exact-match-found policy so check it out: for coll in results_final.keys(): if coll not in colls_to_search: colls_to_search.append(coll) # print results overview: if of == "id": # we have been asked to return list of recIDs recIDs = results_final_for_all_selected_colls.items().tolist() if sf: # do we have to sort? recIDs = sort_records(req, recIDs, sf, so, sp, verbose, of) elif rm: # do we have to rank? results_final_for_all_colls_rank_records_output = rank_records(rm, 0, results_final_for_all_colls, string.split(p) + string.split(p1) + string.split(p2) + string.split(p3), verbose) if results_final_for_all_colls_rank_records_output[0]: recIDs = results_final_for_all_colls_rank_records_output[0] return recIDs elif of.startswith("h"): req.write(print_results_overview(req, colls_to_search, results_final_nb_total, results_final_nb, cpu_time, ln, ec)) selected_external_collections_infos = print_external_results_overview(req, cc, [p, p1, p2, p3], f, ec, verbose, ln) # print records: if len(colls_to_search)>1: cpu_time = -1 # we do not want to have search time printed on each collection print_records_prologue(req, of) for coll in colls_to_search: if results_final.has_key(coll) and results_final[coll]._nbhits: if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, rm, of, ot, coll, results_final_nb[coll], jrec, rg, as, ln, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, sc, pl_in_url, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) results_final_recIDs = results_final[coll].items() results_final_relevances = [] results_final_relevances_prologue = "" results_final_relevances_epilogue = "" if sf: # do we have to sort? results_final_recIDs = sort_records(req, results_final_recIDs, sf, so, sp, verbose, of) elif rm: # do we have to rank? results_final_recIDs_ranked, results_final_relevances, results_final_relevances_prologue, results_final_relevances_epilogue, results_final_comments = \ rank_records(rm, 0, results_final[coll], string.split(p) + string.split(p1) + string.split(p2) + string.split(p3), verbose) if of.startswith("h"): print_warning(req, results_final_comments) if results_final_recIDs_ranked: results_final_recIDs = results_final_recIDs_ranked else: # rank_records failed and returned some error message to display: print_warning(req, results_final_relevances_prologue) print_warning(req, results_final_relevances_epilogue) print_records(req, results_final_recIDs, jrec, rg, of, ot, ln, results_final_relevances, results_final_relevances_prologue, results_final_relevances_epilogue, search_pattern=p, print_records_prologue_p=False, print_records_epilogue_p=False, verbose=verbose) if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, rm, of, ot, coll, results_final_nb[coll], jrec, rg, as, ln, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, sc, pl_in_url, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time, 1)) print_records_epilogue(req, of) if f == "author" and of.startswith("h"): req.write(create_similarly_named_authors_link_box(p, ln)) # log query: try: id_query = log_query(req.get_remote_host(), req.args, uid) if of.startswith("h") and id_query: # Alert/RSS teaser: req.write(websearch_templates.tmpl_alert_rss_teaser_box_for_query(id_query, ln=ln)) except: # do not log query if req is None (used by CLI interface) pass log_query_info("ss", p, f, colls_to_search, results_final_nb_total) # External searches if of.startswith("h"): perform_external_collection_search(req, cc, [p, p1, p2, p3], f, ec, verbose, ln, selected_external_collections_infos) return page_end(req, of, ln) def perform_request_cache(req, action="show"): """Manipulates the search engine cache.""" global search_cache global collection_reclist_cache global collection_reclist_cache_timestamp global field_i18nname_cache global field_i18nname_cache_timestamp global collection_i18nname_cache global collection_i18nname_cache_timestamp req.content_type = "text/html" req.send_http_header() out = "" out += "

    Search Cache

    " # clear cache if requested: if action == "clear": search_cache = {} collection_reclist_cache = create_collection_reclist_cache() # show collection reclist cache: out += "

    Collection reclist cache

    " out += "- collection table last updated: %s" % get_table_update_time('collection') out += "
    - reclist cache timestamp: %s" % collection_reclist_cache_timestamp out += "
    - reclist cache contents:" out += "
    " for coll in collection_reclist_cache.keys(): if collection_reclist_cache[coll]: out += "%s (%d)
    " % (coll, get_collection_reclist(coll)._nbhits) out += "
    " # show search cache: out += "

    Search Cache

    " out += "
    " if len(search_cache): out += """
    """ out += "" % \ ("Pattern", "Field", "Collection", "Number of Hits") for search_cache_key in search_cache.keys(): p, f, c = string.split(search_cache_key, "@", 2) # find out about length of cached data: l = 0 for coll in search_cache[search_cache_key]: l += search_cache[search_cache_key][coll]._nbhits out += "" % (p, f, c, l) out += "
    %s%s%s%s
    %s%s%s%d
    " else: out += "

    Search cache is empty." out += "" out += """

    clear cache""" % weburl # show field i18nname cache: out += "

    Field I18N names cache

    " out += "- fieldname table last updated: %s" % get_table_update_time('fieldname') out += "
    - i18nname cache timestamp: %s" % field_i18nname_cache_timestamp out += "
    - i18nname cache contents:" out += "
    " for field in field_i18nname_cache.keys(): for ln in field_i18nname_cache[field].keys(): out += "%s, %s = %s
    " % (field, ln, field_i18nname_cache[field][ln]) out += "
    " # show collection i18nname cache: out += "

    Collection I18N names cache

    " out += "- collectionname table last updated: %s" % get_table_update_time('collectionname') out += "
    - i18nname cache timestamp: %s" % collection_i18nname_cache_timestamp out += "
    - i18nname cache contents:" out += "
    " for coll in collection_i18nname_cache.keys(): for ln in collection_i18nname_cache[coll].keys(): out += "%s, %s = %s
    " % (coll, ln, collection_i18nname_cache[coll][ln]) out += "
    " req.write("") req.write(out) req.write("") return "\n" def perform_request_log(req, date=""): """Display search log information for given date.""" req.content_type = "text/html" req.send_http_header() req.write("") req.write("

    Search Log

    ") if date: # case A: display stats for a day yyyymmdd = string.atoi(date) req.write("

    Date: %d

    " % yyyymmdd) req.write("""""") req.write("" % ("No.", "Time", "Pattern", "Field", "Collection", "Number of Hits")) # read file: p = os.popen("grep ^%d %s/search.log" % (yyyymmdd, logdir), 'r') lines = p.readlines() p.close() # process lines: i = 0 for line in lines: try: datetime, as, p, f, c, nbhits = string.split(line,"#") i += 1 req.write("" \ % (i, datetime[8:10], datetime[10:12], datetime[12:], p, f, c, nbhits)) except: pass # ignore eventual wrong log lines req.write("
    %s%s%s%s%s%s
    #%d%s:%s:%s%s%s%s%s
    ") else: # case B: display summary stats per day yyyymm01 = int(time.strftime("%Y%m01", time.localtime())) yyyymmdd = int(time.strftime("%Y%m%d", time.localtime())) req.write("""""") req.write("" % ("Day", "Number of Queries")) for day in range(yyyymm01, yyyymmdd + 1): p = os.popen("grep -c ^%d %s/search.log" % (day, logdir), 'r') for line in p.readlines(): req.write("""""" % \ (day, weburl, day, line)) p.close() req.write("
    %s%s
    %s%s
    ") req.write("") return "\n" def profile(p="", f="", c=cdsname): """Profile search time.""" import profile import pstats profile.run("perform_request_search(p='%s',f='%s', c='%s')" % (p, f, c), "perform_request_search_profile") p = pstats.Stats("perform_request_search_profile") p.strip_dirs().sort_stats("cumulative").print_stats() return 0 ## test cases: #print wash_colls(cdsname,"Library Catalogue", 0) #print wash_colls("Periodicals & Progress Reports",["Periodicals","Progress Reports"], 0) #print wash_field("wau") #print print_record(20,"tm","001,245") #print create_opft_search_units(None, "PHE-87-13","reportnumber") #print ":"+wash_pattern("* and % doo * %")+":\n" #print ":"+wash_pattern("*")+":\n" #print ":"+wash_pattern("ellis* ell* e*%")+":\n" #print run_sql("SELECT name,dbquery from collection") #print get_index_id("author") #print get_coll_ancestors("Theses") #print get_coll_sons("Articles & Preprints") #print get_coll_real_descendants("Articles & Preprints") #print get_collection_reclist("Theses") #print log(sys.stdin) #print search_unit_in_bibrec('2002-12-01','2002-12-12') #print type(wash_url_argument("-1",'int')) #print get_nearest_terms_in_bibxxx("ellis", "author", 5, 5) #print call_bibformat(68, "HB_FLY") #print create_collection_i18nname_cache() #print get_fieldvalues(10, "980__a") #print get_fieldvalues_alephseq_like(10,"001___") #print get_fieldvalues_alephseq_like(10,"980__a") #print get_fieldvalues_alephseq_like(10,"foo") #print get_fieldvalues_alephseq_like(10,"-1") #print get_fieldvalues_alephseq_like(10,"99") #print get_fieldvalues_alephseq_like(10,["001", "980"]) ## profiling: #profile("of the this") #print perform_request_search(p="ellis") diff --git a/modules/websearch/lib/websearch_templates.py b/modules/websearch/lib/websearch_templates.py index 368a7ecfe..94e07c260 100644 --- a/modules/websearch/lib/websearch_templates.py +++ b/modules/websearch/lib/websearch_templates.py @@ -1,2578 +1,2555 @@ # -*- coding: utf-8 -*- ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # pylint: disable-msg=C0301 __revision__ = "$Id$" import urllib import time import cgi import gettext import string import locale from invenio.config import \ CFG_WEBSEARCH_ADVANCEDSEARCH_PATTERN_BOX_WIDTH, \ CFG_WEBSEARCH_AUTHOR_ET_AL_THRESHOLD, \ CFG_WEBSEARCH_USE_ALEPH_SYSNOS, \ cdslang, \ cdsname, \ cdsnameintl, \ version, \ weburl, \ supportemail from invenio.dbquery import run_sql from invenio.messages import gettext_set_language from invenio.search_engine_config import CFG_EXPERIMENTAL_FEATURES from invenio.urlutils import make_canonical_urlargd, drop_default_urlargd, create_html_link, create_url from invenio.htmlutils import nmtoken_from_string from invenio.websearch_external_collections import external_collection_get_state def get_fieldvalues(recID, tag): """Return list of field values for field TAG inside record RECID. FIXME: should be imported commonly for search_engine too.""" out = [] if tag == "001___": # we have asked for recID that is not stored in bibXXx tables out.append(str(recID)) else: # we are going to look inside bibXXx tables digit = tag[0:2] bx = "bib%sx" % digit bibx = "bibrec_bib%sx" % digit query = "SELECT bx.value FROM %s AS bx, %s AS bibx WHERE bibx.id_bibrec='%s' AND bx.id=bibx.id_bibxxx AND bx.tag LIKE '%s'" \ "ORDER BY bibx.field_number, bx.tag ASC" % (bx, bibx, recID, tag) res = run_sql(query) for row in res: out.append(row[0]) return out class Template: # This dictionary maps CDS Invenio language code to locale codes (ISO 639) tmpl_localemap = { 'bg': 'bg_BG', 'ca': 'ca_ES', 'de': 'de_DE', 'el': 'el_GR', 'en': 'en_US', 'es': 'es_ES', 'pt': 'pt_BR', 'fr': 'fr_FR', 'it': 'it_IT', 'ru': 'ru_RU', 'sk': 'sk_SK', 'cs': 'cs_CZ', 'no': 'no_NO', 'sv': 'sv_SE', 'uk': 'uk_UA', 'ja': 'ja_JA', 'pl': 'pl_PL', 'hr': 'hr_HR', 'zh_CN': 'zh_CN', 'zh_TW': 'zh_TW', } tmpl_default_locale = "en_US" # which locale to use by default, useful in case of failure # Type of the allowed parameters for the web interface for search results search_results_default_urlargd = { 'cc': (str, cdsname), 'c': (list, []), 'p': (str, ""), 'f': (str, ""), 'rg': (int, 10), 'sf': (str, ""), 'so': (str, "d"), 'sp': (str, ""), 'rm': (str, ""), 'of': (str, "hb"), 'ot': (list, []), 'as': (int, 0), 'p1': (str, ""), 'f1': (str, ""), 'm1': (str, ""), 'op1':(str, ""), 'p2': (str, ""), 'f2': (str, ""), 'm2': (str, ""), 'op2':(str, ""), 'p3': (str, ""), 'f3': (str, ""), 'm3': (str, ""), 'sc': (int, 0), 'jrec': (int, 0), 'recid': (int, -1), 'recidb': (int, -1), 'sysno': (str, ""), 'id': (int, -1), 'idb': (int, -1), 'sysnb': (str, ""), 'action': (str, "search"), 'action_search': (str, ""), 'action_browse': (str, ""), 'd1y': (int, 0), 'd1m': (int, 0), 'd1d': (int, 0), 'd2y': (int, 0), 'd2m': (int, 0), 'd2d': (int, 0), 'ap': (int, 1), 'verbose': (int, 0), 'ec': (list, []), } # ...and for search interfaces search_interface_default_urlargd = { 'as': (int, 0), 'verbose': (int, 0)} def build_search_url(self, known_parameters={}, **kargs): """ Helper for generating a canonical search url. 'known_parameters' is the list of query parameters you inherit from your current query. You can then pass keyword arguments to modify this query. build_search_url(known_parameters, of="xm") The generated URL is absolute. """ parameters = {} parameters.update(known_parameters) parameters.update(kargs) # Now, we only have the arguments which have _not_ their default value parameters = drop_default_urlargd(parameters, self.search_results_default_urlargd) # Asking for a recid? Return a /record/ URL if 'recid' in parameters: target = "%s/record/%d" % (weburl, parameters['recid']) del parameters['recid'] target += make_canonical_urlargd(parameters, self.search_results_default_urlargd) return target return "%s/search%s" % (weburl, make_canonical_urlargd(parameters, self.search_results_default_urlargd)) def build_search_interface_url(self, known_parameters={}, **kargs): """ Helper for generating a canonical search interface URL.""" parameters = {} parameters.update(known_parameters) parameters.update(kargs) c = parameters['c'] del parameters['c'] # Now, we only have the arguments which have _not_ their default value if c and c != cdsname: base = weburl + '/collection/' + urllib.quote(c) else: base = weburl return create_url(base, drop_default_urlargd(parameters, self.search_results_default_urlargd)) def tmpl_record_page_header_content(self, req, recid, ln): """ Provide extra information in the header of /record pages """ _ = gettext_set_language(ln) title = get_fieldvalues(recid, "245__a") if title: title = _("Record") + '#%d: %s' %(recid, cgi.escape(title[0])) else: title = _("Record") + ' #%d' % recid keywords = ', '.join(get_fieldvalues(recid, "6531_a")) description = ' '.join(get_fieldvalues(recid, "520__a")) description += "\n" description += '; '.join(get_fieldvalues(recid, "100__a") + get_fieldvalues(recid, "700__a")) return [cgi.escape(x, True) for x in (title, description, keywords)] def tmpl_navtrail_links(self, as, ln, dads): """ Creates the navigation bar at top of each search page (*Home > Root collection > subcollection > ...*) Parameters: - 'as' *bool* - Should we display an advanced search box? - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'separator' *string* - The separator between two consecutive collections - 'dads' *list* - A list of parent links, eachone being a dictionary of ('name', 'longname') """ out = [] for url, name in dads: out.append(create_html_link(self.build_search_interface_url(c=url, as=as, ln=ln), {}, cgi.escape(name), {'class': 'navtrail'})) return ' > '.join(out) def tmpl_webcoll_body(self, ln, collection, te_portalbox, searchfor, np_portalbox, narrowsearch, focuson, instantbrowse, ne_portalbox): """ Creates the body of the main search page. Parameters: - 'ln' *string* - language of the page being generated - 'collection' - collection id of the page being generated - 'te_portalbox' *string* - The HTML code for the portalbox on top of search - 'searchfor' *string* - The HTML code for the search options - 'np_portalbox' *string* - The HTML code for the portalbox on bottom of search - 'searchfor' *string* - The HTML code for the search categories (left bottom of page) - 'focuson' *string* - The HTML code for the "focuson" categories (right bottom of page) - 'ne_portalbox' *string* - The HTML code for the bottom of the page """ if not narrowsearch: narrowsearch = instantbrowse body = '''

    %(searchfor)s %(np_portalbox)s ''' % { 'weburl' : weburl, 'searchfor' : searchfor, 'np_portalbox' : np_portalbox, 'narrowsearch' : narrowsearch } if focuson: body += """""" body += """
    %(narrowsearch)s""" + focuson + """
    %(ne_portalbox)s
    """ % {'ne_portalbox' : ne_portalbox} return body def tmpl_portalbox(self, title, body): """Creates portalboxes based on the parameters Parameters: - 'title' *string* - The title of the box - 'body' *string* - The HTML code for the body of the box """ out = """
    %(title)s
    %(body)s
    """ % {'title' : cgi.escape(title), 'body' : body} return out def tmpl_searchfor_simple(self, ln, collection_id, collection_name, record_count, middle_option): """Produces simple *Search for* box for the current collection. Parameters: - 'ln' *string* - The language to display - 'header' *string* - header of search form - 'middle_option' *string* - HTML code for the options (any field, specific fields ...) """ # load the right message language _ = gettext_set_language(ln) out = ''' ''' argd = drop_default_urlargd({'ln': ln, 'cc': collection_id, 'sc': 1}, self.search_results_default_urlargd) # Only add non-default hidden values for field, value in argd.items(): out += self.tmpl_input_hidden(field, value) header = _("Search %s records for:") % \ self.tmpl_nbrecs_info(record_count, "","") asearchurl = self.build_search_interface_url(c=collection_id, as=1, ln=ln) # print commentary start: out += ''' ''' % {'ln' : ln, 'weburl' : weburl, 'asearch' : create_html_link(asearchurl, {}, _('Advanced Search')), 'header' : header, 'middle_option' : middle_option, 'msg_search' : _('Search'), 'msg_browse' : _('Browse'), 'msg_search_tips' : _('Search Tips')} return out def tmpl_searchfor_advanced(self, ln, # current language collection_id, collection_name, record_count, middle_option_1, middle_option_2, middle_option_3, searchoptions, sortoptions, rankoptions, displayoptions, formatoptions ): """ Produces advanced *Search for* box for the current collection. Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'ssearchurl' *string* - The URL to simple search form - 'header' *string* - header of search form - 'middle_option_1' *string* - HTML code for the first row of options (any field, specific fields ...) - 'middle_option_2' *string* - HTML code for the second row of options (any field, specific fields ...) - 'middle_option_3' *string* - HTML code for the third row of options (any field, specific fields ...) - 'searchoptions' *string* - HTML code for the search options - 'sortoptions' *string* - HTML code for the sort options - 'rankoptions' *string* - HTML code for the rank options - 'displayoptions' *string* - HTML code for the display options - 'formatoptions' *string* - HTML code for the format options """ # load the right message language _ = gettext_set_language(ln) out = ''' ''' argd = drop_default_urlargd({'ln': ln, 'as': 1, 'cc': collection_id, 'sc': 1}, self.search_results_default_urlargd) # Only add non-default hidden values for field, value in argd.items(): out += self.tmpl_input_hidden(field, value) header = _("Search %s records for") % \ self.tmpl_nbrecs_info(record_count, "","") header += ':' ssearchurl = self.build_search_interface_url(c=collection_id, as=0, ln=ln) out += ''' ''' % {'ln' : ln, 'weburl' : weburl, 'ssearch' : create_html_link(ssearchurl, {}, _("Simple Search")), 'header' : header, 'matchbox_m1' : self.tmpl_matchtype_box('m1', ln=ln), 'middle_option_1' : middle_option_1, 'andornot_op1' : self.tmpl_andornot_box('op1', ln=ln), 'matchbox_m2' : self.tmpl_matchtype_box('m2', ln=ln), 'middle_option_2' : middle_option_2, 'andornot_op2' : self.tmpl_andornot_box('op2', ln=ln), 'matchbox_m3' : self.tmpl_matchtype_box('m3', ln=ln), 'middle_option_3' : middle_option_3, 'msg_search' : _("Search"), 'msg_browse' : _("Browse"), 'msg_search_tips' : _("Search Tips")} if (searchoptions): out += """""" % { 'searchheader' : _("Search options:"), 'searchoptions' : searchoptions } out += """ """ % { 'added' : _("Added since:"), 'until' : _("until:"), 'date_added' : self.tmpl_inputdate("d1", ln=ln), 'date_until' : self.tmpl_inputdate("d2", ln=ln), 'msg_sort' : _("Sort by:"), 'msg_display' : _("Display results:"), 'msg_format' : _("Output format:"), 'sortoptions' : sortoptions, 'rankoptions' : rankoptions, 'displayoptions' : displayoptions, 'formatoptions' : formatoptions } return out def tmpl_matchtype_box(self, name='m', value='', ln='en'): """Returns HTML code for the 'match type' selection box. Parameters: - 'name' *string* - The name of the produced select - 'value' *string* - The selected value (if any value is already selected) - 'ln' *string* - the language to display """ # load the right message language _ = gettext_set_language(ln) out = """ """ % {'name' : name, 'sela' : self.tmpl_is_selected('a', value), 'opta' : _("All of the words:"), 'selo' : self.tmpl_is_selected('o', value), 'opto' : _("Any of the words:"), 'sele' : self.tmpl_is_selected('e', value), 'opte' : _("Exact phrase:"), 'selp' : self.tmpl_is_selected('p', value), 'optp' : _("Partial phrase:"), 'selr' : self.tmpl_is_selected('r', value), 'optr' : _("Regular expression:") } return out def tmpl_is_selected(self, var, fld): """ Checks if *var* and *fld* are equal, and if yes, returns ' selected="selected"'. Useful for select boxes. Parameters: - 'var' *string* - First value to compare - 'fld' *string* - Second value to compare """ if var == fld: return ' selected="selected"' else: return "" def tmpl_andornot_box(self, name='op', value='', ln='en'): """ Returns HTML code for the AND/OR/NOT selection box. Parameters: - 'name' *string* - The name of the produced select - 'value' *string* - The selected value (if any value is already selected) - 'ln' *string* - the language to display """ # load the right message language _ = gettext_set_language(ln) out = """ """ % {'name' : name, 'sela' : self.tmpl_is_selected('a', value), 'opta' : _("AND"), 'selo' : self.tmpl_is_selected('o', value), 'opto' : _("OR"), 'seln' : self.tmpl_is_selected('n', value), 'optn' : _("AND NOT") } return out def tmpl_inputdate(self, name, ln, sy = 0, sm = 0, sd = 0): """ Produces *From Date*, *Until Date* kind of selection box. Suitable for search options. Parameters: - 'name' *string* - The base name of the produced selects - 'ln' *string* - the language to display """ # load the right message language _ = gettext_set_language(ln) box = """ """ # month box += """ """ # year box += """ """ return box def tmpl_narrowsearch(self, as, ln, type, father, has_grandchildren, sons, display_grandsons, grandsons): """ Creates list of collection descendants of type *type* under title *title*. If as==1, then links to Advanced Search interfaces; otherwise Simple Search. Suitable for 'Narrow search' and 'Focus on' boxes. Parameters: - 'as' *bool* - Should we display an advanced search box? - 'ln' *string* - The language to display - 'type' *string* - The type of the produced box (virtual collections or normal collections) - 'father' *collection* - The current collection - 'has_grandchildren' *bool* - If the current collection has grand children - 'sons' *list* - The list of the sub-collections (first level) - 'display_grandsons' *bool* - If the grand children collections should be displayed (2 level deep display) - 'grandsons' *list* - The list of sub-collections (second level) """ # load the right message language _ = gettext_set_language(ln) title = {'r': _("Narrow by collection:"), 'v': _("Focus on:")}[type] if has_grandchildren: style_prolog = "" style_epilog = "" else: style_prolog = "" style_epilog = "" out = """""" % {'title' : title, 'narrowsearchbox': {'r': 'narrowsearchbox', 'v': 'focusonsearchbox'}[type]} # iterate through sons: i = 0 for son in sons: out += """""" % {'name' : cgi.escape(son.name) } else: out += """ """ % {'name' : cgi.escape(son.name) } else: out += '' out += """""" i += 1 out += "
    %(title)s
    """ % \ { 'narrowsearchbox': {'r': 'narrowsearchbox', 'v': 'focusonsearchbox'}[type]} if type == 'r': if son.restricted_p() and son.restricted_p() != father.restricted_p(): out += """ %(link)s%(recs)s """ % { 'link': create_html_link(self.build_search_interface_url(c=son.name, ln=ln, as=as), {}, style_prolog + cgi.escape(son.get_name(ln)) + style_epilog), 'recs' : self.tmpl_nbrecs_info(son.nbrecs, ln=ln)} if son.restricted_p(): out += """ [%(msg)s] """ % { 'msg' : _("restricted") } if display_grandsons and len(grandsons[i]): # iterate trough grandsons: out += """
    """ for grandson in grandsons[i]: out += """ %(link)s%(nbrec)s """ % { 'link': create_html_link(self.build_search_interface_url(c=grandson.name, ln=ln, as=as), {}, cgi.escape(grandson.get_name(ln))), 'nbrec' : self.tmpl_nbrecs_info(grandson.nbrecs, ln=ln)} out += """
    " return out def tmpl_searchalso(self, ln, engines_list, collection_id): _ = gettext_set_language(ln) box_name = _("Search also:") html = """
    """ % locals() for engine in engines_list: internal_name = engine.name name = _(internal_name) base_url = engine.base_url if external_collection_get_state(engine, collection_id) == 3: checked = ' checked="checked"' else: checked = '' html += """""" % \ { 'checked': checked, 'base_url': base_url, 'internal_name': internal_name, 'name': cgi.escape(name), 'id': "extSearch" + nmtoken_from_string(name), 'weburl': weburl,} html += """
    %(box_name)s
    %(name)s
    """ return html def tmpl_nbrecs_info(self, number, prolog=None, epilog=None, ln=cdslang): """ Return information on the number of records. Parameters: - 'number' *string* - The number of records - 'prolog' *string* (optional) - An HTML code to prefix the number (if **None**, will be '(') - 'epilog' *string* (optional) - An HTML code to append to the number (if **None**, will be ')') """ if number is None: number = 0 if prolog is None: prolog = ''' (''' if epilog is None: epilog = ''')''' return prolog + self.tmpl_nice_number(number, ln) + epilog def tmpl_box_restricted_content(self, ln): """ Displays a box containing a *restricted content* message Parameters: - 'ln' *string* - The language to display """ # load the right message language _ = gettext_set_language(ln) return _("The contents of this collection is restricted.") def tmpl_box_no_records(self, ln): """ Displays a box containing a *no content* message Parameters: - 'ln' *string* - The language to display """ # load the right message language _ = gettext_set_language(ln) return _("This collection does not contain any document yet.") def tmpl_instant_browse(self, as, ln, recids, more_link = None): """ Formats a list of records (given in the recids list) from the database. Parameters: - 'as' *int* - Advanced Search interface or not (0 or 1) - 'ln' *string* - The language to display - 'recids' *list* - the list of records from the database - 'more_link' *string* - the "More..." link for the record. If not given, will not be displayed """ # load the right message language _ = gettext_set_language(ln) body = '''''' for recid in recids: body += ''' ''' % {'date': recid['date'], 'body': recid['body'] } body += "
    %(date)s %(body)s
    " if more_link: body += '
    ' + \ create_html_link(more_link, {}, '[>> %s]' % _("more")) + \ '
    ' return '''
    %(header)s
    %(body)s
    ''' % {'header' : _("Latest additions:"), 'body' : body, } def tmpl_searchwithin_select(self, ln, fieldname, selected, values): """ Produces 'search within' selection box for the current collection. Parameters: - 'ln' *string* - The language to display - 'fieldname' *string* - the name of the select box produced - 'selected' *string* - which of the values is selected - 'values' *list* - the list of values in the select """ out = '""" return out def tmpl_select(self, fieldname, values, selected=None, css_class=''): """ Produces a generic select box Parameters: - 'css_class' *string* - optional, a css class to display this select with - 'fieldname' *list* - the name of the select box produced - 'selected' *string* - which of the values is selected - 'values' *list* - the list of values in the select """ if css_class != '': class_field = ' class="%s"' % css_class else: class_field = '' out = '""" return out def tmpl_record_links(self, weburl, recid, ln): """ Displays the *More info* and *Find similar* links for a record Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'recid' *string* - the id of the displayed record """ # load the right message language _ = gettext_set_language(ln) out = '''
    %(detailed)s - %(similar)s''' % { 'detailed': create_html_link(self.build_search_url(recid=recid, ln=ln), {}, _("Detailed record"), {'class': "moreinfo"}), 'similar': create_html_link(self.build_search_url(p="recid:%d" % recid, rm='wrd', ln=ln), {}, _("Similar records"), {'class': "moreinfo"})} if CFG_EXPERIMENTAL_FEATURES: out += ''' - %s ''' % \ create_html_link(self.build_search_url(p='recid:%d' % recid, rm='cit', ln=ln), {}, _("Cited by"), {'class': "moreinfo"}) return out def tmpl_record_body(self, weburl, titles, authors, dates, rns, abstracts, urls_u, urls_z, ln): """ Displays the "HTML basic" format of a record Parameters: - 'weburl' *string* - The base URL for the site - 'authors' *list* - the authors (as strings) - 'dates' *list* - the dates of publication - 'rns' *list* - the quicknotes for the record - 'abstracts' *list* - the abstracts for the record - 'urls_u' *list* - URLs to the original versions of the notice - 'urls_z' *list* - Not used """ out = "" for title in titles: out += "%(title)s " % { 'title' : cgi.escape(title) } if authors: out += " / " for author in authors[:CFG_WEBSEARCH_AUTHOR_ET_AL_THRESHOLD]: out += '%s; ' % \ create_html_link(self.build_search_url(p=author, f='author', ln=ln), {}, cgi.escape(author)) if len(authors) > CFG_WEBSEARCH_AUTHOR_ET_AL_THRESHOLD: out += "et al" for date in dates: out += " %s." % cgi.escape(date) for rn in rns: out += """ [%(rn)s]""" % {'rn' : cgi.escape(rn)} for abstract in abstracts: out += "
    %(abstract)s [...]" % {'abstract' : cgi.escape(abstract[:1+string.find(abstract, '.')]) } for idx in range(0, len(urls_u)): out += """
    %(name)s""" % { 'url' : urls_u[idx], 'name' : urls_u[idx] } return out def tmpl_search_in_bibwords(self, p, f, ln, nearest_box): """ Displays the *Words like current ones* links for a search Parameters: - 'p' *string* - Current search words - 'f' *string* - the fields in which the search was done - 'nearest_box' *string* - the HTML code for the "nearest_terms" box - most probably from a create_nearest_terms_box call """ # load the right message language _ = gettext_set_language(ln) out = '

    ' if f: out += _("Words nearest to %(x_word)s inside %(x_field)s in any collection are:") % {'x_word': '' + cgi.escape(p) + '', 'x_field': '' + cgi.escape(f) + ''} else: out += _("Words nearest to %(x_word)s in any collection are:") % {'x_word': '' + cgi.escape(p) + ''} out += '
    ' + nearest_box + '

    ' return out def tmpl_nearest_term_box(self, p, ln, f, terminfo, intro): """ Displays the *Nearest search terms* box Parameters: - 'p' *string* - Current search words - 'f' *string* - a collection description (if the search has been completed in a collection) - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'terminfo': tuple (term, hits, argd) for each near term - 'intro' *string* - the intro HTML to prefix the box with """ out = '''''' for term, hits, argd in terminfo: if hits: hitsinfo = str(hits) else: hitsinfo = '-' term = cgi.escape(term) if term == p: # print search word for orientation: nearesttermsboxbody_class = "nearesttermsboxbodyselected" if hits > 0: term = create_html_link(self.build_search_url(argd), {}, term, {'class': "nearesttermsselected"}) else: nearesttermsboxbody_class = "nearesttermsboxbody" term = create_html_link(self.build_search_url(argd), {}, term, {'class': "nearestterms"}) out += '''\ ''' % {'hits': hitsinfo, 'nearesttermsboxbody_class': nearesttermsboxbody_class, 'term': term} out += "
    %(hits)s   %(term)s
    " return intro + "
    " + out + "
    " def tmpl_browse_pattern(self, f, ln, browsed_phrases_in_colls, colls): """ Displays the *Nearest search terms* box Parameters: - 'f' *string* - a field name (i18nized) - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'browsed_phrases_in_colls' *array* - the phrases to display - 'colls' *array* - the list of collection parameters of the search (c's) """ # load the right message language _ = gettext_set_language(ln) out = """""" % { 'hits' : _("Hits"), 'f' : cgi.escape(f) } if len(browsed_phrases_in_colls) == 1: # one hit only found: phrase, nbhits = browsed_phrases_in_colls[0][0], browsed_phrases_in_colls[0][1] query = {'c': colls, 'ln': ln, 'p': '"%s"' % phrase, 'f': f} out += """""" % {'nbhits': nbhits, 'link': create_html_link(self.build_search_url(query), {}, cgi.escape(phrase))} elif len(browsed_phrases_in_colls) > 1: # first display what was found but the last one: for phrase, nbhits in browsed_phrases_in_colls[:-1]: query = {'c': colls, 'ln': ln, 'p': '"%s"' % phrase, 'f': f} out += """""" % {'nbhits' : nbhits, 'link': create_html_link(self.build_search_url(query), {}, cgi.escape(phrase))} # now display last hit as "next term": phrase, nbhits = browsed_phrases_in_colls[-1] query = {'c': colls, 'ln': ln, 'p': phrase, 'f': f} out += """""" % {'link': create_html_link(self.build_search_url(query, action='browse'), {}, _("next")), 'weburl' : weburl} out += """
    %(hits)s   %(f)s
    %(nbhits)s   %(link)s
    %(nbhits)s   %(link)s
      %(link)s
    """ return out def tmpl_search_box(self, ln, as, cc, cc_intl, ot, sp, action, fieldslist, f1, f2, f3, m1, m2, m3, p1, p2, p3, op1, op2, rm, p, f, coll_selects, d1y, d2y, d1m, d2m, d1d, d2d, sort_formats, sf, so, ranks, sc, rg, formats, of, pl, jrec, ec): """ Displays the *Nearest search terms* box Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'as' *bool* - Should we display an advanced search box? - 'cc_intl' *string* - the i18nized current collection name - 'cc' *string* - the internal current collection name - 'ot', 'sp' *string* - hidden values - 'action' *string* - the action demanded by the user - 'fieldlist' *list* - the list of all fields available, for use in select within boxes in advanced search - 'p, f, f1, f2, f3, m1, m2, m3, p1, p2, p3, op1, op2, op3, rm' *strings* - the search parameters - 'coll_selects' *array* - a list of lists, each containing the collections selects to display - 'd1y, d2y, d1m, d2m, d1d, d2d' *int* - the search between dates - 'sort_formats' *array* - the select information for the sorting format - 'sf' *string* - the currently selected sort format - 'so' *string* - the currently selected sort order ("a" or "d") - 'ranks' *array* - ranking methods - 'rm' *string* - selected ranking method - 'sc' *string* - split by collection or not - 'rg' *string* - selected results/page - 'formats' *array* - available output formats - 'of' *string* - the selected output format - 'pl' *string* - `limit to' search pattern """ # load the right message language _ = gettext_set_language(ln) # These are hidden fields the user does not manipulate # directly argd = drop_default_urlargd({ 'ln': ln, 'as': as, 'cc': cc, 'ot': ot, 'sp': sp, 'ec': ec, }, self.search_results_default_urlargd) out = '''

    %(ccname)s

    ''' % {'ccname' : cgi.escape(cc_intl), 'weburl' : weburl} # Only add non-default hidden values for field, value in argd.items(): out += self.tmpl_input_hidden(field, value) leadingtext = _("Search") if action == 'browse': leadingtext = _("Browse") if as == 1: # print Advanced Search form: # define search box elements: out += ''' - + - ''' % { 'simple_search': create_html_link(self.build_search_url(p=p1, f=f1, rm=rm, cc=cc, ln=ln, jrec=jrec, rg=rg), {}, _("Simple Search")), 'leading' : leadingtext, 'sizepattern' : CFG_WEBSEARCH_ADVANCEDSEARCH_PATTERN_BOX_WIDTH, 'matchbox1' : self.tmpl_matchtype_box('m1', m1, ln=ln), 'p1' : cgi.escape(p1,1), 'searchwithin1' : self.tmpl_searchwithin_select( ln = ln, fieldname = 'f1', selected = f1, values = self._add_mark_to_field(value = f1, fields = fieldslist, ln = ln) ), 'andornot1' : self.tmpl_andornot_box( name = 'op1', value = op1, ln = ln ), 'matchbox2' : self.tmpl_matchtype_box('m2', m2, ln=ln), 'p2' : cgi.escape(p2,1), 'searchwithin2' : self.tmpl_searchwithin_select( ln = ln, fieldname = 'f2', selected = f2, values = self._add_mark_to_field(value = f2, fields = fieldslist, ln = ln) ), 'andornot2' : self.tmpl_andornot_box( name = 'op2', value = op2, ln = ln ), 'matchbox3' : self.tmpl_matchtype_box('m3', m3, ln=ln), 'p3' : cgi.escape(p3,1), 'searchwithin3' : self.tmpl_searchwithin_select( ln = ln, fieldname = 'f3', selected = f3, values = self._add_mark_to_field(value = f3, fields = fieldslist, ln = ln) ), 'search' : _("Search"), 'browse' : _("Browse"), 'weburl' : weburl, 'ln' : ln, - 'search_tips': _("Search Tips"), + 'search_tips': _("Search Tips") } else: # print Simple Search form: out += ''' ''' % { 'advanced_search': create_html_link(self.build_search_url(p1=p, f1=f, rm=rm, as=1, cc=cc, jrec=jrec, ln=ln, rg=rg), {}, _("Advanced Search")), 'leading' : leadingtext, 'sizepattern' : CFG_WEBSEARCH_ADVANCEDSEARCH_PATTERN_BOX_WIDTH, 'p' : cgi.escape(p, 1), 'searchwithin' : self.tmpl_searchwithin_select( ln = ln, fieldname = 'f', selected = f, values = self._add_mark_to_field(value=f, fields=fieldslist, ln=ln) ), 'search' : _("Search"), 'browse' : _("Browse"), 'weburl' : weburl, 'ln' : ln, - 'search_tips': _("Search Tips"), + 'search_tips': _("Search Tips") } ## secondly, print Collection(s) box: selects = '' for sel in coll_selects: selects += self.tmpl_select(fieldname='c', values=sel) out += """ """ % { 'leading' : leadingtext, 'msg_coll' : _("collections"), 'colls' : selects, } ## thirdly, print search limits, if applicable: if action != _("Browse") and pl: out += """""" % { 'limitto' : _("Limit to:"), 'sizepattern' : CFG_WEBSEARCH_ADVANCEDSEARCH_PATTERN_BOX_WIDTH, 'pl' : cgi.escape(pl, 1), } ## fourthly, print from/until date boxen, if applicable: if action == _("Browse") or (d1y==0 and d1m==0 and d1d==0 and d2y==0 and d2m==0 and d2d==0): pass # do not need it else: cell_6_a = self.tmpl_inputdate("d1", ln, d1y, d1m, d1d) cell_6_b = self.tmpl_inputdate("d2", ln, d2y, d2m, d2d) out += """""" % { 'added' : _("Added since:"), 'until' : _("until:"), 'date1' : self.tmpl_inputdate("d1", ln, d1y, d1m, d1d), 'date2' : self.tmpl_inputdate("d2", ln, d2y, d2m, d2d), } ## fifthly, print Display results box, including sort/rank, formats, etc: if action != _("Browse"): rgs = [] for i in [10, 25, 50, 100, 250, 500]: rgs.append({ 'value' : i, 'text' : "%d %s" % (i, _("results"))}) # sort by: out += """""" % { 'sort_by' : _("Sort by:"), 'display_res' : _("Display results:"), 'out_format' : _("Output format:"), 'select_sf' : self.tmpl_select(fieldname = 'sf', values = sort_formats, selected = sf, css_class = 'address'), 'select_so' : self.tmpl_select(fieldname = 'so', values = [{ 'value' : 'a', 'text' : _("asc.") }, { 'value' : 'd', 'text' : _("desc.") }], selected = so, css_class = 'address'), 'select_rm' : self.tmpl_select(fieldname = 'rm', values = ranks, selected = rm, css_class = 'address'), 'select_rg' : self.tmpl_select(fieldname = 'rg', values = rgs, selected = rg, css_class = 'address'), 'select_sc' : self.tmpl_select(fieldname = 'sc', values = [{ 'value' : 0, 'text' : _("single list") }, { 'value' : 1, 'text' : _("split by collection") }], selected = sc, css_class = 'address'), 'select_of' : self.tmpl_searchwithin_select( ln = ln, fieldname = 'of', selected = of, values = self._add_mark_to_field(value = of, fields = formats, chars = 3, ln = ln) ), } ## last but not least, print end of search box: out += """
    """ return out def tmpl_input_hidden(self, name, value): "Produces the HTML code for a hidden field " if isinstance(value, list): list_input = [self.tmpl_input_hidden(name, val) for val in value] return "\n".join(list_input) return """""" % { 'name' : cgi.escape(str(name), 1), 'value' : cgi.escape(str(value), 1), } def _add_mark_to_field(self, value, fields, ln, chars = 1): """Adds the current value as a MARC tag in the fields array Useful for advanced search""" # load the right message language _ = gettext_set_language(ln) out = fields if value and str(value[0:chars]).isdigit(): out.append({'value' : value, 'text' : str(value) + " " + _("MARC tag") }) return out def tmpl_search_pagestart(self, ln) : "page start for search page. Will display after the page header" return """
    """ def tmpl_search_pageend(self, ln) : "page end for search page. Will display just before the page footer" return """
    """ def tmpl_print_warning(self, msg, type, prologue, epilogue): """Prints warning message and flushes output. Parameters: - 'msg' *string* - The message string - 'type' *string* - the warning type - 'prologue' *string* - HTML code to display before the warning - 'epilogue' *string* - HTML code to display after the warning """ out = '\n%s' % (prologue) if type: out += '%s: ' % type out += '%s%s' % (msg, epilogue) return out def tmpl_print_search_info(self, ln, weburl, middle_only, collection, collection_name, collection_id, as, sf, so, rm, rg, nb_found, of, ot, p, f, f1, f2, f3, m1, m2, m3, op1, op2, p1, p2, p3, d1y, d1m, d1d, d2y, d2m, d2d, all_fieldcodes, cpu_time, pl_in_url, jrec, sc, sp): """Prints stripe with the information on 'collection' and 'nb_found' results and CPU time. Also, prints navigation links (beg/next/prev/end) inside the results set. If middle_only is set to 1, it will only print the middle box information (beg/netx/prev/end/etc) links. This is suitable for displaying navigation links at the bottom of the search results page. Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'middle_only' *bool* - Only display parts of the interface - 'collection' *string* - the collection name - 'collection_name' *string* - the i18nized current collection name - 'as' *bool* - if we display the advanced search interface - 'sf' *string* - the currently selected sort format - 'so' *string* - the currently selected sort order ("a" or "d") - 'rm' *string* - selected ranking method - 'rg' *int* - selected results/page - 'nb_found' *int* - number of results found - 'of' *string* - the selected output format - 'ot' *string* - hidden values - 'p' *string* - Current search words - 'f' *string* - the fields in which the search was done - 'f1, f2, f3, m1, m2, m3, p1, p2, p3, op1, op2' *strings* - the search parameters - 'jrec' *int* - number of first record on this page - 'd1y, d2y, d1m, d2m, d1d, d2d' *int* - the search between dates - 'all_fieldcodes' *array* - all the available fields - 'cpu_time' *float* - the time of the query in seconds """ # load the right message language _ = gettext_set_language(ln) out = "" # left table cells: print collection name if not middle_only: out += '''
    ''' % { 'collection_id': collection_id, 'weburl' : weburl, 'collection_link': create_html_link(self.build_search_interface_url(c=collection, as=as, ln=ln), {}, cgi.escape(collection_name)) } else: out += """
    """ % { 'weburl' : weburl } # middle table cell: print beg/next/prev/end arrows: if not middle_only: out += """
    " else: out += "" # right table cell: cpu time info if not middle_only: if cpu_time > -1: out += """""" % { 'time' : _("Search took %s seconds.") % ('%.2f' % cpu_time), } out += "
    %(collection_link)s %(recs_found)s  """ % { 'recs_found' : _("%s records found") % ('' + self.tmpl_nice_number(nb_found, ln) + '') } else: out += "" if nb_found > rg: - out += "" + collection_name + " : " + _("%s records found") % ('' + self.tmpl_nice_number(nb_found, ln) + '') + "   " + out += "" + cgi.escape(collection_name) + " : " + _("%s records found") % ('' + self.tmpl_nice_number(nb_found, ln) + '') + "   " if nb_found > rg: # navig.arrows are needed, since we have many hits query = {'p': p, 'f': f, 'cc': collection, 'sf': sf, 'so': so, 'sp': sp, 'rm': rm, 'of': of, 'ot': ot, 'as': as, 'ln': ln, 'p1': p1, 'p2': p2, 'p3': p3, 'f1': f1, 'f2': f2, 'f3': f3, 'm1': m1, 'm2': m2, 'm3': m3, 'op1': op1, 'op2': op2, 'sc': 0, 'd1y': d1y, 'd1m': d1m, 'd1d': d1d, 'd2y': d2y, 'd2m': d2m, 'd2d': d2d, } # @todo here def img(gif, txt): return '%(txt)s' % { 'txt': txt, 'gif': gif, 'weburl': weburl} if jrec-rg > 1: out += create_html_link(self.build_search_url(query, jrec=1, rg=rg), {}, img('sb', _("begin")), {'class': 'img'}) if jrec > 1: out += create_html_link(self.build_search_url(query, jrec=max(jrec-rg, 1), rg=rg), {}, img('sp', _("previous")), {'class': 'img'}) if jrec+rg-1 < nb_found: out += "%d - %d" % (jrec, jrec+rg-1) else: out += "%d - %d" % (jrec, nb_found) if nb_found >= jrec+rg: out += create_html_link(self.build_search_url(query, jrec=jrec+rg, rg=rg), {}, img('sn', _("next")), {'class':'img'}) if nb_found >= jrec+rg+rg: out += create_html_link(self.build_search_url(query, jrec=nb_found-rg+1, rg=rg), {}, img('se', _("end")), {'class': 'img'}) # still in the navigation part cc = collection sc = 0 for var in ['p', 'cc', 'f', 'sf', 'so', 'of', 'rg', 'as', 'ln', 'p1', 'p2', 'p3', 'f1', 'f2', 'f3', 'm1', 'm2', 'm3', 'op1', 'op2', 'sc', 'd1y', 'd1m', 'd1d', 'd2y', 'd2m', 'd2d']: out += self.tmpl_input_hidden(name = var, value = vars()[var]) for var in ['ot', 'sp', 'rm']: if vars()[var]: out += self.tmpl_input_hidden(name = var, value = vars()[var]) if pl_in_url: fieldargs = cgi.parse_qs(pl_in_url) for fieldcode in all_fieldcodes: # get_fieldcodes(): if fieldargs.has_key(fieldcode): for val in fieldargs[fieldcode]: out += self.tmpl_input_hidden(name = fieldcode, value = val) out += """  %(jump)s """ % { 'jump' : _("jump to record:"), 'jrec' : jrec, } if not middle_only: out += "%(time)s 
    " else: out += "" out += "
    " return out def tmpl_nice_number(self, number, ln=cdslang, thousands_separator=','): """ Return nicely printed number NUMBER in language LN using given THOUSANDS_SEPARATOR character. This version does not pay attention to locale. See tmpl_nice_number_via_locale(). """ chars_in = list(str(number)) number = len(chars_in) chars_out = [] - for i in range(0,number): + for i in range(0, number): if i % 3 == 0 and i != 0: chars_out.append(thousands_separator) chars_out.append(chars_in[number-i-1]) chars_out.reverse() return ''.join(chars_out) def tmpl_nice_number_via_locale(self, number, ln=cdslang): """ Return nicely printed number NUM in language LN using the locale. See also version tmpl_nice_number(). """ if number is None: return None # Temporarily switch the numeric locale to the requeted one, and format the number # In case the system has no locale definition, use the vanilla form ol = locale.getlocale(locale.LC_NUMERIC) try: locale.setlocale(locale.LC_NUMERIC, self.tmpl_localemap.get(ln, self.tmpl_default_locale)) except locale.Error: return str(number) try: number = locale.format('%d', number, True) except TypeError: return str(number) locale.setlocale(locale.LC_NUMERIC, ol) return number def tmpl_records_format_htmlbrief(self, ln, weburl, rows, relevances_prologue, relevances_epilogue): """Returns the htmlbrief format of the records Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'rows' *array* - Parts of the interface to display, in the format: - 'rows[number]' *int* - The order number - 'rows[recid]' *int* - The recID - 'rows[relevance]' *string* - The relevance of the record - 'rows[record]' *string* - The formatted record - 'relevances_prologue' *string* - HTML code to prepend the relevance indicator - 'relevances_epilogue' *string* - HTML code to append to the relevance indicator (used mostly for formatting) """ # load the right message language _ = gettext_set_language(ln) out = """
    """ % { 'weburl' : weburl, } for row in rows: out += """ """ % row['record'] out += """
    %(number)s. """ % row if row['relevance']: out += """
    """ % { 'prologue' : relevances_prologue, 'epilogue' : relevances_epilogue, 'relevance' : row['relevance'] } out += """
    %s

    """ % { 'basket' : _("ADD TO BASKET") } return out - def tmpl_records_format_other(self, ln, weburl, rows, format, url_argd): - """Returns other formats of the records - - Parameters: - - - 'ln' *string* - The language to display - - - 'weburl' *string* - The base URL for the site - - - 'rows' *array* - Parts of the interface to display, in the format: - - - 'rows[record]' *string* - The formatted record - - - 'rows[number]' *int* - The order number - - - 'rows[recid]' *int* - The recID - - - 'rows[relevance]' *string* - The relevance of the record - - - 'format' *string* - The current format - - - 'url_argd' *string* - Parameters of the search query - """ - - # load the right message language - _ = gettext_set_language(ln) - - out = """
    %(format)s """ % { - 'format' : _("Format:") - } - - result = [] - - for abbrev, name in (('hd', 'HTML'), - ('hx', 'BibTeX'), - ('xd', 'DC'), - ('xe', 'EndNote'), - ('xn', 'NLM'), - ('hm', 'MARC'), - ('xm', 'MARCXML'), - ): - if format == abbrev: - result.append(name) - else: - result.append(create_html_link(self.build_search_url(url_argd, of=abbrev), - {}, name)) - - out += " | ".join(result) - - out += "
    " - - for row in rows: - out += row ['record'] - - if format.startswith("hd"): - # do not print further information but for HTML detailed formats - - if row ['creationdate']: - out += '''
    %(dates)s
    -

    %(similar)s

    -
    - - -
    - -
    - ''' % { - 'dates': _("Record created %(x_date_creation)s, last modified %(x_date_modification)s") % \ - {'x_date_creation': row['creationdate'], - 'x_date_modification': row['modifydate']}, - 'weburl': weburl, - 'recid': row['recid'], - 'ln': ln, - 'similar': create_html_link( - self.build_search_url(p='recid:%d' % \ - row['recid'], - rm='wrd', - ln=ln), - {}, _("Similar records"), - {'class': "moreinfo"}), - 'basket' : _("ADD TO BASKET") - } - - out += '' # empty row for xhtml validation - - if row.has_key ('citinglist'): - cs = row ['citinglist'] - - similar = self.tmpl_print_record_list_for_similarity_boxen( - _("Cited by: %s records") % len (cs), cs, ln) - - out += ''' - ''' % { - 'more': create_html_link( - self.build_search_url(p='recid:%d' % \ - row['recid'], - rm='cit', ln=ln), - {}, _("more")), - 'similar': similar} - - if row.has_key ('cociting'): - cs = row ['cociting'] - - similar = self.tmpl_print_record_list_for_similarity_boxen ( - _("Co-cited with: %s records") % len (cs), cs, ln) - - out += ''' - ''' % { 'more': create_html_link(self.build_search_url(p='cocitedwith:%d' % row['recid'], ln=ln), - {}, _("more")), - 'similar': similar} - - if row.has_key ('citationhistory'): - out += '' % row ['citationhistory'] - - if row.has_key ('downloadsimilarity'): - cs = row ['downloadsimilarity'] - - similar = self.tmpl_print_record_list_for_similarity_boxen ( - _("People who downloaded this document also downloaded:"), cs, ln) - - out += ''' - - - ''' % { 'weburl': weburl, 'recid': row ['recid'], 'ln': ln, - 'similar': similar, 'more': _("more"), - 'graph': row ['downloadhistory'] - } - - out += '
    - %(similar)s %(more)s -

    -
    - %(similar)s %(more)s -
    -
    %s
    %(graph)s
    %(similar)s
    ' - - if row.has_key ('viewsimilarity'): - out += '
     ' - out += self.tmpl_print_record_list_for_similarity_boxen ( - _("People who viewed this page also viewed:"), row ['viewsimilarity'], ln) - - if row.has_key('downloadhistory'): - out += '
     ' - out += row['downloadhistory'] - - if row.has_key ('reviews'): - out += '
     ' - out += row['reviews'] - - if row.has_key ('comments'): - out += row['comments'] - - out += "
     " - return out - def tmpl_print_results_overview(self, ln, weburl, results_final_nb_total, cpu_time, results_final_nb, colls, ec): """Prints results overview box with links to particular collections below. Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'results_final_nb_total' *int* - The total number of hits for the query - 'colls' *array* - The collections with hits, in the format: - 'coll[code]' *string* - The code of the collection (canonical name) - 'coll[name]' *string* - The display name of the collection - 'results_final_nb' *array* - The number of hits, indexed by the collection codes: - 'cpu_time' *string* - The time the query took - 'url_args' *string* - The rest of the search query - 'ec' *array* - selected external collections """ if len(colls) == 1 and not ec: # if one collection only and no external collections, print nothing: return "" # load the right message language _ = gettext_set_language(ln) # first find total number of hits: out = """
    %(founds)s
    """ % { 'founds' : _("%(x_fmt_open)sResults overview:%(x_fmt_close)s Found %(x_nb_records)s records in %(x_nb_seconds)s seconds.") %\ {'x_fmt_open': '', 'x_fmt_close': '', 'x_nb_records': '' + self.tmpl_nice_number(results_final_nb_total, ln) + '', 'x_nb_seconds': '%.2f' % cpu_time} } # then print hits per collection: for coll in colls: if results_final_nb.has_key(coll['code']) and results_final_nb[coll['code']] > 0: out += '''%(coll_name)s, %(number)s
    ''' % { 'coll' : coll['id'], 'coll_name' : cgi.escape(coll['name']), 'number' : _("%s records found") % ('' + self.tmpl_nice_number(results_final_nb[coll['code']], ln) + '') } out += "
    " return out def tmpl_search_no_boolean_hits(self, ln, nearestterms): """No hits found, proposes alternative boolean queries Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'nearestterms' *array* - Parts of the interface to display, in the format: - 'nearestterms[nbhits]' *int* - The resulting number of hits - 'nearestterms[url_args]' *string* - The search parameters - 'nearestterms[p]' *string* - The search terms """ # load the right message language _ = gettext_set_language(ln) out = _("Boolean query returned no hits. Please combine your search terms differently.") out += '''
    ''' for term, hits, argd in nearestterms: out += '''\ ''' % {'hits' : hits, 'link': create_html_link(self.build_search_url(argd), {}, cgi.escape(term), {'class': "nearestterms"})} out += """
    %(hits)s   %(link)s
    """ return out def tmpl_similar_author_names(self, authors, ln): """No hits found, proposes alternative boolean queries Parameters: - 'authors': a list of (name, hits) tuples - 'ln' *string* - The language to display """ # load the right message language _ = gettext_set_language(ln) out = ''' ''' % { 'similar' : _("See also: similar author names") } for author, hits in authors: out += '''\ ''' % {'link': create_html_link( self.build_search_url(p=author, f='author', ln=ln), {}, cgi.escape(author), {'class':"google"}), 'nb' : hits} out += """
    %(similar)s
    %(nb)d %(link)s
    """ return out def tmpl_print_record_detailed(self, recID, ln, weburl): """Displays a detailed on-the-fly record Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'recID' *int* - The record id """ # okay, need to construct a simple "Detailed record" format of our own: out = "

     " # secondly, title: titles = get_fieldvalues(recID, "245__a") for title in titles: out += "

    %s

    " % cgi.escape(title) # thirdly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") if authors: out += "

    " for author in authors: out += '%s; ' % create_html_link(self.build_search_url( ln=ln, p=author, f='author'), {}, cgi.escape(author)) out += "

    " # fourthly, date of creation: dates = get_fieldvalues(recID, "260__c") for date in dates: out += "

    %s

    " % date # fifthly, abstract: abstracts = get_fieldvalues(recID, "520__a") for abstract in abstracts: out += """

    Abstract: %s

    """ % abstract # fifthly bis, keywords: keywords = get_fieldvalues(recID, "6531_a") if len(keywords): out += """

    Keyword(s):""" for keyword in keywords: out += '%s; ' % create_html_link( self.build_search_url(ln=ln, p=keyword, f='keyword'), {}, cgi.escape(keyword)) out += '

    ' # fifthly bis bis, published in: prs_p = get_fieldvalues(recID, "909C4p") prs_v = get_fieldvalues(recID, "909C4v") prs_y = get_fieldvalues(recID, "909C4y") prs_n = get_fieldvalues(recID, "909C4n") prs_c = get_fieldvalues(recID, "909C4c") for idx in range(0, len(prs_p)): out += """

    Publ. in: %s""" % prs_p[idx] if prs_v and prs_v[idx]: out += """%s""" % prs_v[idx] if prs_y and prs_y[idx]: out += """(%s)""" % prs_y[idx] if prs_n and prs_n[idx]: out += """, no.%s""" % prs_n[idx] if prs_c and prs_c[idx]: out += """, p.%s""" % prs_c[idx] out += """.

    """ # sixthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") for idx in range(0, len(urls_u)): link_text = "URL" try: if urls_z[idx]: link_text = urls_z[idx] except IndexError: pass out += """

    %s: %s

    """ % (link_text, urls_u[idx], urls_u[idx]) # print some white space at the end: out += "

    " return out def tmpl_print_record_list_for_similarity_boxen(self, title, recID_score_list, ln=cdslang): """Print list of records in the "hs" (HTML Similarity) format for similarity boxes. RECID_SCORE_LIST is a list of (recID1, score1), (recID2, score2), etc. """ from invenio.search_engine import print_record, record_public_p recID_score_list_to_be_printed = [] # firstly find 5 first public records to print: nb_records_to_be_printed = 0 nb_records_seen = 0 while nb_records_to_be_printed < 5 and nb_records_seen < len(recID_score_list) and nb_records_seen < 50: # looking through first 50 records only, picking first 5 public ones (recID, score) = recID_score_list[nb_records_seen] nb_records_seen += 1 if record_public_p(recID): nb_records_to_be_printed += 1 recID_score_list_to_be_printed.append([recID, score]) # secondly print them: out = '''
    %(title)s
    ''' % { 'title': cgi.escape(title) } for recid, score in recID_score_list_to_be_printed: out += ''' ''' % { 'score': score, 'info' : print_record(recid, format="hs", ln=ln), } out += """
    (%(score)s)  %(info)s
    """ return out def tmpl_print_record_brief(self, ln, recID, weburl): """Displays a brief record on-the-fly Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'recID' *int* - The record id """ out = "" # record 'recID' does not exist in format 'format', so print some default format: # firstly, title: titles = get_fieldvalues(recID, "245__a") # secondly, authors: authors = get_fieldvalues(recID, "100__a") + get_fieldvalues(recID, "700__a") # thirdly, date of creation: dates = get_fieldvalues(recID, "260__c") # thirdly bis, report numbers: rns = get_fieldvalues(recID, "037__a") rns = get_fieldvalues(recID, "088__a") # fourthly, beginning of abstract: abstracts = get_fieldvalues(recID, "520__a") # fifthly, fulltext link: urls_z = get_fieldvalues(recID, "8564_z") urls_u = get_fieldvalues(recID, "8564_u") return self.tmpl_record_body( weburl = weburl, titles = titles, authors = authors, dates = dates, rns = rns, abstracts = abstracts, urls_u = urls_u, urls_z = urls_z, ln=ln) def tmpl_print_record_brief_links(self, ln, recID, weburl): """Displays links for brief record on-the-fly Parameters: - 'ln' *string* - The language to display - 'weburl' *string* - The base URL for the site - 'recID' *int* - The record id """ # load the right message language _ = gettext_set_language(ln) out = "" if CFG_WEBSEARCH_USE_ALEPH_SYSNOS: alephsysnos = get_fieldvalues(recID, "970__a") if len(alephsysnos)>0: alephsysno = alephsysnos[0] out += '
    %s' % \ create_html_link(self.build_search_url(sysno=alephsysno, ln=ln), {}, _("Detailed record"), {'class': "moreinfo"}) else: out += '
    %s' % \ create_html_link(self.build_search_url(recid=recID, ln=ln), {}, _("Detailed record"), {'class': "moreinfo"}) else: out += '
    %s' % \ create_html_link(self.build_search_url(recid=recID, ln=ln), {}, _("Detailed record"), {'class': "moreinfo"}) out += ' - %s' % \ create_html_link(self.build_search_url(p="recid:%d" % recID, rm="wrd", ln=ln), {}, _("Similar records"), {'class': "moreinfo"}) if CFG_EXPERIMENTAL_FEATURES: out += ' - %s' % \ create_html_link(self.build_search_url(p="recid:%d" % recID, rm="cit", ln=ln), {}, _("Cited by"), {'class': "moreinfo"}) return out def tmpl_xml_rss_prologue(self): """Creates XML RSS 2.0 prologue.""" out = """ %(cdsname)s %(weburl)s %(cdsname)s latest documents %(cdslang)s %(timestamp)s CDS Invenio %(version)s %(supportemail)s 1440 %(weburl)s/img/cds.png %(cdsname)s %(weburl)s Search Search this site: p %(weburl)s/search """ % {'cdsname': cdsname, 'weburl': weburl, 'cdslang': cdslang, 'timestamp': time.strftime("%a, %d %b %Y %H:%M:%S %Z", time.localtime()), 'version': version, 'supportemail': supportemail, } return out def tmpl_xml_rss_epilogue(self): """Creates XML RSS 2.0 epilogue.""" out = """\ \n""" return out def tmpl_xml_nlm_prologue(self): """Creates XML NLM prologue.""" out = """\n""" return out def tmpl_xml_nlm_epilogue(self): """Creates XML NLM epilogue.""" out = """\n""" return out def tmpl_xml_marc_prologue(self): """Creates XML MARC prologue.""" out = """\n""" return out def tmpl_xml_marc_epilogue(self): """Creates XML MARC epilogue.""" out = """\n""" return out def tmpl_xml_default_prologue(self): """Creates XML default format prologue. (Sanity calls only.)""" out = """\n""" return out def tmpl_xml_default_epilogue(self): """Creates XML default format epilogue. (Sanity calls only.)""" out = """\n""" return out def tmpl_collection_not_found_page_title(self, colname, ln=cdslang): """ Create page title for cases when unexisting collection was asked for. """ _ = gettext_set_language(ln) out = _("Collection %s Not Found") % cgi.escape(colname) return out def tmpl_collection_not_found_page_body(self, colname, ln=cdslang): """ Create page body for cases when unexisting collection was asked for. """ _ = gettext_set_language(ln) out = """

    %(title)s

    %(sorry)s

    %(you_may_want)s

    """ % { 'title': self.tmpl_collection_not_found_page_title(colname, ln), 'sorry': _("Sorry, collection %s does not seem to exist.") % \ ('' + cgi.escape(colname) + ''), 'you_may_want': _("You may want to start browsing from %s.") % \ ('' + \ cgi.escape(cdsnameintl.get(ln, cdsname)) + '')} return out def tmpl_alert_rss_teaser_box_for_query(self, id_query, ln): """Propose teaser for setting up this query as alert or RSS feed. Parameters: - 'id_query' *int* - ID of the query we make teaser for - 'ln' *string* - The language to display """ # load the right message language _ = gettext_set_language(ln) # get query arguments: res = run_sql("SELECT urlargs FROM query WHERE id=%s", (id_query,)) if res: rssurl = weburl + '/search?of=xr&' + cgi.escape(res[0][0]) else: # cannot detect query arguments, use generic RSS URL rssurl = weburl + '/rss/' alerturl = weburl + '/youralerts/input?ln=%s&idq=%s' % (ln, id_query) out = '''
    %(similar)s
    %(msg_alert)s
    ''' % { 'similar' : _("Interested in being notified about new results for this query?"), 'msg_alert': _("""Set up a personal %(x_url1_open)semail alert%(x_url1_close)s or subscribe to the %(x_url2_open)sRSS feed%(x_url2_close)s.""") % \ {'x_url1_open': ' ' % (alerturl, weburl) + ' ' % (alerturl), 'x_url1_close': '', 'x_url2_open': ' ' % (rssurl, weburl) + ' ' % rssurl, 'x_url2_close': '', }} return out + + def tmpl_detailed_record_metadata(self, recID, ln, format, + content, + creationdate=None, + modifydate=None): + """Returns the main detailed page of a record + + Parameters: + + - 'recID' *int* - The ID of the printed record + + - 'ln' *string* - The language to display + + - 'format' *string* - The format in used to print the record + + - 'content' *string* - The main content of the page + + - 'creationdate' *string* - The creation date of the printed record + + - 'modifydate' *string* - The last modification date of the printed record + """ + _ = gettext_set_language(ln) + + out = content + + return out + + def tmpl_detailed_record_statistics(self, recID, ln, + citinglist, citationhistory, + cociting, downloadsimilarity, + downloadhistory, viewsimilarity): + """Returns the statistics page of a record + + Parameters: + + - 'recID' *int* - The ID of the printed record + + - 'ln' *string* - The language to display + + - citinglist *string* - citinglist box + + - citationhistory *string* - citationhistory box + + - cociting *string* - cociting box + + - downloadsimilarity *string* - downloadsimilarity box + + - downloadhistory *string* - downloadhistory box + + - viewsimilarity *string* - viewsimilarity box + + """ + # load the right message language + _ = gettext_set_language(ln) + + out = '' + if citinglist is not None: + similar = self.tmpl_print_record_list_for_similarity_boxen( + _("Cited by: %s records") % len (citinglist), citinglist, ln) + + out += ''' + + %(similar)s %(more)s +

    + ''' % { + 'more': create_html_link( + self.build_search_url(p='recid:%d' % \ + row['recid'], + rm='cit', ln=ln), + {}, _("more")), + 'similar': similar} + out += '
    ' + + if cociting is not None: + similar = self.tmpl_print_record_list_for_similarity_boxen ( + _("Co-cited with: %s records") % len (cociting), cociting, ln) + + out += ''' + + %(similar)s %(more)s +
    + ''' % { 'more': create_html_link(self.build_search_url(p='cocitedwith:%d' % row['recid'], ln=ln), + {}, _("more")), + 'similar': similar} + out += '
    ' + + if citationhistory is not None: + out += '%s' % citationhistory + + if downloadsimilarity is not None: + similar = self.tmpl_print_record_list_for_similarity_boxen ( + _("People who downloaded this document also downloaded:"), downloadsimilarity, ln) + + out += ''' + %(graph)s + %(similar)s + ''' % { 'weburl': weburl, 'recid': row ['recid'], 'ln': ln, + 'similar': similar, 'more': _("more"), + 'graph': downloadsimilarity + } + + out += '' + out += '
    ' + + if viewsimilarity is not None: + out += self.tmpl_print_record_list_for_similarity_boxen ( + _("People who viewed this page also viewed:"), viewsimilarity, ln) + + if downloadhistory is not None: + out += downloadhistory + '
    ' + + return out + + def tmpl_detailed_record_references(self, recID, ln, content): + """Returns the discussion page of a record + + Parameters: + + - 'recID' *int* - The ID of the printed record + + - 'ln' *string* - The language to display + + - 'content' *string* - The main content of the page + """ + # load the right message language + _ = gettext_set_language(ln) + + out = '' + if content is not None: + out += content + + return out diff --git a/modules/websearch/lib/websearch_webinterface.py b/modules/websearch/lib/websearch_webinterface.py index 8561e261a..f224be351 100644 --- a/modules/websearch/lib/websearch_webinterface.py +++ b/modules/websearch/lib/websearch_webinterface.py @@ -1,532 +1,576 @@ ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """WebSearch URL handler.""" __revision__ = "$Id$" import cgi from urllib import quote from mod_python import apache from invenio.config import weburl, cdsname, cachedir, cdsnameintl, cdslang, adminemail, sweburl from invenio.dbquery import Error from invenio.webinterface_handler import wash_urlargd, WebInterfaceDirectory, \ http_check_credentials, http_get_credentials from invenio.urlutils import redirect_to_url, make_canonical_urlargd, drop_default_urlargd from invenio.webuser import getUid, page_not_authorized, get_user_preferences, \ collect_user_info, auth_apache_user_p, auth_apache_user_in_groups, setApacheUser from invenio import search_engine from invenio.websubmit_webinterface import WebInterfaceFilesPages +from invenio.webcomment_webinterface import WebInterfaceCommentsPages from invenio.webpage import page, create_error_box from invenio.messages import gettext_set_language from invenio.search_engine import get_colID, get_coll_i18nname, collection_restricted_p from invenio.access_control_engine import acc_authorize_action from invenio.access_control_config import VIEWRESTRCOLL import invenio.template websearch_templates = invenio.template.load('websearch') search_results_default_urlargd = websearch_templates.search_results_default_urlargd search_interface_default_urlargd = websearch_templates.search_interface_default_urlargd +output_formats = ['xm', 'xd', 'hm', 'hx', 'hd', 'hb', 'xe', 'xn'] def wash_search_urlargd(form): """ Create canonical search arguments from those passed via web form. """ argd = wash_urlargd(form, search_results_default_urlargd) # Sometimes, users pass ot=245,700 instead of # ot=245&ot=700. Normalize that. ots = [] for ot in argd['ot']: ots += ot.split(',') argd['ot'] = ots # We can either get the mode of function as # action=, or by setting action_browse or # action_search. if argd['action_browse']: argd['action'] = 'browse' elif argd['action_search']: argd['action'] = 'search' else: if argd['action'] not in ('browse', 'search'): argd['action'] = 'search' del argd['action_browse'] del argd['action_search'] return argd class WebInterfaceRecordPages(WebInterfaceDirectory): """ Handling of a /record/ URL fragment """ - _exports = ['', 'files'] + _exports = ['', 'files', 'reviews', 'comments', 'statistics', 'references'] + + _exports.extend(output_formats) - def __init__(self, recid): + def __init__(self, recid, tab, format=None): self.recid = recid + self.tab = tab + self.format = format + + for output_format in output_formats: + self.__dict__[output_format] = self self.files = WebInterfaceFilesPages(self.recid) + self.reviews = WebInterfaceCommentsPages(self.recid, reviews=1) + self.comments = WebInterfaceCommentsPages(self.recid) + self.statistics = self + self.references = self return - + def __call__(self, req, form): argd = wash_search_urlargd(form) argd['recid'] = self.recid + argd['tab'] = self.tab - _ = gettext_set_language(argd['ln']) - + if self.format is not None: + argd['of'] = self.format req.argd = argd uid = getUid(req) if uid == -1: return page_not_authorized(req, "../", text="You are not authorized to view this record.", navmenuid='search') elif uid > 0: pref = get_user_preferences(uid) try: argd['rg'] = int(pref['websearch_group_records']) except (KeyError, ValueError): pass - # Check if the record belongs to a restricted primary # collection. If yes, redirect to the authenticated URL. record_primary_collection = search_engine.guess_primary_collection_of_a_record(self.recid) if collection_restricted_p(record_primary_collection): user_info = collect_user_info(req) (auth_code, auth_msg) = acc_authorize_action(user_info, VIEWRESTRCOLL, collection=record_primary_collection) if auth_code and user_info['email'] == 'guest': target = '/youraccount/login' + \ make_canonical_urlargd({'action': VIEWRESTRCOLL, 'ln' : argd['ln'], 'referer' : \ weburl + '/record/' + str(self.recid) + make_canonical_urlargd(argd, \ search_results_default_urlargd)}, {'ln' : cdslang}) return redirect_to_url(req, target) elif auth_code: return page_not_authorized(req, "../", \ text = auth_msg,\ navmenuid='search') #del argd['recid'] # not wanted argument for detailed record page #target = '/record-restricted/' + str(self.recid) + '/' + \ #make_canonical_urlargd(argd, search_results_default_urlargd) #return redirect_to_url(req, target) # mod_python does not like to return [] in case when of=id: out = search_engine.perform_request_search(req, **argd) if out == []: return str(out) else: return out # Return the same page wether we ask for /record/123 or /record/123/ index = __call__ class WebInterfaceRecordRestrictedPages(WebInterfaceDirectory): """ Handling of a /record-restricted/ URL fragment """ - _exports = ['', 'files'] - - def __init__(self, recid): + _exports = ['', 'files', 'reviews', 'comments', 'statistics', 'references'] + + _exports.extend(output_formats) + + def __init__(self, recid, tab, format=None): self.recid = recid + self.tab = tab + self.format = format + + for output_format in output_formats: + self.__dict__[output_format] = self self.files = WebInterfaceFilesPages(self.recid) + self.reviews = WebInterfaceCommentsPages(self.recid, reviews=1) + self.comments = WebInterfaceCommentsPages(self.recid) + self.statistics = self + self.references = self return def __call__(self, req, form): argd = wash_search_urlargd(form) argd['recid'] = self.recid - + if self.format is not None: + argd['of'] = self.format + req.argd = argd uid = getUid(req) user_info = collect_user_info(req) if uid == -1: return page_not_authorized(req, "../", text="You are not authorized to view this record.", navmenuid='search') elif uid > 0: pref = get_user_preferences(uid) try: argd['rg'] = int(pref['websearch_group_records']) except (KeyError, ValueError): pass record_primary_collection = search_engine.guess_primary_collection_of_a_record(self.recid) if collection_restricted_p(record_primary_collection): (auth_code, dummy) = acc_authorize_action(user_info, VIEWRESTRCOLL, collection=record_primary_collection) if auth_code: return page_not_authorized(req, "../", text="You are not authorized to view this record.", navmenuid='search') # Keep all the arguments, they might be reused in the # record page itself to derivate other queries req.argd = argd # mod_python does not like to return [] in case when of=id: out = search_engine.perform_request_search(req, **argd) if out == []: return str(out) else: return out # Return the same page wether we ask for /record/123 or /record/123/ index = __call__ class WebInterfaceSearchResultsPages(WebInterfaceDirectory): """ Handling of the /search URL and its sub-pages. """ _exports = ['', 'authenticate', 'cache', 'log'] def __call__(self, req, form): """ Perform a search. """ argd = wash_search_urlargd(form) _ = gettext_set_language(argd['ln']) if req.method == 'POST': raise apache.SERVER_RETURN, apache.HTTP_METHOD_NOT_ALLOWED uid = getUid(req) user_info = collect_user_info(req) if uid == -1: return page_not_authorized(req, "../", text = _("You are not authorized to view this area."), navmenuid='search') elif uid > 0: pref = get_user_preferences(uid) try: argd['rg'] = int(pref['websearch_group_records']) except (KeyError, ValueError): pass # If any of the collection requires authentication, redirect # to the authentication form. for coll in argd['c'] + [argd['cc']]: if collection_restricted_p(coll): (auth_code, auth_msg) = acc_authorize_action(user_info, VIEWRESTRCOLL, collection=coll) if auth_code and user_info['email'] == 'guest': target = '/youraccount/login' + \ make_canonical_urlargd({'action' : VIEWRESTRCOLL, 'ln' : argd['ln'], 'referer' : \ weburl + '/search' + make_canonical_urlargd(argd, \ search_results_default_urlargd)}, {'ln' : cdslang}) return redirect_to_url(req, target) elif auth_code: return page_not_authorized(req, "../", \ text = auth_msg,\ navmenuid='search') # Keep all the arguments, they might be reused in the # search_engine itself to derivate other queries req.argd = argd # mod_python does not like to return [] in case when of=id: out = search_engine.perform_request_search(req, **argd) if out == []: return str(out) else: return out def cache(self, req, form): """Search cache page.""" argd = wash_urlargd(form, {'action': (str, 'show')}) return search_engine.perform_request_cache(req, action=argd['action']) def log(self, req, form): """Search log page.""" argd = wash_urlargd(form, {'date': (str, '')}) return search_engine.perform_request_log(req, date=argd['date']) def authenticate(self, req, form): """Restricted search results pages.""" argd = wash_search_urlargd(form) user_info = collect_user_info(req) for coll in argd['c'] + [argd['cc']]: if collection_restricted_p(coll): (auth_code, dummy) = acc_authorize_action(user_info, VIEWRESTRCOLL, collection=coll) if auth_code: return page_not_authorized(req, "../", text="You are not authorized to view this collection.", navmenuid='search') # Keep all the arguments, they might be reused in the # search_engine itself to derivate other queries req.argd = argd uid = getUid(req) if uid > 0: pref = get_user_preferences(uid) try: argd['rg'] = int(pref['websearch_group_records']) except (KeyError, ValueError): pass # mod_python does not like to return [] in case when of=id: out = search_engine.perform_request_search(req, **argd) if out == []: return str(out) else: return out # Parameters for the legacy URLs, of the form /?c=ALEPH legacy_collection_default_urlargd = { 'as': (int, 0), 'verbose': (int, 0), 'c': (str, cdsname)} class WebInterfaceSearchInterfacePages(WebInterfaceDirectory): """ Handling of collection navigation.""" _exports = [('index.py', 'legacy_collection'), ('', 'legacy_collection'), ('search.py', 'legacy_search'), 'search'] search = WebInterfaceSearchResultsPages() def _lookup(self, component, path): """ This handler is invoked for the dynamic URLs (for collections and records)""" if component == 'collection': c = '/'.join(path) def answer(req, form): """Accessing collections cached pages.""" # Accessing collections: this is for accessing the # cached page on top of each collection. argd = wash_urlargd(form, search_interface_default_urlargd) # We simply return the cached page of the collection argd['c'] = c if not argd['c']: # collection argument not present; display # home collection by default argd['c'] = cdsname return display_collection(req, **argd) return answer, [] elif component == 'record' or component == 'record-restricted': try: recid = int(path[0]) except IndexError: # display record #1 for URL /record without a number recid = 1 except ValueError: if path[0] == '': # display record #1 for URL /record/ without a number recid = 1 else: # display page not found for URLs like /record/foo return None, [] - + if recid <= 0: # display page not found for URLs like /record/-5 or /record/0 return None, [] + + format = None + tab = '' + try: + if path[1] in ['', 'files', 'reviews', 'comments', 'statistics', 'references']: + tab = path[1] + format = None + elif path[1] in output_formats: + tab = '' + format = path[1] + else: + # display page not found for URLs like /record/references + # for a collection where 'references' tabs is not visible + return None, [] + + except IndexError: + # Keep normal url if tabs is not specified + pass if component == 'record-restricted': - return WebInterfaceRecordRestrictedPages(recid), path[1:] + return WebInterfaceRecordRestrictedPages(recid, tab, format), path[1:] else: - return WebInterfaceRecordPages(recid), path[1:] + return WebInterfaceRecordPages(recid, tab, format), path[1:] return None, [] def _apache_authentication(self, req, referer, realm): http_check_credentials(req, realm, auth_apache_user_p) (user, passwd) = http_get_credentials(req, realm) setApacheUser(req, user) return redirect_to_url(req, referer or '%s/youraccount/youradminactivities' % sweburl) def legacy_collection(self, req, form): """Collection URL backward compatibility handling.""" accepted_args = dict(legacy_collection_default_urlargd) accepted_args.update({'referer' : (str, '%s/youraccount/your'), 'realm' : (str, '')}) argd = wash_urlargd(form, accepted_args) # Apache authentication stuff if argd['realm']: return self._apache_authentication(req, argd['referer'], argd['realm']) del argd['referer'] del argd['realm'] # If we specify no collection, then we don't need to redirect # the user, so that accessing returns the # default collection. if not form.has_key('c'): return display_collection(req, **argd) # make the collection an element of the path, and keep the # other query elements as is. If the collection is cdsname, # however, redirect to the main URL. c = argd['c'] del argd['c'] if c == cdsname: target = '/' else: target = '/collection/' + quote(c) target += make_canonical_urlargd(argd, legacy_collection_default_urlargd) return redirect_to_url(req, target) def legacy_search(self, req, form): """Search URL backward compatibility handling.""" argd = wash_search_urlargd(form) # We either jump into the generic search form, or the specific # /record/... display if a recid is requested if argd['recid'] != -1: target = '/record/%d' % argd['recid'] del argd['recid'] else: target = '/search' target += make_canonical_urlargd(argd, search_results_default_urlargd) return redirect_to_url(req, target) def display_collection(req, c, as, verbose, ln): "Display search interface page for collection c by looking in the collection cache." _ = gettext_set_language(ln) req.argd = drop_default_urlargd({'as': as, 'verbose': verbose, 'ln': ln}, search_interface_default_urlargd) # get user ID: try: uid = getUid(req) user_preferences = {} if uid == -1: return page_not_authorized(req, "../", text="You are not authorized to view this collection", navmenuid='search') elif uid > 0: user_preferences = get_user_preferences(uid) except Error: return page(title=_("Internal Error"), body = create_error_box(req, verbose=verbose, ln=ln), description="%s - Internal Error" % cdsname, keywords="%s, Internal Error" % cdsname, language=ln, req=req, navmenuid='search') # start display: req.content_type = "text/html" req.send_http_header() # deduce collection id: colID = get_colID(c) if type(colID) is not int: page_body = '

    ' + (_("Sorry, collection %s does not seem to exist.") % ('' + str(c) + '')) + '

    ' page_body = '

    ' + (_("You may want to start browsing from %s.") % ('' + cdsnameintl.get(ln, cdsname) + '')) + '

    ' return page(title=_("Collection %s Not Found") % cgi.escape(c), body=page_body, description=(cdsname + ' - ' + _("Not found") + ': ' + cgi.escape(str(c))), keywords="%s" % cdsname, uid=uid, language=ln, req=req, navmenuid='search') # display collection interface page: try: filedesc = open("%s/collections/%d/navtrail-as=%d-ln=%s.html" % (cachedir, colID, as, ln), "r") c_navtrail = filedesc.read() filedesc.close() filedesc = open("%s/collections/%d/body-as=%d-ln=%s.html" % (cachedir, colID, as, ln), "r") c_body = filedesc.read() filedesc.close() filedesc = open("%s/collections/%d/portalbox-tp-ln=%s.html" % (cachedir, colID, ln), "r") c_portalbox_tp = filedesc.read() filedesc.close() filedesc = open("%s/collections/%d/portalbox-te-ln=%s.html" % (cachedir, colID, ln), "r") c_portalbox_te = filedesc.read() filedesc.close() filedesc = open("%s/collections/%d/portalbox-lt-ln=%s.html" % (cachedir, colID, ln), "r") c_portalbox_lt = filedesc.read() filedesc.close() # show help boxes (usually located in "tr", "top right") # if users have not banned them in their preferences: c_portalbox_rt = "" if user_preferences.get('websearch_helpbox', 1) > 0: filedesc = open("%s/collections/%d/portalbox-rt-ln=%s.html" % (cachedir, colID, ln), "r") c_portalbox_rt = filedesc.read() filedesc.close() filedesc = open("%s/collections/%d/last-updated-ln=%s.html" % (cachedir, colID, ln), "r") c_last_updated = filedesc.read() filedesc.close() if c == cdsname: title = cdsnameintl.get(ln, cdsname) else: title = get_coll_i18nname(c, ln) return page(title=title, body=c_body, navtrail=c_navtrail, description="%s - %s" % (cdsname, c), keywords="%s, %s" % (cdsname, c), uid=uid, language=ln, req=req, cdspageboxlefttopadd=c_portalbox_lt, cdspageboxrighttopadd=c_portalbox_rt, titleprologue=c_portalbox_tp, titleepilogue=c_portalbox_te, lastupdated=c_last_updated, navmenuid='search') except: if verbose >= 9: req.write("
    c=%s" % c) req.write("
    as=%s" % as) req.write("
    ln=%s" % ln) req.write("
    colID=%s" % colID) req.write("
    uid=%s" % uid) return page(title=_("Internal Error"), body = create_error_box(req, ln=ln), description="%s - Internal Error" % cdsname, keywords="%s, Internal Error" % cdsname, uid=uid, language=ln, req=req, navmenuid='search') return "\n" class WebInterfaceRSSFeedServicePages(WebInterfaceDirectory): """RSS 2.0 feed service pages.""" def __call__(self, req, form): """RSS 2.0 feed service.""" # FIXME: currently searching live, should put cache in place via webcoll return search_engine.perform_request_search(req, of="xr") index = __call__ diff --git a/modules/websearch/lib/websearchadminlib.py b/modules/websearch/lib/websearchadminlib.py index 6abfcb7e7..bf0571fcc 100644 --- a/modules/websearch/lib/websearchadminlib.py +++ b/modules/websearch/lib/websearchadminlib.py @@ -1,3122 +1,3282 @@ ## $Id$ ## Administrator interface for WebSearch ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # pylint: disable-msg=C0301 """CDS Invenio WebSearch Administrator Interface.""" __revision__ = "$Id$" import cgi import re import random import time from invenio.config import \ cachedir, \ cdslang, \ cdsname, \ - weburl -from invenio.bibrankadminlib import write_outcome, modify_translations, get_def_name, get_name, get_languages, addadminbox, tupletotable, createhiddenform -from invenio.dbquery import run_sql, escape_string, get_table_update_time -from invenio.websearch_external_collections import external_collections_dictionary, external_collection_sort_engine_by_name, \ - external_collection_get_state, external_collection_get_update_state_list, external_collection_apply_changes + weburl,\ + CFG_WEBCOMMENT_ALLOW_COMMENTS,\ + CFG_WEBCOMMENT_ALLOW_REVIEWS +from invenio.bibrankadminlib import \ + write_outcome, \ + modify_translations, \ + get_def_name, \ + get_name, \ + get_languages, \ + addadminbox, \ + tupletotable, \ + createhiddenform +from invenio.dbquery import \ + run_sql, \ + escape_string, \ + get_table_update_time +from invenio.websearch_external_collections import \ + external_collections_dictionary, \ + external_collection_sort_engine_by_name, \ + external_collection_get_state, \ + external_collection_get_update_state_list, \ + external_collection_apply_changes +from invenio.websearch_external_collections_utils import \ + get_collection_descendants from invenio.websearch_external_collections_config import CFG_EXTERNAL_COLLECTION_STATES_NAME +from invenio.bibformat_elements import bfe_references +from invenio.bibformat_engine import BibFormatObject +from invenio.file import BibRecDocs def getnavtrail(previous = ''): """Get the navtrail""" navtrail = """Admin Area > WebSearch Admin """ % (weburl, weburl) navtrail = navtrail + previous return navtrail def perform_modifytranslations(colID, ln, sel_type='', trans=[], confirm=-1, callback='yes'): """Modify the translations of a collection sel_type - the nametype to modify trans - the translations in the same order as the languages from get_languages()""" output = '' subtitle = '' cdslangs = get_languages() if confirm in ["2", 2] and colID: finresult = modify_translations(colID, cdslangs, sel_type, trans, "collection") col_dict = dict(get_def_name('', "collection")) if colID and col_dict.has_key(int(colID)): colID = int(colID) subtitle = """3. Modify translations for collection '%s'   [?]""" % (col_dict[colID], weburl) if type(trans) is str: trans = [trans] if sel_type == '': sel_type = get_col_nametypes()[0][0] header = ['Language', 'Translation'] actions = [] types = get_col_nametypes() if len(types) > 1: text = """ Name type """ output += createhiddenform(action="modifytranslations#3", text=text, button="Select", colID=colID, ln=ln, confirm=0) if confirm in [-1, "-1", 0, "0"]: trans = [] for (key, value) in cdslangs: try: trans_names = get_name(colID, key, sel_type, "collection") trans.append(trans_names[0][0]) except StandardError, e: trans.append('') for nr in range(0, len(cdslangs)): actions.append(["%s %s" % (cdslangs[nr][1], (cdslangs[nr][0]==cdslang and '(def)' or ''))]) actions[-1].append('' % trans[nr]) text = tupletotable(header=header, tuple=actions) output += createhiddenform(action="modifytranslations#3", text=text, button="Modify", colID=colID, sel_type=sel_type, ln=ln, confirm=2) if sel_type and len(trans) and confirm in ["2", 2]: output += write_outcome(finresult) body = [output] if callback: return perform_editcollection(colID, ln, "perform_modifytranslations", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_modifyrankmethods(colID, ln, func='', rnkID='', confirm=0, callback='yes'): """Modify which rank methods is visible to the collection func - remove or add rank method rnkID - the id of the rank method.""" output = "" subtitle = "" col_dict = dict(get_def_name('', "collection")) rnk_dict = dict(get_def_name('', "rnkMETHOD")) if colID and col_dict.has_key(int(colID)): colID = int(colID) if func in ["0", 0] and confirm in ["1", 1]: finresult = attach_rnk_col(colID, rnkID) elif func in ["1", 1] and confirm in ["1", 1]: finresult = detach_rnk_col(colID, rnkID) subtitle = """9. Modify rank options for collection '%s'   [?]""" % (col_dict[colID], weburl) output = """
    The rank methods enabled for the collection '%s' is:
    """ % col_dict[colID] rnkmethods = get_col_rnk(colID, ln) output += """
    """ if not rnkmethods: output += """No rank methods""" else: for id, name in rnkmethods: output += """%s, """ % name output += """
    """ rnk_list = get_def_name('', "rnkMETHOD") rnk_dict_in_col = dict(get_col_rnk(colID, ln)) rnk_list = filter(lambda x: not rnk_dict_in_col.has_key(x[0]), rnk_list) if rnk_list: text = """ Enable: """ output += createhiddenform(action="modifyrankmethods#9", text=text, button="Enable", colID=colID, ln=ln, func=0, confirm=1) if confirm in ["1", 1] and func in ["0", 0] and int(rnkID) != -1: output += write_outcome(finresult) elif confirm not in ["0", 0] and func in ["0", 0]: output += """Please select a rank method.""" coll_list = get_col_rnk(colID, ln) if coll_list: text = """ Disable: """ output += createhiddenform(action="modifyrankmethods#9", text=text, button="Disable", colID=colID, ln=ln, func=1, confirm=1) if confirm in ["1", 1] and func in ["1", 1] and int(rnkID) != -1: output += write_outcome(finresult) elif confirm not in ["0", 0] and func in ["1", 1]: output += """Please select a rank method.""" body = [output] if callback: return perform_editcollection(colID, ln, "perform_modifyrankmethods", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_addcollectiontotree(colID, ln, add_dad='', add_son='', rtype='', mtype='', callback='yes', confirm=-1): """Form to add a collection to the tree. add_dad - the dad to add the collection to add_son - the collection to add rtype - add it as a regular or virtual mtype - add it to the regular or virtual tree.""" output = "" output2 = "" subtitle = """Attach collection to tree   [?]""" % (weburl) col_dict = dict(get_def_name('', "collection")) if confirm not in [-1, "-1"] and not (add_son and add_dad and rtype): output2 += """All fields must be filled.

    """ elif add_son and add_dad and rtype: add_son = int(add_son) add_dad = int(add_dad) if confirm not in [-1, "-1"]: if add_son == add_dad: output2 += """Cannot add a collection as a pointer to itself.

    """ elif check_col(add_dad, add_son): res = add_col_dad_son(add_dad, add_son, rtype) output2 += write_outcome(res) if res[0] == 1: output2 += """
    The collection will appear on your website after the next webcoll run. You can either run it manually or wait until bibsched does it for you.


    """ else: output2 += """Cannot add the collection '%s' as a %s subcollection of '%s' since it will either create a loop, or the association already exists.

    """ % (col_dict[add_son], (rtype=="r" and 'regular' or 'virtual'), col_dict[add_dad]) add_son = '' add_dad = '' rtype = '' tree = get_col_tree(colID) col_list = col_dict.items() col_list.sort(compare_on_val) output = show_coll_not_in_tree(colID, ln, col_dict) text = """ Attach collection:
    to parent collection:
    """ text += """ with relationship: """ % ((rtype=="r" and 'selected="selected"' or ''), (rtype=="v" and 'selected="selected"' or '')) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/addcollectiontotree" % weburl, text=text, button="Add", colID=colID, ln=ln, confirm=1) output += output2 #output += perform_showtree(colID, ln) body = [output] if callback: return perform_index(colID, ln, mtype="perform_addcollectiontotree", content=addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_addcollection(colID, ln, colNAME='', dbquery='', rest='', callback="yes", confirm=-1): """form to add a new collection. colNAME - the name of the new collection dbquery - the dbquery of the new collection rest - the group allowed to access the new collection""" output = "" subtitle = """Create new collection   [?]""" % (weburl) text = """ Default name
    """ % colNAME output = createhiddenform(action="%s/admin/websearch/websearchadmin.py/addcollection" % weburl, text=text, colID=colID, ln=ln, button="Add collection", confirm=1) if colNAME and confirm in ["1", 1]: res = add_col(colNAME, '', '') output += write_outcome(res) if res[0] == 1: output += perform_addcollectiontotree(colID=colID, ln=ln, add_son=res[1], callback='') elif confirm not in ["-1", -1]: output += """Please give the collection a name.""" body = [output] if callback: return perform_index(colID, ln=ln, mtype="perform_addcollection", content=addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_modifydbquery(colID, ln, dbquery='', callback='yes', confirm=-1): """form to modify the dbquery of the collection. dbquery - the dbquery of the collection.""" subtitle = '' output = "" col_dict = dict(get_def_name('', "collection")) if colID and col_dict.has_key(int(colID)): colID = int(colID) subtitle = """1. Modify collection query for collection '%s'   [?]""" % (col_dict[colID], weburl) if confirm == -1: res = run_sql("SELECT dbquery FROM collection WHERE id=%s" % colID) dbquery = res[0][0] if not dbquery: dbquery = '' reg_sons = len(get_col_tree(colID, 'r')) vir_sons = len(get_col_tree(colID, 'v')) if reg_sons > 1: if dbquery: output += "Warning: This collection got subcollections, and should because of this not have a collection query, for further explanation, check the WebSearch Guide
    " elif reg_sons <= 1: if not dbquery: output += "Warning: This collection does not have any subcollections, and should because of this have a collection query, for further explanation, check the WebSearch Guide
    " text = """ Query
    """ % cgi.escape(dbquery, 1) output += createhiddenform(action="modifydbquery", text=text, button="Modify", colID=colID, ln=ln, confirm=1) if confirm in ["1", 1]: res = modify_dbquery(colID, dbquery) if res: if dbquery == "": text = """Query removed for this collection.""" else: text = """Query set for this collection.""" else: text = """Sorry, could not change query.""" output += text body = [output] if callback: return perform_editcollection(colID, ln, "perform_modifydbquery", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_modifyrestricted(colID, ln, rest='', callback='yes', confirm=-1): """modify which apache group is allowed to access the collection. rest - the groupname""" subtitle = '' output = "" col_dict = dict(get_def_name('', "collection")) if colID and col_dict.has_key(int(colID)): colID = int(colID) subtitle = """2. Modify access restrictions for collection '%s'   [?]""" % (col_dict[colID], weburl) if confirm == -1: res = run_sql("SELECT restricted FROM collection WHERE id=%s" % colID) rest = res[0][0] if not rest: rest = '' text = """ Restricted to:
    """ % rest output += createhiddenform(action="modifyrestricted", text=text, button="Modify", colID=colID, ln=ln, confirm=1) if confirm in ["1", 1]: res = modify_restricted(colID, rest) if res: if rest == "": text = """Removed restriction for this collection.""" else: text = """Restriction set for this collection.""" else: text = """Sorry, could not change the access restrictions.""" output += text body = [output] if callback: return perform_editcollection(colID, ln, "perform_modifyrestricted", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_modifycollectiontree(colID, ln, move_up='', move_down='', move_from='', move_to='', delete='', rtype='', callback='yes', confirm=0): """to modify the collection tree: move a collection up and down, delete a collection, or change the father of the collection. colID - the main collection of the tree, the root move_up - move this collection up (is not the collection id, but the place in the tree) move_up - move this collection down (is not the collection id, but the place in the tree) move_from - move this collection from the current positon (is not the collection id, but the place in the tree) move_to - move the move_from collection and set this as it's father. (is not the collection id, but the place in the tree) delete - delete this collection from the tree (is not the collection id, but the place in the tree) rtype - the type of the collection in the tree, regular or virtual""" colID = int(colID) tree = get_col_tree(colID, rtype) col_dict = dict(get_def_name('', "collection")) subtitle = """Modify collection tree: %s   [?]   Printer friendly version""" % (col_dict[colID], weburl, weburl, colID, ln) fin_output = "" output = "" try: if move_up: move_up = int(move_up) switch = find_last(tree, move_up) if switch and switch_col_treescore(tree[move_up], tree[switch]): output += """Moved the %s collection '%s' up and '%s' down.

    """ % ((rtype=="r" and 'regular' or 'virtual'), col_dict[tree[move_up][0]], col_dict[tree[switch][0]]) else: output += """Could not move the %s collection '%s' up and '%s' down.

    """ % ((rtype=="r" and 'regular' or 'virtual'), col_dict[tree[move_up][0]], col_dict[tree[switch][0]]) elif move_down: move_down = int(move_down) switch = find_next(tree, move_down) if switch and switch_col_treescore(tree[move_down], tree[switch]): output += """Moved the %s collection '%s' down and '%s' up.

    """ % ((rtype=="r" and 'regular' or 'virtual'), col_dict[tree[move_down][0]], col_dict[tree[switch][0]]) else: output += """Could not move the %s collection '%s' up and '%s' down.

    """ % ((rtype=="r" and 'regular' or 'virtual'), col_dict[tree[move_up][0]],col_dict[tree[switch][0]]) elif delete: delete = int(delete) if confirm in [0, "0"]: if col_dict[tree[delete][0]] != col_dict[tree[delete][3]]: text = """Do you want to remove the %s collection '%s' and its subcollections in the %s collection '%s'. """ % ((tree[delete][4]=="r" and 'regular' or 'virtual'), col_dict[tree[delete][0]], (rtype=="r" and 'regular' or 'virtual'), col_dict[tree[delete][3]]) else: text = """Do you want to remove all subcollections of the %s collection '%s'. """ % ((rtype=="r" and 'regular' or 'virtual'), col_dict[tree[delete][3]]) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/modifycollectiontree#tree" % weburl, text=text, button="Confirm", colID=colID, delete=delete, rtype=rtype, ln=ln, confirm=1) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/index?mtype=perform_modifycollectiontree#tree" % weburl, text="To cancel", button="Cancel", colID=colID, ln=ln) else: if remove_col_subcol(tree[delete][0], tree[delete][3], rtype): if col_dict[tree[delete][0]] != col_dict[tree[delete][3]]: output += """Removed the %s collection '%s' and its subcollections in subdirectory '%s'.

    """ % ((tree[delete][4]=="r" and 'regular' or 'virtual'), col_dict[tree[delete][0]], col_dict[tree[delete][3]]) else: output += """Removed the subcollections of the %s collection '%s'.

    """ % ((rtype=="r" and 'regular' or 'virtual'), col_dict[tree[delete][3]]) else: output += """Could not remove the collection from the tree.

    """ delete = '' elif move_from and not move_to: move_from_rtype = move_from[0] move_from_id = int(move_from[1:len(move_from)]) text = """Select collection to place the %s collection '%s' under.

    """ % ((move_from_rtype=="r" and 'regular' or 'virtual'), col_dict[tree[move_from_id][0]]) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/index?mtype=perform_modifycollectiontree#tree" % weburl, text=text, button="Cancel", colID=colID, ln=ln) elif move_from and move_to: move_from_rtype = move_from[0] move_from_id = int(move_from[1:len(move_from)]) move_to_rtype = move_to[0] move_to_id = int(move_to[1:len(move_to)]) tree_from = get_col_tree(colID, move_from_rtype) tree_to = get_col_tree(colID, move_to_rtype) if confirm in [0, '0']: if move_from_id == move_to_id and move_from_rtype == move_to_rtype: output += """Cannot move to itself.

    """ elif tree_from[move_from_id][3] == tree_to[move_to_id][0] and move_from_rtype==move_to_rtype: output += """The collection is already there.

    """ elif check_col(tree_to[move_to_id][0], tree_from[move_from_id][0]) or (tree_to[move_to_id][0] == 1 and tree_from[move_from_id][3] == tree_to[move_to_id][0] and move_from_rtype != move_to_rtype): text = """Move %s collection '%s' to the %s collection '%s'. """ % ((tree_from[move_from_id][4]=="r" and 'regular' or 'virtual'), col_dict[tree_from[move_from_id][0]], (tree_to[move_to_id][4]=="r" and 'regular' or 'virtual'), col_dict[tree_to[move_to_id][0]]) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/modifycollectiontree#tree" % weburl, text=text, button="Confirm", colID=colID, move_from=move_from, move_to=move_to, ln=ln, rtype=rtype, confirm=1) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/index?mtype=perform_modifycollectiontree#tree" % weburl, text="""To cancel""", button="Cancel", colID=colID, ln=ln) else: output += """Cannot move the collection '%s' and set it as a subcollection of '%s' since it will create a loop.

    """ % (col_dict[tree_from[move_from_id][0]], col_dict[tree_to[move_to_id][0]]) else: if (move_to_id != 0 and move_col_tree(tree_from[move_from_id], tree_to[move_to_id])) or (move_to_id == 0 and move_col_tree(tree_from[move_from_id], tree_to[move_to_id], move_to_rtype)): output += """Moved %s collection '%s' to the %s collection '%s'.

    """ % ((move_from_rtype=="r" and 'regular' or 'virtual'), col_dict[tree_from[move_from_id][0]], (move_to_rtype=="r" and 'regular' or 'virtual'), col_dict[tree_to[move_to_id][0]]) else: output += """Could not move %s collection '%s' to the %s collection '%s'.

    """ % ((move_from_rtype=="r" and 'regular' or 'virtual'), col_dict[tree_from[move_from_id][0]], (move_to_rtype=="r" and 'regular' or 'virtual'), col_dict[tree_to[move_to_id][0]]) move_from = '' move_to = '' else: output += """ """ except StandardError, e: return """An error occured. """ output += """
    Narrow by collection: Focus on...:
    """ tree = get_col_tree(colID, 'r') output += create_colltree(tree, col_dict, colID, ln, move_from, move_to, 'r', "yes") output += """ """ tree = get_col_tree(colID, 'v') output += create_colltree(tree, col_dict, colID, ln, move_from, move_to, 'v', "yes") output += """
    """ body = [output] if callback: return perform_index(colID, ln, mtype="perform_modifycollectiontree", content=addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_showtree(colID, ln): """create collection tree/hiarchy""" col_dict = dict(get_def_name('', "collection")) subtitle = "Collection tree: %s" % col_dict[int(colID)] output = """
    Narrow by collection: Focus on...:
    """ tree = get_col_tree(colID, 'r') output += create_colltree(tree, col_dict, colID, ln, '', '', 'r', '') output += """ """ tree = get_col_tree(colID, 'v') output += create_colltree(tree, col_dict, colID, ln, '', '', 'v', '') output += """
    """ body = [output] return addadminbox(subtitle, body) def perform_addportalbox(colID, ln, title='', body='', callback='yes', confirm=-1): """form to add a new portalbox title - the title of the portalbox body - the body of the portalbox""" col_dict = dict(get_def_name('', "collection")) colID = int(colID) subtitle = """Create new portalbox""" text = """ Title
    Body
    """ % (cgi.escape(title), cgi.escape(body)) output = createhiddenform(action="addportalbox#5.1", text=text, button="Add", colID=colID, ln=ln, confirm=1) if body and confirm in [1, "1"]: res = add_pbx(title, body) output += write_outcome(res) if res[1] == 1: output += """Add portalbox to collection""" % (colID, ln, res[1]) elif confirm not in [-1, "-1"]: output += """Body field must be filled. """ body = [output] return perform_showportalboxes(colID, ln, content=addadminbox(subtitle, body)) def perform_addexistingportalbox(colID, ln, pbxID=-1, score=0, position='', sel_ln='', callback='yes', confirm=-1): """form to add an existing portalbox to a collection. colID - the collection to add the portalbox to pbxID - the portalbox to add score - the importance of the portalbox. position - the position of the portalbox on the page sel_ln - the language of the portalbox""" subtitle = """Add existing portalbox to collection""" output = "" colID = int(colID) res = get_pbx() pos = get_pbx_pos() lang = dict(get_languages()) col_dict = dict(get_def_name('', "collection")) pbx_dict = dict(map(lambda x: (x[0], x[1]), res)) col_pbx = get_col_pbx(colID) col_pbx = dict(map(lambda x: (x[0], x[5]), col_pbx)) if len(res) > 0: text = """ Portalbox
    Language
    Position " output += createhiddenform(action="addexistingportalbox#5.2", text=text, button="Add", colID=colID, ln=ln, confirm=1) else: output = """No existing portalboxes to add, please create a new one. """ if pbxID > -1 and position and sel_ln and confirm in [1, "1"]: pbxID = int(pbxID) res = add_col_pbx(colID, pbxID, sel_ln, position, '') output += write_outcome(res) elif pbxID > -1 and confirm not in [-1, "-1"]: output += """All fields must be filled. """ body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showportalboxes(colID, ln, content=output) def perform_deleteportalbox(colID, ln, pbxID=-1, callback='yes', confirm=-1): """form to delete a portalbox which is not in use. colID - the current collection. pbxID - the id of the portalbox""" subtitle = """Delete an unused portalbox""" output = "" colID = int(colID) if pbxID not in [-1, "-1"] and confirm in [1, "1"]: ares = get_pbx() pbx_dict = dict(map(lambda x: (x[0], x[1]), ares)) if pbx_dict.has_key(int(pbxID)): pname = pbx_dict[int(pbxID)] ares = delete_pbx(int(pbxID)) else: return """This portalbox does not exist""" res = get_pbx() col_dict = dict(get_def_name('', "collection")) pbx_dict = dict(map(lambda x: (x[0], x[1]), res)) col_pbx = get_col_pbx() col_pbx = dict(map(lambda x: (x[0], x[5]), col_pbx)) if len(res) > 0: text = """ Portalbox
    """ output += createhiddenform(action="deleteportalbox#5.3", text=text, button="Delete", colID=colID, ln=ln, confirm=1) if pbxID not in [-1, "-1"]: pbxID = int(pbxID) if confirm in [1, "1"]: output += write_outcome(ares) elif confirm not in [-1, "-1"]: output += """Choose a portalbox to delete. """ body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showportalboxes(colID, ln, content=output) def perform_modifyportalbox(colID, ln, pbxID=-1, score='', position='', sel_ln='', title='', body='', callback='yes', confirm=-1): """form to modify a portalbox in a collection, or change the portalbox itself. colID - the id of the collection. pbxID - the portalbox to change score - the score of the portalbox connected to colID which should be changed. position - the position of the portalbox in collection colID to change.""" subtitle = "" output = "" colID = int(colID) res = get_pbx() pos = get_pbx_pos() lang = dict(get_languages()) col_dict = dict(get_def_name('', "collection")) pbx_dict = dict(map(lambda x: (x[0], x[1]), res)) col_pbx = get_col_pbx(colID) col_pbx = dict(map(lambda x: (x[0], x[5]), col_pbx)) if pbxID not in [-1, "-1"]: pbxID = int(pbxID) subtitle = """Modify portalbox '%s' for this collection""" % pbx_dict[pbxID] col_pbx = get_col_pbx(colID) if not (score and position) and not (body and title): for (id_pbx, id_collection, tln, score, position, title, body) in col_pbx: if id_pbx == pbxID: break output += """Collection (presentation) specific values (Changes implies only to this collection.)
    """ text = """ Position
    """ output += createhiddenform(action="modifyportalbox#5.4", text=text, button="Modify", colID=colID, pbxID=pbxID, score=score, title=title, body=cgi.escape(body, 1), sel_ln=sel_ln, ln=ln, confirm=3) if pbxID > -1 and score and position and confirm in [3, "3"]: pbxID = int(pbxID) res = modify_pbx(colID, pbxID, sel_ln, score, position, '', '') res2 = get_pbx() pbx_dict = dict(map(lambda x: (x[0], x[1]), res2)) output += write_outcome(res) output += """
    Portalbox (content) specific values (any changes appears everywhere the portalbox is used.)""" text = """ Title
    """ % cgi.escape(title) text += """ Body
    """ % cgi.escape(body) output += createhiddenform(action="modifyportalbox#5.4", text=text, button="Modify", colID=colID, pbxID=pbxID, sel_ln=sel_ln, score=score, position=position, ln=ln, confirm=4) if pbxID > -1 and confirm in [4, "4"]: pbxID = int(pbxID) res = modify_pbx(colID, pbxID, sel_ln, '', '', title, body) output += write_outcome(res) else: output = """No portalbox to modify.""" body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showportalboxes(colID, ln, content=output) def perform_switchpbxscore(colID, id_1, id_2, sel_ln, ln): """Switch the score of id_1 and id_2 in collection_portalbox. colID - the current collection id_1/id_2 - the id's to change the score for. sel_ln - the language of the portalbox""" output = "" res = get_pbx() pbx_dict = dict(map(lambda x: (x[0], x[1]), res)) res = switch_pbx_score(colID, id_1, id_2, sel_ln) output += write_outcome(res) return perform_showportalboxes(colID, ln, content=output) def perform_showportalboxes(colID, ln, callback='yes', content='', confirm=-1): """show the portalboxes of this collection. colID - the portalboxes to show the collection for.""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) subtitle = """5. Modify portalboxes for collection '%s'   [?]""" % (col_dict[colID], weburl) output = "" pos = get_pbx_pos() output = """
    Portalbox actions (not related to this collection)
    Create new portalbox
    Delete an unused portalbox
    Collection specific actions
    Add existing portalbox to collection
    """ % (colID, ln, colID, ln, colID, ln) header = ['Position', 'Language', '', 'Title', 'Actions'] actions = [] cdslang = get_languages() lang = dict(cdslang) pos_list = pos.items() pos_list.sort() if len(get_col_pbx(colID)) > 0: for (key, value) in cdslang: for (pos_key, pos_value) in pos_list: res = get_col_pbx(colID, key, pos_key) i = 0 for (pbxID, colID_pbx, tln, score, position, title, body) in res: move = """
    """ if i != 0: move += """""" % (weburl, colID, ln, pbxID, res[i - 1][0], tln, random.randint(0, 1000), weburl) else: move += "   " move += "" i += 1 if i != len(res): move += """""" % (weburl, colID, ln, pbxID, res[i][0], tln, random.randint(0, 1000), weburl) move += """
    """ actions.append(["%s" % (i==1 and pos[position] or ''), "%s" % (i==1 and lang[tln] or ''), move, "%s" % title]) for col in [(('Modify', 'modifyportalbox'), ('Remove', 'removeportalbox'),)]: actions[-1].append('%s' % (weburl, col[0][1], colID, ln, pbxID, tln, col[0][0])) for (str, function) in col[1:]: actions[-1][-1] += ' / %s' % (weburl, function, colID, ln, pbxID, tln, str) output += tupletotable(header=header, tuple=actions) else: output += """No portalboxes exists for this collection""" output += content body = [output] if callback: return perform_editcollection(colID, ln, "perform_showportalboxes", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_removeportalbox(colID, ln, pbxID='', sel_ln='', callback='yes', confirm=0): """form to remove a portalbox from a collection. colID - the current collection, remove the portalbox from this collection. sel_ln - remove the portalbox with this language pbxID - remove the portalbox with this id""" subtitle = """Remove portalbox""" output = "" col_dict = dict(get_def_name('', "collection")) res = get_pbx() pbx_dict = dict(map(lambda x: (x[0], x[1]), res)) if colID and pbxID and sel_ln: colID = int(colID) pbxID = int(pbxID) if confirm in ["0", 0]: text = """Do you want to remove the portalbox '%s' from the collection '%s'.""" % (pbx_dict[pbxID], col_dict[colID]) output += createhiddenform(action="removeportalbox#5.5", text=text, button="Confirm", colID=colID, pbxID=pbxID, sel_ln=sel_ln, confirm=1) elif confirm in ["1", 1]: res = remove_pbx(colID, pbxID, sel_ln) output += write_outcome(res) body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showportalboxes(colID, ln, content=output) def perform_switchfmtscore(colID, type, id_1, id_2, ln): """Switch the score of id_1 and id_2 in the table type. colID - the current collection id_1/id_2 - the id's to change the score for. type - like "format" """ fmt_dict = dict(get_def_name('', "format")) res = switch_score(colID, id_1, id_2, type) output = write_outcome(res) return perform_showoutputformats(colID, ln, content=output) def perform_switchfldscore(colID, id_1, id_2, fmeth, ln): """Switch the score of id_1 and id_2 in collection_field_fieldvalue. colID - the current collection id_1/id_2 - the id's to change the score for.""" fld_dict = dict(get_def_name('', "field")) res = switch_fld_score(colID, id_1, id_2) output = write_outcome(res) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output) def perform_switchfldvaluescore(colID, id_1, id_fldvalue_1, id_fldvalue_2, ln): """Switch the score of id_1 and id_2 in collection_field_fieldvalue. colID - the current collection id_1/id_2 - the id's to change the score for.""" name_1 = run_sql("SELECT name from fieldvalue where id=%s" % id_fldvalue_1)[0][0] name_2 = run_sql("SELECT name from fieldvalue where id=%s" % id_fldvalue_2)[0][0] res = switch_fld_value_score(colID, id_1, id_fldvalue_1, id_fldvalue_2) output = write_outcome(res) return perform_modifyfield(colID, fldID=id_1, ln=ln, content=output) def perform_addnewfieldvalue(colID, fldID, ln, name='', value='', callback="yes", confirm=-1): """form to add a new fieldvalue. name - the name of the new fieldvalue value - the value of the new fieldvalue """ output = "" subtitle = """Add new value""" text = """ Display name
    Search value
    """ % (name, value) output = createhiddenform(action="%s/admin/websearch/websearchadmin.py/addnewfieldvalue" % weburl, text=text, colID=colID, fldID=fldID, ln=ln, button="Add", confirm=1) if name and value and confirm in ["1", 1]: res = add_fldv(name, value) output += write_outcome(res) if res[0] == 1: res = add_col_fld(colID, fldID, 'seo', res[1]) if res[0] == 0: output += "
    " + write_outcome(res) elif confirm not in ["-1", -1]: output += """Please fill in name and value. """ body = [output] output = "
    " + addadminbox(subtitle, body) return perform_modifyfield(colID, fldID=fldID, ln=ln, content=output) def perform_modifyfieldvalue(colID, fldID, fldvID, ln, name='', value='', callback="yes", confirm=-1): """form to modify a fieldvalue. name - the name of the fieldvalue value - the value of the fieldvalue """ if confirm in [-1, "-1"]: res = get_fld_value(fldvID) (id, name, value) = res[0] output = "" subtitle = """Modify existing value""" output = """
    Warning: Modifications done below will also inflict on all places the modified data is used.
    """ text = """ Display name
    Search value
    """ % (name, value) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/modifyfieldvalue" % weburl, text=text, colID=colID, fldID=fldID, fldvID=fldvID, ln=ln, button="Update", confirm=1) output += createhiddenform(action="%s/admin/websearch/websearchadmin.py/modifyfieldvalue" % weburl, text="Delete value and all associations", colID=colID, fldID=fldID, fldvID=fldvID, ln=ln, button="Delete", confirm=2) if name and value and confirm in ["1", 1]: res = update_fldv(fldvID, name, value) output += write_outcome(res) #if res: # output += """Operation successfully completed.""" #else: # output += """Operation failed.""" elif confirm in ["2", 2]: res = delete_fldv(fldvID) output += write_outcome(res) elif confirm not in ["-1", -1]: output += """Please fill in name and value.""" body = [output] output = "
    " + addadminbox(subtitle, body) return perform_modifyfield(colID, fldID=fldID, ln=ln, content=output) def perform_removefield(colID, ln, fldID='', fldvID='', fmeth='', callback='yes', confirm=0): """form to remove a field from a collection. colID - the current collection, remove the field from this collection. sel_ln - remove the field with this language fldID - remove the field with this id""" if fmeth == "soo": field = "sort option" elif fmeth == "sew": field = "search field" elif fmeth == "seo": field = "search option" else: field = "field" subtitle = """Remove %s""" % field output = "" col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) res = get_fld_value() fldv_dict = dict(map(lambda x: (x[0], x[1]), res)) if colID and fldID: colID = int(colID) fldID = int(fldID) if fldvID and fldvID != "None": fldvID = int(fldvID) if confirm in ["0", 0]: text = """Do you want to remove the %s '%s' %s from the collection '%s'.""" % (field, fld_dict[fldID], (fldvID not in["", "None"] and "with value '%s'" % fldv_dict[fldvID] or ''), col_dict[colID]) output += createhiddenform(action="removefield#6.5", text=text, button="Confirm", colID=colID, fldID=fldID, fldvID=fldvID, fmeth=fmeth, confirm=1) elif confirm in ["1", 1]: res = remove_fld(colID, fldID, fldvID) output += write_outcome(res) body = [output] output = "
    " + addadminbox(subtitle, body) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output) def perform_removefieldvalue(colID, ln, fldID='', fldvID='', fmeth='', callback='yes', confirm=0): """form to remove a field from a collection. colID - the current collection, remove the field from this collection. sel_ln - remove the field with this language fldID - remove the field with this id""" subtitle = """Remove value""" output = "" col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) res = get_fld_value() fldv_dict = dict(map(lambda x: (x[0], x[1]), res)) if colID and fldID: colID = int(colID) fldID = int(fldID) if fldvID and fldvID != "None": fldvID = int(fldvID) if confirm in ["0", 0]: text = """Do you want to remove the value '%s' from the search option '%s'.""" % (fldv_dict[fldvID], fld_dict[fldID]) output += createhiddenform(action="removefieldvalue#7.4", text=text, button="Confirm", colID=colID, fldID=fldID, fldvID=fldvID, fmeth=fmeth, confirm=1) elif confirm in ["1", 1]: res = remove_fld(colID, fldID, fldvID) output += write_outcome(res) body = [output] output = "
    " + addadminbox(subtitle, body) return perform_modifyfield(colID, fldID=fldID, ln=ln, content=output) def perform_rearrangefieldvalue(colID, fldID, ln, callback='yes', confirm=-1): """rearrang the fieldvalues alphabetically colID - the collection fldID - the field to rearrange the fieldvalue for """ subtitle = "Order values alphabetically" output = "" col_fldv = get_col_fld(colID, 'seo', fldID) col_fldv = dict(map(lambda x: (x[1], x[0]), col_fldv)) fldv_names = get_fld_value() fldv_names = map(lambda x: (x[0], x[1]), fldv_names) if not col_fldv.has_key(None): vscore = len(col_fldv) for (fldvID, name) in fldv_names: if col_fldv.has_key(fldvID): run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=%s WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (vscore, colID, fldID, fldvID)) vscore -= 1 output += write_outcome((1, "")) else: output += write_outcome((0, (0, "No values to order"))) body = [output] output = "
    " + addadminbox(subtitle, body) return perform_modifyfield(colID, fldID, ln, content=output) def perform_rearrangefield(colID, ln, fmeth, callback='yes', confirm=-1): """rearrang the fields alphabetically colID - the collection """ subtitle = "Order fields alphabetically" output = "" col_fld = dict(map(lambda x: (x[0], x[1]), get_col_fld(colID, fmeth))) fld_names = get_def_name('', "field") if len(col_fld) > 0: score = len(col_fld) for (fldID, name) in fld_names: if col_fld.has_key(fldID): run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (score, colID, fldID)) score -= 1 output += write_outcome((1, "")) else: output += write_outcome((0, (0, "No fields to order"))) body = [output] output = "
    " + addadminbox(subtitle, body) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output) def perform_addexistingfieldvalue(colID, fldID, fldvID=-1, ln=cdslang, callback='yes', confirm=-1): """form to add an existing fieldvalue to a field. colID - the collection fldID - the field to add the fieldvalue to fldvID - the fieldvalue to add""" subtitle = """Add existing value to search option""" output = "" if fldvID not in [-1, "-1"] and confirm in [1, "1"]: fldvID = int(fldvID) ares = add_col_fld(colID, fldID, 'seo', fldvID) colID = int(colID) fldID = int(fldID) lang = dict(get_languages()) res = get_def_name('', "field") col_dict = dict(get_def_name('', "collection")) fld_dict = dict(res) col_fld = dict(map(lambda x: (x[0], x[1]), get_col_fld(colID, 'seo'))) fld_value = get_fld_value() fldv_dict = dict(map(lambda x: (x[0], x[1]), fld_value)) text = """ Value
    """ output += createhiddenform(action="addexistingfieldvalue#7.4", text=text, button="Add", colID=colID, fldID=fldID, ln=ln, confirm=1) if fldvID not in [-1, "-1"] and confirm in [1, "1"]: output += write_outcome(ares) elif confirm in [1, "1"]: output += """Select a value to add and try again.""" body = [output] output = "
    " + addadminbox(subtitle, body) return perform_modifyfield(colID, fldID, ln, content=output) def perform_addexistingfield(colID, ln, fldID=-1, fldvID=-1, fmeth='', callback='yes', confirm=-1): """form to add an existing field to a collection. colID - the collection to add the field to fldID - the field to add sel_ln - the language of the field""" subtitle = """Add existing field to collection""" output = "" if fldID not in [-1, "-1"] and confirm in [1, "1"]: fldID = int(fldID) ares = add_col_fld(colID, fldID, fmeth, fldvID) colID = int(colID) lang = dict(get_languages()) res = get_def_name('', "field") col_dict = dict(get_def_name('', "collection")) fld_dict = dict(res) col_fld = dict(map(lambda x: (x[0], x[1]), get_col_fld(colID, fmeth))) fld_value = get_fld_value() fldv_dict = dict(map(lambda x: (x[0], x[1]), fld_value)) if fldvID: fldvID = int(fldvID) text = """ Field
    """ output += createhiddenform(action="addexistingfield#6.2", text=text, button="Add", colID=colID, fmeth=fmeth, ln=ln, confirm=1) if fldID not in [-1, "-1"] and confirm in [1, "1"]: output += write_outcome(ares) elif fldID in [-1, "-1"] and confirm not in [-1, "-1"]: output += """Select a field. """ body = [output] output = "
    " + addadminbox(subtitle, body) if fmeth == "soo": return perform_showsortoptions(colID, ln, content=output) elif fmeth == "sew": return perform_showsearchfields(colID, ln, content=output) elif fmeth == "seo": return perform_showsearchoptions(colID, ln, content=output) def perform_showsortoptions(colID, ln, callback='yes', content='', confirm=-1): """show the sort fields of this collection..""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) fld_type = get_sort_nametypes() subtitle = """8. Modify sort options for collection '%s'   [?]""" % (col_dict[colID], weburl) output = """
    Field actions (not related to this collection)
    Go to the BibIndex interface to modify the available sort options
    Collection specific actions
    Add sort option to collection
    Order sort options alphabetically
    """ % (colID, ln, colID, ln) header = ['', 'Sort option', 'Actions'] actions = [] cdslang = get_languages() lang = dict(cdslang) fld_type_list = fld_type.items() if len(get_col_fld(colID, 'soo')) > 0: res = get_col_fld(colID, 'soo') i = 0 for (fldID, fldvID, stype, score, score_fieldvalue) in res: move = """
    """ if i != 0: move += """""" % (weburl, colID, ln, fldID, res[i - 1][0], random.randint(0, 1000), weburl) else: move += "    " move += "" i += 1 if i != len(res): move += """""" % (weburl, colID, ln, fldID, res[i][0], random.randint(0, 1000), weburl) move += """
    """ actions.append([move, fld_dict[int(fldID)]]) for col in [(('Remove sort option', 'removefield'),)]: actions[-1].append('%s' % (weburl, col[0][1], colID, ln, fldID, col[0][0])) for (str, function) in col[1:]: actions[-1][-1] += ' / %s' % (weburl, function, colID, ln, fldID, str) output += tupletotable(header=header, tuple=actions) else: output += """No sort options exists for this collection""" output += content body = [output] if callback: return perform_editcollection(colID, ln, "perform_showsortoptions", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_showsearchfields(colID, ln, callback='yes', content='', confirm=-1): """show the search fields of this collection..""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) fld_type = get_sort_nametypes() subtitle = """6. Modify search fields for collection '%s'   [?]""" % (col_dict[colID], weburl) output = """
    Field actions (not related to this collection)
    Go to the BibIndex interface to modify the available search fields
    Collection specific actions
    Add search field to collection
    Order search fields alphabetically
    """ % (colID, ln, colID, ln) header = ['', 'Search field', 'Actions'] actions = [] cdslang = get_languages() lang = dict(cdslang) fld_type_list = fld_type.items() if len(get_col_fld(colID, 'sew')) > 0: res = get_col_fld(colID, 'sew') i = 0 for (fldID, fldvID, stype, score, score_fieldvalue) in res: move = """
    """ if i != 0: move += """""" % (weburl, colID, ln, fldID, res[i - 1][0], random.randint(0, 1000), weburl) else: move += "   " move += "" i += 1 if i != len(res): move += '' % (weburl, colID, ln, fldID, res[i][0], random.randint(0, 1000), weburl) move += """
    """ actions.append([move, fld_dict[int(fldID)]]) for col in [(('Remove search field', 'removefield'),)]: actions[-1].append('%s' % (weburl, col[0][1], colID, ln, fldID, col[0][0])) for (str, function) in col[1:]: actions[-1][-1] += ' / %s' % (weburl, function, colID, ln, fldID, str) output += tupletotable(header=header, tuple=actions) else: output += """No search fields exists for this collection""" output += content body = [output] if callback: return perform_editcollection(colID, ln, "perform_showsearchfields", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_showsearchoptions(colID, ln, callback='yes', content='', confirm=-1): """show the sort and search options of this collection..""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) fld_type = get_sort_nametypes() subtitle = """7. Modify search options for collection '%s'   [?]""" % (col_dict[colID], weburl) output = """
    Field actions (not related to this collection)
    Go to the BibIndex interface to modify the available search options
    Collection specific actions
    Add search option to collection
    Order search options alphabetically
    """ % (colID, ln, colID, ln) header = ['', 'Search option', 'Actions'] actions = [] cdslang = get_languages() lang = dict(cdslang) fld_type_list = fld_type.items() fld_distinct = run_sql("SELECT distinct(id_field) FROM collection_field_fieldvalue WHERE type='seo' AND id_collection=%s ORDER by score desc" % colID) if len(fld_distinct) > 0: i = 0 for (id) in fld_distinct: fldID = id[0] col_fld = get_col_fld(colID, 'seo', fldID) move = "" if i != 0: move += """""" % (weburl, colID, ln, fldID, fld_distinct[i - 1][0], random.randint(0, 1000), weburl) else: move += "   " i += 1 if i != len(fld_distinct): move += '' % (weburl, colID, ln, fldID, fld_distinct[i][0], random.randint(0, 1000), weburl) actions.append([move, "%s" % fld_dict[fldID]]) for col in [(('Modify values', 'modifyfield'), ('Remove search option', 'removefield'),)]: actions[-1].append('%s' % (weburl, col[0][1], colID, ln, fldID, col[0][0])) for (str, function) in col[1:]: actions[-1][-1] += ' / %s' % (weburl, function, colID, ln, fldID, str) output += tupletotable(header=header, tuple=actions) else: output += """No search options exists for this collection""" output += content body = [output] if callback: return perform_editcollection(colID, ln, "perform_showsearchoptions", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_modifyfield(colID, fldID, fldvID='', ln=cdslang, content='', callback='yes', confirm=0): """Modify the fieldvalues for a field""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) fld_type = get_sort_nametypes() fldID = int(fldID) subtitle = """Modify values for field '%s'""" % (fld_dict[fldID]) output = """
    Value specific actions
    Add existing value to search option
    Add new value to search option
    Order values alphabetically
    """ % (colID, ln, fldID, colID, ln, fldID, colID, ln, fldID) header = ['', 'Value name', 'Actions'] actions = [] cdslang = get_languages() lang = dict(cdslang) fld_type_list = fld_type.items() col_fld = list(get_col_fld(colID, 'seo', fldID)) if len(col_fld) == 1 and col_fld[0][1] is None: output += """No values added for this search option yet""" else: j = 0 for (fldID, fldvID, stype, score, score_fieldvalue) in col_fld: fieldvalue = get_fld_value(fldvID) move = "" if j != 0: move += """""" % (weburl, colID, ln, fldID, fldvID, col_fld[j - 1][1], random.randint(0, 1000), weburl) else: move += "   " j += 1 if j != len(col_fld): move += """""" % (weburl, colID, ln, fldID, fldvID, col_fld[j][1], random.randint(0, 1000), weburl) if fieldvalue[0][1] != fieldvalue[0][2] and fldvID is not None: actions.append([move, "%s - %s" % (fieldvalue[0][1], fieldvalue[0][2])]) elif fldvID is not None: actions.append([move, "%s" % fieldvalue[0][1]]) move = '' for col in [(('Modify value', 'modifyfieldvalue'), ('Remove value', 'removefieldvalue'),)]: actions[-1].append('%s' % (weburl, col[0][1], colID, ln, fldID, fldvID, col[0][0])) for (str, function) in col[1:]: actions[-1][-1] += ' / %s' % (weburl, function, colID, ln, fldID, fldvID, str) output += tupletotable(header=header, tuple=actions) output += content body = [output] output = "
    " + addadminbox(subtitle, body) if len(col_fld) == 0: output = content return perform_showsearchoptions(colID, ln, content=output) def perform_showoutputformats(colID, ln, callback='yes', content='', confirm=-1): """shows the outputformats of the current collection colID - the collection id.""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) subtitle = """10. Modify output formats for collection '%s'   [?]""" % (col_dict[colID], weburl) output = """
    Output format actions (not specific to the chosen collection)
    Go to the BibFormat interface to modify
    Collection specific actions
    Add existing output format to collection
    """ % (colID, ln) header = ['', 'Code', 'Output format', 'Actions'] actions = [] col_fmt = get_col_fmt(colID) fmt_dict = dict(get_def_name('', "format")) i = 0 if len(col_fmt) > 0: for (id_format, colID_fld, code, score) in col_fmt: move = """
    """ if i != 0: move += """""" % (weburl, colID, ln, id_format, col_fmt[i - 1][0], random.randint(0, 1000), weburl) else: move += "   " move += "" i += 1 if i != len(col_fmt): move += '' % (weburl, colID, ln, id_format, col_fmt[i][0], random.randint(0, 1000), weburl) move += """
    """ actions.append([move, code, fmt_dict[int(id_format)]]) for col in [(('Remove', 'removeoutputformat'),)]: actions[-1].append('%s' % (weburl, col[0][1], colID, ln, id_format, col[0][0])) for (str, function) in col[1:]: actions[-1][-1] += ' / %s' % (weburl, function, colID, ln, id_format, str) output += tupletotable(header=header, tuple=actions) else: output += """No output formats exists for this collection""" output += content body = [output] if callback: return perform_editcollection(colID, ln, "perform_showoutputformats", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def external_collections_build_select(colID, external_collection): output = '\n' return output def perform_manage_external_collections(colID, ln, callback='yes', content='', confirm=-1): """Show the interface to configure external collections to the user.""" colID = int(colID) subtitle = """11. Configuration of related external collections""" output = '
    ' % {'colID': colID} table_header = ['External collection', 'Mode', 'Apply also to daughter collections?'] table_content = [] external_collections = external_collection_sort_engine_by_name(external_collections_dictionary.values()) for external_collection in external_collections: collection_name = external_collection.name select = external_collections_build_select(colID, external_collection) recurse = '' % {'collection_name': collection_name} table_content.append([collection_name, select, recurse]) output += tupletotable(header=table_header, tuple=table_content) output += '' output += '
    ' return addadminbox(subtitle, [output]) def perform_update_external_collections(colID, ln, state_list, recurse_list): colID = int(colID) changes = [] output = "" if not state_list: return 'Warning : No state found.
    ' + perform_manage_external_collections(colID, ln) external_collections = external_collection_sort_engine_by_name(external_collections_dictionary.values()) if len(external_collections) != len(state_list): return 'Warning : Size of state_list different from external_collections!
    ' + perform_manage_external_collections(colID, ln) for (external_collection, state) in zip(external_collections, state_list): state = int(state) collection_name = external_collection.name recurse = recurse_list and collection_name in recurse_list oldstate = external_collection_get_state(external_collection, colID) if oldstate != state or recurse: changes += external_collection_get_update_state_list(external_collection, colID, state, recurse) external_collection_apply_changes(changes) return output + '

    ' + perform_manage_external_collections(colID, ln) +def perform_showdetailedrecordoptions(colID, ln, callback='yes', content='', confirm=-1): + """Show the interface to configure detailed record page to the user.""" + + colID = int(colID) + + subtitle = """12. Configuration of detailed record page""" + output = '''
    +
    + +
    +
    Show tabs:
    +
    + ''' % {'colID': colID} + + for (tab_id, tab_info) in get_detailed_page_tabs(colID).iteritems(): + if tab_id == 'comments' and \ + not CFG_WEBCOMMENT_ALLOW_REVIEWS and \ + not CFG_WEBCOMMENT_ALLOW_COMMENTS: + continue + check = '' + output += ''' +
    + ''' % {'tabid':tab_id, + 'check':((tab_info['visible'] and 'checked="checked"') or ''), + 'label':tab_info['label']} + + output += '
    ' + output += '
    ' + output += ''' + ''' + output += '
    ' + + return addadminbox(subtitle, [output]) + +def perform_update_detailed_record_options(colID, ln, tabs, recurse): + """Update the preferences for the tab to show/hide in the detailed record page.""" + colID = int(colID) + changes = [] + output = 'Operation successfully completed.' + + + if '' in tabs: + tabs.remove('') + tabs.append('metadata') + + def update_settings(colID, tabs, recurse): + run_sql("DELETE FROM collectiondetailedpagetabs WHERE id_collection='%s'" % colID) + run_sql("REPLACE INTO collectiondetailedpagetabs" + \ + " SET id_collection='%s', tabs='%s'" % (colID, ';'.join(tabs))) + ## for enabled_tab in tabs: +## run_sql("REPLACE INTO collectiondetailedpagetabs" + \ +## " SET id_collection='%s', tabs='%s'" % (colID, ';'.join(tabs))) + if recurse: + for descendant_id in get_collection_descendants(colID): + update_settings(descendant_id, tabs, recurse) + + update_settings(colID, tabs, recurse) +## for colID in colIDs: +## run_sql("DELETE FROM collectiondetailedpagetabs WHERE id_collection='%s'" % colID) +## for enabled_tab in tabs: +## run_sql("REPLACE INTO collectiondetailedpagetabs" + \ +## " SET id_collection='%s', tabs='%s'" % (colID, ';'.join(tabs))) + + #if callback: + return perform_editcollection(colID, ln, "perform_modifytranslations", + '

    ' + output + '

    ' + \ + perform_showdetailedrecordoptions(colID, ln)) + #else: + # return addadminbox(subtitle, body) + #return output + '

    ' + perform_showdetailedrecordoptions(colID, ln) + + def perform_addexistingoutputformat(colID, ln, fmtID=-1, callback='yes', confirm=-1): """form to add an existing output format to a collection. colID - the collection the format should be added to fmtID - the format to add.""" subtitle = """Add existing output format to collection""" output = "" if fmtID not in [-1, "-1"] and confirm in [1, "1"]: ares = add_col_fmt(colID, fmtID) colID = int(colID) res = get_def_name('', "format") fmt_dict = dict(res) col_dict = dict(get_def_name('', "collection")) col_fmt = get_col_fmt(colID) col_fmt = dict(map(lambda x: (x[0], x[2]), col_fmt)) if len(res) > 0: text = """ Output format
    """ output += createhiddenform(action="addexistingoutputformat#10.2", text=text, button="Add", colID=colID, ln=ln, confirm=1) else: output = """No existing output formats to add, please create a new one.""" if fmtID not in [-1, "-1"] and confirm in [1, "1"]: output += write_outcome(ares) elif fmtID in [-1, "-1"] and confirm not in [-1, "-1"]: output += """Please select output format.""" body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showoutputformats(colID, ln, content=output) def perform_deleteoutputformat(colID, ln, fmtID=-1, callback='yes', confirm=-1): """form to delete an output format not in use. colID - the collection id of the current collection. fmtID - the format id to delete.""" subtitle = """Delete an unused output format""" output = """
    Deleting an output format will also delete the translations associated.
    """ colID = int(colID) if fmtID not in [-1, "-1"] and confirm in [1, "1"]: fmt_dict = dict(get_def_name('', "format")) old_colNAME = fmt_dict[int(fmtID)] ares = delete_fmt(int(fmtID)) res = get_def_name('', "format") fmt_dict = dict(res) col_dict = dict(get_def_name('', "collection")) col_fmt = get_col_fmt() col_fmt = dict(map(lambda x: (x[0], x[2]), col_fmt)) if len(res) > 0: text = """ Output format
    """ output += createhiddenform(action="deleteoutputformat#10.3", text=text, button="Delete", colID=colID, ln=ln, confirm=0) if fmtID not in [-1, "-1"]: fmtID = int(fmtID) if confirm in [0, "0"]: text = """Do you want to delete the output format '%s'. """ % fmt_dict[fmtID] output += createhiddenform(action="deleteoutputformat#10.3", text=text, button="Confirm", colID=colID, fmtID=fmtID, ln=ln, confirm=1) elif confirm in [1, "1"]: output += write_outcome(ares) elif confirm not in [-1, "-1"]: output += """Choose a output format to delete. """ body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showoutputformats(colID, ln, content=output) def perform_removeoutputformat(colID, ln, fmtID='', callback='yes', confirm=0): """form to remove an output format from a collection. colID - the collection id of the current collection. fmtID - the format id. """ subtitle = """Remove output format""" output = "" col_dict = dict(get_def_name('', "collection")) fmt_dict = dict(get_def_name('', "format")) if colID and fmtID: colID = int(colID) fmtID = int(fmtID) if confirm in ["0", 0]: text = """Do you want to remove the output format '%s' from the collection '%s'.""" % (fmt_dict[fmtID], col_dict[colID]) output += createhiddenform(action="removeoutputformat#10.5", text=text, button="Confirm", colID=colID, fmtID=fmtID, confirm=1) elif confirm in ["1", 1]: res = remove_fmt(colID, fmtID) output += write_outcome(res) body = [output] output = "
    " + addadminbox(subtitle, body) return perform_showoutputformats(colID, ln, content=output) def perform_index(colID=1, ln=cdslang, mtype='', content='', confirm=0): """The index method, calling methods to show the collection tree, create new collections and add collections to tree. """ subtitle = "Overview" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output = "" fin_output = "" if not col_dict.has_key(1): res = add_col(cdsname, '', '') if res: fin_output += """Created root collection.
    """ else: return "Cannot create root collection, please check database." if cdsname != run_sql("SELECT name from collection WHERE id=1")[0][0]: res = run_sql("update collection set name='%s' where id=1" % cdsname) if res: fin_output += """The name of the root collection has been modified to be the same as the %(cdsname)s installation name given prior to installing %(cdsname)s.
    """ % {'cdsname' : cdsname} else: return "Error renaming root collection." fin_output += """
    0. Show all 1. Create new collection 2. Attach collection to tree 3. Modify collection tree 4. Webcoll Status
    5. Collections Status
    """ % (weburl, colID, ln, weburl, colID, ln, weburl, colID, ln, weburl, colID, ln, weburl, colID, ln, weburl, colID, ln) if mtype == "": fin_output += """

    For managing the collections, select an item from the menu.
    """ if mtype == "perform_addcollection" and content: fin_output += content elif mtype == "perform_addcollection" or mtype == "perform_showall": fin_output += perform_addcollection(colID=colID, ln=ln, callback='') fin_output += "
    " if mtype == "perform_addcollectiontotree" and content: fin_output += content elif mtype == "perform_addcollectiontotree" or mtype == "perform_showall": fin_output += perform_addcollectiontotree(colID=colID, ln=ln, callback='') fin_output += "
    " if mtype == "perform_modifycollectiontree" and content: fin_output += content elif mtype == "perform_modifycollectiontree" or mtype == "perform_showall": fin_output += perform_modifycollectiontree(colID=colID, ln=ln, callback='') fin_output += "
    " if mtype == "perform_checkwebcollstatus" and content: fin_output += content elif mtype == "perform_checkwebcollstatus" or mtype == "perform_showall": fin_output += perform_checkwebcollstatus(colID, ln, callback='') if mtype == "perform_checkcollectionstatus" and content: fin_output += content elif mtype == "perform_checkcollectionstatus" or mtype == "perform_showall": fin_output += perform_checkcollectionstatus(colID, ln, callback='') body = [fin_output] return addadminbox('Menu', body) def show_coll_not_in_tree(colID, ln, col_dict): """Returns collections not in tree""" tree = get_col_tree(colID) in_tree = {} output = "These collections are not in the tree, and should be added:
    " for (id, up, down, dad, reltype) in tree: in_tree[id] = 1 in_tree[dad] = 1 res = run_sql("SELECT id from collection") if len(res) != len(in_tree): for id in res: if not in_tree.has_key(id[0]): output += """%s , """ % (weburl, id[0], ln, col_dict[id[0]]) output += "

    " else: output = "" return output def create_colltree(tree, col_dict, colID, ln, move_from='', move_to='', rtype='', edit=''): """Creates the presentation of the collection tree, with the buttons for modifying it. tree - the tree to present, from get_tree() col_dict - the name of the collections in a dictionary colID - the collection id to start with move_from - if a collection to be moved has been chosen move_to - the collection which should be set as father of move_from rtype - the type of the tree, regular or virtual edit - if the method should output the edit buttons.""" if move_from: move_from_rtype = move_from[0] move_from_id = int(move_from[1:len(move_from)]) tree_from = get_col_tree(colID, move_from_rtype) tree_to = get_col_tree(colID, rtype) tables = 0 tstack = [] i = 0 text = """ """ for i in range(0, len(tree)): id_son = tree[i][0] up = tree[i][1] down = tree[i][2] dad = tree[i][3] reltype = tree[i][4] tmove_from = "" j = i while j > 0: j = j - 1 try: if tstack[j][1] == dad: table = tstack[j][2] for k in range(0, tables - table): tables = tables - 1 text += """
    """ break except StandardError, e: pass text += """ """ if i > 0 and tree[i][1] == 0: tables = tables + 1 text += """ """ while tables > 0: text += """
    """ if i == 0: tstack.append((id_son, dad, 1)) else: tstack.append((id_son, dad, tables)) if up == 1 and edit: text += """""" % (weburl, colID, ln, i, rtype, tree[i][0], weburl) else: text += """ """ text += "" if down == 1 and edit: text += """""" % (weburl, colID, ln, i, rtype, tree[i][0], weburl) else: text += """ """ text += "" if edit: if move_from and move_to: tmove_from = move_from move_from = '' if not (move_from == "" and i == 0) and not (move_from != "" and int(move_from[1:len(move_from)]) == i and rtype == move_from[0]): check = "true" if move_from: #if tree_from[move_from_id][0] == tree_to[i][0] or not check_col(tree_to[i][0], tree_from[move_from_id][0]): # check = '' #elif not check_col(tree_to[i][0], tree_from[move_from_id][0]): # check = '' #if not check and (tree_to[i][0] == 1 and tree_from[move_from_id][3] == tree_to[i][0] and move_from_rtype != rtype): # check = "true" if check: text += """ """ % (weburl, colID, ln, move_from, rtype, i, rtype, weburl, col_dict[tree_from[int(move_from[1:len(move_from)])][0]], col_dict[tree_to[i][0]]) else: try: text += """""" % (weburl, colID, ln, rtype, i, rtype, tree[i][0], weburl, col_dict[tree[i][0]]) except KeyError: pass else: text += """ """ % weburl else: text += """ """ % weburl text += """ """ if edit: try: text += """""" % (weburl, colID, ln, i, rtype, tree[i][0], weburl) except KeyError: pass elif i != 0: text += """ """ % weburl text += """ """ if tmove_from: move_from = tmove_from try: text += """%s%s%s%s%s""" % (tree[i][0], (reltype=="v" and '' or ''), weburl, tree[i][0], ln, col_dict[id_son], (move_to=="%s%s" %(rtype, i) and ' ' % weburl or ''), (move_from=="%s%s" % (rtype, i) and ' ' % weburl or ''), (reltype=="v" and '' or '')) except KeyError: pass text += """
    """ tables = tables - 1 text += """ """ return text def perform_deletecollection(colID, ln, confirm=-1, callback='yes'): """form to delete a collection colID - id of collection """ subtitle ='' output = """
    WARNING:
    When deleting a collection, you also deletes all data related to the collection like translations, relations to other collections and information about which rank methods to use.
    For more information, please go to the WebSearch guide and read the section regarding deleting a collection.
    """ % weburl col_dict = dict(get_def_name('', "collection")) if colID != 1 and colID and col_dict.has_key(int(colID)): colID = int(colID) subtitle = """4. Delete collection '%s'   [?]""" % (col_dict[colID], weburl) res = run_sql("SELECT * from collection_collection WHERE id_dad=%s" % colID) res2 = run_sql("SELECT * from collection_collection WHERE id_son=%s" % colID) if not res and not res2: if confirm in ["-1", -1]: text = """Do you want to delete this collection.""" output += createhiddenform(action="deletecollection#4", text=text, colID=colID, button="Delete", confirm=0) elif confirm in ["0", 0]: text = """Are you sure you want to delete this collection.""" output += createhiddenform(action="deletecollection#4", text=text, colID=colID, button="Confirm", confirm=1) elif confirm in ["1", 1]: result = delete_col(colID) if not result: raise Exception else: output = """Can not delete a collection that is a part of the collection tree, remove collection from the tree and try again.""" else: subtitle = """4. Delete collection""" output = """Not possible to delete the root collection""" body = [output] if callback: return perform_editcollection(colID, ln, "perform_deletecollection", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_editcollection(colID=1, ln=cdslang, mtype='', content=''): """interface to modify a collection. this method is calling other methods which again is calling this and sending back the output of the method. if callback, the method will call perform_editcollection, if not, it will just return its output. colID - id of the collection mtype - the method that called this method. content - the output from that method.""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) if not col_dict.has_key(colID): return """Collection deleted. """ fin_output = """ +
    Menu
    0. Show all 1. Modify collection query 2. Modify access restrictions 3. Modify translations 4. Delete collection
    5. Modify portalboxes 6. Modify search fields 7. Modify search options 8. Modify sort options 9. Modify rank options
    10.Modify output formats 11.Configuration of related external collections12.Detailed record page options
    - """ % (colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln) + """ % (colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln, colID, ln) if mtype == "perform_modifydbquery" and content: fin_output += content elif mtype == "perform_modifydbquery" or not mtype: fin_output += perform_modifydbquery(colID, ln, callback='') if mtype == "perform_modifyrestricted" and content: fin_output += content elif mtype == "perform_modifyrestricted" or not mtype: fin_output += perform_modifyrestricted(colID, ln, callback='') if mtype == "perform_modifytranslations" and content: fin_output += content elif mtype == "perform_modifytranslations" or not mtype: fin_output += perform_modifytranslations(colID, ln, callback='') if mtype == "perform_deletecollection" and content: fin_output += content elif mtype == "perform_deletecollection" or not mtype: fin_output += perform_deletecollection(colID, ln, callback='') if mtype == "perform_showportalboxes" and content: fin_output += content elif mtype == "perform_showportalboxes" or not mtype: fin_output += perform_showportalboxes(colID, ln, callback='') if mtype == "perform_showsearchfields" and content: fin_output += content elif mtype == "perform_showsearchfields" or not mtype: fin_output += perform_showsearchfields(colID, ln, callback='') if mtype == "perform_showsearchoptions" and content: fin_output += content elif mtype == "perform_showsearchoptions" or not mtype: fin_output += perform_showsearchoptions(colID, ln, callback='') if mtype == "perform_showsortoptions" and content: fin_output += content elif mtype == "perform_showsortoptions" or not mtype: fin_output += perform_showsortoptions(colID, ln, callback='') if mtype == "perform_modifyrankmethods" and content: fin_output += content elif mtype == "perform_modifyrankmethods" or not mtype: fin_output += perform_modifyrankmethods(colID, ln, callback='') if mtype == "perform_showoutputformats" and content: fin_output += content elif mtype == "perform_showoutputformats" or not mtype: fin_output += perform_showoutputformats(colID, ln, callback='') if mtype == "perform_manage_external_collections" and content: fin_output += content elif mtype == "perform_manage_external_collections" or not mtype: fin_output += perform_manage_external_collections(colID, ln, callback='') + if mtype == "perform_showdetailedrecordoptions" and content: + fin_output += content + elif mtype == "perform_showdetailedrecordoptions" or not mtype: + fin_output += perform_showdetailedrecordoptions(colID, ln, callback='') + return addadminbox("Overview of edit options for collection '%s'" % col_dict[colID], [fin_output]) def perform_checkwebcollstatus(colID, ln, confirm=0, callback='yes'): """Check status of the collection tables with respect to the webcoll cache.""" subtitle = """Webcoll Status   [?]""" % weburl output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """
    Last updates:
    """ collection_table_update_time = "" collection_web_update_time = "" collection_table_update_time = get_table_update_time('collection') output += "Collection table last updated: %s
    " % collection_table_update_time try: file = open("%s/collections/last_updated" % cachedir) collection_web_update_time = file.readline().strip() output += "Collection cache last updated: %s
    " % collection_web_update_time file.close() except: pass # reformat collection_web_update_time to the format suitable for comparisons try: collection_web_update_time = time.strftime("%Y-%m-%d %H:%M:%S", time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S")) except ValueError, e: pass if collection_table_update_time > collection_web_update_time: output += """
    Warning: The collections has been modified since last time Webcoll was executed, to process the changes, Webcoll must be executed.
    """ header = ['ID', 'Name', 'Time', 'Status', 'Progress'] actions = [] output += """
    Last BibSched tasks:
    """ res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'webcoll', '', '', 'Not executed yet']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'bibindex', '', '', 'Not executed yet']) output += tupletotable(header=header, tuple=actions) output += """
    Next scheduled BibSched run:
    """ actions = [] res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime > now() ORDER by runtime") webcoll_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) webcoll_future = "yes" else: actions.append(['', 'webcoll', '', '', 'Not scheduled']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime > now() ORDER by runtime") bibindex_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) bibindex_future = "yes" else: actions.append(['', 'bibindex', '', '', 'Not scheduled']) output += tupletotable(header=header, tuple=actions) if webcoll_future == "": output += """
    Warning: Webcoll is not scheduled for a future run by bibsched, any updates to the collection will not be processed.
    """ if bibindex_future == "": output += """
    Warning: Bibindex is not scheduled for a future run by bibsched, any updates to the records will not be processed.
    """ body = [output] if callback: return perform_index(colID, ln, "perform_checkwebcollstatus", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def perform_checkcollectionstatus(colID, ln, confirm=0, callback='yes'): """Check the configuration of the collections.""" subtitle = """Collections Status   [?]""" % weburl output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) collections = run_sql("SELECT id, name, dbquery, restricted FROM collection ORDER BY id") header = ['ID', 'Name', 'Query', 'Subcollections', 'Restricted', 'I18N', 'Status'] rnk_list = get_def_name('', "rnkMETHOD") actions = [] for (id, name, dbquery, restricted) in collections: reg_sons = len(get_col_tree(id, 'r')) vir_sons = len(get_col_tree(id, 'v')) status = "" langs = run_sql("SELECT ln from collectionname where id_collection=%s" % id) i8n = "" if len(langs) > 0: for lang in langs: i8n += "%s, " % lang else: i8n = """None""" if (reg_sons > 1 and dbquery) or dbquery=="": status = """1:Query""" elif dbquery is None and reg_sons == 1: status = """2:Query""" elif dbquery == "" and reg_sons == 1: status = """3:Query""" if (reg_sons > 1 or vir_sons > 1): subs = """Yes""" else: subs = """No""" if dbquery is None: dbquery = """No""" if restricted == "": restricted = "" if status: status += """,4:Restricted""" else: status += """4:Restricted""" elif restricted is None: restricted = """No""" if status == "": status = """OK""" actions.append([id, """%s""" % (weburl, id, ln, name), dbquery, subs, restricted, i8n, status]) output += tupletotable(header=header, tuple=actions) body = [output] return addadminbox(subtitle, body) if callback: return perform_index(colID, ln, "perform_checkcollectionstatus", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) def get_col_tree(colID, rtype=''): """Returns a presentation of the tree as a list. TODO: Add loop detection colID - startpoint for the tree rtype - get regular or virtual part of the tree""" try: colID = int(colID) stack = [colID] ssize = 0 tree = [(colID, 0, 0, colID, 'r')] while len(stack) > 0: ccolID = stack.pop() if ccolID == colID and rtype: res = run_sql("SELECT id_son, score, type FROM collection_collection WHERE id_dad=%s AND type='%s' ORDER BY score ASC,id_son" % (ccolID, rtype)) else: res = run_sql("SELECT id_son, score, type FROM collection_collection WHERE id_dad=%s ORDER BY score ASC,id_son" % ccolID) ssize += 1 ntree = [] for i in range(0, len(res)): id_son = res[i][0] score = res[i][1] rtype = res[i][2] stack.append(id_son) if i == (len(res) - 1): up = 0 else: up = 1 if i == 0: down = 0 else: down = 1 ntree.insert(0, (id_son, up, down, ccolID, rtype)) tree = tree[0:ssize] + ntree + tree[ssize:len(tree)] return tree except StandardError, e: return () def add_col_dad_son(add_dad, add_son, rtype): """Add a son to a collection (dad) add_dad - add to this collection id add_son - add this collection id rtype - either regular or virtual""" try: res = run_sql("SELECT score FROM collection_collection WHERE id_dad=%s ORDER BY score ASC" % add_dad) highscore = 0 for score in res: if int(score[0]) > highscore: highscore = int(score[0]) highscore += 1 res = run_sql("INSERT INTO collection_collection(id_dad,id_son,score,type) values(%s,%s,%s,'%s')" % (add_dad, add_son, highscore, rtype)) return (1, highscore) except StandardError, e: return (0, e) def compare_on_val(first, second): """Compare the two values""" return cmp(first[1], second[1]) def get_col_fld(colID=-1, type = '', id_field=''): """Returns either all portalboxes associated with a collection, or based on either colID or language or both. colID - collection id ln - language id""" sql = "SELECT id_field,id_fieldvalue,type,score,score_fieldvalue FROM collection_field_fieldvalue, field WHERE id_field=field.id" try: if colID > -1: sql += " AND id_collection=%s" % colID if id_field: sql += " AND id_field=%s" % id_field if type: sql += " AND type='%s'" % type sql += " ORDER BY type, score desc, score_fieldvalue desc" res = run_sql(sql) return res except StandardError, e: return "" def get_col_pbx(colID=-1, ln='', position = ''): """Returns either all portalboxes associated with a collection, or based on either colID or language or both. colID - collection id ln - language id""" sql = "SELECT id_portalbox, id_collection, ln, score, position, title, body FROM collection_portalbox, portalbox WHERE id_portalbox = portalbox.id" try: if colID > -1: sql += " AND id_collection=%s" % colID if ln: sql += " AND ln='%s'" % ln if position: sql += " AND position='%s'" % position sql += " ORDER BY position, ln, score desc" res = run_sql(sql) return res except StandardError, e: return "" def get_col_fmt(colID=-1): """Returns all formats currently associated with a collection, or for one specific collection colID - the id of the collection""" try: if colID not in [-1, "-1"]: res = run_sql("SELECT id_format, id_collection, code, score FROM collection_format, format WHERE id_format = format.id AND id_collection=%s ORDER BY score desc" % colID) else: res = run_sql("SELECT id_format, id_collection, code, score FROM collection_format, format WHERE id_format = format.id ORDER BY score desc") return res except StandardError, e: return "" def get_col_rnk(colID, ln): """ Returns a list of the rank methods the given collection is attached to colID - id from collection""" try: res1 = dict(run_sql("SELECT id_rnkMETHOD, '' FROM collection_rnkMETHOD WHERE id_collection=%s" % colID)) res2 = get_def_name('', "rnkMETHOD") result = filter(lambda x: res1.has_key(x[0]), res2) return result except StandardError, e: return () def get_pbx(): """Returns all portalboxes""" try: res = run_sql("SELECT id, title, body FROM portalbox ORDER by title,body") return res except StandardError, e: return "" def get_fld_value(fldvID = ''): """Returns fieldvalue""" try: sql = "SELECT id, name, value FROM fieldvalue" if fldvID: sql += " WHERE id=%s" % fldvID sql += " ORDER BY name" res = run_sql(sql) return res except StandardError, e: return "" def get_pbx_pos(): """Returns a list of all the positions for a portalbox""" position = {} position["rt"] = "Right Top" position["lt"] = "Left Top" position["te"] = "Title Epilog" position["tp"] = "Title Prolog" position["ne"] = "Narrow by coll epilog" position["np"] = "Narrow by coll prolog" return position def get_sort_nametypes(): """Return a list of the various translationnames for the fields""" type = {} type['soo'] = 'Sort options' type['seo'] = 'Search options' type['sew'] = 'Search within' return type def get_fmt_nametypes(): """Return a list of the various translationnames for the output formats""" type = [] type.append(('ln', 'Long name')) return type def get_fld_nametypes(): """Return a list of the various translationnames for the fields""" type = [] type.append(('ln', 'Long name')) return type def get_col_nametypes(): """Return a list of the various translationnames for the collections""" type = [] type.append(('ln', 'Long name')) return type def find_last(tree, start_son): """Find the previous collection in the tree with the same father as start_son""" id_dad = tree[start_son][3] while start_son > 0: start_son -= 1 if tree[start_son][3] == id_dad: return start_son def find_next(tree, start_son): """Find the next collection in the tree with the same father as start_son""" id_dad = tree[start_son][3] while start_son < len(tree): start_son += 1 if tree[start_son][3] == id_dad: return start_son def remove_col_subcol(id_son, id_dad, type): """Remove a collection as a son of another collection in the tree, if collection isn't used elsewhere in the tree, remove all registered sons of the id_son. id_son - collection id of son to remove id_dad - the id of the dad""" try: if id_son != id_dad: tree = get_col_tree(id_son) res = run_sql("DELETE FROM collection_collection WHERE id_son=%s and id_dad=%s" % (id_son, id_dad)) else: tree = get_col_tree(id_son, type) res = run_sql("DELETE FROM collection_collection WHERE id_son=%s and id_dad=%s and type='%s'" % (id_son, id_dad, type)) if not run_sql("SELECT * from collection_collection WHERE id_son=%s and type='%s'" % (id_son, type)): for (id, up, down, dad, rtype) in tree: res = run_sql("DELETE FROM collection_collection WHERE id_son=%s and id_dad=%s" % (id, dad)) return (1, "") except StandardError, e: return (0, e) def check_col(add_dad, add_son): """Check if the collection can be placed as a son of the dad without causing loops. add_dad - collection id add_son - collection id""" try: stack = [add_dad] res = run_sql("SELECT id_dad FROM collection_collection WHERE id_dad=%s AND id_son=%s" % (add_dad, add_son)) if res: raise StandardError while len(stack) > 0: colID = stack.pop() res = run_sql("SELECT id_dad FROM collection_collection WHERE id_son=%s" % colID) for id in res: if int(id[0]) == int(add_son): raise StandardError else: stack.append(id[0]) return (1, "") except StandardError, e: return (0, e) def attach_rnk_col(colID, rnkID): """attach rank method to collection rnkID - id from rnkMETHOD table colID - id of collection, as in collection table """ try: res = run_sql("INSERT INTO collection_rnkMETHOD(id_collection, id_rnkMETHOD) values (%s,%s)" % (colID, rnkID)) return (1, "") except StandardError, e: return (0, e) def detach_rnk_col(colID, rnkID): """detach rank method from collection rnkID - id from rnkMETHOD table colID - id of collection, as in collection table """ try: res = run_sql("DELETE FROM collection_rnkMETHOD WHERE id_collection=%s AND id_rnkMETHOD=%s" % (colID, rnkID)) return (1, "") except StandardError, e: return (0, e) def switch_col_treescore(col_1, col_2): try: res1 = run_sql("SELECT score FROM collection_collection WHERE id_dad=%s and id_son=%s" % (col_1[3], col_1[0])) res2 = run_sql("SELECT score FROM collection_collection WHERE id_dad=%s and id_son=%s" % (col_2[3], col_2[0])) res = run_sql("UPDATE collection_collection SET score=%s WHERE id_dad=%s and id_son=%s" % (res2[0][0], col_1[3], col_1[0])) res = run_sql("UPDATE collection_collection SET score=%s WHERE id_dad=%s and id_son=%s" % (res1[0][0], col_2[3], col_2[0])) return (1, "") except StandardError, e: return (0, e) def move_col_tree(col_from, col_to, move_to_rtype=''): """Move a collection from one point in the tree to another. becomes a son of the endpoint. col_from - move this collection from current point col_to - and set it as a son of this collection. move_to_rtype - either virtual or regular collection""" try: res = run_sql("SELECT score FROM collection_collection WHERE id_dad=%s ORDER BY score asc" % col_to[0]) highscore = 0 for score in res: if int(score[0]) > highscore: highscore = int(score[0]) highscore += 1 if not move_to_rtype: move_to_rtype = col_from[4] res = run_sql("DELETE FROM collection_collection WHERE id_son=%s and id_dad=%s" % (col_from[0], col_from[3])) res = run_sql("INSERT INTO collection_collection(id_dad,id_son,score,type) values(%s,%s,%s,'%s')" % (col_to[0], col_from[0], highscore, move_to_rtype)) return (1, "") except StandardError, e: return (0, e) def remove_pbx(colID, pbxID, ln): """Removes a portalbox from the collection given. colID - the collection the format is connected to pbxID - the portalbox which should be removed from the collection. ln - the language of the portalbox to be removed""" try: res = run_sql("DELETE FROM collection_portalbox WHERE id_collection=%s AND id_portalbox=%s AND ln='%s'" % (colID, pbxID, ln)) return (1, "") except StandardError, e: return (0, e) def remove_fmt(colID, fmtID): """Removes a format from the collection given. colID - the collection the format is connected to fmtID - the format which should be removed from the collection.""" try: res = run_sql("DELETE FROM collection_format WHERE id_collection=%s AND id_format=%s" % (colID, fmtID)) return (1, "") except StandardError, e: return (0, e) def remove_fld(colID, fldID, fldvID=''): """Removes a field from the collection given. colID - the collection the format is connected to fldID - the field which should be removed from the collection.""" try: sql = "DELETE FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s" % (colID, fldID) if fldvID: if fldvID != "None": sql += " AND id_fieldvalue=%s" % fldvID else: sql += " AND id_fieldvalue is NULL" res = run_sql(sql) return (1, "") except StandardError, e: return (0, e) def delete_fldv(fldvID): """Deletes all data for the given fieldvalue fldvID - delete all data in the tables associated with fieldvalue and this id""" try: res = run_sql("DELETE FROM collection_field_fieldvalue WHERE id_fieldvalue=%s" % fldvID) res = run_sql("DELETE FROM fieldvalue WHERE id=%s" % fldvID) return (1, "") except StandardError, e: return (0, e) def delete_pbx(pbxID): """Deletes all data for the given portalbox pbxID - delete all data in the tables associated with portalbox and this id """ try: res = run_sql("DELETE FROM collection_portalbox WHERE id_portalbox=%s" % pbxID) res = run_sql("DELETE FROM portalbox WHERE id=%s" % pbxID) return (1, "") except StandardError, e: return (0, e) def delete_fmt(fmtID): """Deletes all data for the given format fmtID - delete all data in the tables associated with format and this id """ try: res = run_sql("DELETE FROM format WHERE id=%s" % fmtID) res = run_sql("DELETE FROM collection_format WHERE id_format=%s" % fmtID) res = run_sql("DELETE FROM formatname WHERE id_format=%s" % fmtID) return (1, "") except StandardError, e: return (0, e) def delete_col(colID): """Deletes all data for the given collection colID - delete all data in the tables associated with collection and this id """ try: res = run_sql("DELETE FROM collection WHERE id=%s" % colID) res = run_sql("DELETE FROM collectionname WHERE id_collection=%s" % colID) res = run_sql("DELETE FROM collection_rnkMETHOD WHERE id_collection=%s" % colID) res = run_sql("DELETE FROM collection_collection WHERE id_dad=%s" % colID) res = run_sql("DELETE FROM collection_collection WHERE id_son=%s" % colID) res = run_sql("DELETE FROM collection_portalbox WHERE id_collection=%s" % colID) res = run_sql("DELETE FROM collection_format WHERE id_collection=%s" % colID) res = run_sql("DELETE FROM collection_field_fieldvalue WHERE id_collection=%s" % colID) return (1, "") except StandardError, e: return (0, e) def add_fmt(code, name, rtype): """Add a new output format. Returns the id of the format. code - the code for the format, max 6 chars. name - the default name for the default language of the format. rtype - the default nametype""" try: res = run_sql("INSERT INTO format (code, name) values ('%s','%s')" % (escape_string(code), escape_string(name))) fmtID = run_sql("SELECT id FROM format WHERE code='%s'" % escape_string(code)) res = run_sql("INSERT INTO formatname(id_format, type, ln, value) VALUES (%s,'%s','%s','%s')" % (fmtID[0][0], rtype, cdslang, escape_string(name))) return (1, fmtID) except StandardError, e: return (0, e) def update_fldv(fldvID, name, value): """Modify existing fieldvalue fldvID - id of fieldvalue to modify value - the value of the fieldvalue name - the name of the fieldvalue.""" try: res = run_sql("UPDATE fieldvalue set name='%s' where id=%s" % (escape_string(name), fldvID)) res = run_sql("UPDATE fieldvalue set value='%s' where id=%s" % (escape_string(value), fldvID)) return (1, "") except StandardError, e: return (0, e) def add_fldv(name, value): """Add a new fieldvalue, returns id of fieldvalue value - the value of the fieldvalue name - the name of the fieldvalue.""" try: res = run_sql("SELECT id FROM fieldvalue WHERE name='%s' and value='%s'" % (escape_string(name), escape_string(value))) if not res: res = run_sql("INSERT INTO fieldvalue (name, value) values ('%s','%s')" % (escape_string(name), escape_string(value))) res = run_sql("SELECT id FROM fieldvalue WHERE name='%s' and value='%s'" % (escape_string(name), escape_string(value))) if res: return (1, res[0][0]) else: raise StandardError except StandardError, e: return (0, e) def add_pbx(title, body): try: res = run_sql("INSERT INTO portalbox (title, body) values ('%s','%s')" % (escape_string(title), escape_string(body))) res = run_sql("SELECT id FROM portalbox WHERE title='%s' AND body='%s'" % (escape_string(title), escape_string(body))) if res: return (1, res[0][0]) else: raise StandardError except StandardError, e: return (0, e) def add_col(colNAME, dbquery, rest): """Adds a new collection to collection table colNAME - the default name for the collection, saved to collection and collectionname dbquery - query related to the collection rest - name of apache group allowed to access collection""" try: rtype = get_col_nametypes()[0][0] colID = run_sql("SELECT id FROM collection WHERE id=1") if colID: sql = "INSERT INTO collection(name,dbquery,restricted) VALUES('%s'" % escape_string(colNAME) else: sql = "INSERT INTO collection(id,name,dbquery,restricted) VALUES(1,'%s'" % escape_string(colNAME) if dbquery: sql += ",'%s'" % escape_string(dbquery) else: sql += ",null" if rest: sql += ",'%s'" % escape_string(rest) else: sql += ",null" sql += ")" res = run_sql(sql) colID = run_sql("SELECT id FROM collection WHERE name='%s'" % escape_string(colNAME)) res = run_sql("INSERT INTO collectionname(id_collection, type, ln, value) VALUES (%s,'%s','%s','%s')" % (colID[0][0], rtype, cdslang, escape_string(colNAME))) if colID: return (1, colID[0][0]) else: raise StandardError except StandardError, e: return (0, e) def add_col_pbx(colID, pbxID, ln, position, score=''): """add a portalbox to the collection. colID - the id of the collection involved pbxID - the portalbox to add ln - which language the portalbox is for score - decides which portalbox is the most important position - position on page the portalbox should appear.""" try: if score: res = run_sql("INSERT INTO collection_portalbox(id_portalbox, id_collection, ln, score, position) values (%s,%s,'%s',%s,'%s')" % (pbxID, colID, ln, score, position)) else: res = run_sql("SELECT score FROM collection_portalbox WHERE id_collection=%s and ln='%s' and position='%s' ORDER BY score desc, ln, position" % (colID, ln, position)) if res: score = int(res[0][0]) else: score = 0 res = run_sql("INSERT INTO collection_portalbox(id_portalbox, id_collection, ln, score, position) values (%s,%s,'%s',%s,'%s')" % (pbxID, colID, ln, (score + 1), position)) return (1, "") except StandardError, e: return (0, e) def add_col_fmt(colID, fmtID, score=''): """Add a output format to the collection. colID - the id of the collection involved fmtID - the id of the format. score - the score of the format, decides sorting, if not given, place the format on top""" try: if score: res = run_sql("INSERT INTO collection_format(id_format, id_collection, score) values (%s,%s,%s)" % (fmtID, colID, score)) else: res = run_sql("SELECT score FROM collection_format WHERE id_collection=%s ORDER BY score desc" % colID) if res: score = int(res[0][0]) else: score = 0 res = run_sql("INSERT INTO collection_format(id_format, id_collection, score) values (%s,%s,%s)" % (fmtID, colID, (score + 1))) return (1, "") except StandardError, e: return (0, e) def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""" try: if fldvID and fldvID not in [-1, "-1"]: run_sql("DELETE FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s and type='%s' and id_fieldvalue is NULL" % (colID, fldID, type)) res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s and type='%s' ORDER BY score desc" % (colID, fldID, type)) if res: score = int(res[0][0]) res = run_sql("SELECT score_fieldvalue FROM collection_field_fieldvalue WHERE id_collection=%s AND id_field=%s and type='%s' ORDER BY score_fieldvalue desc" % (colID, fldID, type)) else: res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s and type='%s' ORDER BY score desc" % (colID, type)) if res: score = int(res[0][0]) + 1 else: score = 1 res = run_sql("SELECT * FROM collection_field_fieldvalue where id_field=%s and id_collection=%s and type='%s' and id_fieldvalue=%s" % (fldID, colID, type, fldvID)) if not res: run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=score_fieldvalue+1 WHERE id_field=%s AND id_collection=%s and type='%s'" % (fldID, colID, type)) res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_fieldvalue, id_collection, type, score, score_fieldvalue) values (%s,%s,%s,'%s',%s,%s)" % (fldID, fldvID, colID, type, score, 1)) else: return (0, (1, "Already exists")) else: res = run_sql("SELECT * FROM collection_field_fieldvalue WHERE id_collection=%s AND type='%s' and id_field=%s and id_fieldvalue is NULL" % (colID, type, fldID)) if res: return (0, (1, "Already exists")) else: run_sql("UPDATE collection_field_fieldvalue SET score=score+1") res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score,score_fieldvalue) values (%s,%s,'%s',%s, 0)" % (fldID, colID, type, 1)) return (1, "") except StandardError, e: return (0, e) def modify_restricted(colID, rest): """Modify which apache group is allowed to use the collection. colID - the id of the collection involved restricted - the new group""" try: sql = "UPDATE collection SET restricted=" if rest: sql += "'%s'" % escape_string(rest) else: sql += "null" sql += " WHERE id=%s" % colID res = run_sql(sql) return (1, "") except StandardError, e: return (0, e) def modify_dbquery(colID, dbquery): """Modify the dbquery of an collection. colID - the id of the collection involved dbquery - the new dbquery""" try: sql = "UPDATE collection SET dbquery=" if dbquery: sql += "'%s'" % escape_string(dbquery) else: sql += "null" sql += " WHERE id=%s" % colID res = run_sql(sql) return (1, "") except StandardError, e: return (0, e) def modify_pbx(colID, pbxID, sel_ln, score='', position='', title='', body=''): """Modify a portalbox colID - the id of the collection involved pbxID - the id of the portalbox that should be modified sel_ln - the language of the portalbox that should be modified title - the title body - the content score - if several portalboxes in one position, who should appear on top. position - position on page""" try: if title: res = run_sql("UPDATE portalbox SET title='%s' WHERE id=%s" % (escape_string(title), pbxID)) if body: res = run_sql("UPDATE portalbox SET body='%s' WHERE id=%s" % (escape_string(body), pbxID)) if score: res = run_sql("UPDATE collection_portalbox SET score='%s' WHERE id_collection=%s and id_portalbox=%s and ln='%s'" % (score, colID, pbxID, sel_ln)) if position: res = run_sql("UPDATE collection_portalbox SET position='%s' WHERE id_collection=%s and id_portalbox=%s and ln='%s'" % (position, colID, pbxID, sel_ln)) return (1, "") except Exception, e: return (0, e) def switch_fld_score(colID, id_1, id_2): """Switch the scores of id_1 and id_2 in collection_field_fieldvalue colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s and id_field=%s" % (colID, id_1)) res2 = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s and id_field=%s" % (colID, id_2)) if res1[0][0] == res2[0][0]: return (0, (1, "Cannot rearrange the selected fields, either rearrange by name or use the mySQL client to fix the problem.")) else: res = run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (res2[0][0], colID, id_1)) res = run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (res1[0][0], colID, id_2)) return (1, "") except StandardError, e: return (0, e) def switch_fld_value_score(colID, id_1, fldvID_1, fldvID_2): """Switch the scores of two field_value colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score_fieldvalue FROM collection_field_fieldvalue WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (colID, id_1, fldvID_1)) res2 = run_sql("SELECT score_fieldvalue FROM collection_field_fieldvalue WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (colID, id_1, fldvID_2)) if res1[0][0] == res2[0][0]: return (0, (1, "Cannot rearrange the selected fields, either rearrange by name or use the mySQL client to fix the problem.")) else: res = run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=%s WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (res2[0][0], colID, id_1, fldvID_1)) res = run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=%s WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (res1[0][0], colID, id_1, fldvID_2)) return (1, "") except Exception, e: return (0, e) def switch_pbx_score(colID, id_1, id_2, sel_ln): """Switch the scores of id_1 and id_2 in the table given by the argument. colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score FROM collection_portalbox WHERE id_collection=%s and id_portalbox=%s and ln='%s'" % (colID, id_1, sel_ln)) res2 = run_sql("SELECT score FROM collection_portalbox WHERE id_collection=%s and id_portalbox=%s and ln='%s'" % (colID, id_2, sel_ln)) if res1[0][0] == res2[0][0]: return (0, (1, "Cannot rearrange the selected fields, either rearrange by name or use the mySQL client to fix the problem.")) res = run_sql("UPDATE collection_portalbox SET score=%s WHERE id_collection=%s and id_portalbox=%s and ln='%s'" % (res2[0][0], colID, id_1, sel_ln)) res = run_sql("UPDATE collection_portalbox SET score=%s WHERE id_collection=%s and id_portalbox=%s and ln='%s'" % (res1[0][0], colID, id_2, sel_ln)) return (1, "") except Exception, e: return (0, e) def switch_score(colID, id_1, id_2, table): """Switch the scores of id_1 and id_2 in the table given by the argument. colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score FROM collection_%s WHERE id_collection=%s and id_%s=%s" % (table, colID, table, id_1)) res2 = run_sql("SELECT score FROM collection_%s WHERE id_collection=%s and id_%s=%s" % (table, colID, table, id_2)) if res1[0][0] == res2[0][0]: return (0, (1, "Cannot rearrange the selected fields, either rearrange by name or use the mySQL client to fix the problem.")) res = run_sql("UPDATE collection_%s SET score=%s WHERE id_collection=%s and id_%s=%s" % (table, res2[0][0], colID, table, id_1)) res = run_sql("UPDATE collection_%s SET score=%s WHERE id_collection=%s and id_%s=%s" % (table, res1[0][0], colID, table, id_2)) return (1, "") except Exception, e: return (0, e) + +def get_detailed_page_tabs(colID=None, recID=None): + """ + Returns the complete list of tabs to be displayed in the + detailed record pages. + + Returned structured is a dict with + - key : last component of the url that leads to detailed record tab: http:www.../record/74/key + - values: a dictionary with the following keys: + - label: *string* label to be printed as tab (Not localized here) + - visible: *boolean* if False, tab should not be shown + - enabled: *boolean* if True, tab should be disabled + - order: *int* position of the tab in the list of tabs + + returns dict + """ + + tabs = {'metadata' : {'label': 'Information', 'visible': False, 'enabled': True, 'order': 1}, + 'references': {'label': 'References', 'visible': False, 'enabled': True, 'order': 2}, + 'comments' : {'label': 'Discussion', 'visible': False, 'enabled': True, 'order': 3}, + 'statistics': {'label': 'Usage statistics', 'visible': False, 'enabled': True, 'order': 4}, + 'files' : {'label': 'Fulltext', 'visible': False, 'enabled': True, 'order': 5} + } + + res = run_sql("SELECT tabs FROM collectiondetailedpagetabs " + \ + "WHERE id_collection='%s'" % colID) + + if len(res) > 0: + tabs_state = res[0][0].split(';') + for tab_state in tabs_state: + if tabs.has_key(tab_state): + tabs[tab_state]['visible'] = True; + + else: + # no preference set for this collection. + # assume all tabs are displayed + for key in tabs.keys(): + tabs[key]['visible'] = True + + + if not CFG_WEBCOMMENT_ALLOW_COMMENTS and \ + not CFG_WEBCOMMENT_ALLOW_REVIEWS: + tabs['comments']['visible'] = False + tabs['comments']['enabled'] = False + + if recID is not None: + # Disable references if no references found + bfo = BibFormatObject(recID) + if bfe_references.format(bfo, '', '') == '': + tabs['references']['enabled'] = False + # Disable fulltext if no file found + brd = BibRecDocs(recID) + if len(brd.listBibDocs()) == 0: + tabs['files']['enabled'] = False + + tabs[''] = tabs['metadata'] + del tabs['metadata'] + + return tabs + diff --git a/modules/websearch/web/admin/websearchadmin.py b/modules/websearch/web/admin/websearchadmin.py index cb1c65221..b13e2ea06 100644 --- a/modules/websearch/web/admin/websearchadmin.py +++ b/modules/websearch/web/admin/websearchadmin.py @@ -1,1076 +1,1100 @@ ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """CDS Invenio WebSearch Administrator Interface.""" __revision__ = "$Id$" __lastupdated__ = """$Date$""" import sys import invenio.websearchadminlib as wsc from invenio.bibrankadminlib import check_user from invenio.webpage import page, create_error_box from invenio.config import weburl, sweburl, cdslang, cdsname from invenio.dbquery import Error from invenio.webuser import getUid, page_not_authorized from invenio.messages import gettext_set_language +from invenio.urlutils import wash_url_argument def switchfmtscore(req, colID, type, id_1, id_2, ln=cdslang): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_switchfmtscore(colID=colID, ln=ln, type=type, id_1=id_1, id_2=id_2), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def switchfldscore(req, colID, id_1, id_2, fmeth, ln=cdslang): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_switchfldscore(colID=colID, ln=ln, id_1=id_1, id_2=id_2, fmeth=fmeth), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def switchfldvaluescore(req, colID, id_1, id_fldvalue_1, id_fldvalue_2, ln=cdslang): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_switchfldvaluescore(colID=colID, ln=ln, id_1=id_1, id_fldvalue_1=id_fldvalue_1, id_fldvalue_2=id_fldvalue_2), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def runwebcoll(req, colID, ln=cdslang, confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Collection Management", body=wsc.perform_checkwebcollstatus(colID=colID, ln=ln, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def switchpbxscore(req, colID, id_1, id_2, sel_ln,ln=cdslang): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_switchpbxscore(colID=colID, ln=ln, id_1=id_1, id_2=id_2, sel_ln=sel_ln), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifydbquery(req, colID, ln=cdslang, dbquery='', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifydbquery(colID=colID, ln=ln, dbquery=dbquery, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def showtree(req, colID, ln=cdslang): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Collection tree", body=wsc.perform_showtree(colID=colID, ln=ln), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifyrestricted(req, colID, ln=cdslang, rest='', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyrestricted(colID=colID, ln=ln, rest=rest, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifytranslations(req, colID, ln=cdslang, sel_type='', trans = [], confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifytranslations(colID=colID, ln=ln, sel_type=sel_type, trans=trans, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addcollectiontotree(req, colID, ln=cdslang, add_dad='', add_son='', rtype='', mtype='', callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Collection Management", body=wsc.perform_addcollectiontotree(colID=colID, ln=cdslang, add_dad=add_dad, add_son=add_son, rtype=rtype, callback=callback, confirm=confirm), uid=uid, language=ln, navtrail = navtrail_previous_links, req=req, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addcollection(req, colID, ln=cdslang, colNAME='', dbquery='', rest='', callback="yes", confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Collection Management", body=wsc.perform_addcollection(colID=colID, ln=cdslang, colNAME=colNAME, dbquery=dbquery, rest=rest, callback=callback, confirm=confirm), uid=uid, language=ln, navtrail = navtrail_previous_links, req=req, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifyrankmethods(req, colID, ln=cdslang, func='', rnkID='', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyrankmethods(colID=colID, ln=ln, func=func, rnkID=rnkID, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def deletecollection(req, colID, ln=cdslang, confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_deletecollection(colID=colID, ln=ln, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def editcollection(req, colID=1, ln=cdslang, mtype=''): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_editcollection(colID=colID, ln=ln, mtype=mtype), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addoutputformat(req, colID, ln=cdslang, code='', name='', callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addoutputformat(colID=colID, ln=ln, code=code, name=name, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def showoutputformats(req, colID, ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_showoutputformats(colID=colID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addexistingoutputformat(req, colID, ln=cdslang, fmtID=-1, callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addexistingoutputformat(colID=colID, ln=ln, fmtID=fmtID, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def deleteoutputformat(req, colID, ln=cdslang, fmtID=-1, callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_deleteoutputformat(colID=colID, ln=ln, fmtID=fmtID, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def removeoutputformat(req, colID, ln=cdslang, fmtID='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_removeoutputformat(colID=colID, ln=ln, fmtID=fmtID, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def update_external_collections(req, colID, ln=cdslang, state=None, recurse=None): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body = wsc.perform_update_external_collections(colID, ln, state, recurse), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) +def update_detailed_record_options(req, colID, ln=cdslang, tabs=[], recurse=0): + """Update the preferences for the tab to show/hide in the detailed record page. """ + + _tabs = wash_url_argument(tabs, 'list') + navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) + + try: + uid = getUid(req) + except Error, e: + return error_page(req) + + auth = check_user(req,'cfgwebsearch') + if not auth[0]: + return page(title="Edit Collection", + body = wsc.perform_update_detailed_record_options(colID, ln, _tabs, recurse), + uid=uid, + language=ln, + req=req, + navtrail = navtrail_previous_links, + lastupdated=__lastupdated__) + else: + return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) + def removefieldvalue(req, colID, ln=cdslang, fldID='', fldvID='', fmeth='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_removefieldvalue(colID=colID, ln=ln, fldID=fldID, fldvID=fldvID, fmeth=fmeth, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def removefield(req, colID, ln=cdslang, fldID='', fldvID='', fmeth='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_removefield(colID=colID, ln=ln, fldID=fldID, fldvID=fldvID, fmeth=fmeth, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifyfield(req, colID, fldID, fldvID='', ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyfield(colID=colID, fldID=fldID, fldvID=fldvID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifyoutputformat(req, colID, ln=cdslang, fmtID=-1, sel_type='', trans=[], confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyoutputformat(colID=colID, ln=ln, fmtID=fmtID, sel_type=sel_type, trans=trans, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def showsearchoptions(req, colID, ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_showsearchoptions(colID=colID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addexistingfield(req, colID, ln=cdslang, fldID=-1, fldvID=-1, fmeth='', callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addexistingfield(colID=colID, ln=ln, fldID=fldID, fldvID=fldvID, fmeth=fmeth, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page(title='Authorization failure', uid=uid, body=wsc.adderrorbox('try to login first', datalist=["""You are not a user authorized to perform admin tasks, try to login with another account.""" % (sweburl, weburl)]), navtrail= navtrail_previous_links, lastupdated=__lastupdated__) def rearrangefield(req, colID, ln=cdslang, fmeth='', callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_rearrangefield(colID=colID, ln=ln, fmeth=fmeth, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page(title='Authorization failure', uid=uid, body=wsc.adderrorbox('try to login first', datalist=["""You are not a user authorized to perform admin tasks, try to login with another account.""" % (sweburl, weburl)]), navtrail= navtrail_previous_links, lastupdated=__lastupdated__) def addexistingfieldvalue(req, colID, fldID, ln=cdslang, callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addexistingfieldvalue(colID=colID, ln=ln, fldID=fldID, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page(title='Authorization failure', uid=uid, body=wsc.adderrorbox('try to login first', datalist=["""You are not a user authorized to perform admin tasks, try to login with another account.""" % (sweburl, weburl)]), navtrail= navtrail_previous_links, lastupdated=__lastupdated__) def rearrangefieldvalue(req, colID, fldID, ln=cdslang, callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_rearrangefieldvalue(colID=colID, ln=ln, fldID=fldID, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page(title='Authorization failure', uid=uid, body=wsc.adderrorbox('try to login first', datalist=["""You are not a user authorized to perform admin tasks, try to login with another account.""" % (sweburl, weburl)]), navtrail= navtrail_previous_links, lastupdated=__lastupdated__) def addnewfieldvalue(req, colID, fldID, ln=cdslang, name='', value='', callback="yes", confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addnewfieldvalue(colID=colID, fldID=fldID, ln=cdslang, name=name, value=value, callback=callback, confirm=confirm), uid=uid, language=ln, navtrail = navtrail_previous_links, req=req, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifyfieldvalue(req, colID, fldID, fldvID, ln=cdslang, name='', value='', callback="yes", confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyfieldvalue(colID=colID, fldID=fldID, fldvID=fldvID, ln=cdslang, name=name, value=value, callback=callback, confirm=confirm), uid=uid, language=ln, navtrail = navtrail_previous_links, req=req, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def showsearchfields(req, colID, ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_showsearchfields(colID=colID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def showsortoptions(req, colID, ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_showsortoptions(colID=colID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifyportalbox(req, colID, ln=cdslang, pbxID=-1, score='', position='', sel_ln='', title='', body='', callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_modifyportalbox(colID=colID, ln=ln, pbxID=pbxID, score=score, position=position, sel_ln=sel_ln, title=title, body=body, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def removeportalbox(req, colID, ln=cdslang, pbxID='', sel_ln='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_removeportalbox(colID=colID, ln=ln, pbxID=pbxID, sel_ln=sel_ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addexistingportalbox(req, colID, ln=cdslang, pbxID=-1, score=0, position='', sel_ln='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addexistingportalbox(colID=colID, ln=ln, pbxID=pbxID, score=score, position=position, sel_ln=sel_ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page(title='Authorization failure', uid=uid, body=wsc.adderrorbox('try to login first', datalist=["""You are not a user authorized to perform admin tasks, try to login with another account.""" % (sweburl, weburl)]), navtrail= navtrail_previous_links, lastupdated=__lastupdated__) def deleteportalbox(req, colID, ln=cdslang, pbxID=-1, callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_deleteportalbox(colID=colID, ln=ln, pbxID=pbxID, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def showportalboxes(req, colID, ln=cdslang, callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_showportalboxes(colID=colID, ln=ln, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def addportalbox(req, colID, ln=cdslang, title='', body='', callback='yes', confirm=-1): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Edit Collection", body=wsc.perform_addportalbox(colID=colID, ln=ln, title=title, body=body, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def modifycollectiontree(req, colID, ln=cdslang, move_up='', move_down='', move_from='', move_to='', delete='', rtype='', callback='yes', confirm=0): navtrail_previous_links = wsc.getnavtrail() + """> Collection Management """ % (weburl) try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Collection Management", body=wsc.perform_modifycollectiontree(colID=colID, ln=ln, move_up=move_up, move_down=move_down, move_from=move_from, move_to=move_to, delete=delete, rtype=rtype, callback=callback, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def index(req, colID=1, ln=cdslang, mtype='', content='', confirm=0): navtrail_previous_links = wsc.getnavtrail() try: uid = getUid(req) except Error, e: return error_page(req) auth = check_user(req,'cfgwebsearch') if not auth[0]: return page(title="Collection Management", body=wsc.perform_index(colID=colID, ln=ln, mtype=mtype, content=content, confirm=confirm), uid=uid, language=ln, req=req, navtrail = navtrail_previous_links, lastupdated=__lastupdated__) else: return page_not_authorized(req=req, text=auth[1], navtrail=navtrail_previous_links) def error_page(req, ln=cdslang, verbose=1): _ = gettext_set_language(ln) return page(title=_("Internal Error"), body = create_error_box(req, verbose=verbose, ln=ln), description="%s - Internal Error" % cdsname, keywords="%s, Internal Error" % cdsname, language=ln, req=req) diff --git a/modules/webstyle/css/cds.css b/modules/webstyle/css/cds.css index acc249504..7558c131e 100644 --- a/modules/webstyle/css/cds.css +++ b/modules/webstyle/css/cds.css @@ -1,1390 +1,1610 @@ /* * -*- mode: text; coding: utf-8; -*- $Id$ This file is part of CDS Invenio. Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. CDS Invenio is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. CDS Invenio is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CDS Invenio; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ body { color: #000; background: #fff; margin: 0px; padding: 0px; } h1 { font-size: 173%; font-weight: 700; margin-top: 5px; margin-left: 0px; color: #36c; background: transparent; } .h1 { font-size: 173%; font-weight: 700; margin-left: 0px; color: #36c; background: transparent; } h2 { font-size: 144%; font-weight: 650; margin-left: 0px; color: #36c; background: transparent; } h3 { font-size: 120%; font-weight: 600; font-variant: small-caps; margin-top: 40px; margin-left: 0px; margin-bottom: 10px; color: #36c; background: transparent; border-bottom: dotted 2px #36c; width: 50%; } h4 { font-size: 110%; font-weight: 600; font-style: italic; color: #36c; margin-left: 0px; background: transparent; } h5 { font-size: 110%; font-weight: 400; color: #36c; margin-left: 0px; background: transparent; } h6 { font-size: 110%; font-weight: 200; font-style: italic; color: #36c; margin-left: 0px; background: transparent; } a:link { color: #00c; background: transparent; } a:visited { color: #006; background: transparent; } a:active { color: #00c; background: transparent; } a:hover { color: #00c; background: transparent; } a.moreinfo:link { color: #060; background: transparent; } a.moreinfo:visited { color: #060; background: transparent; } a.moreinfo:active { color: #060; background: transparent; } a.moreinfo:hover { color: #060; background: transparent; } a.img:hover { color: #00c; background: transparent; } a.img:active { color: #00c; background: transparent; font-weight: normal; } a.note:link { color: #666; background: transparent; } a.note:visited { color: #666; background: transparent; } a.note:active { color: #666; background: transparent; } a.note:hover { color: #666; background: transparent; } .headerbox { color: #000; background: transparent; width: 100%; padding: 0px; margin-top: 0px; margin-bottom: 0px; border-collapse: collapse; border-bottom: 2px solid #3366cc; } .headerboxbody { color: #000; padding: 0px; margin: 0px; } .headerboxbodylogo { width: 200px; padding-left: 5px; color: #36c; font-size: 20px; font-weight: bold; font-variant: small-caps; letter-spacing: 6px; } .headermodulebox { color: #fff; background: transparent; border-collapse: collapse; margin: 0px; padding: 0px; } .headermoduleboxbody { color: #000; background: #36c; font-size: x-small; font-weight: bold; text-align: center; margin: 0px; padding: 0px; width: 75px; } .headermoduleboxbodyblank { width: 12px; padding: 0px; margin: 0px; } .headermoduleboxbodyselected { color: #000; background: #fff; font-size: x-small; font-weight: bold; text-align: center; border-left: 2px solid #36c; border-right: 2px solid #36c; border-top: 2px solid #36c; margin: 5px; padding: 0px; width: 75px; } a.header:link { color: #fff; background: #36c; text-decoration: none; } a.header:visited { color: #fff; background: #36c; text-decoration: none; } a.header:active { color: #fff; background: #36c; text-decoration: none; } a.header:hover { color: #fff; background: #36c; text-decoration: none; } a.headerselected:link { color: #36c; background: #fff; text-decoration: none; } a.headerselected:visited { color: #36c; background: #fff; text-decoration: none; } a.headerselected:active { color: #36c; background: #fff; text-decoration: none; } a.headerselected:hover { color: #36c; background: #fff; text-decoration: none; } .navtrailbox { color: #36c; background: #fff; padding: 0px; margin-top: 7px; border-spacing: 0px; border-collapse: collapse; font-size: x-small; } .navtrailboxbody { color: #36c; padding: 0px 0px 0px 10px; border-spacing: 0px; background: #fff; font-size: x-small; } a.navtrail:link { color: #36c; background: transparent; } a.navtrail:visited { color: #36c; background: transparent; } a.navtrail:active { color: #36c; background: transparent; } a.navtrail:hover { color: #36c; background: transparent; } .info { color: #060; background: transparent; } .snapshot { color: #000; background: transparent; border: 2px solid #999; margin: 10px 10px 0px 40px; } .pageheader { color: #999; font-size: x-small; background: transparent; padding: 0px; margin: 0px; width: 100%; } .pagebody { color: #000; background: transparent; margin:0px; padding: 20px; } .pagebodystripeleft { color: #000; background: #fff; font-size: x-small; width: 120px; margin: 0px; padding-left: 10px; float: left; } .pagebodystripemiddle { color: #000; background: #fff; padding: 0px; margin: 0px; } .pagebodystriperight { color: #000; background: #fff; font-size: x-small; width: 120px; float: right; } .pageboxlefttop { color: #000; background: transparent; font-size: x-small; } .pageboxlefttopadd { color: #000; background: transparent; font-size: x-small; } .pageboxleftbottom { color: #000; background: transparent; font-size: x-small; } .pageboxleftbottomadd { color: #000; background: transparent; font-size: x-small; } .pageboxrighttop { color: #000; background: transparent; font-size: x-small; } .pageboxrighttopadd { color: #000; background: transparent; font-size: x-small; } .pageboxrightbottom { color: #000; background: transparent; font-size: x-small; } .pageboxrightbottomadd { color: #000; background: transparent; font-size: x-small; } .pagefooter { color: #666; background: #fff; font-size: x-small; margin-top: 50px; padding: 0px; border-top: 1px solid #666; width: 100%; clear: both; } .pagefooterstripeleft { color: #666; background: #fff; font-size: x-small; margin-left: 5px; width: 60%; float: left; text-align: left; } .pagefooterstriperight { color: #666; background: #fff; margin-right: 5px; font-size: x-small; text-align: right; } a.footer:link { color: #666; background: transparent; } a.footer:visited { color: #666; background: transparent; } a.footer:active { color: #666; background: transparent; } a.footer:hover { color: #666; background: transparent; } .errorbox { color: #000; background: #ffcccc; padding: 1px; margin: 5px 30px 5px 30px; border-collapse: collapse; border: 2px solid #900; } .errorboxheader { color: #000; background: #ffcccc; padding: 3px; border-spacing: 0px; font-weight: bold; text-align: left; } .errorboxbody { color: #000; background: #ffcccc; padding: 3px; } .searchbox { color: #000; background: #fff; padding: 1px; margin: 5px 0px 5px 0px; border-collapse: collapse; border-top: 1px solid #36c; } .searchboxheader { color: #000; background: #f1f1f1; padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .searchboxbody { color: #000; background: #fff; padding: 3px; } .narrowsearchbox { color: #000; background: #fff; padding: 1px; margin: 20px 20px 5px 0px; border-collapse: collapse; border-top: 1px solid #36c; } .narrowsearchboxheader { color: #000; background: #f1f1f1; padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .narrowsearchboxbody { color: #000; background: #fff; padding: 3px; } .focusonsearchbox { color: #000; background: #f0f8ff; padding: 1px; margin: 20px 20px 5px 0px; border-collapse: collapse; border-top: 1px solid #36c; } .focusonsearchboxheader { color: #000; background: #e6e6fa; padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .focusonsearchboxbody { color: #000; background: #f0f8ff; padding: 3px; } .searchalsosearchbox { color: #000; background: #fffbf5; padding: 1px; margin: 20px 20px 5px 0px; border-collapse: collapse; border-top: 1px solid #36c; } .searchalsosearchboxheader { color: #000; background: #ffeacc; padding: 3px; border-spacing: 0px; font-size: small; text-align: left; } .searchalsosearchboxbody { color: #444; background: #fffbf5; padding: 3px; } .latestadditionsbox { color: #000; background: #fff; padding: 5px; margin: 5px 20px 5px 0px; border-spacing: 5px; } .latestadditionsboxtimebody { color: #000; background: #fff; padding: 3px; white-space: nowrap; text-align: right; vertical-align: top; font-size: xx-small; } .latestadditionsboxrecordbody { color: #000; background: #fff; padding: 3px; text-align: left; vertical-align: top; font-size: small; } .portalbox { color: #000; background: #fff; margin: 0px 0px 15px 0px; border-collapse: collapse; border-top: 1px solid #abb; font-size: x-small; width: 100%; } .portalboxheader { color: #000; background: #f1f1f1; padding: 2px; border-spacing: 0px; border-bottom: 1px solid #999; text-align: left; font-size: x-small; } .portalboxbody { color: #000; background: #fff; padding: 2px; font-size: x-small; } .admin_wvar, .admin_w200, .admin_wvar_nomargin { color: #000; background: white; padding: 1px; margin: 0px 0px 5px 20px; border-spacing: 0px; border-top: 1px solid #36c; } .admin_w200 { width: 250px; } .admin_wvar_nomargin { margin: 0px; } .adminlabel { width: 100px; font-size: small; background: #f1f1f1; vertical-align: top; } .adminheader, .adminheaderleft, .adminheadercenter, .adminheaderright { color: #000; background: #f1f1f1; border-spacing: 0px; font-size: small; padding: 3px 5px; text-align: center; } .adminheaderleft { text-align: left; } .adminheaderright { text-align: right; } .adminbutton { color: #fff; background: #36c; font-weight: bold; margin: 5px 10px 5px 10px; border-collapse: collapse; border-top: 1px solid #36c; } .admintd, .admintdleft, .admintdright { font-size: small; padding: 0px 10px; text-align: center; vertical-align: top; } .admintdleft { text-align: left; } .admintdright { text-align: right; } a.google:link { color: #333; background: transparent; } a.google:visited { color: #333; background: transparent; } a.google:active { color: #333; background: transparent; } a.google:hover { color: #333; background: transparent; } .googlebox { color: #333; background: #fff; text-align: left; margin-left: auto; margin-right: auto; margin-top: 50px; padding: 10px; font-size: small; border-collapse: collapse; border-top: 1px solid #fc0; } .googleboxheader { color: #333; background: #ffc; font-weight: normal; font-size: small; vertical-align: top; } .googleboxbody { color: #333; background: #fff; padding: 0px 5px 0px 5px; font-size: small; text-align: left; vertical-align: top; } .adminbox { color: #000; background: #f1f1f1; margin: 0px; padding: 0px; width: 120px; } .adminboxheader { color: #000; background: #f1f1f1; font-size: x-small; text-align: left; } .adminboxbody { color: #000; background: #f1f1f1; font-size: x-small; } .formbutton { color: #fff; background: #36c; font-weight: bold; } .headline { color: #36c; background: transparent; } .quicknote { color: #603; background: transparent; } .important { color: #f00; background: transparent; } .popupselected { color: #fff; background: #006; } .searchresultsbox { color: #000; background: #ffe; padding: 0px; margin-top: 15px; border-collapse: collapse; border-top: 1px solid #fc0; width: 100%; } .searchresultsboxheader { color: #000; background: #ffc; padding: 2px; border-spacing: 0px; text-align: left; font-weight: normal; } .searchresultsboxbody { color: #000; background: #ffe; border-top: 1px dotted #fc0; border-bottom: 1px dotted #fc0; padding: 2px; } .searchresultsboxrecords { color: #000; background: transparent; margin-left: 0px; margin-right: 20px; } .nearesttermsbox { color: #603; background: #ffe; padding: 0px; border-collapse: collapse; } .nearesttermsboxheader { color: #603; background: #ffc; padding: 0px; border-spacing: 0px; text-align: left; font-weight: normal; } .nearesttermsboxbody { color: #603; background: #fff; padding: 0px; } a.nearestterms:link { color: #603; background: transparent; } a.nearestterms:visited { color: #603; background: transparent; } a.nearestterms:active { color: #603; background: transparent; } a.nearestterms:hover { color: #603; background: transparent; } .nearesttermsboxbodyselected { color: #999; background: #fff; padding: 0px; } a.nearesttermsselected:link { color: #999; background: transparent; } a.nearesttermsselected:visited { color: #999; background: transparent; } a.nearesttermsselected:active { color: #999; background: transparent; } a.nearesttermsselected:hover { color: #999; background: transparent; } .moreinfo { color: #060; font-size: small; background: transparent; } .rankscoreinfo { color: #666; font-size: x-small; background: transparent; } .userinfobox { color: #039; font-size: x-small; width: 150px; margin-bottom: 15px; } .userinfoboxheader { color: #039; font-size: x-small; font-weight: bold; border-top: 1px solid #060; border-bottom: 1px solid #060; } .userinfoboxbody { color: #039; padding: 0px 5px 2px 0px; font-size: x-small; font-weight: normal; } a.userinfo:link { color: #039; background: transparent; } a.userinfo:visited { color: #039; background: transparent; } a.userinfo:active { color: #039; background: transparent; } a.userinfo:hover { color: #039; background: transparent; } a.langinfo:link { color: #666; background: transparent; } a.langinfo:visited { color: #666; background: transparent; } a.langinfo:active { color: #666; background: transparent; } a.langinfo:hover { color: #666; background: transparent; } .faq { margin-left: 12%; margin-right: 3%; } .faqq { margin-left: 18%; margin-right: 3%; } .exampleleader { color: #060; background: transparent; } .example { color: #039; background: transparent; } .blocknote { color: #000; background: #ccc; } .blocknotebis { color: #000; background: #999; } .devel { color: #600; background: #fff; border-color: #600; border-left-width: medium; border-left-style: solid; font-size: 90%; } .normal { color: #000; background: #fff; } .address { font-style: normal; font-size: x-small; } .note { color: #666; background: transparent; } .warning { color: #603; background: transparent; } .light { color: #ccc; background: transparent; } .nbdoccoll { color: #666; background: transparent; } hr { width: 100%; height: 1px; color: #999; background-color: #999; border-width: 0; } input,select { color: #000; background: #fff; } .wsactionbutton { width: 150px; height: 25px; color: #039; margin: 0px; background-color: #fff; border: 2px solid #039; vertical-align: middle; font-size: small; padding: 5px 5px 0px 5px; } .wsactionbuttonh { width: 150px; height: 25px; color: #039; margin: 0px; background-color: #9cf; border: 2px solid #039; vertical-align: middle; font-size: small; padding: 5px 5px 0px 5px; } .textbutton { color: #039; font-weight: bold; text-decoration: none; } .submitBody { color: #000; background: #9cf; } .submitHeader { color: #fff; background: #006; } .submitCurrentPage { color: #000; background: #9cf; border-top: 1px solid #039; border-left: 1px solid #039; border-right: 1px solid #039; } .submitEmptyPage { color: #fff; background: #fff; border-bottom: 1px solid #039; } .submitPage { color: #000; background: #fff; border-top: 1px solid #039; border-left: 1px solid #039; border-right: 1px solid #039; } .mycdscell { border-right: 1px solid #fff; } .guideimg { border: 2px dotted #777; padding: 5px; margin: 5px; } .guideheader { font-size: 120%; font-weight: 600; font-variant: small-caps; color: #36c; margin-left: 10px; background: transparent; } .recordlastmodifiedbox { text-align: left; font-size: small; color: #603; background: #fff; } .commentbox { color: #000; width: 100%; padding: 0px 10px 10px 10px; border-left: 2px solid #36c; } .warninggreen { color: #060; background: transparent; } .warningred { color: #f00; background: transparent; } .reportabuse { color: #000; background: #fff; font-size: small; vertical-align: bottom; } /* WebMessage module */ .mailbox{ border-collapse: collapse; color: #000; margin-top: 15px; padding: 0px; width: auto; } .mailboxheader tr{ background: #ffc; } .inboxheader { text-align:center; padding: 5px 30px 5px 30px; border-top: 1px solid #fc0; border-bottom: 1px solid #fc0; } .messageheader{ width: 100%; padding: 0px; border: 0px; } .mailboxinput{ width: 100%; } .mailboxlabel{ white-space: nowrap; padding-right: 15px; } .mailboxbody{ background: #ffe; } .mailboxrecord{ /* each record */ } .mailboxrecord td{ /* each cell of a record */ padding: 4px 30px 4px 30px; border-top: 1px dashed #fff; } .mailboxfooter{ background-color: #fff; } .mailboxfooter td{ padding: 10px 0px 0px 0px; border-top: 1px solid #fc0; border-bottom: none; border-left: none; border-right: none; } .mailboxsearch td { padding-top: 10px; padding-bottom: 10px; } .mailboxresults td { padding-bottom: 5px; border-bottom: 1px solid #fc0; } .nonsubmitbutton { color: #000; background: #fc0; font-weight: bold; } .confirmoperation{ margin: auto; width: 400px; height: 100px; background-color: #ddf; } .confirmmessage{ font-weight: bold; text-align: center; } .infobox{ background-color: #ffc; padding: 7px; border-collapse: collapse; border: 1px solid #fc0; } .warningbox{ background-color: #cff; padding: 7px; border-collapse: collapse; border: 1px solid #ccff00; } .quotabox{ background-color: #ffc; width: 200px; height: 15px; border: 1px solid #fc0; margin: 3px 0px 3px 0px; } .quotabar{ background-color: #fc0; border: 0px none black; height: 15px; } /* WebBasket module */ #bskcontainer{ float: left; background: transparent; } #bsktabs{ float: left; background:transparent; padding: 0px; margin: 0px; text-align: center; } .bsktab{ float: left; vertical-align: center; margin: 0px 20px 0px 20px; padding: 4px 10px 5px 5px; background-repeat: no-repeat; background-position: top-left; background-color: #ffe; } #bsktab_selected{ background-color: #ffc; font-weight: bold; border-bottom: hidden; } .bsktab a{ color: #000; text-decoration: none; } .bsktab a:hover{ text-decoration: underline; } .bsktab img{ margin: 0px 5px 0px 0px; } #bskcontent{ float: left; width: 100%; border-collapse: collapse; background: #ffe; border: none; } #bsktopics{ background-color: #ffc; padding: 10px; width: 100%; } .bsktopic{ white-space: nowrap; font-weight: bold; margin: 0px 20px 0px 20px; } .bsktopic a{ font-weight: normal; text-decoration: none; color: #000; } .bsktopic a:hover{ text-decoration: underline; } #bskbaskets{ padding: 10px; } #bskinfos{ background-color: transparent; } .bskbasket{ margin-bottom: 20px; border-collapse: collapse; border: 1px solid #fc0; background-color:white; } .bskbasketheader{ background-color: #ffc; } .bskbasketheader td{ padding: 5px; border-bottom: 1px solid #fc0; border-collapse: collapse; vertical-align: top; } .bskbasketfooter{ border-top: 1px solid #fc0; background-color: #ffc; padding: 3px; } .bskbasketheaderactions{ text-align: center; white-space: nowrap; } .bskbasketheaderactions td{ border: none; } .bskbasketheaderactions img{ border: 0px; margin: 2px; } .bskbasketheaderactions a{ font-size: small; color: #000; } .bskbasketfooter td{ padding: 5px 0px 5px 0px; } .bskactions{ text-align: center; white-space: nowrap; border-bottom: 1px solid #fc0; } .bskactions td{ border: none; } .bskactions img{ border: 0px; margin: 2px; } .bskactions a{ font-size: x-small; } .bsktitle { width: 100%; } .bskcmtcol{ white-space: nowrap; text-align: right; } .bskcontentcol{ border-bottom: 1px solid #fc0; padding: 5px; } .bskcontentcol a{ font-size: small; } .bskcomment { padding: 15px 10px 15px 10px; margin-bottom: 5px; border-bottom: 1px solid #fc0; } .bsklabel{ font-size: small; font-weight: bold; white-space: nowrap; padding-right: 15px; } .bsk_create_link{ padding-top: 5px; padding-bottom: 10px; background-color: transparent; } .bsk_create_link a{ color: black; } .bsk_create_link img{ border: none; } dd{ margin-bottom: 10px; } /* end of WebBasket module */ /* WebSubmit module */ form.hyperlinkform { /* used in form tag for a form that should be hidden, but contains a button styled like a hyperlink */ display: inline; padding: 0; margin: 0; height: 0; width: 0; } input.hyperlinkformHiddenInput { /* used in a hidden input tag for a form that should be hidden, but contains a button styled like a hyperlink */ display: inline; padding: 0; margin: 0; height: 0; width: 0; } input.hyperlinkformSubmitButton { /* used in a submit input tag for a form that should be hidden, but contains a button styled like a hyperlink */ display: inline; padding: 0; margin: 0; border: 0; background-color: transparent; font-size: 1em; line-height: 1em; text-decoration: underline; cursor: pointer; color: blue; } /* end of WebSubmit module */ /* BibEdit module */ .bibEditTable{ background: #ececec; border: 0px; padding: 0px; border-collapse: collapse; } .bibEditTable th{ background: #ccc; text-align: left; padding: 5px; } .bibEditCellRight{ font-size: small; text-align: right; padding: 0px; } .bibEditCellTag{ font-size: small; text-align: right; vertical-align: top; padding: 2px 5px 2px 5px; font-weight: bold; } /* end of BibEdit module*/ /* WebAlert module */ .alrtTable{ border: 1px solid black; width: 100%; padding: 0px; border-collapse: collapse; } .alrtTable td{ border: 1px solid black; padding: 3px; } /* end of WebAlert module */ /* externalcollections */ .externalcollectionsbox { color: #333; background: #fffbf5; text-align: left; margin-left: auto; margin-right: auto; margin-top: 50px; padding: 10px; font-size: small; border-collapse: collapse; border-top: 1px solid #fc0; } .externalcollectionsboxheader { color: #333; background: #ffeacc; font-weight: normal; font-size: small; vertical-align: top; } .externalcollectionsboxbody { color: #333; background: ##fffbf5; padding: 0px 5px 0px 5px; font-size: small; text-align: left; vertical-align: top; } .externalcollectionsresultsbox { color: #000; background: #fffbf5; padding: 0px; margin-top: 15px; border-collapse: collapse; border-top: 1px solid #fc0; width: 100%; } .externalcollectionsresultsboxheader { color: #000; background: #ffeacc; padding: 2px; border-spacing: 0px; text-align: left; font-weight: normal; } .externalcollectionsresultsboxbody { color: #000; background: #fffbf5; border-top: 1px dotted #fc0; border-bottom: 1px dotted #fc0; padding: 2px; } .externalcollectionsresultsboxrecords { color: #000; background: transparent; margin-left: 0px; margin-right: 20px; } +/* Start 'detailed record' boxes*/ + +div.detailed, div.mini-panel { + width:90%; + margin:auto; + position:relative; + max-width: 1280px; +} +div.detailed div.content { + position:relative; + top:1em; +} +div.detailed img, div.mini-panel img{ + border:none; +} +div.detailed div.content, div.mini-panel { + /* Should be removed for future CERN style*/ + border: 1px solid #36c; + padding-top:3px; + padding-bottom:3px; +} +div.mini-panel{ + /* Should be removed for future CERN style*/ + background-color:#F2F2FD; + background-image: url(mini_panel_background.gif); +} +.notopgap { margin: 0; height:0;} +.nobottomgap { margin-bottom: 0; height:0;} +/* CERN-specific style +div.detailed .inside, div.mini-panel{ + border-left: 1px solid #B2B2B2; + border-right: 1px solid #B2B2B2; + background: #FFF url(gradient-lightgray-1x100.gif) repeat-x left top; + color: #000000; + padding-left: 0px; + padding-right:0px; +} +*/ + +/* mini-panel in detailed record pages*/ + +/* Future CERN-specific style +.top-left, .top-right, .bottom-left, .bottom-right { + background-image: url(rcorners-gray-1280x18.gif); + height: 9px; + font-size: 2px; +} +.top-left, .bottom-left { + margin-right: 9px; +} +.top-right, .bottom-right { + margin-left: 9px; + margin-top: -9px; +} +.top-right { + background-position: 100% 0; +} +.bottom-left { + background-position: 0 -9px; +} +.bottom-right { + background-position: 100% -9px; +} +*/ + +/* Detailed record box */ +.top-left-folded { + height: 10px; +} +/* Future CERN-specific style +.top-left-folded, .top-right-folded, .bottom-left-folded, .bottom-right-folded { + background-image: url(rcorners-gray-1280x60-folded.gif); + height: 30px; + font-size: 2px; +} +.top-left-folded, .bottom-left-folded { + margin-right: 21px; +} +.top-right-folded, .bottom-right-folded { + margin-left: 21px; + margin-top: -30px; +} +.top-right-folded { + background-position: 100% 0; +} +.bottom-left-folded { + background-position: 0 -30px; +} +.bottom-right-folded { + background-position: 100% -30px; +} +*/ + +/* tabs as used in detailed record pages */ +ul.tabs{ + margin-top:5px; + margin-bottom:5px; + list-style-type:none; + text-align:center; +} +.tabs li{ + display:inline; +} +.tabs li a{ + border-top: 1px solid #36c; + border-right: 1px solid #36c; + border-bottom: 1px solid #36c; + border-left: none; + background-color: #FFF; + padding:4px; + color:#36c; + font-size:x-small; + font-weight:bold; + text-decoration:none; + zoom:100%; /*We loose CSS validity here, but necessary because of ie7*/ +} +.tabs li.on a{ + background-color: #36c; + color: #FFF +} +.tabs li.disabled a{ + color:#ccf; + cursor:default; +} +.tabs li.first a{ + border-left: 1px solid #36c; +} + +/*Future CERN-specific style +ul.tabs{ + margin-top:5px; + margin-bottom:5px; + list-style-type:none; + text-align:center; +} +.tabs li{ + display:inline; +} +.tabs li a{ + border-top: 1px solid #B2B2B2; + border-right: 1px solid #B2B2B2; + border-bottom: 1px solid #B2B2B2; + border-left: none; + background: #EBEBEB url(gradient_tab-gray-1x23.gif) repeat-x left top; + padding:4px; + color:#000; + text-decoration:none; + zoom:100%; +} +.tabs li.on a{ + background: #D6D6D6 url(gradient_tab_on-gray-1x23.gif) repeat-x left top; +} +.tabs li.disabled a{ + color:#999; + cursor:default +} +.tabs li.first a{ + border-left: 1px solid #B2B2B2; +} +*/ + +/* Actions in mini-box in detailed view */ +ul.detailedRecordActions{ + list-style-image: url(arrow_link-icon-15x11-right.gif) ; + padding-left: 1em; + text-align:left; + margin:0.05em; +} +.detailedRecordActions, .detailedRecordActions a{ + text-decoration:none; + color:#555; + font-weight:700; + font-size:small; +} + +/* Grading stars for mini-panel in detailed view*/ +div.mini-panel div.star a{ + text-indent:-9000px; /*Hide text*/ + height:30px; + width:30px; + float:left; +} +div.mini-panel div.star{ + height:30px !important; + float:left; + clear:none; + width:auto; + text-align:left; + background:url(star_dot-icon-30x30.gif) no-repeat; +} +div.mini-panel div.star:hover{ + background-image:url(star-icon-30x30.gif) ; +} + +/* Short bib notice displayed as sheet of paper in detailed record pages */ +#commentHB { + background: #fff url(paper-texture-128x128.gif) repeat top left; + padding:4px; + border-bottom: 1px solid #CCC; + border-right: 1px solid #CCC; + border-top: 1px solid #DDD; + border-left: 1px solid #DDD; +} +#commentHB #clip { + position:relative; + clear:none; + float:left; + left: -45px; + top:-15px; + height:72px; + width:72px; + background: transparent url(paper_clip-72x72.gif) no-repeat top left; +} +#commentHB #HB{ + position:relative; + left: -50px; +} + +/* end detailed record page*/ + /* end of cds.css */ diff --git a/modules/webstyle/img/arrow_link-icon-15x11-right.gif b/modules/webstyle/img/arrow_link-icon-15x11-right.gif new file mode 100644 index 000000000..d7ed63c26 Binary files /dev/null and b/modules/webstyle/img/arrow_link-icon-15x11-right.gif differ diff --git a/modules/webstyle/img/file-icon-none-96x128.gif b/modules/webstyle/img/file-icon-none-96x128.gif new file mode 100644 index 000000000..3c111c9ca Binary files /dev/null and b/modules/webstyle/img/file-icon-none-96x128.gif differ diff --git a/modules/webstyle/img/file-icon-text-15x20.gif b/modules/webstyle/img/file-icon-text-15x20.gif new file mode 100644 index 000000000..adc36ba95 Binary files /dev/null and b/modules/webstyle/img/file-icon-text-15x20.gif differ diff --git a/modules/webstyle/img/file-icon-text-96x128.gif b/modules/webstyle/img/file-icon-text-96x128.gif new file mode 100644 index 000000000..4437b393d Binary files /dev/null and b/modules/webstyle/img/file-icon-text-96x128.gif differ diff --git a/modules/webstyle/img/gradient-lightgray-1x100.gif b/modules/webstyle/img/gradient-lightgray-1x100.gif new file mode 100644 index 000000000..6302606e3 Binary files /dev/null and b/modules/webstyle/img/gradient-lightgray-1x100.gif differ diff --git a/modules/webstyle/img/gradient_tab-gray-1x23.gif b/modules/webstyle/img/gradient_tab-gray-1x23.gif new file mode 100644 index 000000000..b85aced60 Binary files /dev/null and b/modules/webstyle/img/gradient_tab-gray-1x23.gif differ diff --git a/modules/webstyle/img/gradient_tab_on-gray-1x23.gif b/modules/webstyle/img/gradient_tab_on-gray-1x23.gif new file mode 100644 index 000000000..316216105 Binary files /dev/null and b/modules/webstyle/img/gradient_tab_on-gray-1x23.gif differ diff --git a/modules/webstyle/img/paper-texture-128x128.gif b/modules/webstyle/img/paper-texture-128x128.gif new file mode 100644 index 000000000..46c68e202 Binary files /dev/null and b/modules/webstyle/img/paper-texture-128x128.gif differ diff --git a/modules/webstyle/img/paper_clip-72x72.gif b/modules/webstyle/img/paper_clip-72x72.gif new file mode 100644 index 000000000..a27d53a36 Binary files /dev/null and b/modules/webstyle/img/paper_clip-72x72.gif differ diff --git a/modules/webstyle/img/rcorners-gray-1280x18.gif b/modules/webstyle/img/rcorners-gray-1280x18.gif new file mode 100644 index 000000000..7412c80b0 Binary files /dev/null and b/modules/webstyle/img/rcorners-gray-1280x18.gif differ diff --git a/modules/webstyle/img/rcorners-gray-1280x60-folded.gif b/modules/webstyle/img/rcorners-gray-1280x60-folded.gif new file mode 100644 index 000000000..96b116f51 Binary files /dev/null and b/modules/webstyle/img/rcorners-gray-1280x60-folded.gif differ diff --git a/modules/webstyle/img/star-icon-30x30.gif b/modules/webstyle/img/star-icon-30x30.gif new file mode 100644 index 000000000..b8662c717 Binary files /dev/null and b/modules/webstyle/img/star-icon-30x30.gif differ diff --git a/modules/webstyle/img/star_dot-icon-30x30.gif b/modules/webstyle/img/star_dot-icon-30x30.gif new file mode 100644 index 000000000..6433d1cf1 Binary files /dev/null and b/modules/webstyle/img/star_dot-icon-30x30.gif differ diff --git a/modules/webstyle/lib/webpage.py b/modules/webstyle/lib/webpage.py index e96f88a82..84d0d3466 100644 --- a/modules/webstyle/lib/webpage.py +++ b/modules/webstyle/lib/webpage.py @@ -1,172 +1,179 @@ ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """CDS Invenio Web Page Functions""" __revision__ = "$Id$" from invenio.config import \ CFG_WEBSTYLE_CDSPAGEBOXLEFTBOTTOM, \ CFG_WEBSTYLE_CDSPAGEBOXLEFTTOP, \ CFG_WEBSTYLE_CDSPAGEBOXRIGHTBOTTOM, \ CFG_WEBSTYLE_CDSPAGEBOXRIGHTTOP, \ CFG_WEBSTYLE_CDSPAGEFOOTER, \ CFG_WEBSTYLE_CDSPAGEHEADER, \ cdslang, \ supportemail from invenio.messages import gettext_set_language from invenio.webuser import create_userinfobox_body from invenio.errorlib import get_msgs_for_code_list, register_errors import invenio.template webstyle_templates = invenio.template.load('webstyle') def create_navtrailbox_body(title, previous_links, prolog="", separator=""" > """, epilog="", language=cdslang): """Create navigation trail box body input: title = page title; previous_links = the trail content from site title until current page (both ends exlusive). output: text containing the navtrail """ return webstyle_templates.tmpl_navtrailbox_body(ln = language, title = title, previous_links = \ previous_links, separator = separator, prolog = prolog, epilog = epilog) def page(title, body, navtrail="", description="", keywords="", uid=0, cdspageheaderadd="", cdspageboxlefttopadd="", cdspageboxleftbottomadd="", cdspageboxrighttopadd="", cdspageboxrightbottomadd="", cdspagefooteradd="", lastupdated="", language=cdslang, verbose=1, titleprologue="", - titleepilogue="", secure_page_p=0, req=None, errors=[], warnings=[], navmenuid="admin"): + titleepilogue="", secure_page_p=0, req=None, errors=[], warnings=[], navmenuid="admin", + navtrail_append_title_p=1): """page(): display CDS web page input: title of the page body of the page in html format description goes to the metadata in the header of the HTML page keywords goes to the metadata in the header of the html page cdspageheaderadd is a message to be displayed just under the page header cdspageboxlefttopadd is a message to be displayed in the page body on left top cdspageboxleftbottomadd is a message to be displayed in the page body on left bottom cdspageboxrighttopadd is a message to be displayed in the page body on right top cdspageboxrightbottomadd is a message to be displayed in the page body on right bottom cdspagefooteradd is a message to be displayed on the top of the page footer lastupdated is a text containing the info on last update (optional) language is the language version of the page verbose is verbosity of the page (useful for debugging) titleprologue is to be printed right before page title titleepilogue is to be printed right after page title req is the mod_python request object errors is the list of error codes as defined in the moduleName_config.py file of the calling module log is the string of data that should be appended to the log file (errors automatically logged) secure_page_p is 0 or 1 and tells whether we are to use HTTPS friendly page elements or not navmenuid the section of the website this page belongs (search, submit, baskets, etc.) + navtrail_append_title_p is 0 or 1 and tells whether page title is appended to navtrail output: the final cds page with header, footer, etc. """ _ = gettext_set_language(language) # if there are event if warnings: warnings = get_msgs_for_code_list(warnings, 'warning', language) register_errors(warnings, 'warning') # if there are errors if errors: errors = get_msgs_for_code_list(errors, 'error', language) register_errors(errors, 'error', req) body = create_error_box(req, errors=errors, ln=language) return webstyle_templates.tmpl_page(req, ln=language, description = description, keywords = keywords, userinfobox = create_userinfobox_body(req, uid, language), - navtrailbox = create_navtrailbox_body(title, navtrail, + navtrailbox = create_navtrailbox_body(navtrail_append_title_p \ + and title or '', + navtrail, language=language), uid = uid, secure_page_p = secure_page_p, # pageheader = CFG_WEBSTYLE_CDSPAGEHEADER, pageheaderadd = cdspageheaderadd, boxlefttop = CFG_WEBSTYLE_CDSPAGEBOXLEFTTOP, boxlefttopadd = cdspageboxlefttopadd, boxleftbottomadd = cdspageboxleftbottomadd, boxleftbottom = CFG_WEBSTYLE_CDSPAGEBOXLEFTBOTTOM, boxrighttop = CFG_WEBSTYLE_CDSPAGEBOXRIGHTTOP, boxrighttopadd = cdspageboxrighttopadd, boxrightbottomadd = cdspageboxrightbottomadd, boxrightbottom = CFG_WEBSTYLE_CDSPAGEBOXRIGHTBOTTOM, titleprologue = titleprologue, title = title, titleepilogue = titleepilogue, body = body, # pagefooter = CFG_WEBSTYLE_CDSPAGEFOOTER, lastupdated = lastupdated, pagefooteradd = cdspagefooteradd, navmenuid = navmenuid) def pageheaderonly(title, navtrail="", description="", keywords="", uid=0, cdspageheaderadd="", language=cdslang, - req=None, secure_page_p=0, verbose=1, navmenuid="admin"): + req=None, secure_page_p=0, verbose=1, navmenuid="admin", + navtrail_append_title_p=1): """Return just the beginning of page(), with full headers. Suitable for the search results page and any long-taking scripts.""" return webstyle_templates.tmpl_pageheader(req, ln = language, headertitle = title, description = description, keywords = keywords, userinfobox = create_userinfobox_body(req, uid, language), - navtrailbox = create_navtrailbox_body(title, navtrail, + navtrailbox = create_navtrailbox_body(navtrail_append_title_p \ + and title or '', + navtrail, language=language), uid = uid, secure_page_p = secure_page_p, # pageheader = CFG_WEBSTYLE_CDSPAGEHEADER, pageheaderadd = cdspageheaderadd, navmenuid = navmenuid) def pagefooteronly(cdspagefooteradd="", lastupdated="", language=cdslang, req=None, verbose=1): """Return just the ending of page(), with full footer. Suitable for the search results page and any long-taking scripts.""" return webstyle_templates.tmpl_pagefooter(req, ln=language, lastupdated = lastupdated, pagefooteradd = cdspagefooteradd) def create_error_box(req, title=None, verbose=1, ln=cdslang, errors=None): """Analyse the req object and the sys traceback and return a text message box with internal information that would be suitful to display when something bad has happened. """ _ = gettext_set_language(ln) return webstyle_templates.tmpl_error_box(title = title, ln = ln, verbose = verbose, req = req, supportemail = supportemail, errors = errors) diff --git a/modules/webstyle/lib/webstyle_templates.py b/modules/webstyle/lib/webstyle_templates.py index ca3d5fac8..010f9a097 100644 --- a/modules/webstyle/lib/webstyle_templates.py +++ b/modules/webstyle/lib/webstyle_templates.py @@ -1,637 +1,776 @@ ## $Id$ ## CDS Invenio WebStyle templates. ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. __revision__ = \ "$Id$" import time import cgi import traceback import urllib import sys import string from invenio.config import \ cdslang, \ cdsname, \ cdsnameintl, \ supportemail, \ sweburl, \ weburl, \ version from invenio.messages import gettext_set_language, language_list_long from invenio.urlutils import make_canonical_urlargd, create_html_link from invenio.dateutils import convert_datecvs_to_datestruct, \ convert_datestruct_to_dategui +from invenio import template +websearch_templates = template.load('websearch') class Template: def tmpl_navtrailbox_body(self, ln, title, previous_links, separator, prolog, epilog): """Create navigation trail box body Parameters: - 'weburl' *string* - The base URL for the site - 'ln' *string* - The language to display - 'title' *string* - page title; - 'previous_links' *string* - the trail content from site title until current page (both ends exlusive) - 'prolog' *string* - HTML code to prefix the navtrail item with - 'epilog' *string* - HTML code to suffix the navtrail item with - 'separator' *string* - HTML code that separates two navtrail items Output: - text containing the navtrail """ # load the right message language _ = gettext_set_language(ln) out = "" if title != cdsnameintl.get(ln, cdsname): out += create_html_link(weburl, {'ln': ln}, _("Home"), {'class': 'navtrail'}) if previous_links: if out: out += separator out += previous_links if title: if out: out += separator if title == cdsnameintl.get(ln, cdsname): # hide site name, print Home instead out += cgi.escape(_("Home")) else: out += cgi.escape(title) return cgi.escape(prolog) + out + cgi.escape(epilog) def tmpl_page(self, req=None, ln=cdslang, description="", keywords="", userinfobox="", navtrailbox="", pageheaderadd="", boxlefttop="", boxlefttopadd="", boxleftbottom="", boxleftbottomadd="", boxrighttop="", boxrighttopadd="", boxrightbottom="", boxrightbottomadd="", titleprologue="", title="", titleepilogue="", body="", lastupdated=None, pagefooteradd="", uid=0, secure_page_p=0, navmenuid=""): """Creates a complete page Parameters: - 'weburl' *string* - The base URL for the site - 'ln' *string* - The language to display - 'sitename' *string* - the first part of the page HTML title - 'headertitle' *string* - the second part of the page HTML title - 'supportemail' *string* - email of the support team - 'description' *string* - description goes to the metadata in the header of the HTML page - 'keywords' *string* - keywords goes to the metadata in the header of the HTML page - 'userinfobox' *string* - the HTML code for the user information box - 'navtrailbox' *string* - the HTML code for the navigation trail box - 'pageheaderadd' *string* - additional page header HTML code - 'boxlefttop' *string* - left-top box HTML code - 'boxlefttopadd' *string* - additional left-top box HTML code - 'boxleftbottom' *string* - left-bottom box HTML code - 'boxleftbottomadd' *string* - additional left-bottom box HTML code - 'boxrighttop' *string* - right-top box HTML code - 'boxrighttopadd' *string* - additional right-top box HTML code - 'boxrightbottom' *string* - right-bottom box HTML code - 'boxrightbottomadd' *string* - additional right-bottom box HTML code - 'title' *string* - the title of the page - 'body' *string* - the body of the page - 'version' *string* - the version number of CDS Invenio - 'lastupdated' *string* - when the page was last updated - 'languagebox' *string* - the HTML code for the language box - 'pagefooteradd' *string* - additional page footer HTML code - 'secure_page_p' *int* (0 or 1) - are we to use HTTPS friendly page elements or not? - 'navmenuid' *string* - the id of the navigation item to highlight for this page Output: - HTML code of the page """ # load the right message language _ = gettext_set_language(ln) out = self.tmpl_pageheader(req, ln = ln, headertitle = title, description = description, keywords = keywords, userinfobox = userinfobox, navtrailbox = navtrailbox, pageheaderadd = pageheaderadd, secure_page_p = secure_page_p, navmenuid=navmenuid) + """
    %(boxlefttop)s
    %(boxlefttopadd)s
    %(boxleftbottomadd)s
    %(boxleftbottom)s
    %(boxrighttop)s
    %(boxrighttopadd)s
    %(boxrightbottomadd)s
    %(boxrightbottom)s
    %(titleprologue)s

    %(title)s

    %(titleepilogue)s %(body)s
    """ % { 'boxlefttop' : boxlefttop, 'boxlefttopadd' : boxlefttopadd, 'boxleftbottom' : boxleftbottom, 'boxleftbottomadd' : boxleftbottomadd, 'boxrighttop' : boxrighttop, 'boxrighttopadd' : boxrighttopadd, 'boxrightbottom' : boxrightbottom, 'boxrightbottomadd' : boxrightbottomadd, 'titleprologue' : titleprologue, 'title' : cgi.escape(title), 'titleepilogue' : titleepilogue, 'body' : body, } + self.tmpl_pagefooter(req, ln = ln, lastupdated = lastupdated, pagefooteradd = pagefooteradd) return out def tmpl_pageheader(self, req, ln=cdslang, headertitle="", description="", keywords="", userinfobox="", navtrailbox="", pageheaderadd="", uid=0, secure_page_p=0, navmenuid="admin"): """Creates a page header Parameters: - 'weburl' *string* - The base URL for the site - 'ln' *string* - The language to display - 'sitename' *string* - the first part of the page HTML title - 'headertitle' *string* - the second part of the page HTML title - 'supportemail' *string* - email of the support team - 'description' *string* - description goes to the metadata in the header of the HTML page - 'keywords' *string* - keywords goes to the metadata in the header of the HTML page - 'userinfobox' *string* - the HTML code for the user information box - 'navtrailbox' *string* - the HTML code for the navigation trail box - 'pageheaderadd' *string* - additional page header HTML code - 'languagebox' *string* - the HTML code for the language box - 'secure_page_p' *int* (0 or 1) - are we to use HTTPS friendly page elements or not? - 'navmenuid' *string* - the id of the navigation item to highlight for this page Output: - HTML code of the page headers """ # load the right message language _ = gettext_set_language(ln) if headertitle == cdsnameintl.get(ln, cdsname): headertitle = _("Home") out = """\ %(sitename)s: %(headertitle)s """ % { 'weburl' : weburl, 'sweburl' : sweburl, 'cssurl' : secure_page_p and sweburl or weburl, 'ln' : ln, 'sitename' : cdsnameintl.get(ln, cdsname), 'headertitle' : cgi.escape(headertitle), 'supportemail' : supportemail, 'description' : cgi.escape(description), 'keywords' : cgi.escape(keywords), 'userinfobox' : userinfobox, 'navtrailbox' : navtrailbox, 'pageheaderadd' : pageheaderadd, 'search_selected': navmenuid == 'search' and "selected" or "", 'submit_selected': navmenuid == 'submit' and "selected" or "", 'personalize_selected': navmenuid.startswith('your') and "selected" or "", 'help_selected': navmenuid == 'help' and "selected" or "", 'msg_search' : _("Search"), 'msg_submit' : _("Submit"), 'msg_personalize' : _("Personalize"), 'msg_help' : _("Help"), 'languagebox' : self.tmpl_language_selection_box(req, ln), } return out def tmpl_pagefooter(self, req=None, ln=cdslang, lastupdated=None, pagefooteradd=""): """Creates a page footer Parameters: - 'weburl' *string* - The base URL for the site - 'ln' *string* - The language to display - 'sitename' *string* - the first part of the page HTML title - 'supportemail' *string* - email of the support team - 'version' *string* - the version number of CDS Invenio - 'lastupdated' *string* - when the page was last updated - 'languagebox' *string* - the HTML code for the language box - 'pagefooteradd' *string* - additional page footer HTML code Output: - HTML code of the page headers """ # load the right message language _ = gettext_set_language(ln) if lastupdated: if lastupdated.startswith("$Date: "): lastupdated = convert_datestruct_to_dategui(\ convert_datecvs_to_datestruct(lastupdated), ln=ln) msg_lastupdated = _("Last updated") + ": " + lastupdated else: msg_lastupdated = "" out = """ """ % { 'weburl' : weburl, 'sweburl' : sweburl, 'ln' : ln, 'sitename' : cdsnameintl.get(ln, cdsname), 'supportemail' : supportemail, 'msg_search' : _("Search"), 'msg_submit' : _("Submit"), 'msg_personalize' : _("Personalize"), 'msg_help' : _("Help"), 'msg_poweredby' : _("Powered by"), 'msg_maintainedby' : _("Maintained by"), 'msg_lastupdated' : msg_lastupdated, 'languagebox' : self.tmpl_language_selection_box(req, ln), 'version' : version, 'pagefooteradd' : pagefooteradd, } return out def tmpl_language_selection_box(self, req, language=cdslang): """Take URLARGS and LANGUAGE and return textual language selection box for the given page. Parameters: - 'req' - The mod_python request object - 'language' *string* - The selected language """ # load the right message language _ = gettext_set_language(language) # Work on a copy in order not to bork the arguments of the caller argd = {} if req and req.args: argd.update(cgi.parse_qs(req.args)) parts = [] for (lang, lang_namelong) in language_list_long(): if lang == language: parts.append('%s' % lang_namelong) else: # Update the 'ln' argument in the initial request argd['ln'] = lang if req and req.uri: args = urllib.quote(req.uri, '/:?') + make_canonical_urlargd(argd, {}) else: args = "" parts.append(create_html_link(args, {}, lang_namelong, {'class': "langinfo"})) return _("This site is also available in the following languages:") + \ "
    " + '  '.join(parts) def tmpl_error_box(self, ln, title, verbose, req, supportemail, errors): """Produces an error box. Parameters: - 'title' *string* - The title of the error box - 'ln' *string* - The selected language - 'verbose' *bool* - If lots of information should be displayed - 'req' *object* - the request object - 'supportemail' *string* - the supportemail for this installation - 'errors' list of tuples (error_code, error_message) - #! todo """ # load the right message language _ = gettext_set_language(ln) info_not_available = _("N/A") if title is None: if errors: title = _("Error") + ': %s' % errors[0][1] else: title = _("Internal Error") browser_s = _("Browser") if req: try: if req.headers_in.has_key('User-Agent'): browser_s += ': ' + req.headers_in['User-Agent'] else: browser_s += ': ' + info_not_available host_s = req.hostname page_s = req.unparsed_uri client_s = req.connection.remote_ip except: # FIXME: bad except browser_s += ': ' + info_not_available host_s = page_s = client_s = info_not_available else: browser_s += ': ' + info_not_available host_s = page_s = client_s = info_not_available error_s = '' sys_error_s = '' traceback_s = '' if verbose >= 1: if sys.exc_info()[0]: sys_error_s = _("System Error") + ': %s %s\n' % \ (sys.exc_info()[0], sys.exc_info()[1]) if errors: errs = '' for error_tuple in errors: try: errs += "%s%s : %s\n " % (' '*6, error_tuple[0], error_tuple[1]) except: errs += "%s%s\n" % (' '*6, error_tuple) errs = errs[6:-2] # get rid of trainling ',' error_s = _("Error") + ': %s")' % errs + "\n" else: error_s = _("Error") + ': ' + info_not_available if verbose >= 9: traceback_s = _("Traceback") + ': \n%s' % \ string.join(traceback.format_tb(sys.exc_info()[2]), "\n") out = """

    %(title)s %(sys1)s %(sys2)s

    %(contact)s

     URI: http://%(host)s%(page)s
     %(time_label)s: %(time)s
     %(browser)s
     %(client_label)s: %(client)s
     %(error)s%(sys_error)s%(traceback)s
     
    -
    + %(send_error_label)s
    """ % { 'title' : title, 'time_label': _("Time"), 'client_label': _("Client"), 'send_error_label': \ _("Please send an error report to the Administrator."), 'send_label': _("Send error report"), 'sys1' : sys.exc_info()[0] or '', 'sys2' : sys.exc_info()[1] or '', 'contact' : \ _("Please contact %s quoting the following information:") % \ '' + \ supportemail + '', 'host' : host_s, 'page' : page_s, 'time' : time.strftime("%d/%b/%Y:%H:%M:%S %z"), 'browser' : browser_s, 'client' : client_s, 'error' : error_s, 'traceback' : traceback_s, 'sys_error' : sys_error_s, 'weburl' : weburl, 'referer' : page_s!=info_not_available and \ ("http://" + host_s + page_s) or \ info_not_available } return out + + def detailed_record_container(self, content, recid, tabs, ln=cdslang, + show_similar_rec_p=True, + creationdate=None, + modifydate=None): + """Prints the box displayed in detailed records pages, with tabs at the top. + + Parameters: + + - content *string* - the content displayed inside the box + - recid *int* - the id of the displayed record + - tabs ** - the tabs displayed at the top of the box. + - ln *string* - the language of the page in which the box is displayed + - show_similar_rec_p *bool* print 'similar records' link in the box + - creationdate *string* - the creation date of the displayed record + - modifydate *string* - the last modification date of the displayed record + """ + # load the right message language + _ = gettext_set_language(ln) + + # If no tabs, simply returns the content + if len(tabs) == 0: + return content + + # Build the tabs at the top of the page + out_tabs = '' + if len(tabs) > 1: + first_tab = True + for (label, url, selected, enabled) in tabs: + css_class = [] + if selected: + css_class.append('on') + if first_tab: + css_class.append('first') + first_tab = False + if not enabled: + css_class.append('disabled') + css_class = ' class="%s"' % ' '.join(css_class) + if not enabled: + out_tabs += '%(label)s' % \ + {'class':css_class, + 'label':label} + else: + out_tabs += '%(label)s' % \ + {'class':css_class, + 'url':url, + 'label':label} + if out_tabs != '': + out_tabs = '''
    +
    +
      %s
    +
    +
    ''' % out_tabs + + out = """ +
    + %(tabs)s +
    +
    +
    +
    +
     
    +

     

    + %(content)s +

     

    +
    +
    %(dates)s
    +
    %(similar)s
    +
    +
    +
    + """ % { + 'tabs':out_tabs, + 'content':content, + 'similar':create_html_link( + websearch_templates.build_search_url(p='recid:%d' % \ + recid, + rm='wrd', + ln=ln), + {}, _("Similar records"), + {'class': "moreinfo"}), + 'dates':creationdate and '
     %(dates)s
    ' % { + 'dates': _("Record created %(x_date_creation)s, last modified %(x_date_modification)s") % \ + {'x_date_creation': creationdate, + 'x_date_modification': modifydate}, + } or '' + } + + return out + + def detailed_record_mini_panel(self, recid, ln=cdslang, + format='hd', + files='', + reviews='', + actions=''): + """Displays the actions dock at the bottom of the detailed record + pages. + + Parameters: + + - recid *int* - the id of the displayed record + - format *string* - the format used to display the record + - files *string* - the small panel representing the fulltext + - reviews *string* - the small panel representing the reviews + - actions *string* - the small panel representing the possible user's action + """ + # load the right message language + _ = gettext_set_language(ln) + + out = """ +
    +
    +
    +
    + +
    + %(files)s +
    +
    + %(reviews)s +
    +
    + %(actions)s +
    +
    +
    +
    +
    + """ % { + 'weburl': weburl, + 'ln':ln, + 'recid':recid, + 'files': files, + 'reviews':reviews, + 'actions': actions, + } + return out diff --git a/modules/websubmit/lib/file.py b/modules/websubmit/lib/file.py index b68eed602..455d4fedd 100644 --- a/modules/websubmit/lib/file.py +++ b/modules/websubmit/lib/file.py @@ -1,722 +1,723 @@ ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. __revision__ = "$Id$" ## import interesting modules: import os import re import shutil import md5 import urllib from xml.sax.saxutils import quoteattr from invenio.config import \ cdslang, \ filedir, \ filedirsize, \ images, \ weburl from invenio.dbquery import run_sql #from invenio.websubmit_config import *s from mimetypes import MimeTypes import invenio.template websubmit_templates = invenio.template.load('websubmit') _archive_path = filedir _archive_size = filedirsize _mimes = MimeTypes() _mimes.suffix_map.update({'.tbz2' : '.tar.bz2'}) _mimes.encodings_map.update({'.bz2' : 'bzip2'}) _extensions = _mimes.encodings_map.keys() + \ _mimes.suffix_map.keys() + \ _mimes.types_map[1].keys() _extensions.sort() _extensions.reverse() def file_strip_ext(file): """Strip in the best way the extension from a filename""" ext = '.' while ext: ext = '' for c_ext in _extensions: if file.endswith(c_ext): file = file[0:-len(c_ext)] ext = c_ext break return file _path_re = re.compile(r'.*[\\/:]') def decompose_file(file): """Decompose a file into dirname, basename and extension""" basename = _path_re.sub('', file) dirname = file[:-len(basename)-1] base = file_strip_ext(basename) extension = basename[len(base) + 1:] return (dirname, base, extension) def propose_unique_name(file, use_version=False): """Propose a unique name, taking in account the version""" if use_version: version = ';'+re.sub('.*;', '', file) file = file[:-len(version)] else: version = '' (basedir, basename, extension) = decompose_file(file) if extension: # Sometimes the extension wasn't guessed extension = '.' + extension goodname = "%s%s%s" % (basename, extension, version) i = 1 listdir = os.listdir(basedir) while goodname in listdir: i += 1 goodname = "%s_%s%s%s" % (basename, i, extension, version) return "%s/%s" % (basedir, goodname) class BibRecDocs: """this class represents all the files attached to one record""" def __init__(self, recid): self.id = recid self.bibdocs = [] self.buildBibDocList() def buildBibDocList(self): self.bibdocs = [] res = run_sql("select id_bibdoc,type,status from bibrec_bibdoc,bibdoc " "where id=id_bibdoc and id_bibrec=%s", (self.id,)) for row in res: if row[2] == "": status = 0 else: status = int(row[2]) if status & 1 == 0: self.bibdocs.append(BibDoc(bibdocid=row[0], recid=self.id)) def listBibDocs(self, type=""): """Returns the list all bibdocs object belonging to a recid. If type is set, it returns just the bibdocs of that type. """ tmp = [] for bibdoc in self.bibdocs: if type == "" or type == bibdoc.getType(): tmp.append(bibdoc) return tmp def getBibDocNames(self, type="Main"): """Returns the names of the files associated with the bibdoc of a paritcular type""" names = [] for bibdoc in self.listBibDocs(type): names.append(bibdoc.getDocName()) return names def getBibDoc(self, bibdocid): """Returns the bibdoc with a particular bibdocid associated with this recid""" for bibdoc in self.bibdocs: if bibdoc.getId() == bibdocid: return bibdoc return None def deleteBibDoc(self, bibdocid): """Delete a bibdocid associated with the recid.""" for bibdoc in self.bibdocs: if bibdoc.getId() == bibdocid: bibdoc.delete() self.buildBibDocList() def addBibDoc(self, type="Main", docname="file"): """Creates a new bibdoc associated with the recid, with a file called docname and a particular type. It returns the bibdoc object which was just created. If it already exists a bibdoc with docname name, it appends a _number to have a unique name. """ goodname = docname i = 1 while goodname in self.getBibDocNames(type): i += 1 goodname = "%s_%s" % (docname, i) bibdoc = BibDoc(recid=self.id, type=type, docname=goodname) if bibdoc is not None: self.bibdocs.append(bibdoc) return bibdoc def addNewFile(self, fullpath, type="Main"): """Creates a new bibdoc given a fullpath file and store the file in it. It returns the bibdoc object. """ basename = decompose_file(fullpath)[1] bibdoc = self.addBibDoc(type, basename) if bibdoc is not None: bibdoc.addFilesNewVersion([fullpath]) return bibdoc return None def addNewVersion(self, fullpath, bibdocid): """Adds a new fullpath file to an already existent bibdocid making the previous files associated with the same bibdocids obsolete. It returns the bibdoc object. """ bibdoc = self.getBibDoc(bibdocid) if bibdoc is not None: bibdoc.addFilesNewVersion([fullpath]) return bibdoc return None def addNewFormat(self, fullpath, bibdocid): """Adds a new format for a fullpath file to an already existent bibdocid along side already there files. It returns the bibdoc object. """ bibdoc = self.getBibDoc(bibdocid) if bibdoc is not None: bibdoc.addFilesNewFormat([fullpath]) return bibdoc return None def listLatestFiles(self, type=""): docfiles = [] for bibdoc in self.listBibDocs(type): for docfile in bibdoc.listLatestFiles(): docfiles.append(docfile) return docfiles def checkFileExists(self, fullpath, type=""): """Check if the file pointed by fullpath corresponds to some existant file, either by name or by content.""" basename = decompose_file(fullpath)[1] if os.path.exists(fullpath): docfiles = self.listLatestFiles(type) for docfile in docfiles: if docfile.name == basename or \ md5.new(readfile(fullpath)).digest() == \ md5.new(readfile(docfile.getPath())).digest(): return docfile.getBibDocId() else: return 0 def display(self, bibdocid="", version="", type="", ln = cdslang): t = "" bibdocs = [] if bibdocid != "": for bibdoc in self.bibdocs: if bibdoc.getId() == bibdocid: bibdocs.append(bibdoc) else: bibdocs = self.listBibDocs(type) if len(bibdocs) > 0: types = listTypesFromArray(bibdocs) fulltypes = [] for mytype in types: fulltype = { 'name' : mytype, 'content' : [], } for bibdoc in bibdocs: if mytype == bibdoc.getType(): fulltype['content'].append(bibdoc.display(version, ln = ln)) fulltypes.append(fulltype) t = websubmit_templates.tmpl_bibrecdoc_filelist( ln = ln, types = fulltypes, ) return t class BibDoc: """this class represents one file attached to a record there is a one to one mapping between an instance of this class and an entry in the bibdoc db table""" def __init__ (self, bibdocid="", recid="", docname="file", type="Main"): # bibdocid is known, the document already exists if bibdocid != "": if recid == "": res = run_sql("select id_bibrec,type from bibrec_bibdoc " "where id_bibdoc=%s", (bibdocid,)) if len(res) > 0: recid = res[0][0] self.type = res[0][1] else: recid = None self.type = "" else: res = run_sql("select type from bibrec_bibdoc " "where id_bibrec=%s and id_bibdoc=%s", (recid, bibdocid,)) self.type = res[0][0] # gather the other information res = run_sql("select id,status,docname,creation_date," "modification_date from bibdoc where id=%s", (bibdocid,)) self.cd = res[0][3] self.md = res[0][4] self.recid = recid self.docname = res[0][2] self.id = bibdocid self.status = int(res[0][1]) group = "g" + str(int(int(self.id) / _archive_size)) self.basedir = "%s/%s/%s" % (_archive_path, group, self.id) # else it is a new document else: if docname == "" or type == "": return None else: self.recid = recid self.type = type self.docname = docname self.status = 0 self.id = run_sql("insert into bibdoc " "(status,docname,creation_date,modification_date) " "values(%s,%s,NOW(),NOW())", (str(self.status), docname,)) if self.id is not None: # we link the document to the record if a recid was # specified if self.recid != "": run_sql("insert into bibrec_bibdoc values(%s,%s,%s)", (recid, self.id, self.type,)) else: return None group = "g" + str(int(int(self.id) / _archive_size)) self.basedir = "%s/%s/%s" % (_archive_path, group, self.id) # we create the corresponding storage directory if not os.path.exists(self.basedir): os.makedirs(self.basedir) # and save the father record id if it exists if self.recid != "": fp = open("%s/.recid" % self.basedir, "w") fp.write(str(self.recid)) fp.close() if self.type != "": fp = open("%s/.type" % self.basedir, "w") fp.write(str(self.type)) fp.close() # build list of attached files self.docfiles = {} self.BuildFileList() # link with relatedFiles self.relatedFiles = {} self.BuildRelatedFileList() def addFilesNewVersion(self, files=[]): """add a new version of a file to an archive""" latestVersion = self.getLatestVersion() if latestVersion == "0": myversion = "1" else: myversion = str(int(latestVersion) + 1) for file in files: if os.path.exists(file): dummy, basename, extension = decompose_file(file) if extension: extension = '.' + extension self.changeName(basename) destination = propose_unique_name("%s/%s%s;%s" % (self.basedir, basename, extension, myversion), True) shutil.copy(file, destination) self.BuildFileList() def addFilesNewFormat(self, files=[], version=""): """add a new format of a file to an archive""" if version == "": version = self.getLatestVersion() for file in files: if os.path.exists(file): dummy, basename, extension = decompose_file(file) if extension: extension = '.' + extension destination = propose_unique_name("%s/%s%s;%s" % (self.basedir, basename, extension, version), True) shutil.copy(file, destination) self.BuildFileList() def getIcon(self): if self.relatedFiles.has_key('Icon'): return self.relatedFiles['Icon'][0] else: return None def addIcon(self, file): """link an icon with the bibdoc object""" #first check if an icon already exists existingIcon = self.getIcon() if existingIcon is not None: existingIcon.delete() #then add the new one basename = decompose_file(file)[1] newicon = BibDoc(type='Icon', docname=basename) if newicon is not None: newicon.addFilesNewVersion([file]) run_sql("insert into bibdoc_bibdoc values(%s,%s,'Icon')", (self.id, newicon.getId(),)) if os.path.exists(newicon.getBaseDir()): fp = open("%s/.docid" % newicon.getBaseDir(), "w") fp.write(str(self.id)) fp.close() fp = open("%s/.type" % newicon.getBaseDir(), "w") fp.write(str(self.type)) fp.close() self.BuildRelatedFileList() def deleteIcon(self): existingIcon = self.getIcon() if existingIcon is not None: existingIcon.delete() self.BuildRelatedFileList() def display(self, version="", ln = cdslang): t = "" if version == "all": docfiles = self.listAllFiles() elif version != "": docfiles = self.listVersionFiles(version) else: docfiles = self.listLatestFiles() existingIcon = self.getIcon() if existingIcon is not None: imagepath = "%s/getfile.py?docid=%s&name=%s&format=gif" % \ (weburl, existingIcon.getId(), urllib.quote(existingIcon.getDocName())) else: imagepath = "%s/smallfiles.gif" % images versions = [] for version in listVersionsFromArray(docfiles): currversion = { 'version' : version, 'previous' : 0, 'content' : [] } if version == self.getLatestVersion() and version != "1": currversion['previous'] = 1 for docfile in docfiles: if docfile.getVersion() == version: currversion['content'].append(docfile.display(ln = ln)) versions.append(currversion) t = websubmit_templates.tmpl_bibdoc_filelist( ln = ln, weburl = weburl, versions = versions, imagepath = imagepath, docname = self.docname, id = self.id, + recid = self.recid ) return t def changeName(self, newname): run_sql("update bibdoc set docname=%s where id=%s", (newname, self.id,)) self.docname = newname def getDocName(self): """retrieve bibdoc name""" return self.docname def getBaseDir(self): """retrieve bibdoc base directory""" return self.basedir def getType(self): """retrieve bibdoc type""" return self.type def getRecid(self): """retrieve bibdoc recid""" return self.recid def getId(self): """retrieve bibdoc id""" return self.id def getFile(self, name, format, version): if version == "": docfiles = self.listLatestFiles() else: docfiles = self.listVersionFiles(version) for docfile in docfiles: if docfile.getName()==name and (docfile.getFormat()==format or not format): return docfile return None def listVersions(self): versions = [] for docfile in self.docfiles: if not docfile.getVersion() in versions: versions.append(docfile.getVersion()) return versions def delete(self): """delete the current bibdoc instance""" self.status = self.status | 1 run_sql("update bibdoc set status='" + str(self.status) + "' where id=%s",(self.id,)) def BuildFileList(self): """lists all files attached to the bibdoc""" self.docfiles = [] if os.path.exists(self.basedir): self.md5s = Md5Folder(self.basedir) for fil in os.listdir(self.basedir): if fil not in (".recid", ".docid", ".", "..", '.doc_checksum', '.type'): filepath = "%s/%s" % (self.basedir, fil) fileversion = re.sub(".*;", "", fil) fullname = fil.replace(";%s" % fileversion, "") checksum = self.md5s.get_checksum(fil) (dirname, basename, extension) = decompose_file(fullname) # we can append file: self.docfiles.append(BibDocFile(filepath, self.type, fileversion, basename, extension, self.id, self.status, checksum)) def BuildRelatedFileList(self): res = run_sql("select ln.id_bibdoc2,ln.type,bibdoc.status from " "bibdoc_bibdoc as ln,bibdoc where id=ln.id_bibdoc2 and " "ln.id_bibdoc1=%s", (self.id,)) for row in res: bibdocid = row[0] type = row[1] if row[2] == "": status = 0 else: status = int(row[2]) if status & 1 == 0: if not self.relatedFiles.has_key(type): self.relatedFiles[type] = [] self.relatedFiles[type].append(BibDoc(bibdocid=bibdocid)) def listAllFiles(self): return self.docfiles def listLatestFiles(self): return self.listVersionFiles(self.getLatestVersion()) def listVersionFiles(self, version): tmp = [] for docfile in self.docfiles: if docfile.getVersion() == str(version): tmp.append(docfile) return tmp def getLatestVersion(self): if len(self.docfiles) > 0: self.docfiles.sort(orderFilesWithVersion) return self.docfiles[0].getVersion() else: return 0 def getFileNumber(self): return len(self.docfiles) def registerDownload(self, addressIp, version, format, userid=0): return run_sql("INSERT INTO rnkDOWNLOADS " "(id_bibrec,id_bibdoc,file_version,file_format," "id_user,client_host,download_time) VALUES " "(%s,%s,%s,%s,%s,INET_ATON(%s),NOW())", (self.recid, self.id, version, format.upper(), userid, addressIp,)) class BibDocFile: """this class represents a physical file in the CDS Invenio filesystem""" def __init__(self, fullpath, type, version, name, format, bibdocid, status, checksum): self.fullpath = fullpath self.type = type self.bibdocid = bibdocid self.version = version self.status = status self.checksum = checksum self.size = os.path.getsize(fullpath) self.md = os.path.getmtime(fullpath) try: self.cd = os.path.getctime(fullpath) except: self.cd = self.md self.name = name self.format = format self.dir = os.path.dirname(fullpath) if format == "": self.mime = "text/plain" self.encoding = "" self.fullname = name else: self.fullname = "%s.%s" % (name, format) (self.mime, self.encoding) = _mimes.guess_type(self.fullname) if self.mime is None: self.mime = "text/plain" def display(self, ln = cdslang): if self.format != "": format = ".%s" % self.format else: format = "" return websubmit_templates.tmpl_bibdocfile_filelist( ln = ln, weburl = weburl, id = self.bibdocid, selfformat = self.format, version = self.version, name = self.name, format = format, size = self.size, ) def isRestricted(self): """return restriction state""" if int(self.status) & 10 == 10: return 1 return 0 def getType(self): return self.type def getPath(self): return self.fullpath def getBibDocId(self): return self.bibdocid def getName(self): return self.name def getFormat(self): return self.format def getSize(self): return self.size def getVersion(self): return self.version def getChecksum(self): return self.checksum def getRecid(self): return run_sql("select id_bibrec from bibrec_bibdoc where " "id_bibdoc=%s",(self.bibdocid,))[0][0] def stream(self, req): if os.path.exists(self.fullpath): req.content_type = self.mime req.encoding = self.encoding req.filename = self.fullname req.headers_out["Content-Disposition"] = \ "attachment; filename=%s" % quoteattr(self.fullname) req.send_http_header() fp = file(self.fullpath, "r") content = fp.read() fp.close() return content def readfile(path): """Read the contents of a text file and return them as a string. Return an empty string if unable to access the file for reading. @param path: (string) - path to the file @return: (string) contents of file or empty string """ content = "" if os.access(path, os.F_OK|os.R_OK): try: fp = open(path, "r") except IOError: pass else: content = fp.read() fp.close() return content def listTypesFromArray(bibdocs): types = [] for bibdoc in bibdocs: if not bibdoc.getType() in types: types.append(bibdoc.getType()) return types def listVersionsFromArray(docfiles): versions = [] for docfile in docfiles: if not docfile.getVersion() in versions: versions.append(docfile.getVersion()) return versions def orderFilesWithVersion(docfile1, docfile2): """order docfile objects according to their version""" version1 = int(docfile1.getVersion()) version2 = int(docfile2.getVersion()) return cmp(version2, version1) class Md5Folder: """Manage all the Md5 checksum about a folder""" def __init__(self, folder): """Initialize the class from the md5 checksum of a given path""" self.folder = folder self.load() def update(self, only_new = True): """Update the .doc_checksum file with the current files. If only_new is specified then only not already calculated file are calculated.""" self.md5s = {} for filename in os.listdir(self.folder): if not only_new or self.md5s.get(filename, None) is None and \ not filename.startswith('.'): self.md5s[filename] = md5.new(open("%s/%s" % (self.folder, filename), "rb").read()).hexdigest() self.store() def store(self): """Store the current md5 dictionary into .doc_checksum""" md5file = open("%s/.doc_checksum" % self.folder, "w") for key, value in self.md5s.items(): md5file.write('%s *%s\n' % (value, key)) def load(self): """Load .doc_checksum into the md5 dictionary""" self.md5s = {} try: for row in open("%s/.doc_checksum" % self.folder, "r"): md5hash = row[:32] filename = row[34:].strip() self.md5s[filename] = md5hash except IOError: pass def check(self, filename = ''): """Check the specified file or all the files for which it exists a hash for being coherent with the stored hash.""" if filename and filename in self.md5s.keys(): return self.md5s[filename] == md5.new(open("%s/%s" % (self.folder, filename), "rb").read()).hexdigest() else: for filename, md5hash in self.md5s.items(): if md5.new(open("%s/%s" % (self.folder, filename), "rb").read()).hexdigest() != md5hash: return False return True def get_checksum(self, filename): md5hash = self.md5s.get(filename, None) if md5hash is None: self.update() # Now it should not fail! md5hash = self.md5s[filename] return md5hash diff --git a/modules/websubmit/lib/websubmit_templates.py b/modules/websubmit/lib/websubmit_templates.py index d734b79f7..418fc6050 100644 --- a/modules/websubmit/lib/websubmit_templates.py +++ b/modules/websubmit/lib/websubmit_templates.py @@ -1,1962 +1,1966 @@ ## $Id$ ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. __revision__ = "$Id$" import urllib import time import cgi import gettext import string import locale import re import operator import os from invenio.config import \ accessurl, \ images, \ version, \ weburl from invenio.messages import gettext_set_language class Template: # Parameters allowed in the web interface for fetching files files_default_urlargd = { 'version': (str, "") # version "" means "latest" } def tmpl_submit_home_page(self, ln, catalogues): """ The content of the home page of the submit engine Parameters: - 'ln' *string* - The language to display the interface in - 'catalogues' *string* - The HTML code for the catalogues list """ # load the right message language _ = gettext_set_language(ln) return """ """ % { 'document_types' : _("Document types available for submission"), 'please_select' : _("Please select the type of document you want to submit."), 'catalogues' : catalogues, } def tmpl_submit_home_catalog_no_content(self, ln): """ The content of the home page of submit in case no doctypes are available Parameters: - 'ln' *string* - The language to display the interface in """ # load the right message language _ = gettext_set_language(ln) out = "

    " + _("No document types available.") + "

    \n" return out def tmpl_submit_home_catalogs(self, ln, catalogs): """ Produces the catalogs' list HTML code Parameters: - 'ln' *string* - The language to display the interface in - 'catalogs' *array* - The catalogs of documents, each one a hash with the properties: - 'id' - the internal id - 'name' - the name - 'sons' - sub-catalogs - 'docs' - the contained document types, in the form: - 'id' - the internal id - 'name' - the name There is at least one catalog """ # load the right message language _ = gettext_set_language(ln) # import pprint # out = "
    " + pprint.pformat(catalogs)
             out = ""
             for catalog in catalogs:
                 out += "\n
      " out += self.tmpl_submit_home_catalogs_sub(ln, catalog) out += "\n
    \n" return out def tmpl_submit_home_catalogs_sub(self, ln, catalog): """ Recursive function that produces a catalog's HTML display Parameters: - 'ln' *string* - The language to display the interface in - 'catalog' *array* - A catalog of documents, with the properties: - 'id' - the internal id - 'name' - the name - 'sons' - sub-catalogs - 'docs' - the contained document types, in the form: - 'id' - the internal id - 'name' - the name """ # load the right message language _ = gettext_set_language(ln) if catalog['level'] == 1: out = "
  • %s\n" % catalog['name'] else: if catalog['level'] == 2: out = "
  • %s\n" % catalog['name'] else: if catalog['level'] > 2: out = "
  • %s\n" % catalog['name'] if len(catalog['docs']) or len(catalog['sons']): out += "
      \n" if len(catalog['docs']) != 0: for row in catalog['docs']: out += self.tmpl_submit_home_catalogs_doctype(ln, row) if len(catalog['sons']) != 0: for row in catalog['sons']: out += self.tmpl_submit_home_catalogs_sub(ln, row) if len(catalog['docs']) or len(catalog['sons']): out += "
  • " else: out += "" return out def tmpl_submit_home_catalogs_doctype(self, ln, doc): """ Recursive function that produces a catalog's HTML display Parameters: - 'ln' *string* - The language to display the interface in - 'doc' *array* - A catalog of documents, with the properties: - 'id' - the internal id - 'name' - the name """ # load the right message language _ = gettext_set_language(ln) return """
  • %(name)s
  • """ % doc def tmpl_action_page(self, ln, uid, guest, pid, now, doctype, description, docfulldesc, snameCateg, lnameCateg, actionShortDesc, indir, statustext): """ Recursive function that produces a catalog's HTML display Parameters: - 'ln' *string* - The language to display the interface in - 'guest' *boolean* - If the user is logged in or not - 'pid' *string* - The current process id - 'now' *string* - The current time (security control features) - 'doctype' *string* - The selected doctype - 'description' *string* - The description of the doctype - 'docfulldesc' *string* - The title text of the page - 'snameCateg' *array* - The short names of all the categories of documents - 'lnameCateg' *array* - The long names of all the categories of documents - 'actionShortDesc' *array* - The short names (codes) for the different actions - 'indir' *array* - The directories for each of the actions - 'statustext' *array* - The names of the different action buttons """ # load the right message language _ = gettext_set_language(ln) out = "" out += """

    %(continue_explain)s
    Access Number:

    """ % { 'continue_explain' : _("To continue with a previously interrupted submission, enter an access number into the box below:"), 'doctype' : doctype, 'go' : _("GO"), } return out def tmpl_warning_message(self, ln, msg): """ Produces a warning message for the specified text Parameters: - 'ln' *string* - The language to display the interface in - 'msg' *string* - The message to display """ # load the right message language _ = gettext_set_language(ln) return """
    %s
    """ % msg def tmpl_page_interface(self, ln, docname, actname, curpage, nbpages, file, nextPg, access, nbPg, doctype, act, indir, fields, javascript, images, mainmenu): """ Produces a page with the specified fields (in the submit chain) Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The document type - 'docname' *string* - The document type name - 'actname' *string* - The action name - 'act' *string* - The action - 'curpage' *int* - The current page of submitting engine - 'nbpages' *int* - The total number of pages - 'nextPg' *int* - The next page - 'access' *string* - The submission number - 'nbPg' *string* - ?? - 'indir' *string* - the directory of submitting - 'fields' *array* - the fields to display in the page, with each record having the structure: - 'fullDesc' *string* - the description of the field - 'text' *string* - the HTML code of the field - 'javascript' *string* - if the field has some associated javascript code - 'type' *string* - the type of field (T, F, I, H, D, S, R) - 'name' *string* - the name of the field - 'rows' *string* - the number of rows for textareas - 'cols' *string* - the number of columns for textareas - 'val' *string* - the default value of the field - 'size' *string* - the size for text fields - 'maxlength' *string* - the maximum length for text fields - 'htmlcode' *string* - the complete HTML code for user-defined fields - 'typename' *string* - the long name of the type - 'javascript' *string* - the javascript code to insert in the page - 'images' *string* - the path to the images - 'mainmenu' *string* - the url of the main menu """ # load the right message language _ = gettext_set_language(ln) # top menu out = """
    \n" # Display the navigation cell # Display "previous page" navigation arrows out += """
    %(docname)s   %(actname)s  """ % { 'docname' : docname, 'actname' : actname, } for i in range(1, nbpages+1): if i == int(curpage): out += """""" % curpage else: out += """""" % (i,i) out += """
       page: %s  %s   
     %(summary)s(2) 

    """ % { 'summary' : _("SUMMARY"), 'doctype' : doctype, 'act' : act, 'access' : access, 'indir' : indir, 'file' : file, 'nextPg' : nextPg, 'curpage' : curpage, 'nbPg' : nbPg, } for field in fields: if field['javascript']: out += """ """ % field['javascript']; # now displays the html form field(s) out += "%s\n%s\n" % (field['fullDesc'], field['text']) out += javascript out += "
     
     
    """ if int(curpage) != 1: out += """ """ % { 'prpage' : int(curpage) - 1, 'images' : images, 'prevpage' : _("Previous page"), } else: out += """ """ # Display the submission number out += """ \n""" % { 'submission' : _("Submission number") + '(1)', 'access' : access, } # Display the "next page" navigation arrow if int(curpage) != int(nbpages): out += """ """ % { 'nxpage' : int(curpage) + 1, 'images' : images, 'nextpage' : _("Next page"), } else: out += """ """ out += """
      %(prevpage)s %(prevpage)s  %(submission)s: %(access)s %(nextpage)s %(nextpage)s  


    %(back)s


    %(take_note)s
    %(explain_summary)s
    """ % { 'surequit' : _("Are you sure you want to quit this submission?"), 'back' : _("Back to main menu"), 'mainmenu' : mainmenu, 'images' : images, 'take_note' : '(1) ' + _("This is your submission access number. It can be used to continue with an interrupted submission in case of problems."), 'explain_summary' : '(2) ' + _("Mandatory fields appear in red in the SUMMARY window."), } return out def tmpl_submit_field(self, ln, field): """ Produces the HTML code for the specified field Parameters: - 'ln' *string* - The language to display the interface in - 'field' *array* - the field to display in the page, with the following structure: - 'javascript' *string* - if the field has some associated javascript code - 'type' *string* - the type of field (T, F, I, H, D, S, R) - 'name' *string* - the name of the field - 'rows' *string* - the number of rows for textareas - 'cols' *string* - the number of columns for textareas - 'val' *string* - the default value of the field - 'size' *string* - the size for text fields - 'maxlength' *string* - the maximum length for text fields - 'htmlcode' *string* - the complete HTML code for user-defined fields - 'typename' *string* - the long name of the type """ # load the right message language _ = gettext_set_language(ln) # If the field is a textarea if field['type'] == 'T': ## Field is a textarea: text="" \ % (field['name'], field['rows'], field['cols'], cgi.escape(str(field['val']), 1)) # If the field is a file upload elif field['type'] == 'F': ## the field is a file input: text = """""" \ % (field['name'], field['size'], "%s" \ % ((field['maxlength'] in (0, None) and " ") or (""" maxlength="%s\"""" % field['maxlength'])) ) # If the field is a text input elif field['type'] == 'I': ## Field is a text input: text = """""" \ % (field['name'], field['size'], field['val'], "%s" \ % ((field['maxlength'] in (0, None) and " ") or (""" maxlength="%s\"""" % field['maxlength'])) ) # If the field is a hidden input elif field['type'] == 'H': text="" % (field['name'], field['val']) # If the field is user-defined elif field['type'] == 'D': text=field['htmlcode'] # If the field is a select box elif field['type'] == 'S': text=field['htmlcode'] # If the field type is not recognized else: text="%s: unknown field type" % field['typename'] return text def tmpl_page_interface_js(self, ln, upload, field, fieldhtml, txt, check, level, curdir, values, select, radio, curpage, nbpages, images, returnto): """ Produces the javascript for validation and value filling for a submit interface page Parameters: - 'ln' *string* - The language to display the interface in - 'upload' *array* - booleans if the field is a field - 'field' *array* - the fields' names - 'fieldhtml' *array* - the fields' HTML representation - 'txt' *array* - the fields' long name - 'check' *array* - if the fields should be checked (in javascript) - 'level' *array* - strings, if the fields should be filled (M) or not (O) - 'curdir' *array* - the current directory of the submission - 'values' *array* - the current values of the fields - 'select' *array* - booleans, if the controls are "select" controls - 'radio' *array* - booleans, if the controls are "radio" controls - 'curpage' *int* - the current page - 'nbpages' *int* - the total number of pages - 'images' *int* - the path to the images - 'returnto' *array* - a structure with 'field' and 'page', if a mandatory field on antoher page was not completed """ # load the right message language _ = gettext_set_language(ln) nbFields = len(upload) # if there is a file upload field, we change the encoding type out = """""" return out def tmpl_page_endaction(self, ln, weburl, file, nextPg, startPg, access, curpage, nbPg, nbpages, doctype, act, docname, actname, indir, mainmenu, finished, function_content, next_action, images): """ Produces the pages after all the fields have been submitted. Parameters: - 'ln' *string* - The language to display the interface in - 'weburl' *string* - The url of CDS Invenio - 'doctype' *string* - The document type - 'act' *string* - The action - 'docname' *string* - The document type name - 'actname' *string* - The action name - 'curpage' *int* - The current page of submitting engine - 'startPg' *int* - The start page - 'nextPg' *int* - The next page - 'access' *string* - The submission number - 'nbPg' *string* - total number of pages - 'nbpages' *string* - number of pages (?) - 'indir' *string* - the directory of submitting - 'file' *string* - ?? - 'mainmenu' *string* - the url of the main menu - 'finished' *bool* - if the submission is finished - 'images' *string* - the path to the images - 'function_content' *string* - HTML code produced by some function executed - 'next_action' *string* - if there is another action to be completed, the HTML code for linking to it """ # load the right message language _ = gettext_set_language(ln) out = """
    """ % { 'finished' : _("finished!"), } else: for i in range(1, nbpages + 1): out += """""" % (i,i) out += """
    %(docname)s   %(actname)s  """ % { 'file' : file, 'nextPg' : nextPg, 'startPg' : startPg, 'access' : access, 'curpage' : curpage, 'nbPg' : nbPg, 'doctype' : doctype, 'act' : act, 'docname' : docname, 'actname' : actname, 'indir' : indir, 'mainmenu' : mainmenu, } if finished == 1: out += """
      %(finished)s   
       %s %(end_action)s  
     %(summary)s(2) """ % { 'end_action' : _("end of action"), 'summary' : _("SUMMARY"), 'doctype' : doctype, 'act' : act, 'access' : access, 'indir' : indir, } out += """

    %(function_content)s %(next_action)s

    """ % { 'function_content' : function_content, 'next_action' : next_action, } if finished == 0: out += """%(submission)s²: %(access)s""" % { 'submission' : _("Submission no"), 'access' : access, } else: out += " \n" out += """


    """ # Add the "back to main menu" button if finished == 0: out += """ %(back)s

    """ % { 'surequit' : _("Are you sure you want to quit this submission?"), 'back' : _("Back to main menu"), 'images' : images, 'mainmenu' : mainmenu } else: out += """ %(back)s

    """ % { 'back' : _("Back to main menu"), 'images' : images, 'mainmenu' : mainmenu, } return out def tmpl_function_output(self, ln, display_on, action, doctype, step, functions): """ Produces the output of the functions. Parameters: - 'ln' *string* - The language to display the interface in - 'display_on' *bool* - If debug information should be displayed - 'doctype' *string* - The document type - 'action' *string* - The action - 'step' *int* - The current step in submission - 'functions' *aray* - HTML code produced by functions executed and informations about the functions - 'name' *string* - the name of the function - 'score' *string* - the score of the function - 'error' *bool* - if the function execution produced errors - 'text' *string* - the HTML code produced by the function """ # load the right message language _ = gettext_set_language(ln) out = "" if display_on: out += """

    %(function_list)s

    """ % { 'function_list' : _("Here is the %(x_action)s function list for %(x_doctype)s documents at level %(x_step)s") % { 'x_action' : action, 'x_doctype' : doctype, 'x_step' : step, }, 'function' : _("Function"), 'score' : _("Score"), 'running' : _("Running function"), } for function in functions: out += """""" % { 'name' : function['name'], 'score' : function['score'], 'result' : function['error'] and (_("Function %s does not exist.") % function['name'] + "
    ") or function['text'] } out += "
    %(function)s%(score)s%(running)s
    %(name)s%(score)s%(result)s
    " else: for function in functions: if not function['error']: out += function['text'] return out def tmpl_next_action(self, ln, actions): """ Produces the output of the functions. Parameters: - 'ln' *string* - The language to display the interface in - 'actions' *array* - The actions to display, in the structure - 'page' *string* - the starting page - 'action' *string* - the action (in terms of submission) - 'doctype' *string* - the doctype - 'nextdir' *string* - the path to the submission data - 'access' *string* - the submission number - 'indir' *string* - ?? - 'name' *string* - the name of the action """ # load the right message language _ = gettext_set_language(ln) out = "

    %(haveto)s

      " % { 'haveto' : _("You must now"), } i = 0 for action in actions: if i > 0: out += " " + _("or") + " " i += 1 out += """
    • %(name)s
    • """ % action out += "
    " return out def tmpl_filelist(self, ln, filelist, recid, docid, version): """ Displays the file list for a record. Parameters: - 'ln' *string* - The language to display the interface in - 'recid' *string* - The record id - 'docid' *string* - The document id - 'version' *string* - The version of the document - 'filelist' *string* - The HTML string of the filelist (produced by the BibDoc classes) """ # load the right message language _ = gettext_set_language(ln) title = _("record") + ' #' + '%s' % (weburl, recid, recid) if docid != "": title += ' ' + _("document") + ' #' + str(docid) if version != "": title += ' ' + _("version") + ' #' + str(version) - out = """
    - """ % (title, filelist) + + """ % (filelist) return out def tmpl_bibrecdoc_filelist(self, ln, types): """ Displays the file list for a record. Parameters: - 'ln' *string* - The language to display the interface in - 'types' *array* - The different types to display, each record in the format: - 'name' *string* - The name of the format - 'content' *array of string* - The HTML code produced by tmpl_bibdoc_filelist, for the right files """ # load the right message language _ = gettext_set_language(ln) out = "" for mytype in types: out += "%s %s:" % (mytype['name'], _("file(s)")) out += "
      " for content in mytype['content']: out += content out += "
    " return out - def tmpl_bibdoc_filelist(self, ln, weburl, versions, imagepath, docname, id): + def tmpl_bibdoc_filelist(self, ln, weburl, versions, imagepath, docname, id, recid): """ Displays the file list for a record. Parameters: - 'ln' *string* - The language to display the interface in - 'weburl' *string* - The url of CDS Invenio - 'versions' *array* - The different versions to display, each record in the format: - 'version' *string* - The version - 'content' *string* - The HTML code produced by tmpl_bibdocfile_filelist, for the right file - 'previous' *bool* - If the file has previous versions - 'imagepath' *string* - The path to the image of the file - 'docname' *string* - The name of the document - 'id' *int* - The id of the document + - 'recid' *int* - The record id + """ # load the right message language _ = gettext_set_language(ln) out = """""" % { 'imagepath' : imagepath, 'docname' : docname } for version in versions: if version['previous']: - versiontext = """
    (%(see)s %(previous)s)""" % { + versiontext = """
    (%(see)s %(previous)s)""" % { 'see' : _("see"), 'weburl' : weburl, 'id' : id, + 'recID': recid, 'previous': _("previous"), } else: versiontext = "" out += """" out += "" return out def tmpl_bibdocfile_filelist(self, ln, weburl, id, name, selfformat, version, format, size): """ Displays a file in the file list. Parameters: - 'ln' *string* - The language to display the interface in - 'weburl' *string* - The url of CDS Invenio - 'id' *int* - The id of the document - 'name' *string* - The name of the file - 'selfformat' *string* - The format to pass in parameter - 'version' *string* - The version - 'format' *string* - The display format - 'size' *string* - The size of the file """ # load the right message language _ = gettext_set_language(ln) return """ %(name)s%(format)s [%(size)s B] """ % { 'weburl' : weburl, 'docid' : id, 'quotedname' : urllib.quote(name), 'selfformat' : urllib.quote(selfformat), 'version' : version, 'name' : name, 'format' : format, 'size' : size } def tmpl_submit_summary (self, ln, values, images): """ Displays the summary for the submit procedure. Parameters: - 'ln' *string* - The language to display the interface in - 'values' *array* - The values of submit. Each of the records contain the following fields: - 'name' *string* - The name of the field - 'mandatory' *bool* - If the field is mandatory or not - 'value' *string* - The inserted value - 'page' *int* - The submit page on which the field is entered - 'images' *string* - the path to the images """ # load the right message language _ = gettext_set_language(ln) out = """""" % \ { 'images' : images } for value in values: if value['mandatory']: color = "red" else: color = "" out += """""" % { 'color' : color, 'name' : value['name'], 'value' : value['value'], 'page' : value['page'] } out += "
    %(name)s %(value)s
    " return out def tmpl_yoursubmissions(self, ln, images, weburl, order, doctypes, submissions): """ Displays the list of the user's submissions. Parameters: - 'ln' *string* - The language to display the interface in - 'images' *string* - the path to the images - 'weburl' *string* - The url of CDS Invenio - 'order' *string* - The ordering parameter - 'doctypes' *array* - All the available doctypes, in structures: - 'id' *string* - The doctype id - 'name' *string* - The display name of the doctype - 'selected' *bool* - If the doctype should be selected - 'submissions' *array* - The available submissions, in structures: - 'docname' *string* - The document name - 'actname' *string* - The action name - 'status' *string* - The status of the document - 'cdate' *string* - Creation date - 'mdate' *string* - Modification date - 'id' *string* - The id of the submission - 'reference' *string* - The display name of the doctype - 'pending' *bool* - If the submission is pending - 'act' *string* - The action code - 'doctype' *string* - The doctype code """ # load the right message language _ = gettext_set_language(ln) out = "" out += """
    " return out def tmpl_yourapprovals(self, ln, referees): """ Displays the doctypes and categories for which the user is referee Parameters: - 'ln' *string* - The language to display the interface in - 'referees' *array* - All the doctypes for which the user is referee: - 'doctype' *string* - The doctype - 'docname' *string* - The display name of the doctype - 'categories' *array* - The specific categories for which the user is referee: - 'id' *string* - The category id - 'name' *string* - The display name of the category """ # load the right message language _ = gettext_set_language(ln) out = """ " return out def tmpl_publiline_selectdoctype(self, ln, docs): """ Displays the doctypes that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'docs' *array* - All the doctypes that the user can select: - 'doctype' *string* - The doctype - 'docname' *string* - The display name of the doctype """ # load the right message language _ = gettext_set_language(ln) out = """ """ return out def tmpl_publiline_selectcateg(self, ln, doctype, title, categories, images): """ Displays the categories from a doctype that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'title' *string* - The doctype name - 'images' *string* - the path to the images - 'categories' *array* - All the categories that the user can select: - 'id' *string* - The id of the category - 'waiting' *int* - The number of documents waiting - 'approved' *int* - The number of approved documents - 'rejected' *int* - The number of rejected documents """ # load the right message language _ = gettext_set_language(ln) out = """ """ % { 'key' : _("Key"), 'pending' : _("Pending"), 'images' : images, 'waiting' : _("Waiting for approval"), 'approved' : _("Approved"), 'already_approved' : _("Already approved"), 'rejected' : _("Rejected"), 'rejected_text' : _("Rejected"), 'somepending' : _("Some documents are pending."), } return out def tmpl_publiline_selectdocument(self, ln, doctype, title, categ, images, docs): """ Displays the documents that the user can select in the specified category Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'title' *string* - The doctype name - 'images' *string* - the path to the images - 'categ' *string* - the category - 'docs' *array* - All the categories that the user can select: - 'RN' *string* - The id of the document - 'status' *string* - The status of the document """ # load the right message language _ = gettext_set_language(ln) out = """ """ return out def tmpl_publiline_displaydoc(self, ln, doctype, docname, categ, rn, status, dFirstReq, dLastReq, dAction, access, images, accessurl, confirm_send, auth_code, auth_message, authors, title, sysno, newrn): """ Displays the categories from a doctype that the user can select Parameters: - 'ln' *string* - The language to display the interface in - 'doctype' *string* - The doctype - 'docname' *string* - The doctype name - 'categ' *string* - the category - 'rn' *string* - The document RN (id number) - 'status' *string* - The status of the document - 'dFirstReq' *string* - The date of the first approval request - 'dLastReq' *string* - The date of the last approval request - 'dAction' *string* - The date of the last action (approval or rejection) - 'images' *string* - the path to the images - 'accessurl' *string* - the URL of the publications - 'confirm_send' *bool* - must display a confirmation message about sending approval email - 'auth_code' *bool* - authorised to referee this document - 'auth_message' *string* - ??? - 'authors' *string* - the authors of the submission - 'title' *string* - the title of the submission - 'sysno' *string* - the unique database id for the record - 'newrn' *string* - the record number assigned to the submission """ # load the right message language _ = gettext_set_language(ln) if status == "waiting": image = """""" % images elif status == "approved": image = """""" % images elif status == "rejected": image = """""" % images else: image = "" out = """ """ return out diff --git a/modules/websubmit/lib/websubmit_webinterface.py b/modules/websubmit/lib/websubmit_webinterface.py index 0984748cf..7abdb2c2e 100644 --- a/modules/websubmit/lib/websubmit_webinterface.py +++ b/modules/websubmit/lib/websubmit_webinterface.py @@ -1,422 +1,453 @@ ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## CDS Invenio is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDS Invenio; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +__lastupdated__ = """$Date$""" + __revision__ = "$Id$" import string import os import time import types import re from mod_python import apache import sys from urllib import quote from invenio.config import \ CFG_ACCESS_CONTROL_LEVEL_SITE, \ cdslang, \ cdsname, \ images, \ storage, \ urlpath, \ version, \ weburl from invenio.dbquery import run_sql, Error from invenio.access_control_engine import acc_authorize_action from invenio.access_control_admin import acc_is_role -from invenio.webpage import page, create_error_box +from invenio.webpage import page, create_error_box, pageheaderonly, pagefooteronly from invenio.webuser import getUid, get_email, page_not_authorized from invenio.websubmit_config import * from invenio.file import * from invenio.webinterface_handler import wash_urlargd, WebInterfaceDirectory from invenio.urlutils import make_canonical_urlargd, redirect_to_url from invenio.messages import gettext_set_language +from invenio.search_engine import \ + guess_primary_collection_of_a_record, \ + get_colID, \ + create_navtrail_links import invenio.template websubmit_templates = invenio.template.load('websubmit') - +from invenio.websearchadminlib import get_detailed_page_tabs +import invenio.template +webstyle_templates = invenio.template.load('webstyle') +websearch_templates = invenio.template.load('websearch') class WebInterfaceFilesPages(WebInterfaceDirectory): def __init__(self,recid): self.recid = recid def _lookup(self, component, path): # after /record//files/ every part is used as the file # name (with possible path in the case of archives to be # uncompressed) filename = component def getfile(req, form): args = wash_urlargd(form, websubmit_templates.files_default_urlargd) ln = args['ln'] _ = gettext_set_language(ln) uid = getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE > 1: return page_not_authorized(req, "../getfile.py/index", navmenuid='submit') uid_email = get_email(uid) readonly = CFG_ACCESS_CONTROL_LEVEL_SITE == 1 # From now on: either the user provided a specific file # name (and a possible version), or we return a list of # all the available files. In no case are the docids # visible. bibarchive = BibRecDocs(self.recid) if filename: # We know the complete file name, guess which docid it # refers to ## TODO: Change the extension system according to ext.py from setlink ## and have a uniform extension mechanism... name = file_strip_ext(filename) format = filename[len(name):] if format and format[0] == '.': format = format[1:] # search this filename in the complete list of files for doc in bibarchive.listBibDocs(): if filename in [f.fullname for f in doc.listAllFiles()]: docfile=doc.getFile(name,format,args['version']) if docfile is None: return warningMsg(_("Unable to find file."), req, cdsname, ln) if docfile.isRestricted(): return warningMsg(_("This file is restricted!"), req, cdsname, ln) if not readonly: ip = str(req.get_remote_host(apache.REMOTE_NOLOOKUP)) res = doc.registerDownload(ip, version, format, uid) return docfile.stream(req) else: return warningMsg(_("Unable to find file."), req, cdsname, ln) filelist = bibarchive.display("", args['version'], ln=ln) t = websubmit_templates.tmpl_filelist( ln=ln, recid=self.recid, docid="", version=args['version'], filelist=filelist) + + cc = guess_primary_collection_of_a_record(self.recid) + unordered_tabs = get_detailed_page_tabs(get_colID(cc), self.recid) + ordered_tabs_id = [(tab_id, values['order']) for (tab_id, values) in unordered_tabs.iteritems()] + ordered_tabs_id.sort(lambda x,y: cmp(x[1],y[1])) + tabs = [(unordered_tabs[tab_id]['label'], \ + '%s/record/%s/%s' % (weburl, self.recid, tab_id), \ + tab_id == 'files', + unordered_tabs[tab_id]['enabled']) \ + for (tab_id, order) in ordered_tabs_id + if unordered_tabs[tab_id]['visible'] == True] + t = webstyle_templates.detailed_record_container(t, + self.recid, + tabs, + args['ln']) + title, description, keywords = websearch_templates.tmpl_record_page_header_content(req, self.recid, args['ln']) + return pageheaderonly(title=title, + navtrail=create_navtrail_links(cc=cc, as=0, ln=ln) + \ + ''' > %s + > %s''' % \ + (weburl, self.recid, title, _("Access to Fulltext")), - return page(title="", - body=t, - navtrail=_("Access to Fulltext"), description="", keywords="keywords", uid=uid, language=ln, req=req, - navmenuid='submit') - + navmenuid='search', + navtrail_append_title_p=0) + \ + websearch_templates.tmpl_search_pagestart(ln) + \ + t + \ + websearch_templates.tmpl_search_pageend(ln) + \ + pagefooteronly(lastupdated=__lastupdated__, language=ln, req=req) return getfile, [] def __call__(self, req, form): """Called in case of URLs like /record/123/files without trailing slash. """ return redirect_to_url(req, '%s/record/%s/files/' % (weburl, self.recid)) def websubmit_legacy_getfile(req, form): """ Handle legacy /getfile.py URLs """ # FIXME: this should _redirect_ to the proper # /record/.../files/... URL. args = wash_urlargd(form, { 'c': (str, cdsname), 'recid': (str, ''), 'docid': (str, ''), 'version': (str, ''), 'name': (str, ''), 'format': (str, '') }) def _getfile_py(req,c=cdsname,ln=cdslang,recid="",docid="",version="",name="",format=""): _ = gettext_set_language(ln) # get user ID: try: uid = getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE >= 1: return page_not_authorized(req, "../getfile.py/index", navmenuid='submit') uid_email = get_email(uid) except Error, e: return errorMsg(e.value,req) filelist="" # redirect to a canonical URL as far as it is possible (what # if we only have a docid, and no file supplied?) if name!="": if docid=="": return errorMsg(_("Parameter docid missing"), req, c, ln) doc = BibDoc(bibdocid=docid) docfile=doc.getFile(name,format,version) if docfile is None: return warningMsg(_("Unable to find file."),req, c, ln) # redirect to this specific file, possibly dropping # the version if we are referring to the latest one. if docfile.format: format = '.' + docfile.format else: format = '' target = '%s/record/%d/files/%s%s' % ( weburl, doc.recid, quote(docfile.name), format) if version and int(version) == int(doc.getLatestVersion()): version = '' target += make_canonical_urlargd({ 'version': version}, websubmit_templates.files_default_urlargd) return redirect_to_url(req, target) # all files attached to a record elif recid!="": return redirect_to_url(req, '%s/record/%s/files/' % (weburl, recid)) # a precise filename elif docid!="": bibdoc = BibDoc(bibdocid=docid) recid = bibdoc.getRecid() filelist = bibdoc.display(version, ln=ln) t = websubmit_templates.tmpl_filelist( ln = ln, recid = recid, docid = docid, version = version, filelist = filelist, ) p_navtrail = _("Access to Fulltext") return page(title="", body=t, navtrail = p_navtrail, description="", keywords="keywords", uid=uid, language=ln, req=req, - navmenuid='submit') + navmenuid='search') return _getfile_py(req, **args) # -------------------------------------------------- from invenio.websubmit_engine import home, action, interface, endaction class WebInterfaceSubmitPages(WebInterfaceDirectory): _exports = ['summary', 'sub', 'direct', ''] def direct(self, req, form): args = wash_urlargd(form, {'sub': (str, '')}) sub = args['sub'] uid = getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE >= 1: return page_not_authorized(req, "../direct.py/index", navmenuid='submit') myQuery = req.args if sub == "": return errorMsg("Sorry parameter missing...",req) res = run_sql("select docname,actname from sbmIMPLEMENT where subname=%s", (sub,)) if len(res)==0: return errorMsg("Sorry. Cannot analyse parameter",req) else: # get document type doctype = res[0][0] # get action name action = res[0][1] # retrieve other parameter values params = re.sub("sub=[^&]*","",myQuery) # find existing access number result = re.search("access=([^&]*)",params) if result is not None: access = result.group(1) params = re.sub("access=[^&]*","",params) else: # create 'unique' access number pid = os.getpid() now = time.time() access = "%i_%s" % (now,pid) # retrieve 'dir' value res = run_sql ("select dir from sbmACTION where sactname=%s",(action,)) dir = res[0][0] try: mainmenu = req.headers_in['Referer'] except: mainmenu = "" url = "/submit?doctype=%s&dir=%s&access=%s&act=%s&startPg=1%s&mainmenu=%s" % ( doctype,dir,access,action,params,quote(mainmenu)) req.err_headers_out.add("Location", url) raise apache.SERVER_RETURN, apache.HTTP_MOVED_PERMANENTLY return "" def sub(self, req, form): uid = getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE >= 1: return page_not_authorized(req, "../sub/", navmenuid='submit') myQuery = req.args if myQuery: if re.search("@",myQuery): param = re.sub("@.*","",myQuery) IN = re.sub(".*@","",myQuery) else: IN = myQuery url = "%s/submit/direct?sub=%s&%s" % (urlpath,IN,param) req.err_headers_out.add("Location", url) raise apache.SERVER_RETURN, apache.HTTP_MOVED_PERMANENTLY return "" else: return "Illegal page access" def summary(self, req, form): args = wash_urlargd(form, { 'doctype': (str, ''), 'act': (str, ''), 'access': (str, ''), 'indir': (str, '')}) uid = getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE >= 1: return page_not_authorized(req, "../summary.py/index", navmenuid='submit') t="" curdir = "%s/%s/%s/%s" % (storage,args['indir'],args['doctype'],args['access']) subname = "%s%s" % (args['act'], args['doctype']) res = run_sql("select sdesc,fidesc,pagenb,level from sbmFIELD where subname=%s " "order by pagenb,fieldnb", (subname,)) nbFields = 0 values = [] for arr in res: if arr[0] != "": val = { 'mandatory' : (arr[3] == 'M'), 'value' : '', 'page' : arr[2], 'name' : arr[0], } if os.path.exists("%s/%s" % (curdir,arr[1])): fd = open("%s/%s" % (curdir,arr[1]),"r") value = fd.read() fd.close() value = value.replace("\n"," ") value = value.replace("Select:","") else: value = "" val['value'] = value values.append(val) return websubmit_templates.tmpl_submit_summary( ln = args['ln'], values = values, images = images, ) def index(self, req, form): args = wash_urlargd(form, { 'c': (str, cdsname), 'doctype': (str, ''), 'act': (str, ''), 'startPg': (str, "1"), 'indir': (str, ''), 'access': (str, ''), 'mainmenu': (str, ''), 'fromdir': (str, ''), 'file': (str, ''), 'nextPg': (str, ''), 'nbPg': (str, ''), 'curpage': (str, '1'), 'step': (str, '0'), 'mode': (str, 'U'), }) req.form = form def _index(req, c, ln, doctype, act, startPg, indir, access, mainmenu, fromdir, file, nextPg, nbPg, curpage, step, mode): uid = getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE >= 1: return page_not_authorized(req, "../submit", navmenuid='submit') if doctype=="": return home(req,c,ln) elif act=="": return action(req,c,ln,doctype) elif int(step)==0: return interface(req,c,ln, doctype, act, startPg, indir, access, mainmenu, fromdir, file, nextPg, nbPg, curpage) else: return endaction(req,c,ln, doctype, act, startPg, indir, access,mainmenu, fromdir, file, nextPg, nbPg, curpage, step, mode) return _index(req, **args) # Answer to both /submit/ and /submit __call__ = index def errorMsg(title,req,c=cdsname,ln=cdslang): _ = gettext_set_language(ln) return page(title=_("Error"), body = create_error_box(req, title=title,verbose=0, ln=ln), description=_("Internal Error"), keywords="%s, Internal Error" % c, language=ln, req=req, navmenuid='submit') def warningMsg(title,req,c=cdsname,ln=cdslang): _ = gettext_set_language(ln) return page(title=_("Warning"), body = title, description=_("Internal Error"), keywords="%s, Internal Error" % c, language=ln, req=req, navmenuid='submit')