Changeset 20455
- Timestamp:
- 2009-08-31T15:47:50+12:00 (15 years ago)
- 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 62 62 /** An element of the argument type enumeration specifying a language combobox control. */ 63 63 static final public byte LANGUAGE = 4; 64 /** An element of the argument type enumeration specifying a listcontrol. */64 /** An element of the argument type enumeration specifying a metadata combobox control. */ 65 65 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;68 66 /** 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; 70 68 /** 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; 72 70 /** 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; 74 72 /** 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; 76 74 /** An editable combo box */ 77 static final public byte ENUM_STRING = 1 1;75 static final public byte ENUM_STRING = 10; 78 76 79 77 ///////////////////////////////////////////////////////////////// … … 418 416 * @see org.greenstone.gatherer.util.StaticStrings#LANGUAGE_STR 419 417 * @see org.greenstone.gatherer.util.StaticStrings#METADATA_TYPE_STR 420 * @see org.greenstone.gatherer.util.StaticStrings#METADATUM_TYPE_STR421 418 * @see org.greenstone.gatherer.util.StaticStrings#REGEXP_STR 422 419 */ … … 444 441 else if(new_type.equalsIgnoreCase(StaticStrings.METADATA_TYPE_STR)) { 445 442 this.type = METADATA; 446 }447 else if(new_type.equalsIgnoreCase(StaticStrings.METADATUM_TYPE_STR)) {448 this.type = METADATUM;449 443 } 450 444 else if(new_type.equalsIgnoreCase(StaticStrings.REGEXP_STR)) { … … 515 509 text.append(name); 516 510 517 String value = getValue(); //XMLTools.getValue(element); 511 // getValue returns display name for metadata args 512 String value = getValue(); 518 513 if (value.length() == 0) { 519 514 return text.toString(); … … 522 517 text.append(StaticStrings.SPACE_CHARACTER); 523 518 524 // // Handle metadata elements specially525 // if (type == METADATA || type == METADATUM) {526 // // Tokenize the string527 // 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 546 519 // If the value contains a space, add speech marks 547 520 // (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) { 549 522 value = StaticStrings.SPEECH_CHARACTER + value + StaticStrings.SPEECH_CHARACTER; 550 523 } -
gli/trunk/src/org/greenstone/gatherer/cdm/ArgumentControl.java
r20441 r20455 155 155 break; 156 156 157 case Argument.METADATUM:158 157 case Argument.METADATA: 159 158 value_control = new GComboBox(MetadataSetManager.getEveryMetadataSetElement(), false); … … 410 409 argument.setAssigned(true); 411 410 return true; 412 case Argument.METADATUM:413 411 case Argument.METADATA: 414 412 String meta_value = (((JComboBox)value_control).getSelectedItem()).toString(); -
gli/trunk/src/org/greenstone/gatherer/util/StaticStrings.java
r18911 r20455 192 192 static final public String METADATA_XML = "metadata.xml"; 193 193 static final public String METADATAXMLPLUG_STR = "MetadataXMLPlugin"; 194 static final public String METADATUM_TYPE_STR = "metadatum";195 194 static final public String MGPP_ATTRIBUTE = "mgpp_enabled"; 196 195 static final public String MINUS_CHARACTER = "-";
Note:
See TracChangeset
for help on using the changeset viewer.