Changeset 4933


Ignore:
Timestamp:
2003-07-15T14:17:08+12:00 (21 years ago)
Author:
jmt12
Message:

Major CDM rewrite so it uses DOM.

Location:
trunk/gli
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/classes/dictionary.properties

    r4804 r4933  
    118118CDM.ClassifierManager.Assigned:Currently Assigned Classifiers
    119119CDM.ClassifierManager.Classifier:Select classifier to add:
     120CDM.ClassifierManager.Classifier_Exists:That classifier has already been assigned for this collection.
     121CDM.ClassifierManager.Classifier_Str:classifier
    120122CDM.ClassifierManager.Classifier_XML_Parse_Failed:GLI has been unable to determine the arguments for the {0}\nclassifier.  Please ensure that the classifier in question\nprovides the  -xml flag by running the classinfo.pl script\nsimilar to the  description of the  pluginfo.pl  script in\nsection   2.1  of   the   Greenstone   Developers   Guide.
    121123CDM.ClassifierManager.Configure:Configure Selected Classifier
     
    195197CDM.MetadataSetManager.Sets:Available Metadata Sets
    196198CDM.MetadataSetManager.Title:{39}{46}Metadata Set Review{47}{34}
    197 CDM.Move.At_Bottom:Cannot move the plugin {0} lower as it is already at the bottom of the list.
    198 CDM.Move.At_Top:Cannot move the plugin {0} higher as it is already at the top of the list.
     199CDM.Move.At_Bottom:Cannot move the {0} {1} lower as it is already at the bottom of the list.
     200CDM.Move.At_Top:Cannot move the {0} {1} higher as it is already at the top of the list.
    199201CDM.Move.Cannot:Cannot move the plugin {0} any lower as RecPlug and ArcPlug must be at the bottom of the list.
    200202CDM.Move.Fixed:<html>RecPlug and ArcPlug are generally required to be last and so are fixed in place.<br>If you really must move them please hand edit the collect.cfg file.</html>
     203CDM.Move.Move_Bottom:Move To Bottom
     204CDM.Move.Move_Down:Move Down
     205CDM.Move.Move_Top:Move To Top
     206CDM.Move.Move_Up:Move Up
    201207CDM.Move.Title:Error - Cannot Move
    202208CDM.PlugInManager.Add:Add Specified Plugin
     
    205211CDM.PlugInManager.Controls:Editing Controls
    206212CDM.PlugInManager.Instructions:Use this view to add, configure or remove plugins from your collection. To add one choose it from the combobox and click 'Add Specified Plugin'.\nTo configure or remove one, select it from the list of assigned plugins then:\ni)   Change its position in the plugin order by clicking on the arrow buttons. (Note: The position of RecPlug and ArcPlug are fixed).\nii)  Configure it by clicking 'Configure Selected Plugin',\niii) Remove it by clicking 'Remove Selected Plugin'.\n\nPlugins are configured using a pop-up design area with a scrollable list of arguments. Enable arguments and enter or select values as necessary.
    207 CDM.PlugInManager.Move_Bottom:Move To Bottom
    208 CDM.PlugInManager.Move_Down:Move Down
    209 CDM.PlugInManager.Move_Top:Move To Top
    210 CDM.PlugInManager.Move_Up:Move Up
    211213CDM.PlugInManager.PlugIn:Select plugin to add:
     214CDM.PlugInManager.PlugIn_Exists:That plugin has already been assigned for this collection.
     215CDM.PlugInManager.PlugIn_Str:plugin
    212216CDM.PlugInManager.PlugIn_XML_Parse_Failed:GLI has been unable to determine the arguments for the {0}\nplugin. Please ensure that the plugin in question provides\nthe  -xml flag by running the pluginfo.pl script described\nin  section  2.1  of  the   Greenstone  Developers  Guide.
    213217CDM.PlugInManager.Remove:Remove Selected Plugin
     
    215219CDM.PlugInManager.Parsing.Message:Design tool is loading plugin information.
    216220CDM.PlugInManager.Parsing.Title:Loading PlugIns
    217 CDM.SubcollectionManager.Add:Add New Filter Definition
    218 CDM.SubcollectionManager.Add_Subindex:Add New Subcollection Partition
     221CDM.SubcollectionManager.Add:Add
    219222CDM.SubcollectionManager.Assigned:Defined Subcollection Filters
    220 CDM.SubcollectionManager.Clear_Default_Subindex:Clear Default Subcollection Partition
    221 CDM.SubcollectionManager.Default_Subindex:Default Subcollection Partition:
    222223CDM.SubcollectionManager.Exclude:Exclude
    223224CDM.SubcollectionManager.Flags:Flags to set when matching.
     
    228229CDM.SubcollectionManager.Match:Regular expression to match with:
    229230CDM.SubcollectionManager.Name:Name the subcollection filter:
    230 CDM.SubcollectionManager.PartitionName:Name the subcollection partition:
    231 CDM.SubcollectionManager.Remove:Remove Selected Filter Definition
    232 CDM.SubcollectionManager.Remove_Subindex:Remove Subcollection Partition
    233 CDM.SubcollectionManager.Set_Default_Subindex:Set Default Subcollection Partition
     231CDM.SubcollectionManager.Remove:Remove
    234232CDM.SubcollectionManager.Source:Document attribute to match against:
    235 CDM.SubcollectionManager.Subcollection:Defined Subcollection Filters
    236233CDM.SubcollectionManager.Subcollection_Controls:Define Filters
    237 CDM.SubcollectionManager.Subindexes:Assigned Subcollection Partitions
    238234CDM.SubcollectionManager.Subindex_Controls:Assign Partitions
    239235CDM.SubcollectionManager.Title:{39}{46}Partition Indexes{47}{34}
     236CDM.SubcollectionManager.Update:Update
     237CDM.SubcollectionIndexManager.Add_Subindex:Add New Subcollection Partition
     238CDM.SubcollectionIndexManager.Clear_Default_Subindex:Clear Default Subcollection Partition
     239CDM.SubcollectionIndexManager.Default_Subindex:Default:
     240CDM.SubcollectionIndexManager.PartitionName:Partition Name:
     241CDM.SubcollectionIndexManager.Remove_Subindex:Remove Subcollection Partition
     242CDM.SubcollectionIndexManager.Set_Default_Subindex:Set Default Subcollection Partition
     243CDM.SubcollectionIndexManager.Subcollection:Defined Subcollection Filters
     244CDM.SubcollectionIndexManager.Subindexes:Assigned Subcollection Partitions
    240245CDM.SuperCollectionManager.Instructions:A supercollection is one where a single search is performed over several collections, as if all the collections were one. Specify the collections to include in the supercollection by clicking on the appropriate collection's name in the list below. The current collection will automatically be included. \nWARNING: If the individual collections do not have the same indexes (including subcollection partitions and language partitions) as each other, cross-collection searching will not work properly. The user will only be able to search using indexes common to all collections.
    241246CDM.SuperCollectionManager.Title:{39}{46}Super-Collection Selection{47}{34}
  • trunk/gli/languages.dat

    r4293 r4933  
    11ENGLISH          EN     GERMANIC
    22MAORI            MI     OCEANIC/INDONESIAN
    3 #AFAR             AA     HAMITIC
    4 #ABKHAZIAN        AB     IBERO-CAUCASIAN
    5 #AFRIKAANS        AF     GERMANIC
    6 #AMHARIC          AM     SEMITIC
    73ARABIC           AR     SEMITIC
    8 #ASSAMESE         AS     INDIAN
    9 #AYMARA           AY     AMERINDIAN
    10 #AZERBAIJANI      AZ     TURKIC/ALTAIC
    11 #BASHKIR          BA     TURKIC/ALTAIC
    12 #BYELORUSSIAN     BE     SLAVIC
    13 #BULGARIAN        BG     SLAVIC
    14 #BIHARI           BH     INDIAN
    15 #BISLAMA          BI     [not given]
    16 #BENGALI(BANGLA)  BN     INDIAN
    17 #TIBETAN          BO     ASIAN
    18 #BRETON           BR     CELTIC
    19 #CATALAN          CA     ROMANCE
    20 #CORSICAN         CO     ROMANCE
    21 #CZECH            CS     SLAVIC
    22 #WELSH            CY     CELTIC
    23 #DANISH           DA     GERMANIC
     4CHINESE          ZH     ASIAN
     5DUTCH            NL     GERMANIC
     6FRENCH           FR     ROMANCE
    247GERMAN           DE     GERMANIC
    25 #BHUTANI          DZ     ASIAN
    26 #GREEK            EL     LATIN/GREEK
    27 #ESPERANTO        EO     INTERNATIONAL AUX.
     8HEBREW           IW     SEMITIC [*Changed back from HE in 2003 by us. Not valid iso639, HE]
     9INDONESIAN       ID     OCEANIC/INDONESIAN [*Changed 1989 from original ISO 639:1988, IN]
     10ITALIAN          IT     ROMANCE
     11KAZAKH           KZ     TURKIC/ALTAIC [*Changed 2003 by us. Not valid iso639, KK]
     12PORTUGUESE       PT     ROMANCE
     13RUSSIAN          RU     SLAVIC
    2814SPANISH          ES     ROMANCE
    29 #ESTONIAN         ET     FINNO-UGRIC
    30 #BASQUE           EU     BASQUE
    31 #PERSIAN(FARSI)   FA     IRANIAN
    32 #FINNISH          FI     FINNO-UGRIC
    33 #FIJI             FJ     OCEANIC/INDONESIAN
    34 #FAROESE          FO     GERMANIC
    35 FRENCH           FR     ROMANCE
    36 #FRISIAN          FY     GERMANIC
    37 #IRISH            GA     CELTIC
    38 #SCOTS(GAELIC)    GD     CELTIC
    39 #GALICIAN         GL     ROMANCE
    40 #GUARANI          GN     AMERINDIAN
    41 #GUJARATI         GU     INDIAN
    42 #HAUSA            HA     NEGRO-AFRICAN
    43 HEBREW           HE     SEMITIC [*Changed 1989 from original ISO 639:1988, IW]
    44 #HINDI            HI     INDIAN
    45 #CROATIAN         HR     SLAVIC
    46 #HUNGARIAN        HU     FINNO-UGRIC
    47 #ARMENIAN         HY     INDO-EUROPEAN (OTHER)
    48 #INTERLINGUA      IA     INTERNATIONAL AUX.
    49 #INTERLINGUE      IE     INTERNATIONAL AUX.
    50 #INUPIAK          IK     ESKIMO
    51 INDONESIAN       ID     OCEANIC/INDONESIAN [*Changed 1989 from original ISO 639:1988, IN]
    52 #ICELANDIC        IS     GERMANIC
    53 ITALIAN          IT     ROMANCE
    54 #INUKTITUT        IU     [        ]
    55 #JAPANESE         JA     ASIAN
    56 #JAVANESE         JV     OCEANIC/INDONESIAN
    57 #GEORGIAN         KA     IBERO-CAUCASIAN
    58 #KAZAKH           KK     TURKIC/ALTAIC
    59 #GREENLANDIC      KL     ESKIMO
    60 #CAMBODIAN        KM     ASIAN
    61 #KANNADA          KN     DRAVIDIAN
    62 #KOREAN           KO     ASIAN
    63 #KASHMIRI         KS     INDIAN
    64 #KURDISH          KU     IRANIAN
    65 #KIRGHIZ          KY     TURKIC/ALTAIC
    66 #LATIN            LA     LATIN/GREEK
    67 #LINGALA          LN     NEGRO-AFRICAN
    68 #LAOTHIAN         LO     ASIAN
    69 #LITHUANIAN       LT     BALTIC
    70 #LATVIAN(LETTISH) LV     BALTIC
    71 #MALAGASY         MG     OCEANIC/INDONESIAN
    72 #MACEDONIAN       MK     SLAVIC
    73 #MALAYALAM        ML     DRAVIDIAN
    74 #MONGOLIAN        MN     [not given]
    75 #MOLDAVIAN        MO     ROMANCE
    76 #MARATHI          MR     INDIAN
    77 #MALAY            MS     OCEANIC/INDONESIAN
    78 #MALTESE          MT     SEMITIC
    79 #BURMESE          MY     ASIAN
    80 #NAURU            NA     [not given]
    81 #NEPALI           NE     INDIAN
    82 DUTCH            NL     GERMANIC
    83 #NORWEGIAN        NO     GERMANIC
    84 #OCCITAN          OC     ROMANCE
    85 #AFAN(OROMO)      OM     HAMITIC
    86 #ORIYA            OR     INDIAN
    87 #PUNJABI          PA     INDIAN
    88 #POLISH           PL     SLAVIC
    89 #PASHTO(PUSHTO)   PS     IRANIAN
    90 #PORTUGUESE       PT     ROMANCE
    91 #QUECHUA          QU     AMERINDIAN
    92 #RHAETO-ROMANCE   RM     ROMANCE
    93 #KURUNDI          RN     NEGRO-AFRICAN
    94 #ROMANIAN         RO     ROMANCE
    95 RUSSIAN          RU     SLAVIC
    96 #KINYARWANDA      RW     NEGRO-AFRICAN
    97 #SANSKRIT         SA     INDIAN
    98 #SINDHI           SD     INDIAN
    99 #SANGHO           SG     NEGRO-AFRICAN
    100 #SERBO-CROATIAN   SH     SLAVIC
    101 #SINGHALESE       SI     INDIAN
    102 #SLOVAK           SK     SLAVIC
    103 #SLOVENIAN        SL     SLAVIC
    104 #SAMOAN           SM     OCEANIC/INDONESIAN
    105 #SHONA            SN     NEGRO-AFRICAN
    106 #SOMALI           SO     HAMITIC
    107 #ALBANIAN         SQ     INDO-EUROPEAN (OTHER)
    108 #SERBIAN          SR     SLAVIC
    109 #SISWATI          SS     NEGRO-AFRICAN
    110 #SESOTHO          ST     NEGRO-AFRICAN
    111 #SUNDANESE        SU     OCEANIC/INDONESIAN
    112 #SWEDISH          SV     GERMANIC
    113 #SWAHILI          SW     NEGRO-AFRICAN
    114 #TAMIL            TA     DRAVIDIAN
    115 #TELUGU           TE     DRAVIDIAN
    116 #TAJIK            TG     IRANIAN
    117 #THAI             TH     ASIAN
    118 #TIGRINYA         TI     SEMITIC
    119 #TURKMEN          TK     TURKIC/ALTAIC
    120 #TAGALOG          TL     OCEANIC/INDONESIAN
    121 #SETSWANA         TN     NEGRO-AFRICAN
    122 #TONGA            TO     OCEANIC/INDONESIAN
    123 #TURKISH          TR     TURKIC/ALTAIC
    124 #TSONGA           TS     NEGRO-AFRICAN
    125 #TATAR            TT     TURKIC/ALTAIC
    126 #TWI              TW     NEGRO-AFRICAN
    127 #UIGUR            UG     [       ]
    128 #UKRAINIAN        UK     SLAVIC
    129 #URDU             UR     INDIAN
    130 #UZBEK            UZ     TURKIC/ALTAIC
    131 #VIETNAMESE       VI     ASIAN
    132 #VOLAPUK          VO     INTERNATIONAL AUX.
    133 #WOLOF            WO     NEGRO-AFRICAN
    134 #XHOSA            XH     NEGRO-AFRICAN
    135 #YIDDISH          YI     GERMANIC [*Changed 1989 from original ISO 639:1988, JI]
    136 #YORUBA           YO     NEGRO-AFRICAN
    137 #ZHUANG           ZA     [       ]
    138 #CHINESE          ZH     ASIAN
    139 #ZULU             ZU     NEGRO-AFRICAN
     15
     16#Languages we don't actually have interfaces for
     17
     18AFAR             AA     HAMITIC
     19ABKHAZIAN        AB     IBERO-CAUCASIAN
     20AFRIKAANS        AF     GERMANIC
     21AMHARIC          AM     SEMITIC
     22ASSAMESE         AS     INDIAN
     23AYMARA           AY     AMERINDIAN
     24AZERBAIJANI      AZ     TURKIC/ALTAIC
     25BASHKIR          BA     TURKIC/ALTAIC
     26BYELORUSSIAN     BE     SLAVIC
     27BULGARIAN        BG     SLAVIC
     28BIHARI           BH     INDIAN
     29BISLAMA          BI     [not given]
     30BENGALI(BANGLA)  BN     INDIAN
     31TIBETAN          BO     ASIAN
     32BRETON           BR     CELTIC
     33CATALAN          CA     ROMANCE
     34CORSICAN         CO     ROMANCE
     35CZECH            CS     SLAVIC
     36WELSH            CY     CELTIC
     37DANISH           DA     GERMANIC
     38BHUTANI          DZ     ASIAN
     39GREEK            EL     LATIN/GREEK
     40ESPERANTO        EO     INTERNATIONAL AUX.
     41ESTONIAN         ET     FINNO-UGRIC
     42BASQUE           EU     BASQUE
     43PERSIAN(FARSI)   FA     IRANIAN
     44FINNISH          FI     FINNO-UGRIC
     45FIJI             FJ     OCEANIC/INDONESIAN
     46FAROESE          FO     GERMANIC
     47FRISIAN          FY     GERMANIC
     48IRISH            GA     CELTIC
     49SCOTS(GAELIC)    GD     CELTIC
     50GALICIAN         GL     ROMANCE
     51GUARANI          GN     AMERINDIAN
     52GUJARATI         GU     INDIAN
     53HAUSA            HA     NEGRO-AFRICAN
     54HINDI            HI     INDIAN
     55CROATIAN         HR     SLAVIC
     56HUNGARIAN        HU     FINNO-UGRIC
     57ARMENIAN         HY     INDO-EUROPEAN (OTHER)
     58INTERLINGUA      IA     INTERNATIONAL AUX.
     59INTERLINGUE      IE     INTERNATIONAL AUX.
     60INUPIAK          IK     ESKIMO
     61ICELANDIC        IS     GERMANIC
     62INUKTITUT        IU     [        ]
     63JAPANESE         JA     ASIAN
     64JAVANESE         JV     OCEANIC/INDONESIAN
     65GEORGIAN         KA     IBERO-CAUCASIAN
     66GREENLANDIC      KL     ESKIMO
     67CAMBODIAN        KM     ASIAN
     68KANNADA          KN     DRAVIDIAN
     69KOREAN           KO     ASIAN
     70KASHMIRI         KS     INDIAN
     71KURDISH          KU     IRANIAN
     72KIRGHIZ          KY     TURKIC/ALTAIC
     73LATIN            LA     LATIN/GREEK
     74LINGALA          LN     NEGRO-AFRICAN
     75LAOTHIAN         LO     ASIAN
     76LITHUANIAN       LT     BALTIC
     77LATVIAN(LETTISH) LV     BALTIC
     78MALAGASY         MG     OCEANIC/INDONESIAN
     79MACEDONIAN       MK     SLAVIC
     80MALAYALAM        ML     DRAVIDIAN
     81MONGOLIAN        MN     [not given]
     82MOLDAVIAN        MO     ROMANCE
     83MARATHI          MR     INDIAN
     84MALAY            MS     OCEANIC/INDONESIAN
     85MALTESE          MT     SEMITIC
     86BURMESE          MY     ASIAN
     87NAURU            NA     [not given]
     88NEPALI           NE     INDIAN
     89NORWEGIAN        NO     GERMANIC
     90OCCITAN          OC     ROMANCE
     91AFAN(OROMO)      OM     HAMITIC
     92ORIYA            OR     INDIAN
     93PUNJABI          PA     INDIAN
     94POLISH           PL     SLAVIC
     95PASHTO(PUSHTO)   PS     IRANIAN
     96QUECHUA          QU     AMERINDIAN
     97RHAETO-ROMANCE   RM     ROMANCE
     98KURUNDI          RN     NEGRO-AFRICAN
     99ROMANIAN         RO     ROMANCE
     100KINYARWANDA      RW     NEGRO-AFRICAN
     101SANSKRIT         SA     INDIAN
     102SINDHI           SD     INDIAN
     103SANGHO           SG     NEGRO-AFRICAN
     104SERBO-CROATIAN   SH     SLAVIC
     105SINGHALESE       SI     INDIAN
     106SLOVAK           SK     SLAVIC
     107SLOVENIAN        SL     SLAVIC
     108SAMOAN           SM     OCEANIC/INDONESIAN
     109SHONA            SN     NEGRO-AFRICAN
     110SOMALI           SO     HAMITIC
     111ALBANIAN         SQ     INDO-EUROPEAN (OTHER)
     112SERBIAN          SR     SLAVIC
     113SISWATI          SS     NEGRO-AFRICAN
     114SESOTHO          ST     NEGRO-AFRICAN
     115SUNDANESE        SU     OCEANIC/INDONESIAN
     116SWEDISH          SV     GERMANIC
     117SWAHILI          SW     NEGRO-AFRICAN
     118TAMIL            TA     DRAVIDIAN
     119TELUGU           TE     DRAVIDIAN
     120TAJIK            TG     IRANIAN
     121THAI             TH     ASIAN
     122TIGRINYA         TI     SEMITIC
     123TURKMEN          TK     TURKIC/ALTAIC
     124TAGALOG          TL     OCEANIC/INDONESIAN
     125SETSWANA         TN     NEGRO-AFRICAN
     126TONGA            TO     OCEANIC/INDONESIAN
     127TURKISH          TR     TURKIC/ALTAIC
     128TSONGA           TS     NEGRO-AFRICAN
     129TATAR            TT     TURKIC/ALTAIC
     130TWI              TW     NEGRO-AFRICAN
     131UIGUR            UG     [       ]
     132UKRAINIAN        UK     SLAVIC
     133URDU             UR     INDIAN
     134UZBEK            UZ     TURKIC/ALTAIC
     135VIETNAMESE       VI     ASIAN
     136VOLAPUK          VO     INTERNATIONAL AUX.
     137WOLOF            WO     NEGRO-AFRICAN
     138XHOSA            XH     NEGRO-AFRICAN
     139YIDDISH          YI     GERMANIC [*Changed 1989 from original ISO 639:1988, JI]
     140YORUBA           YO     NEGRO-AFRICAN
     141ZHUANG           ZA     [       ]
     142ZULU             ZU     NEGRO-AFRICAN
  • trunk/gli/src/org/greenstone/gatherer/collection/BuildOptions.java

    r4675 r4933  
    213213            }
    214214            else if(node_name.equals("Desc")) {
    215             argument.setDesc(MSMUtils.getValue(node));
     215            argument.setDescription(MSMUtils.getValue(node));
    216216            }
    217217            else if(node_name.equals("Type")) {
     
    219219            }
    220220            else if(node_name.equals("Default")) {
    221             argument.setDefault(MSMUtils.getValue(node));
     221            argument.setDefaultValue(MSMUtils.getValue(node));
    222222            }
    223223            else if(node_name.equals("List")) {
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r4805 r4933  
    376376        }
    377377
    378         collection.cdm = new CollectionDesignManager();
     378        collection.cdm = new CollectionDesignManager(new File(getCollectionConfig()));
    379379        collection.gdm = new GDMManager();
    380380
     
    783783                msm = collection.msm; // Legacy
    784784                collection.msm.load();
    785                 collection.cdm = new CollectionDesignManager();
     785                collection.cdm = new CollectionDesignManager(new File(collection_file.getParent(), Utility.CONFIG_DIR));
    786786                collection.gdm = new GDMManager();
    787787                // Tell everyone that it worked.
     
    933933    }
    934934    /** Determine if the manager is ready for actions apon its collection.
    935       * @return A <i>boolean</i> which is <i>true</i> to indicate a collection has been loaded and thus the collection is ready for editing, <i>false</i> otherwise.
    936       */
    937 
    938     public synchronized boolean ready() {
    939         if(collection != null) {
    940             return true;
    941         }
    942         else {
    943             return false;
    944         }
    945     }
    946 
     935     * @return A <i>boolean</i> which is <i>true</i> to indicate a collection has been loaded and thus the collection is ready for editing, <i>false</i> otherwise.
     936     */
     937   
     938    public synchronized boolean ready() {
     939    if(collection != null) {
     940        return true;
     941    }
     942    else {
     943        return false;
     944    }
     945    }
     946   
    947947    public synchronized boolean reallyReady() {
    948     if(collection == null) {
    949         Gatherer.println("Called reallyReady() when collection was null.");
    950         Gatherer.println("Closing thread = " + closing_thread);
    951         Gatherer.println("This thread = " + Thread.currentThread());
    952         Gatherer.println("Thus we return: " + (closing_thread == null || closing_thread == Thread.currentThread() ? "not ready" : "ready"));
    953     }
    954948    // If the closing thread is non-null we should only allow that thread to see the collection as closed.
    955949    if(closing_thread != null) {
    956         // Only the closing thread sees the truth
    957         if(Thread.currentThread() == closing_thread) {
    958             return (collection == null);
    959         }
    960         // All other threads are told a lie.
    961         else {
    962             return true;
    963         }
     950        // Only the closing thread sees the truth
     951        if(Thread.currentThread() == closing_thread) {
     952        return (collection == null);
     953        }
     954        // All other threads are told a lie.
     955        else {
     956        return true;
     957        }
    964958    }
    965959    else {
    966         if(collection != null) {
    967             return true;
    968         }
    969         else {
    970             return false;
    971         }
    972     }
    973     }
     960        if(collection != null) {
     961        return true;
     962        }
     963        else {
     964        return false;
     965        }
     966    }
     967    }
    974968    /** Called to refresh the models upon which the trees are based.
    975       * @see org.greenstone.gatherer.collection.Collection
    976       */
     969     * @see org.greenstone.gatherer.collection.Collection
     970     */
    977971    public void refreshTrees() {
    978972    }
  • trunk/gli/src/org/greenstone/gatherer/gui/GConfigPane.java

    r4675 r4933  
    6363    ///atherer.println("CollectionChanged(" + ready + ")");
    6464    if(ready) {
    65         String filename = Gatherer.c_man.getCollectionConfig();
    66         if(cdm != null && cdm.getFilename().equals(filename)) {
    67         return;
    68         }
    69         else {
    70         if(cdm != null) {
    71             cdm.destroy();
    72             cdm = null;
    73         }
    74         // Create a new config manager.
    75         cdm = new CollectionDesignManager();
    76         // Parse the configuration file.
    77         cdm.parse(filename);
    78         // Display it.
    79         cdm.display(this);
    80         }
     65        // Retrieve the new config manager.
     66        cdm = Gatherer.c_man.getCollection().cdm;
     67        // Display it.
     68        cdm.display(this);
    8169    }
    8270    else {
     
    9684    cdm.gainFocus();
    9785    }
    98     public ArrayList getIndexes() {
    99     return cdm.getIndexes();
    100     }
    10186
    10287    public ArrayList getLanguageCodes() {
    103     return cdm.languages.getLanguageCodes();
     88    return cdm.language_manager.getLanguageCodes();
    10489    }
    10590
  • trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java

    r4686 r4933  
    137137    int total_height = PANE_SIZE.height;
    138138    for(int i = 0; i < build_argument_count; i++) {
    139                 // Retrieve the argument so we know how to format the control.
     139        // Retrieve the argument so we know how to format the control.
    140140        Argument argument = build_options.getBuildArgument(i);
    141                 // Now attempt to retrieve any existing value for this argument.
     141        // Now attempt to retrieve any existing value for this argument.
    142142        boolean enabled = build_options.getBuildValueEnabled(argument.getName());
    143143        String value = build_options.getBuildValue(argument.getName());
     
    165165    int total_height = PANE_SIZE.height;
    166166    for(int i = 0; i < import_argument_count; i++) {
    167                 // Retrieve the argument so we know how to format the control.
     167        // Retrieve the argument so we know how to format the control.
    168168        Argument argument = build_options.getImportArgument(i);
    169                 // Now attempt to retrieve any existing value for this argument.
     169        // Now attempt to retrieve any existing value for this argument.
    170170        boolean enabled = build_options.getImportValueEnabled(argument.getName());
    171171        String value = build_options.getImportValue(argument.getName());
     
    372372        this.argument = argument;
    373373        this.type = type;
    374         String tooltip = Utility.formatHTMLWidth("<html>" + argument.getDesc() + "</html>", 60);
    375                 // Because of the dynamic order of component creation/connection/layout, we can't really follow that pattern here.
     374        String tooltip = Utility.formatHTMLWidth("<html>" + argument.getDescription() + "</html>", 60);
     375        // Because of the dynamic order of component creation/connection/layout, we can't really follow that pattern here.
    376376        setBackground(Gatherer.config.getColor("coloring.collection_tree_background", false));
    377377        setBorder(BorderFactory.createEmptyBorder(2,0,2,0));
     
    379379        setPreferredSize(ROW_SIZE);
    380380
    381                 /*
    382                   JPanel inner_pane = new JPanel();
    383                   inner_pane.setOpaque(false);
    384                 */
    385 
    386                 // Try to determine what the value_controls value should be.
     381        /*
     382          JPanel inner_pane = new JPanel();
     383          inner_pane.setOpaque(false);
     384        */
     385
     386        // Try to determine what the value_controls value should be.
    387387        if(value == null) {
    388388        value = argument.getDefaultValue();
    389389        }
    390                 // Create a correct value control based on the argument provided.
     390        // Create a correct value control based on the argument provided.
    391391        switch(argument.getType()) {
    392392        case Argument.ENUM:
     
    402402        }
    403403        // Build an option model, wrapping each entry of the list table.
    404         HashMap arg_list = argument.getList();
     404        HashMap arg_list = argument.getOptions();
    405405        Iterator it = arg_list.keySet().iterator();
    406406        while(it.hasNext()) {
  • trunk/gli/src/org/greenstone/gatherer/mem/MetadataEditorManager.java

    r4882 r4933  
    4444import javax.swing.tree.*;
    4545import org.greenstone.gatherer.Gatherer;
    46 import org.greenstone.gatherer.cdm.Language;
     46import org.greenstone.gatherer.cdm.LanguageListCellRenderer;
     47import org.greenstone.gatherer.cdm.LanguageManager;
    4748import org.greenstone.gatherer.gui.ComboArea;
    4849import org.greenstone.gatherer.gui.GComboBox;
     
    581582        language_label.setPreferredSize(LABEL_SIZE);
    582583        language_box = new JComboBox(Gatherer.g_man.config_pane.getLanguageCodes().toArray());
     584        language_box.setRenderer(new LanguageListCellRenderer());
    583585
    584586        JPanel center_pane = new JPanel();
     
    906908        // Add the attribute, even if one of the same name already exists. Maybe one day someone would like to enforce the occurance rules but not me and not today.
    907909        String name_str = name.getSelectedItem().toString();
    908         String language_code = ((Language)language_box.getSelectedItem()).getCode();
     910        String language_code = (String) language_box.getSelectedItem();
    909911        String value_str = value.getText();
    910912
     
    10231025        if(!current_set.containsElement(name_str)) {
    10241026            // Add it,
    1025             String language_code = Gatherer.config.interface_language.getCode();
     1027            String language_code = Gatherer.config.interface_language;
    10261028            ElementWrapper element = current_set.addElement(name_str, language_code);
    10271029            // Then update the tree
  • trunk/gli/src/org/greenstone/gatherer/msm/MSMUtils.java

    r4674 r4933  
    146146    return false;
    147147    }
     148
     149    /** Remove all of the child nodes from a certain node. */
     150    static final public void clear(Node parent) {
     151    while(parent.hasChildNodes()) {
     152        parent.removeChild(parent.getFirstChild());
     153    }
     154    }
     155
    148156    /** Method to determine if a certain path of elements can be found in another tree. This method tests by comparing node names, and finally the #text node past the leaf end of the path.
    149157     * @param tree The root <strong>Node</strong> of the tree to be searched.
     
    719727    static final public void setValue(Element element, String value) {
    720728    // Remove any existing child node(s)
    721     while(element.hasChildNodes()) {
    722         element.removeChild(element.getFirstChild());
    723     }
     729    clear(element);
    724730    // Add new text node.
    725731    element.appendChild(element.getOwnerDocument().createTextNode(value));
  • trunk/gli/src/org/greenstone/gatherer/msm/MetadataSetManager.java

    r4837 r4933  
    12831283    }
    12841284}
     1285
  • trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java

    r4364 r4933  
    316316    public void start() {
    317317    progress_bar.setValue(MIN);
    318     num_indexes = Gatherer.g_man.config_pane.getIndexes().size();
     318    num_indexes = Gatherer.c_man.getCollection().cdm.index_manager.getSize();
    319319    num_docs = import_progress.getNumberOfDocuments();
    320320    }
  • trunk/gli/src/org/greenstone/gatherer/util/EmailAddress.java

    r4674 r4933  
    66 * University of Waikato, New Zealand.
    77 *
    8  * <BR><BR>
    9  *
    108 * Author: John Thompson, Greenstone Digital Library, University of Waikato
    119 *
    12  * <BR><BR>
    13  *
    1410 * Copyright (C) 1999 New Zealand Digital Library Project
    15  *
    16  * <BR><BR>
    1711 *
    1812 * This program is free software; you can redistribute it and/or modify
     
    2115 * (at your option) any later version.
    2216 *
    23  * <BR><BR>
    24  *
    2517 * This program is distributed in the hope that it will be useful,
    2618 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2719 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2820 * GNU General Public License for more details.
    29  *
    30  * <BR><BR>
    3121 *
    3222 * You should have received a copy of the GNU General Public License
     
    3525 *########################################################################
    3626 */
    37 
    38  
    39 
    40 
    41 
    42 
    43 /* GPL_HEADER */
    4427package org.greenstone.gatherer.util;
    45 /**************************************************************************************
    46  * Title:        Gatherer
    47  * Description:  The Gatherer: a tool for gathering and enriching a digital collection.
    48  * Company:      The University of Waikato
    49  * Written:      03/05/02
    50  * Revised:      04/10/02 - Commented
    51  **************************************************************************************/
     28
    5229import java.awt.BorderLayout;
    5330import java.awt.Color;
     
    6239import org.greenstone.gatherer.Gatherer;
    6340/** This class wraps an email address, separating address and host, and providing a pretty printer.
    64  * @author John Thompson
    65  * @version 2.3
     41 * @author John Thompson, Greenstone Digital Library, University of Waikato
     42 * @version 2.3d
    6643 */
    6744public class EmailAddress {
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r4806 r4933  
    280280        OutputFormat f = new OutputFormat(document);
    281281        f.setIndenting(true);
    282         f.setLineWidth(256);
     282        f.setLineWidth(0);
    283283        f.setPreserveSpace(false);
    284284        // Create the necessary writer stream for serialization.
     
    792792    catch (Exception error) {
    793793        if(noisey) {
     794        error.printStackTrace();
    794795        Gatherer.printStackTrace(error);
    795796        }
Note: See TracChangeset for help on using the changeset viewer.