Changeset 5910
- Timestamp:
- 2003-11-20T10:51:54+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionConfiguration.java
r5844 r5910 79 79 // now we need to read in the whole of the entry - may span multiple lines, may be surrounded by single or double quotes 80 80 String start_string = temp.substring(0,1); 81 if ((start_string.equals("\"") || start_string.equals("\'")) && (!temp.endsWith(start_string) || temp.length()==1)) { 82 83 StringBuffer value_raw = new StringBuffer(temp.substring(1)); 84 // add the new line back in 85 value_raw.append(StaticStrings.NEW_LINE_CHAR); 86 int pos = value_raw.indexOf(start_string); 87 int old_pos = 0; 88 while (pos != -1 && value_raw.charAt(pos-1)=='\\') { 89 old_pos = pos+1; 90 pos = value_raw.indexOf(start_string, old_pos); 91 } 92 while(pos == -1) { 93 String next_line = br.readLine(); 94 if(next_line != null) { 95 value_raw.append(next_line); 96 value_raw.append(StaticStrings.NEW_LINE_CHAR); 97 } 98 next_line = null; 99 pos = value_raw.indexOf(start_string, old_pos); 81 if (start_string.equals("\"") || start_string.equals("\'")) { 82 if (temp.endsWith(start_string) && temp.length() != 1) { 83 temp = temp.substring(1, temp.length() - 1); 84 } 85 else { 86 StringBuffer value_raw = new StringBuffer(temp.substring(1)); 87 // add the new line back in 88 value_raw.append(StaticStrings.NEW_LINE_CHAR); 89 int pos = value_raw.indexOf(start_string); 90 int old_pos = 0; 100 91 while (pos != -1 && value_raw.charAt(pos-1)=='\\') { 101 92 old_pos = pos+1; 102 93 pos = value_raw.indexOf(start_string, old_pos); 103 94 } 104 } 105 106 temp = value_raw.substring(0, value_raw.lastIndexOf(start_string)); 107 value_raw = null; 108 95 while(pos == -1) { 96 String next_line = br.readLine(); 97 if(next_line != null) { 98 value_raw.append(next_line); 99 value_raw.append(StaticStrings.NEW_LINE_CHAR); 100 } 101 next_line = null; 102 pos = value_raw.indexOf(start_string, old_pos); 103 while (pos != -1 && value_raw.charAt(pos-1)=='\\') { 104 old_pos = pos+1; 105 pos = value_raw.indexOf(start_string, old_pos); 106 } 107 } 108 109 temp = value_raw.substring(0, value_raw.lastIndexOf(start_string)); 110 value_raw = null; 111 } 109 112 } 110 113
Note:
See TracChangeset
for help on using the changeset viewer.