Ignore:
Timestamp:
2004-04-23T14:56:30+12:00 (20 years ago)
Author:
kjdon
Message:

tidied up the getXXXDir methods in Utility. Utility.getCollectionDir (which returns the path to the collect directory) has been renamed to getCollectDir, and a new Utility.getCollectionDir is provided which returns the path to an individual collection's base dir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r7014 r7224  
    110110    /** Definition of an important directory name, in this case the location of help documentation. */
    111111    static final public String HELP_DIR = BASE_DIR + "help" + File.separator;
     112    /** Definition of an important directory name, in this case the images directory for the collection. */
     113    static final public String IMAGES_DIR = "images" + File.separator;
    112114    /** Definition of an important directory name, in this case the import directory for the collection. */
    113115    static final public String IMPORT_DIR = "import" + File.separator;
     
    460462
    461463    /** Method which constructs the archive directory given a certain collection.
    462      * @param gsdl_path The location of the greenstone installation  as a <strong>String</strong>.
    463      * @param col_name The collection name
     464     * @param gsdl_path The location of the collection directory as a <strong>String</strong>.
    464465     * @return The location of the given collections archive directory, also as a <strong>String</strong>.
    465466     */
    466     static public String getArchiveDir(String gsdl_path, String col_name) {
    467     return gsdl_path + File.separator + COL_DIR + col_name + File.separator + ARCHIVE_DIR;
     467    static public String getArchiveDir(String col_dir) {
     468    return col_dir + ARCHIVE_DIR;
    468469    }
    469470    /** Method which constructs the build directory given a certain collection.
     
    483484    return new File(getGLIUserFolder(), StaticStrings.CACHE_FOLDER);
    484485    }
    485     /** Method which constructs the collection directory for Greenstone.
     486    /** Method which constructs the collect directory for Greenstone.
    486487     * @param gsdl_path The location of the gsdl installation directory as a <strong>String</strong>.
    487488     * @return The location of the collection directory, also as a <strong>String</strong>.
    488489     */
    489     public static String getCollectionDir(String gsdl_path) {
     490    public static String getCollectDir(String gsdl_path) {
    490491    return gsdl_path + COL_DIR;
    491492    }
     493   
     494    /** Method which constructs a collection's top level directory
     495     * @@param gsdl_path The location of the gsdl installation directory as a <strong>String</strong>.
     496     * @param The name of the collection as a <strong>String</strong>.
     497     * @return The location of the collection's base directory
     498     */
     499    public static String getCollectionDir(String gsdl_path, String coll_name) {
     500    return getCollectDir(gsdl_path) + coll_name + File.separator;
     501    }
     502   
    492503    /** Method which constructs the configuration file given a certain collection.
    493504     * @param col_dir The location of the collection directory as a <strong>String</strong>.
     
    610621    }
    611622
     623    /** Method which constructs the images directory given a certain collection.
     624     * @param col_dir The location of the collection directory as a <strong>String</strong>.
     625     * @return The location of the given collections images directory, also as a <strong>String</strong>.
     626     */
     627    public static String getImagesDir(String col_dir) {
     628    return col_dir + IMAGES_DIR;
     629    }
    612630    /** Method which constructs the import directory given a certain collection.
    613631     * @param col_dir The location of the collection directory as a <strong>String</strong>.
Note: See TracChangeset for help on using the changeset viewer.