Ignore:
Timestamp:
2003-07-15T14:17:08+12:00 (21 years ago)
Author:
jmt12
Message:

Major CDM rewrite so it uses DOM.

Location:
trunk/gli/src/org/greenstone/gatherer/collection
Files:
2 edited

Legend:

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

    r4675 r4933  
    213213            }
    214214            else if(node_name.equals("Desc")) {
    215             argument.setDesc(MSMUtils.getValue(node));
     215            argument.setDescription(MSMUtils.getValue(node));
    216216            }
    217217            else if(node_name.equals("Type")) {
     
    219219            }
    220220            else if(node_name.equals("Default")) {
    221             argument.setDefault(MSMUtils.getValue(node));
     221            argument.setDefaultValue(MSMUtils.getValue(node));
    222222            }
    223223            else if(node_name.equals("List")) {
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r4805 r4933  
    376376        }
    377377
    378         collection.cdm = new CollectionDesignManager();
     378        collection.cdm = new CollectionDesignManager(new File(getCollectionConfig()));
    379379        collection.gdm = new GDMManager();
    380380
     
    783783                msm = collection.msm; // Legacy
    784784                collection.msm.load();
    785                 collection.cdm = new CollectionDesignManager();
     785                collection.cdm = new CollectionDesignManager(new File(collection_file.getParent(), Utility.CONFIG_DIR));
    786786                collection.gdm = new GDMManager();
    787787                // Tell everyone that it worked.
     
    933933    }
    934934    /** Determine if the manager is ready for actions apon its collection.
    935       * @return A <i>boolean</i> which is <i>true</i> to indicate a collection has been loaded and thus the collection is ready for editing, <i>false</i> otherwise.
    936       */
    937 
    938     public synchronized boolean ready() {
    939         if(collection != null) {
    940             return true;
    941         }
    942         else {
    943             return false;
    944         }
    945     }
    946 
     935     * @return A <i>boolean</i> which is <i>true</i> to indicate a collection has been loaded and thus the collection is ready for editing, <i>false</i> otherwise.
     936     */
     937   
     938    public synchronized boolean ready() {
     939    if(collection != null) {
     940        return true;
     941    }
     942    else {
     943        return false;
     944    }
     945    }
     946   
    947947    public synchronized boolean reallyReady() {
    948     if(collection == null) {
    949         Gatherer.println("Called reallyReady() when collection was null.");
    950         Gatherer.println("Closing thread = " + closing_thread);
    951         Gatherer.println("This thread = " + Thread.currentThread());
    952         Gatherer.println("Thus we return: " + (closing_thread == null || closing_thread == Thread.currentThread() ? "not ready" : "ready"));
    953     }
    954948    // If the closing thread is non-null we should only allow that thread to see the collection as closed.
    955949    if(closing_thread != null) {
    956         // Only the closing thread sees the truth
    957         if(Thread.currentThread() == closing_thread) {
    958             return (collection == null);
    959         }
    960         // All other threads are told a lie.
    961         else {
    962             return true;
    963         }
     950        // Only the closing thread sees the truth
     951        if(Thread.currentThread() == closing_thread) {
     952        return (collection == null);
     953        }
     954        // All other threads are told a lie.
     955        else {
     956        return true;
     957        }
    964958    }
    965959    else {
    966         if(collection != null) {
    967             return true;
    968         }
    969         else {
    970             return false;
    971         }
    972     }
    973     }
     960        if(collection != null) {
     961        return true;
     962        }
     963        else {
     964        return false;
     965        }
     966    }
     967    }
    974968    /** Called to refresh the models upon which the trees are based.
    975       * @see org.greenstone.gatherer.collection.Collection
    976       */
     969     * @see org.greenstone.gatherer.collection.Collection
     970     */
    977971    public void refreshTrees() {
    978972    }
Note: See TracChangeset for help on using the changeset viewer.