Changeset 34185


Ignore:
Timestamp:
2020-06-16T09:53:16+12:00 (4 years ago)
Author:
kjdon
Message:

changed doClassifier to doClassifiers as it was misleading and bugged me. copy in and out displayItems inside a classifier, so that GLI doesn't delete them. Oh this needs an overhaul. But when does one have the time...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfigXMLReadWrite.java

    r30691 r34185  
    627627
    628628    //Handle classifiers
    629     static private void doClassifier(Document to, Node browseNode)
     629    static private void doClassifiers(Document to, Node browseNode)
    630630    {
    631631        Element toElement = to.getDocumentElement();
     
    708708                }
    709709                classify_element.appendChild(option_element);
    710             }
     710
     711            } // for each option
     712           
    711713            //format element for this classifier
    712714            Element format = (Element) XMLTools.getChildByTagName(e, StaticStrings.FORMAT_STR);
     
    715717                classify_element.appendChild(doFormat(to, format, null));
    716718            }
     719
     720            // Handling 'displayItem' element of this 'classifier' element - for now, just copy in and out so they don't get deleted
     721            NodeList di_children = e.getElementsByTagName(StaticStrings.DISPLAYITEM_STR);
     722           
     723            XMLTools.duplicateElementList(to, classify_element, di_children, true);
     724                       
    717725            appendProperly(toElement, classify_element);
    718726        }
     
    15671575                classifier_element.appendChild(convertFormat(to, e));
    15681576            }
     1577
     1578            // Handling 'displayItem' element of this 'classifier' element - for now, just copy in and out so they don't get deleted
     1579            NodeList di_children = child.getElementsByTagName(StaticStrings.DISPLAYITEM_STR);
     1580           
     1581            XMLTools.duplicateElementList(to, classifier_element, di_children, true);
    15691582            browse_element.appendChild(classifier_element);
    15701583        }
     
    26822695                System.out.println("There is no classifier.");
    26832696            }
    2684             doClassifier(dOc, browseNode);
     2697            doClassifiers(dOc, browseNode);
    26852698        }
    26862699
Note: See TracChangeset for help on using the changeset viewer.