Ignore:
Timestamp:
2008-02-12T16:13:13+13:00 (16 years ago)
Author:
davidb
Message:

Changes to GLI to support export into Fedora. New utility called flisvn diff gems/MetadataSetManager.java

File:
1 edited

Legend:

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

    r13819 r14974  
    8686    /** The name of the import element. */
    8787    static final private String IMPORT = "Import";
     88    /** The name of the import element. */
     89    static final private String EXPORT = "Export";
    8890    /** The name of the imported attribute. */
    8991    static final private String IMPORTED = "imported";
     
    111113    }
    112114    // Finally create all of the child managers that are directly dependant on a collection
    113     build_options = new ScriptOptions(getBuildValues(), "buildcol.pl");
    114     import_options = new ScriptOptions(getImportValues(), "import.pl");
     115
     116    if (Configuration.fedora_info.isActive()) {
     117        build_options = new ScriptOptions(getValues(BUILD), "g2f-buildcol.pl");
     118        import_options = new ScriptOptions(getValues(IMPORT), "g2f-import.pl");
     119    }
     120    else {
     121        build_options = new ScriptOptions(getBuildValues(), "buildcol.pl");
     122        import_options = new ScriptOptions(getImportValues(), "import.pl");
     123    }
    115124    }
    116125   
     
    334343   
    335344
     345    /** Method to retrieve the current import/build/export/whatever options associated with this Collection. */
     346    private Element getValues(String val_type) {
     347    Element values_element = null;
     348    try {
     349        Element document_element = document.getDocumentElement();
     350        Element config_element = (Element) XMLTools.getNodeFromNamed(document_element, BUILD_CONFIG);
     351        values_element = (Element) XMLTools.getNodeFromNamed(config_element, val_type);
     352        config_element = null;
     353        document_element = null;
     354    }
     355    catch (Exception error) {
     356        DebugStream.printStackTrace(error);
     357    }
     358    return values_element;
     359    }
     360
    336361   
    337362    /** Method to retrieve the current build options associated with this Collection. */
     
    350375    return build_values_element;
    351376    }
     377
    352378   
    353379    /** Count either documents or folders, depending on the state of the given boolean. */
Note: See TracChangeset for help on using the changeset viewer.