Changeset 20455


Ignore:
Timestamp:
2009-08-31T15:47:50+12:00 (15 years ago)
Author:
kjdon
Message:

removed metadatum type arg - I don't think it is ever used. and what was it anyway??

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

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/cdm/Argument.java

    r20439 r20455  
    6262  /** An element of the argument type enumeration specifying a language combobox control. */
    6363  static final public byte LANGUAGE = 4;
    64   /** An element of the argument type enumeration specifying a list control. */
     64  /** An element of the argument type enumeration specifying a metadata combobox control. */
    6565  static final public byte METADATA = 5;
    66   /** An element of the argument type enumeration specifying a metadata combobox control. */
    67   static final public byte METADATUM = 6;
    6866  /** An element of the argument type enumeration specifying a text field. */
    69   static final public byte STRING = 7;
     67  static final public byte STRING = 6;
    7068  /** An element of the argument type enumeration specifying a regular expression text field. */
    71   static final public byte REGEXP = 8;
     69  static final public byte REGEXP = 7;
    7270  /** An element of the argument type enumeration specifying a metadata set combobox control. */
    73   static final public byte METADATA_SET_NAMESPACE = 9;
     71  static final public byte METADATA_SET_NAMESPACE = 8;
    7472  /** An element of the argument type enumeration specifying a text field. */
    75   static final public byte URL = 10;
     73  static final public byte URL = 9;
    7674  /** An editable combo box */
    77   static final public byte ENUM_STRING = 11;
     75  static final public byte ENUM_STRING = 10;
    7876
    7977  /////////////////////////////////////////////////////////////////
     
    418416   * @see org.greenstone.gatherer.util.StaticStrings#LANGUAGE_STR
    419417   * @see org.greenstone.gatherer.util.StaticStrings#METADATA_TYPE_STR
    420    * @see org.greenstone.gatherer.util.StaticStrings#METADATUM_TYPE_STR
    421418   * @see org.greenstone.gatherer.util.StaticStrings#REGEXP_STR
    422419   */
     
    444441    else if(new_type.equalsIgnoreCase(StaticStrings.METADATA_TYPE_STR)) {
    445442      this.type = METADATA;
    446     }
    447     else if(new_type.equalsIgnoreCase(StaticStrings.METADATUM_TYPE_STR)) {
    448       this.type = METADATUM;
    449443    }
    450444    else if(new_type.equalsIgnoreCase(StaticStrings.REGEXP_STR)) {
     
    515509    text.append(name);
    516510
    517     String value = getValue(); //XMLTools.getValue(element);
     511    // getValue returns display name for metadata args
     512    String value = getValue();
    518513    if (value.length() == 0) {
    519514      return text.toString();
     
    522517    text.append(StaticStrings.SPACE_CHARACTER);
    523518
    524     //      // Handle metadata elements specially
    525     //      if (type == METADATA || type == METADATUM) {
    526     //      // Tokenize the string
    527     //      StringTokenizer tokenizer = new StringTokenizer(value, ",");
    528     //      while (tokenizer.hasMoreTokens()) {
    529     //      String token = tokenizer.nextToken();
    530 
    531     //      MetadataElement metadata_element = MetadataTools.getMetadataElementWithDisplayName(token);
    532     //      if (metadata_element != null) {
    533     //      text.append(metadata_element.getFullName());
    534     //      }
    535     //      else {
    536     //      text.append(token);
    537     //      }
    538 
    539     //      if (tokenizer.hasMoreTokens()) {
    540     //      text.append(StaticStrings.COMMA_CHARACTER);
    541     //      }
    542     //      }
    543     //      return text.toString();
    544     //      }
    545 
    546519    // If the value contains a space, add speech marks
    547520    //   (Except for metadata elements, which won't have spaces when written out to collect.cfg)
    548     if (value.indexOf(StaticStrings.SPACE_CHARACTER) != -1 && !(type == METADATUM || type == METADATA)) {
     521    if (value.indexOf(StaticStrings.SPACE_CHARACTER) != -1 && type != METADATA) {
    549522      value = StaticStrings.SPEECH_CHARACTER + value + StaticStrings.SPEECH_CHARACTER;
    550523    }
  • gli/trunk/src/org/greenstone/gatherer/cdm/ArgumentControl.java

    r20441 r20455  
    155155      break;
    156156
    157     case Argument.METADATUM:
    158157    case Argument.METADATA:
    159158      value_control = new GComboBox(MetadataSetManager.getEveryMetadataSetElement(), false);
     
    410409    argument.setAssigned(true);
    411410    return true;
    412       case Argument.METADATUM:
    413411      case Argument.METADATA:
    414412      String meta_value = (((JComboBox)value_control).getSelectedItem()).toString();
  • gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java

    r18911 r20455  
    192192    static final public String METADATA_XML = "metadata.xml";
    193193    static final public String METADATAXMLPLUG_STR = "MetadataXMLPlugin";
    194     static final public String METADATUM_TYPE_STR = "metadatum";
    195194    static final public String MGPP_ATTRIBUTE = "mgpp_enabled";
    196195    static final public String MINUS_CHARACTER = "-";
Note: See TracChangeset for help on using the changeset viewer.