Changeset 5874
- Timestamp:
- 2003-11-18T15:30:28+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/msm/parsers/GreenstoneMetadataParser.java
r5712 r5874 911 911 /** Retrieve the value associated with a certain index. This is harder than it first sounds as you must take into account the parent indexes of this one. 912 912 * @param index The index whose value you wish to calculate, as a <strong>String</strong>. 913 * @return The fully quantified path to the value that matches index, also as a <strong>String</strong>. Delimitiation between subject layers is denoted by the string " \\"913 * @return The fully quantified path to the value that matches index, also as a <strong>String</strong>. Delimitiation between subject layers is denoted by the string "|" 914 914 */ 915 915 public String getValue(String index) { 916 916 ///ystem.err.println("Retrieve value for the alias/index: '" + index + "'"); 917 917 StringBuffer value = new StringBuffer(""); 918 918 // If index isn't the index, it must be the alias. Replace it with the index dammit. 919 919 Entry entry = null; 920 920 if(!Utility.isIndex(index)) { … … 925 925 ///ystem.err.println("\tIndex is actually: " + index); 926 926 } 927 927 // Now build the hierarchy if necessary. 928 928 int dot_index = -1; 929 929 if((dot_index = index.indexOf(".")) != -1) { 930 930 ///ystem.err.println("\tHierarchy information required -->"); 931 931 value.append(getValue(index.substring(0, dot_index))); 932 value.append(StaticStrings. ESCAPE_STR + StaticStrings.ESCAPE_STR);932 value.append(StaticStrings.PIPE_STR); 933 933 ///ystem.err.println("\t<-- Hierarchy information complete"); 934 934 } … … 940 940 } 941 941 entry = null; 942 942 ///ystem.err.println("\tFinal value is: '" + value.toString() + "'\n"); 943 943 return value.toString(); 944 944 }
Note:
See TracChangeset
for help on using the changeset viewer.