Changeset 5298


Ignore:
Timestamp:
2003-08-27T15:09:19+12:00 (21 years ago)
Author:
jmt12
Message:

Codec

File:
1 edited

Legend:

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

    r4675 r5298  
    55import org.greenstone.gatherer.cdm.CommandTokenizer;
    66import org.greenstone.gatherer.msm.MSMUtils;
     7import org.greenstone.gatherer.util.Codec;
    78import org.greenstone.gatherer.util.Utility;
    89import org.w3c.dom.*;
    910/** This class provides access to a collection configuration file. This version accepts either a valid xml document or a historical collect.cfg file. */
    10 public class CollectionConfiguration {
     11public class CollectionConfiguration
     12    implements Comparable {
    1113
    1214    private Element creator_element;
     
    8082                    }
    8183                    else if(description == null) {
    82                     description = Utility.decodeGreenstone(temp);
     84                    description = Codec.transform(temp, Codec.GREENSTONE_TO_TEXT);
    8385                    ///ystem.err.println("Found first match: " + description);
    8486                    }
     
    109111        Gatherer.printStackTrace(error);
    110112    }
     113    }
     114
     115    public int compareTo(Object other) {
     116    if(other == null) {
     117        return -1;
     118    }
     119    return toString().compareTo(other.toString());
     120    }
     121
     122    public boolean equals(Object other) {
     123    return (compareTo(other) == 0);
    111124    }
    112125
Note: See TracChangeset for help on using the changeset viewer.