Changeset 14635
- Timestamp:
- 2007-10-09T09:57:18+13:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r14634 r14635 2536 2536 toElement.appendChild (to_element); 2537 2537 } 2538 private void doPlugoutElement (Document to, Element from) {2539 Element toElement = to.getDocumentElement ();2540 2541 Node plugout_element = XMLTools.getChildByTagName (from, PLUGOUT_ELEMENT);2542 if (plugout_element == null) {2543 return; // such an element not found2544 }2545 2546 Element to_element = XMLTools.duplicateElement (to, (Element)plugout_element, true);2547 toElement.appendChild (to_element);2548 }2549 private void convertPlugoutElement (Document from, Document to) {2550 Element toElement = to.getDocumentElement ();2551 2552 Node plugout_element = XMLTools.getChildByTagName (from.getDocumentElement (), PLUGOUT_ELEMENT);2553 if (plugout_element == null) {2554 return; // such an element not found2555 }2556 2557 Element to_element = XMLTools.duplicateElement (to, (Element)plugout_element, true);2558 toElement.appendChild (to_element);2559 }2560 2538 private void doDefaultIndexLanguage (Document to, Node searchNode) { 2561 2539 Element toElement = to.getDocumentElement (); … … 2910 2888 2911 2889 import_element.appendChild (plugin_list_element); 2890 2891 //do the plugout element (used by building flax collections) 2892 Node plugout = XMLTools.getChildByTagNameIndexed (from.getDocumentElement (), PLUGOUT_ELEMENT, 0); 2893 if (plugout != null) { 2894 Element to_element = XMLTools.duplicateElement (to, (Element)plugout, true); 2895 import_element.appendChild (to_element); 2896 } 2897 2912 2898 to.getDocumentElement ().appendChild (import_element); 2913 2899 } 2900 2914 2901 //Handle 'searchType' of collectionConfig.xml. In the internal structure, its also called 'searchType', eg. plain, form 2915 2902 private void convertSearchType (Document from, Document to) { … … 3631 3618 } 3632 3619 if (importNode != null) { 3633 Node pluginListNode = XMLTools.getChildByTagNameIndexed ((Element)importNode, StaticStrings.PLUGINLIST_STR, 0);3634 3620 //do plugin list nodes 3621 Node pluginListNode = XMLTools.getChildByTagNameIndexed ((Element)importNode, StaticStrings.PLUGINLIST_STR, 0); 3635 3622 if (pluginListNode == null) { 3636 System.out.println ("There is no plugin set.");3623 System.out.println ("There is no pluginlist set."); 3637 3624 } 3638 3625 if (pluginListNode != null) { 3639 3626 3640 3627 doPlugin (dOc, pluginListNode); 3628 } 3629 3630 //do the plugout element (used by building flax collections) 3631 Node plugout = XMLTools.getChildByTagNameIndexed ((Element)importNode, PLUGOUT_ELEMENT, 0); 3632 if (plugout != null) { 3633 Element to_element = XMLTools.duplicateElement (dOc, (Element)plugout, true); 3634 toElement.appendChild (to_element); 3641 3635 } 3642 3636 } … … 3688 3682 doReplaceListRef (dOc, fromElement); 3689 3683 doOAIElement (dOc, fromElement); 3690 doPlugoutElement (dOc, fromElement);3691 3684 3692 3685 } … … 3880 3873 convertBuildType (dOc, skeleton); 3881 3874 convertIndex (dOc, skeleton); 3882 convertPlugin (dOc, skeleton); 3875 convertPlugin (dOc, skeleton);//also do the plugout element 3883 3876 convertClassifier (dOc, skeleton); 3884 3877 convertSubcollectionIndexes (dOc, skeleton); … … 3890 3883 convertReplaceListRef (dOc, skeleton); 3891 3884 convertOAIElement(dOc, skeleton); 3892 convertPlugoutElement(dOc, skeleton); 3893 3885 3894 3886 return skeleton; 3895 3887 }
Note:
See TracChangeset
for help on using the changeset viewer.