Changeset 6879


Ignore:
Timestamp:
2004-02-24T13:09:55+13:00 (20 years ago)
Author:
mdewsnip
Message:

Renamed GDM* classes to MetadataXMLFile*, for our sanity.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
3 added
8 edited

Legend:

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

    r6387 r6879  
    5050import org.greenstone.gatherer.file.FileNode;
    5151import org.greenstone.gatherer.msm.ElementWrapper;
    52 import org.greenstone.gatherer.msm.GDMManager;
     52import org.greenstone.gatherer.msm.MetadataXMLFileManager;
    5353import org.greenstone.gatherer.msm.MetadataSetManager;
    5454import org.greenstone.gatherer.msm.MSMUtils;
     
    6767    public CollectionDesignManager cdm;
    6868    /** A reference to the Greenstone Directory Metadata Manager. */
    69     public GDMManager gdm;
     69    public MetadataXMLFileManager gdm;
    7070    /** A reference to the Metadata Set Manager. */
    7171    public MetadataSetManager msm;
     
    109109     * @see org.greenstone.gatherer.Gatherer
    110110     * @see org.greenstone.gatherer.cdm.CollectionDesignManager
    111      * @see org.greenstone.gatherer.msm.GDMManager
     111     * @see org.greenstone.gatherer.msm.MetadataXMLFileManager
    112112     * @see org.greenstone.gatherer.msm.MetadataSetManager
    113113     */
     
    162162    }
    163163
    164     public GDMManager getGDM() {
     164    public MetadataXMLFileManager getGDM() {
    165165    return gdm;
    166166    }
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r6842 r6879  
    6161import org.greenstone.gatherer.gui.tree.WorkspaceTree;
    6262import org.greenstone.gatherer.msm.ElementWrapper;
    63 import org.greenstone.gatherer.msm.GDMManager;
     63import org.greenstone.gatherer.msm.MetadataXMLFileManager;
    6464import org.greenstone.gatherer.msm.GreenstoneArchiveParser;
    6565import org.greenstone.gatherer.msm.LegacyCollectionImporter;
     
    426426        }
    427427
    428         collection.gdm = new GDMManager();
     428        collection.gdm = new MetadataXMLFileManager();
    429429
    430430        progress.setProgress(3);
     
    872872        }
    873873
    874         // Whether the collection is legacy or not, we should now be able to prepared the GDMManager
    875         collection.gdm = new GDMManager();
     874        // Whether the collection is legacy or not, we should now be able to prepare the MetadataXMLFileManager
     875        collection.gdm = new MetadataXMLFileManager();
    876876
    877877        // Tell everyone that it worked.
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r6770 r6879  
    3939import org.greenstone.gatherer.gui.LongProgressBar;
    4040import org.greenstone.gatherer.gui.tree.DragTree;
    41 import org.greenstone.gatherer.msm.GDMManager;
     41import org.greenstone.gatherer.msm.MetadataXMLFileManager;
    4242import org.greenstone.gatherer.undo.UndoManager;
    4343import org.greenstone.gatherer.util.ArrayTools;
     
    442442                    if (job.source.toString().equals("Collection")) {
    443443                    ///ystem.err.println("Move within collection...");
    444                     GDMManager gdm = Gatherer.c_man.getCollection().gdm;
     444                    MetadataXMLFileManager gdm = Gatherer.c_man.getCollection().gdm;
    445445                    // we just retrieve the metadata attached to the origin node...
    446446                    ArrayList existing_metadata = gdm.getMetadataOnly(source_file);
     
    454454                // If it came from the recycle bin retrieve the metadata from there, once again remembering to account for inherited metadata
    455455                    else if (job.source.toString().equals("Undo")) {
    456                     GDMManager gdm = Gatherer.c_man.getCollection().gdm;
     456                    MetadataXMLFileManager gdm = Gatherer.c_man.getCollection().gdm;
    457457                    // Retrieve metadata from the recycle bin
    458458                    ArrayList existing_metadata = Gatherer.c_man.undo.getMetadata(source_file);
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r6842 r6879  
    122122    /** The main tab pane containing the different views, available here to trap view change events. */
    123123    private JTabbedPane tab_pane = null;
    124     /** A reference to any existing search and replace module/dialog. */
    125     // private SearchAndReplace sar = null;
    126124    /** A threaded tab changer to try and avoid NPE on exit. */
    127125    private TabUpdater tab_updater = null;
     
    135133    private TreeSynchronizer workspace_tree_sync = null;
    136134    /**Constructor. Enable window events and arranges all other components.
    137       * @param size The intial <strong>Dimension</strong> of the screen.
    138       */
     135     * @param size The intial <strong>Dimension</strong> of the screen.
     136     */
    139137    public GUIManager(Dimension size) {
    140138    super();
     
    173171
    174172    /** Any implementation of <i>ActionListener</i> must include this method so that we can be informed when an action has occured. In this case we are listening to actions from the menu-bar, and should react appropriately.
    175       * @param event An <strong>ActionEvent</strong> containing information about the action that has occured.
    176       */
     173     * @param event An <strong>ActionEvent</strong> containing information about the action that has occured.
     174     */
    177175    public void actionPerformed(ActionEvent event) {
    178176    boolean cont = true;
     
    220218    }
    221219    else if(esrc == menu_bar.file_options) {
    222         // Just incase the user has edited the GeneralSettings of a collection without losing focus afterwards. Well I'm forever losing foc... ooh shiney.
    223         design_pane.loseFocus();
    224         // And spawn a new preferences.
     220        // Just incase the user has edited the GeneralSettings of a collection without losing focus afterwards. Well I'm forever losing foc... ooh shiney.
     221        design_pane.loseFocus();
     222        // And spawn a new preferences.
    225223        new Preferences();
    226224    }
     
    366364//          browser_pane.afterDisplay();
    367365//      }
    368     if(mirror_pane != null) {
     366    if (mirror_pane != null) {
    369367        mirror_pane.afterDisplay();
    370368    }
  • trunk/gli/src/org/greenstone/gatherer/msm/LegacyCollectionImporter.java

    r6770 r6879  
    182182                    element_ew = null;
    183183                }
    184                 // If the raw name is null now, we have been instructed to ignore this metadata, so we can delete it from the metadata.xml (GDMDocument would do this anyway when it tried to save)
     184                // If the raw name is null now, we have been instructed to ignore this metadata, so we can delete it from the metadata.xml (MetadataXMLFile would do this anyway when it tried to save)
    185185                else {
    186186                    // Retrieve the parent node
     
    257257                        changed = true;
    258258                    }
    259                     // Cancel only skips the current metadata.xml file - actually I'll ignore the file on a cancel, as otherwise it will bugger up GDMManager when it starts up
     259                    // Cancel only skips the current metadata.xml file - actually I'll ignore the file on a cancel, as otherwise it will bugger up MetadataXMLFileManager when it starts up
    260260                    else {
    261261                        // Confirm the cancel, informing the user that the metadata.xml will be completely ignored if they continue
  • trunk/gli/src/org/greenstone/gatherer/msm/MetadataSetManager.java

    r6770 r6879  
    8686    private ExistingMetadataLoader loader = null;
    8787    /** Specialized parser for parsing GreenstoneDirectoryMetadata files, which not only caches entries, but also breaks up massive metadata.xml files into reasonable sizes. */
    88     private GDMParser gdm_parser = null;
     88    private MetadataXMLFileParser gdm_parser = null;
    8989    /** A list of classes who are interested in changes to the loaded metadata sets. */
    9090    private Vector listeners = null;
     
    9292    /** Constructor. */
    9393    public MetadataSetManager() {
    94     this.gdm_parser = new GDMParser();
     94    this.gdm_parser = new MetadataXMLFileParser();
    9595    this.listeners = new Vector();
    9696    this.loader = new ExistingMetadataLoader();
     
    10881088
    10891089    /** Add a reference to a piece of metadata to the given FileNode. The whole method gets a wee bit messy as we have to allow for several different commands from users such as accumulate / overwrite, skip just this file or cancel the whole batch. Cancelling is especially problematic as we need to rollback any changes (within reason).
    1090      * It is also worth mentioning that despite its name, no actual metadata is added directly by this method. Instead a call to fireMetadataChanged() is issued, which is in turn processed by the GDMManager (which, given this method may have been called from GDMManager as well, means the cycle is complete. Um, that doesn't mean theres an infinite loop... I hope).
     1090     * It is also worth mentioning that despite its name, no actual metadata is added directly by this method. Instead a call to fireMetadataChanged() is issued, which is in turn processed by the MetadataXMLFileManager (which, given this method may have been called from MetadataXMLFileManager as well, means the cycle is complete. Um, that doesn't mean theres an infinite loop... I hope).
    10911091     * @param id a long unique identifier shared by all actions caused by the same gesture.
    10921092     * @param record the FileNode we are adding the metadata to.
  • trunk/gli/src/org/greenstone/gatherer/undo/UndoManager.java

    r6008 r6879  
    5151import org.greenstone.gatherer.file.FileQueue;
    5252import org.greenstone.gatherer.file.FileSystemModel;
    53 import org.greenstone.gatherer.msm.GDMDocument;
     53import org.greenstone.gatherer.msm.MetadataXMLFile;
    5454import org.greenstone.gatherer.msm.Metadata;
    5555import org.greenstone.gatherer.msm.MSMEvent;
     
    7575    private FileQueue file_queue;
    7676    private FileSystemModel model;
    77     private GDMDocument obsolete_metadata;
     77    private MetadataXMLFile obsolete_metadata;
    7878    /** What sort of action should a drag resemble. Not really used as we override with custom drag icon. */
    7979    private int drag_action = DnDConstants.ACTION_MOVE;
     
    104104    }
    105105    this.model = new FileSystemModel(new FileNode(recycle_directory, "Undo"));
    106     obsolete_metadata = new GDMDocument(); // This GDM is never saved.
     106    obsolete_metadata = new MetadataXMLFile(); // This GDM is never saved.
    107107    redo = new UndoStack(false);
    108108    redo_sources = new ArrayList();
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r6770 r6879  
    254254        return true;
    255255    }
    256     // A file not found exception is most likely thrown because the directory the metadata.xml file is attempting to be written to no longer has any files in it. I'll add a test in GDMDocument to test for this, but if it still happens ignore it (a non-existant directory can't really have metadata added to it any way.
     256    // A file not found exception is most likely thrown because the directory the metadata.xml file is attempting to be written to no longer has any files in it. I'll add a test in MetadataXMLFile to test for this, but if it still happens ignore it (a non-existant directory can't really have metadata added to it any way.
    257257    catch (Exception exception) {
    258258        if(!file.getName().endsWith(METADATA_XML)) {
Note: See TracChangeset for help on using the changeset viewer.