Changeset 4512
- Timestamp:
- 2003-06-09T11:48:54+12:00 (21 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/cdm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMetaManager.java
r4494 r4512 217 217 value = ct.nextToken(); 218 218 } 219 // Check if the key is an index, an if so retrieve it.219 // Check if the key is an index, and if so retrieve it. 220 220 if(((String)key).startsWith(".")) { 221 ///ystem.err.println("Detected '.' prefix."); 221 222 String key_str = (String)key; 222 223 key_str = key_str.substring(1); 223 224 key = manager.indexes.getIndex(key_str); 225 // If that didn't work, then it might be a subindex so have a bash at retrieving that instead. 226 if(key == null) { 227 key = manager.subcollections.getSubIndex(key_str); 228 //if(key != null) { 229 ///ystem.err.println("Its a subindex."); 230 //} 231 //else { 232 ///ystem.err.println("Error Will Robinson."); 233 //} 234 } 235 //else { 236 ///ystem.err.println("Its an index."); 237 //} 224 238 } 225 239 // An if we have a language code, retrieve its object too. -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java
r4494 r4512 169 169 return (Subcollection) subcollections.get(name); 170 170 } 171 172 /** Retrieve a certain subindex given its name. 173 * @param name the String representation of a subindex. 174 * @return the SubIndex requested or null if no such subindex. 175 */ 176 public SubIndex getSubIndex(String name) { 177 for(int i = 0; i < subindexes.size(); i++) { 178 SubIndex subindex = (SubIndex) subindexes.get(i); 179 if(subindex.toString().equals(name)) { 180 return subindex; 181 } 182 } 183 return null; 184 } 185 171 186 /** Method to get all of the subindexes set. 172 187 * @return A <strong>SubIndexes</strong> object containing all the defined indexes.
Note:
See TracChangeset
for help on using the changeset viewer.