- Timestamp:
- 2008-10-28T16:41:47+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r17612 r17616 1428 1428 command_element.setAttribute (StaticStrings.TYPE_ATTRIBUTE, StaticStrings.INCLUDE_STR); 1429 1429 } 1430 StringTokenizer pattern_tokenizer = new StringTokenizer (full_pattern_str, StaticStrings.SEPARATOR_CHARACTER); 1431 if(pattern_tokenizer.countTokens () >= 2) { 1432 String content_str = pattern_tokenizer.nextToken (); 1430 1431 // Let's make sure it is a valid Greenstone configuration line 1432 String[] results = full_pattern_str.split("\\" + StaticStrings.SEPARATOR_CHARACTER, 3); 1433 1434 if (results.length >= 2) { 1435 String content_str = results[0]; 1433 1436 // Since the contents of indexes have to be certain keywords, or metadata elements, if the content isn't a keyword and doesn't yet have a namespace, append the extracted metadata namespace. 1434 if (!content_str.equals (StaticStrings.FILENAME_STR) && content_str.indexOf (StaticStrings.NS_SEP) == -1) {1437 if (!content_str.equals (StaticStrings.FILENAME_STR) && content_str.indexOf (StaticStrings.NS_SEP) == -1) { 1435 1438 content_str = StaticStrings.EXTRACTED_NAMESPACE + content_str; 1436 1439 } 1437 1440 command_element.setAttribute (StaticStrings.CONTENT_ATTRIBUTE, content_str); 1438 XMLTools.setValue (command_element, pattern_tokenizer.nextToken ()); 1439 if(pattern_tokenizer.hasMoreTokens ()) { 1440 command_element.setAttribute (StaticStrings.OPTIONS_ATTRIBUTE, pattern_tokenizer.nextToken ()); 1441 } 1442 } 1443 pattern_tokenizer = null; 1441 XMLTools.setValue (command_element, results[1]); 1442 if (results.length >= 3) { 1443 command_element.setAttribute (StaticStrings.OPTIONS_ATTRIBUTE, results[2]); 1444 } 1445 } 1444 1446 } 1445 1447 }
Note:
See TracChangeset
for help on using the changeset viewer.