Ignore:
Timestamp:
2009-01-12T11:17:16+13:00 (15 years ago)
Author:
kjdon
Message:

updated the rtl-gli branch with files from trunk. Result of a merge 14807:18318

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli/src/org/greenstone/gatherer/cdm/Plugin.java

    r13177 r18352  
    4242    private String default_process_expression = "";
    4343    private boolean does_explode_metadata_databases = false;
    44     private boolean loading_options_failed = false;
    45 
    46    
     44    private boolean does_replace_srcdocs_with_html = false; // to work with replace_srcdoc_with_html.pl
     45    /** Plugins are loaded as needed. This variable indicates 1. whether a plugin has been loaded already; 2. whether a
     46     * plugin has been successfully loaded. When both are true, has_loaded_options will be true. */
     47    private boolean has_loaded_options = false;
     48
    4749    /** Constructor used in DOMProxyListModel initializations, and Library Level. Used for Base plugins (those in the list of available plugins, not ones that are in the DOMProxyList)
    4850     */
     
    8486
    8587
    86     public boolean didLoadingOptionsFail()
    87     {
    88     return loading_options_failed;
     88    public boolean hasLoadedOptions()
     89    {
     90    return has_loaded_options;
    8991    }
    9092
     
    100102    }
    101103
     104    /** Checks whether the plugin this instance is based on processes source documents that can be replaced with their Greenstone generated html variants.
     105     * This method works with replace_srcdoc_with_html.pl */
     106    public boolean doesReplaceSrcDocsWithHtml()
     107    {
     108    //return does_replace_srcdocs_with_html;
     109    Plugin base_plugin = Plugins.getPlugin(getName(), false);
     110    if (base_plugin == null) {
     111      return false;
     112    }
     113    return base_plugin.does_replace_srcdocs_with_html;
     114    }
    102115
    103116    /** Checks whether this plugin instance will process the specified file (given its block_exp). */
     
    211224    }
    212225
    213 
    214     public void setLoadingOptionsFailed()
    215     {
    216     this.loading_options_failed = true;
     226    // To work with replace_srcdoc_with_html.pl
     227    public void setDoesReplaceSrcDocsWithHtml(boolean does_replace_srcdocs_with_html)
     228    {
     229    this.does_replace_srcdocs_with_html = does_replace_srcdocs_with_html;
     230    }
     231
     232    public void setHasLoadedOptions(boolean hasLoadedOptions)
     233    {
     234    this.has_loaded_options = hasLoadedOptions;
    217235    }
    218236}
Note: See TracChangeset for help on using the changeset viewer.