Changeset 10611
- Timestamp:
- 2005-09-21T14:32:25+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r10529 r10611 499 499 } 500 500 if(command != null && command.length()> 0 ) { 501 /* if command contains buildtype only, it means that the none of 502 * buildtype has been selected, so we don't want to write into 503 * collect.cfg file*/ 504 if (!command.matches("^buildtype\\s*")){ 505 write(buffered_writer, command); 506 buffered_writer.newLine(); 507 just_wrote_newline = false; 508 } 501 write(buffered_writer, command); 502 buffered_writer.newLine(); 503 just_wrote_newline = false; 509 504 } 510 505 } … … 782 777 783 778 static private String metadataToString(Element command_element, boolean text_value) { 779 // lets first check the value - if its empty, don't bother sticking it in the config file 780 String value_str = XMLTools.getValue(command_element); 781 if (value_str.equals("")) { 782 return ""; 783 } 784 784 boolean special = false; 785 // If there is no value attribute, then we don't write anything785 786 786 StringBuffer text = new StringBuffer(""); 787 787 String name_str = command_element.getAttribute(NAME_ATTRIBUTE); 788 // If the name is one of the special four, we don't write the collectionmeta first. Note the maintainer collectionmeta issingled out for 'prittying' reasons.788 // If the name is one of the special four, we don't write the collectionmeta first. Note maintainer and buildtype are singled out for 'prittying' reasons. 789 789 if(name_str.equals(COLLECTIONMETADATA_MAINTAINER_STR)|| name_str.equals(BUILDTYPE_STR) ) { 790 790 text.append(name_str); … … 817 817 name_str = null; 818 818 819 String value_str = XMLTools.getValue(command_element);820 819 // The value string we retrieved will be encoded for xml, so we now decode it - to text if text_value set. This parameter was originally show_extracted_namespace, but sincethis is only true for 'toString()' commands from within the CDM, its good enough to determine if this toString() will be used to display on screen, or write to collect.cfg 821 820 if(text_value == CollectionMeta.TEXT) {
Note:
See TracChangeset
for help on using the changeset viewer.