Changeset 16130 for gli/trunk


Ignore:
Timestamp:
2008-06-24T17:32:06+12:00 (16 years ago)
Author:
osborn
Message:

Additions for Scheduling Component

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/collection/Collection.java

    r14974 r16130  
    6262    /** A reference to the import ScriptOptions. */
    6363    public ScriptOptions import_options;
     64    /** A reference to the schedule ScriptOptions */
     65    public ScriptOptions schedule_options;
    6466    /** true if an error has occurred during construction */
    6567    public boolean error = false;
     
    8688    /** The name of the import element. */
    8789    static final private String IMPORT = "Import";
    88     /** The name of the import element. */
     90    /** The name of the schedule element. */
     91    static final private String SCHEDULE = "Schedule";
     92    /** The name of the export element. */
    8993    static final private String EXPORT = "Export";
    9094    /** The name of the imported attribute. */
     
    121125        build_options = new ScriptOptions(getBuildValues(), "buildcol.pl");
    122126        import_options = new ScriptOptions(getImportValues(), "import.pl");
     127        schedule_options = new ScriptOptions(getScheduleValues(), "schedule.pl");
    123128    }
    124129    }
     
    376381    }
    377382
     383    private Element getScheduleValues() {
     384    Element schedule_values_element = null;
     385    try {
     386        Element document_element = document.getDocumentElement();
     387        Element build_config_element = (Element) XMLTools.getNodeFromNamed(document_element, BUILD_CONFIG);
     388        schedule_values_element = (Element) XMLTools.getNodeFromNamed(build_config_element, SCHEDULE);
     389        build_config_element = null;
     390        document_element = null;
     391    }
     392    catch (Exception error) {
     393        DebugStream.printStackTrace(error);
     394    }
     395    return schedule_values_element;
     396    }
    378397   
    379398    /** Count either documents or folders, depending on the state of the given boolean. */
Note: See TracChangeset for help on using the changeset viewer.