Changeset 36301
- Timestamp:
- 2022-07-22T10:59:27+12:00 (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/cdm/SearchIndexManager.java
r36252 r36301 126 126 // Try to retrieve existing metadatum 127 127 String source_str = new_index.getID(); 128 SearchMeta metadatum = CollectionDesignManager.searchmeta_manager.getMetadatum( /*StaticStrings.STOP_CHARACTER +*/source_str, new_index.getType(), false);128 SearchMeta metadatum = CollectionDesignManager.searchmeta_manager.getMetadatum(source_str, new_index.getType(), false); 129 129 // If no metadata was found, add new pseudo metadata using the id 130 130 if(metadatum == null) { 131 metadatum = new SearchMeta( /*StaticStrings.STOP_CHARACTER +*/source_str, new_index.getType());131 metadatum = new SearchMeta(source_str, new_index.getType()); 132 132 metadatum.setAssigned(true); 133 133 metadatum.setValue(source_str); … … 199 199 // Try to retrieve existing metadatum 200 200 source_str = new_index.getID(); 201 SearchMeta metadatum = CollectionDesignManager.searchmeta_manager.getMetadatum( /*StaticStrings.STOP_CHARACTER +*/source_str, new_index.getType(), false);201 SearchMeta metadatum = CollectionDesignManager.searchmeta_manager.getMetadatum(source_str, new_index.getType(), false); 202 202 // If no metadata was found, add new pseudo metadata using the id 203 203 if(metadatum == null) { 204 metadatum = new SearchMeta( /*StaticStrings.STOP_CHARACTER +*/source_str, new_index.getType());204 metadatum = new SearchMeta(source_str, new_index.getType()); 205 205 metadatum.setAssigned(true); 206 206 metadatum.setValue(source_str); … … 494 494 495 495 496 // /** add all sources as separate indexes (fields). */497 // private class AddAllIndexActionListener498 // implements ActionListener {499 500 // public void actionPerformed(ActionEvent event) {501 // ArrayList all_sources = source_list.getAll();502 // all_sources.add(0, StaticStrings.TEXT_STR);503 // ArrayList new_sources = new ArrayList();504 // for(int i = 0; i < all_sources.size(); i++) {505 // Object source = all_sources.get(i);506 507 // // Create new index508 // new_sources.clear();509 // new_sources.add(source);510 // Index index = new Index(new_sources);511 // if(!index_model.contains(index)) {512 // // Determine the metadatum value513 // String name = source.toString();514 // if(name.startsWith(StaticStrings.EXTRACTED_NAMESPACE) && name.indexOf(StaticStrings.NS_SEP, StaticStrings.EXTRACTED_NAMESPACE.length()) == -1) {515 // name = name.substring(StaticStrings.EXTRACTED_NAMESPACE.length());516 // }517 // // Create new metadatum518 // CollectionMeta metadatum = new CollectionMeta(StaticStrings.STOP_CHARACTER + index.getID());519 // metadatum.setValue(name);520 // name = null;521 // // Assign new index522 // addIndex(index, metadatum);523 // }524 // source = null;525 // index = null;526 // }527 // new_sources = null;528 // new_index_prompt.dispose();529 530 // }531 // }532 496 533 497 private class AllFieldsBoxListener
Note:
See TracChangeset
for help on using the changeset viewer.