Changeset 10560


Ignore:
Timestamp:
2005-08-25T12:05:49+12:00 (19 years ago)
Author:
mdewsnip
Message:

Added a getCollectionDirectoryPath() function that returns the path of the currently open collection directory.

File:
1 edited

Legend:

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

    r10556 r10560  
    213213
    214214    // Remove the lock on this file, then remove the collection.
    215     String collection_directory_path = getCollectionDirectoryPath(collection.getName());
    216     File lock_file = new File(collection_directory_path + LOCK_FILE);
     215    File lock_file = new File(getCollectionDirectoryPath() + LOCK_FILE);
    217216    lock_file.delete();
    218217    if (lock_file.exists()) {
     
    521520
    522521
     522    static public String getCollectionDirectoryPath()
     523    {
     524    return Gatherer.getCollectDirectoryPath() + collection.getName() + File.separator;
     525    }
     526
     527
    523528    /** Constructs the absolute filename of the collection's directory, which should resemble "$GSDLHOME/collect/<col_name>"
    524529     * @return A <strong>String</strong> containing the directory name.
     
    535540    public String getCollectionFilePath()
    536541    {
    537     return getCollectionDirectoryPath(collection.getName()) + collection.getName() + ".col";
     542    return getCollectionDirectoryPath() + collection.getName() + ".col";
    538543    }
    539544
     
    544549    public String getCollectionArchivesDirectoryPath()
    545550    {
    546     return getCollectionDirectoryPath(collection.getName()) + "archives" + File.separator;
     551    return getCollectionDirectoryPath() + "archives" + File.separator;
    547552    }
    548553
     
    553558    public String getCollectionBuildingDirectoryPath()
    554559    {
    555     return getCollectionDirectoryPath(collection.getName()) + "building" + File.separator;
     560    return getCollectionDirectoryPath() + "building" + File.separator;
    556561    }
    557562
     
    571576    public String getCollectionEtcDirectoryPath()
    572577    {
    573     return getCollectionDirectoryPath(collection.getName()) + "etc" + File.separator;
     578    return getCollectionDirectoryPath() + "etc" + File.separator;
    574579    }
    575580
     
    580585    public String getCollectionImagesDirectoryPath()
    581586    {
    582     return getCollectionDirectoryPath(collection.getName()) + "images" + File.separator;
     587    return getCollectionDirectoryPath() + "images" + File.separator;
    583588    }
    584589
     
    589594    public String getCollectionImportDirectoryPath()
    590595    {
    591     return getCollectionDirectoryPath(collection.getName()) + "import" + File.separator;
     596    return getCollectionDirectoryPath() + "import" + File.separator;
    592597    }
    593598
     
    598603    public String getCollectionIndexDirectoryPath()
    599604    {
    600     return getCollectionDirectoryPath(collection.getName()) + "index" + File.separator;
     605    return getCollectionDirectoryPath() + "index" + File.separator;
    601606    }
    602607
     
    607612    public String getCollectionLogDirectoryPath()
    608613    {
    609     return getCollectionDirectoryPath(collection.getName()) + "log" + File.separator;
     614    return getCollectionDirectoryPath() + "log" + File.separator;
    610615    }
    611616
     
    616621    public String getCollectionMetadataDirectoryPath()
    617622    {
    618     return getCollectionDirectoryPath(collection.getName()) + "metadata" + File.separator;
     623    return getCollectionDirectoryPath() + "metadata" + File.separator;
    619624    }
    620625
Note: See TracChangeset for help on using the changeset viewer.