source: tags/ms_r16q2/NAMES_COM/names.aisc

Last change on this file was 8623, checked in by westram, 12 years ago

merge from e4fix [8376] [8377] [8378] [8379] [8380] [8386] [8387] [8388] [8389]

  • do not save AWARs which have default values
    • motivation: edit4-props saved after [8362] did not load with older versions
    • pros:
      • if the user did not change the default, changing the default in code will propagate to the user
    • cons:
      • AWARs used by multiple applications will trigger in non-saving application, when the database containing the awar is saved
        • only happens once if AWAR was previously stored with default-value
        • the most obvious ones were those edit4-search-strings linked to ntree (primer, probe, gene). disarmed them by setting the default to NULL
  • always generate definitions of SAI color translation tables (since default no longer saved)
    • drawback: when user deletes a default color translation table, it will re-appear after restart
  • allow experts to save fast-aligner protection to properties
  • deliver errors exported by awar callbacks (when triggered by widget change)
  • sequence color mapping
    • translate stored old default ('=0') to new default ('') on awar creation
    • removed code talking to AWARs via ARBDB interface - just use AWARs straightforward
  • ignore request_refresh_for_sequence_terminals when there is no hierarchy yet (now triggered by seq colors)
  • lib/arb_default/edit4.arb
    • removed default values (where code defaulted to same value)
    • changed some defaults
      • aligner (explicit, but empty ref)
      • helix setting (stolen from WL)
  • lib/arb_default/ntree.arb
    • removed all values
      • equal to default value
      • obsolete entries (former awar names)
      • entries that are now stored in main DB
  • removed unused AWARS (AWTC_create_rename_awars)
  • default for AWAR_TREE now "" everywhere
  • removed unused AISC variable
  • renamed edit direction related variables/awars
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.3 KB
Line 
1PROJECT        arboo_server
2OBJECT_KEY     AN,             # MAIN PREFIX
3MAX_KEY        21,             # MAX NUMBER OF AN ATTRIBUTE
4MAX_OBJECT     4,              # MAX DIFFERENT USER STRUCTURES
5MAX_STRING_LEN 1024,
6MAX_PAR_CNT    16,
7MAGIC_NUMBER   0x414e53,       # MAGIC_NUMBER 6 HEX DIGITS (see AISC/magic.lst@NAMESERVER)
8
9
10SERVER_INCLUDES (~
11#include <stdio.h>
12#include <aisc.h>
13#include <aisc_com.h>~)
14INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~)
15
16DATA {
17
18# ********************************* USER DATA *******************************************
19
20# ******************************* PRIVAT STRUCTURES: DO NOT CHANGE *********************************
21
22@STRUCT, @SKEY, @SKEYC, @SDOCU;
23
24dll_public, ,   ,   (~parent of dll (=DoubledLinkedList)~), {
25@TYPE,         @IDENT, @REF, @ACC, @SAVE, @KEY,   @KEYC, @INIT, @DOCU;
26t_key,         key,    t,    r,    ,      ,       ,      ,      (~The key~);
27int,           cnt,    t,    r,    ,      CNT,    0,     ,      (~Number of elements~);
28long,          hash,   t,    ,     ,      ,       ,      ,      (~Hash Table~);
29dllheader_ext, parent, flt,  r,    ,      PARENT, 1,     ,      (~My Owner~);
30dllheader_ext, last,   flt,  r,    ,      LAST,   2,     ,      (~Pointer to the last element~);
31};
32
33
34dll_header, COMMON, 0,  (~link header (should be head of each function)~), {
35@TYPE,       @IDENT,             @REF, @ACC, @SAVE, @KEY,      @KEYC, @INIT, @DOCU;
36t_key,       key,                t,    r,    ,      KEY,       0,     ,      (~The Key~);
37aisc_string, aisc_get_keystring, %,    r,    ,      KEYSTRING, 1,     ,      (~THE STRING of the KEY~);
38dll_public,  parent,             ls,   r,    ,      (~~),      2,     ,      (~Pointer to dll_public~);
39aisc_string, ident,              t,    ,     1,     IDENT,     5,     ,      (~The ident [not necessary]~);
40};
41
42
43# ********************************* USER STRUCTURES *******************************************
44
45AN_revers,  REVERS, 4,  (~revers mapping for shorts~), {
46    @TYPE,       @IDENT,    @REF, @ACC, @SAVE, @KEY,       @KEYC,  @INIT,  @DOCU;
47    dllh,        mh,        t,    ,     ,      (~~),       0,      ,       (~Header~);
48    aisc_string, full_name, t,    rw,   ,      ,           ,       ,       (~the full name of a species~);
49    aisc_string, acc,       t,    rw,   ,      ,           ,       ,       (~accession number~);
50    aisc_string, add_id,    t,    rw,   ,      ,           ,       ,       (~additional id data~);
51};
52
53AN_shorts, SHORTS,  3,  (~a dictionary~), SAVEDIRECTION HORIZONTAL, {
54    @TYPE,          @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,       @KEYC,  @INIT,  @DOCU;
55    dllh,           mh,             t,      ,       1,      (~~),       0,      ,       (~Header~);
56    aisc_string,    full_name,      t,      r,      1,      FULL_NAME,  8,      ,       (~the full name of a species~);
57    aisc_string,    acc,            t,      r,      1,      ACC,        9,      ,       (~accession number~);
58    aisc_string,    add_id,         t,      r,      1,      ADDID,      10,     ,       (~additional id data~);
59    aisc_string,    shrt,           t,      r,      1,      SHORT,      11,     ,       (~The Short~);
60};
61
62
63# called from code using id AN_LOCAL
64# single functions: LOCAL_GET_SHORT LOCAL_DEL_SHORT
65
66AN_local, LOCAL,    2,  (~local communication buffer~), {
67    @TYPE,       @IDENT,     @REF, @ACC, @SAVE, @KEY,      @KEYC, @INIT,                   @DOCU;
68    dllh,        mh,         t,    ,     ,      (~~),      0,     ,                        (~Header~);
69    int,         socket,     t,    ,     ,      ,          ,      names_init_socket(THIS), (~the callback~), DESTROY names_destroy_socket(THIS);
70    aisc_string, whoami,     t,    ,     ,      WHOAMI,    8,     ,                        (~who am i~);
71    aisc_string, full_name,  t,    rw,   ,      FULL_NAME, 9,     "",                      (~the full name of a species~);
72    aisc_string, acc,        t,    rw,   ,      ACCESSION, 10,    "",                      (~accession number~);
73    aisc_string, add_id,     t,    rw,   ,      ADDID,     11,    "",                      (~additional id data~);
74    aisc_string, advice,     t,    rw,   ,      ADVICE,    13,    "",                      (~advice for the short name~);
75    aisc_string, get_short,  %,    r,    ,      GET_SHORT, 14,    ,                        (~get a short name~);
76    int,         del_short,  %,    r,    ,      DEL_SHORT, 15,    ,                        (~forget stored short name~);
77};
78
79
80# called from code using id AN_MAIN
81# single functions: MAIN_SHUTDOWN MAIN_SAVEALL
82
83AN_main, MAIN, 1, (~global data~), SAVEDIRECTION VERTICAL, {
84    @TYPE,          @IDENT,            @REF,  @ACC,   @SAVE,  @KEY,       @KEYC,  @INIT,  @DOCU;
85    t_key,          key,               t,     n,      ,       ,           ,       ,       (~the KEY~);
86    AN_local,       loc_st,            d,     ,       ,       LOCAL,      8,      ,       (~the parameters~);
87    AN_shorts,      shorts1,           d,     r,      1,      SHORTS1,    10,     ,       (~the unique letters for a word~);
88    AN_shorts,      names,             d,     r,      1,      NAMES,      12,     ,       (~the unique names first*second*S*accession~);
89    AN_revers,      revers,            d,     r,      ,       ,           ,       ,       (~the revers unique names first*second*S*accession~);
90    int,            touched,           t,     r,      ,       TOUCHED,    14,     0,      (~does the database need to be saved?~);
91    aisc_string,    server_shutdown,   %,     w,      ,       SHUTDOWN,   15,     ,       (~SHUTDOWN command~);
92    int,            server_save,       %,     w,      ,       SAVEALL,    16,     ,       (~SAVE everything~);
93    aisc_string,    server_file,       t,     r,      ,       FILENAME,   17,     ,       (~The filename of the keys~);
94    int,            server_filedate,   t,     ,       ,       FILEDATE,   18,     ,       (~The filedate of server_file~);
95    int,            dbversion,         t,     ,       1,      DBVERSION,  19,     4,      (~Nameserver database version~);
96    aisc_string,    add_field,         t,     r,      1,      ADD_FIELD,  20,     ,       (~additional field used for identification~);
97    aisc_string,    add_field_default, t,     r,      1,      AF_DEFAULT, 21,     ,       (~default value for add_field, if field is missing~);
98    long,           prefix_hash,       t,     ,       ,       ,           ,       0,      (~prefix hash table~)
99    };
100};
Note: See TracBrowser for help on using the repository browser.