Changeset 14204
- Timestamp:
- 2007-06-29T13:16:23+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r14037 r14204 2433 2433 toElement.appendChild (language_indexes); 2434 2434 } 2435 // Handling both earchType and search format statement2435 // Handling both searchType and search format statement 2436 2436 private void doSearchFormat (Document to, Node searchNode) { 2437 2437 //There are two elements called <format> in <search>: one is for searchType; another is for format statement … … 2511 2511 2512 2512 Element to_element = XMLTools.duplicateElement (to, (Element)replace_element, true); 2513 toElement.appendChild (to_element); 2514 } 2515 private void doOAIElement (Document to, Element from) { 2516 Element toElement = to.getDocumentElement (); 2517 2518 Node oai_element = XMLTools.getChildByTagName (from, StaticStrings.OAI_ELEMENT); 2519 if (oai_element == null) { 2520 return; // such an element not found 2521 } 2522 2523 Element to_element = XMLTools.duplicateElement (to, (Element)oai_element, true); 2524 toElement.appendChild (to_element); 2525 } 2526 private void convertOAIElement (Document from, Document to) { 2527 Element toElement = to.getDocumentElement (); 2528 2529 Node oai_element = XMLTools.getChildByTagName (from.getDocumentElement (), StaticStrings.OAI_ELEMENT); 2530 if (oai_element == null) { 2531 return; // such an element not found 2532 } 2533 2534 Element to_element = XMLTools.duplicateElement (to, (Element)oai_element, true); 2513 2535 toElement.appendChild (to_element); 2514 2536 } … … 3610 3632 doDisplayFormat (dOc, fromElement); 3611 3633 doReplaceListRef (dOc, fromElement); 3634 doOAIElement (dOc, fromElement); 3612 3635 3613 3636 } … … 3615 3638 3616 3639 public void saveCollectionConfigXML (File collect_cfg_file, Document doc) { 3617 //In this method, the file collect_cfg_file must be 'collectionConfig.xml' instead of 'collect.cfg'3640 //In this method, the file collect_cfg_file must be 'collectionConfig.xml' 3618 3641 3619 3642 … … 3810 3833 convertDisplayFormat (dOc, skeleton); 3811 3834 convertReplaceListRef (dOc, skeleton); 3835 convertOAIElement(dOc, skeleton); 3812 3836 3813 3837 return skeleton;
Note:
See TracChangeset
for help on using the changeset viewer.