Changeset 26169

Show
Ignore:
Timestamp:
11.09.2012 15:33:22 (7 years ago)
Author:
sjm84
Message:

Removed some code that has been made redundant

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r26055 r26169  
    937937    protected Node secondConfigFormatPass(String collection, Document skinAndLibraryDoc, Document doc, UserContext userContext) 
    938938    { 
    939         String to = GSPath.appendLink(collection, "DocumentMetadataRetrieve"); // Hard-wired? 
    940         Element metaMessage = this.doc.createElement(GSXML.MESSAGE_ELEM); 
    941         Element metaRequest = GSXML.createBasicRequest(this.doc, GSXML.REQUEST_TYPE_PROCESS, to, userContext); 
    942         Element paramList = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER); 
    943         Element docNodeList = this.doc.createElement(GSXML.DOC_NODE_ELEM + GSXML.LIST_MODIFIER); 
    944  
    945         NodeList metaNodes = skinAndLibraryDoc.getElementsByTagName("gsf:metadata"); 
    946  
    947         for (int i = 0; i < metaNodes.getLength(); i++) 
    948         { 
    949             Element param = this.doc.createElement(GSXML.PARAM_ELEM); 
    950             param.setAttribute(GSXML.NAME_ATT, "metadata"); 
    951             param.setAttribute(GSXML.VALUE_ATT, ((Element) metaNodes.item(i)).getAttribute(GSXML.NAME_ATT)); 
    952             paramList.appendChild(param); 
    953         } 
    954         metaRequest.appendChild(paramList); 
    955  
    956         NodeList docNodes = doc.getElementsByTagName("documentNode"); 
    957         for (int i = 0; i < docNodes.getLength(); i++) 
    958         { 
    959             Element docNode = this.doc.createElement(GSXML.DOC_NODE_ELEM); 
    960             docNode.setAttribute(GSXML.NODE_ID_ATT, ((Element) docNodes.item(i)).getAttribute(GSXML.NODE_ID_ATT)); 
    961             docNode.setAttribute(GSXML.NODE_TYPE_ATT, ((Element) docNodes.item(i)).getAttribute(GSXML.NODE_TYPE_ATT)); 
    962             docNodeList.appendChild(docNode); 
    963         } 
    964         metaRequest.appendChild(docNodeList); 
    965  
    966         metaMessage.appendChild(metaRequest); 
    967         Element response = (Element) mr.process(metaMessage); 
    968  
    969         NodeList metaDocNodes = response.getElementsByTagName(GSXML.DOC_NODE_ELEM); 
    970         for (int i = 0; i < docNodes.getLength(); i++) 
    971         { 
    972             GSXML.mergeMetadataLists(docNodes.item(i), metaDocNodes.item(i)); 
    973         } 
    974  
    975939        String configStylesheet_file = GSFile.stylesheetFile(GlobalProperties.getGSDL3Home(), (String) this.config_params.get(GSConstants.SITE_NAME), collection, (String) this.config_params.get(GSConstants.INTERFACE_NAME), base_interfaces, "config_format.xsl"); 
    976940        Document configStylesheet_doc = this.converter.getDOM(new File(configStylesheet_file));