Changeset 25719

Show
Ignore:
Timestamp:
31.05.2012 11:53:21 (7 years ago)
Author:
sjm84
Message:

Reformatting this file and reorganising imports

Files:
1 modified

Legend:

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

    r25703 r25719  
    11package org.greenstone.gsdl3.core; 
    22 
     3import java.io.File; 
     4import java.io.FileReader; 
     5import java.io.Serializable; 
     6import java.io.StringWriter; 
     7import java.util.ArrayList; 
     8import java.util.HashMap; 
     9 
     10import javax.xml.transform.Transformer; 
     11import javax.xml.transform.TransformerException; 
     12import javax.xml.transform.TransformerFactory; 
     13import javax.xml.transform.dom.DOMSource; 
     14import javax.xml.transform.stream.StreamResult; 
     15 
     16import org.apache.commons.lang3.StringUtils; 
     17import org.apache.log4j.Logger; 
     18import org.apache.xerces.parsers.DOMParser; 
     19import org.greenstone.gsdl3.action.Action; 
     20import org.greenstone.gsdl3.util.GSConstants; 
     21import org.greenstone.gsdl3.util.GSFile; 
     22import org.greenstone.gsdl3.util.GSParams; 
     23import org.greenstone.gsdl3.util.GSPath; 
     24import org.greenstone.gsdl3.util.GSXML; 
     25import org.greenstone.gsdl3.util.GSXSLT; 
     26import org.greenstone.gsdl3.util.UserContext; 
     27import org.greenstone.gsdl3.util.XMLConverter; 
     28import org.greenstone.gsdl3.util.XMLTransformer; 
    329import org.greenstone.util.GlobalProperties; 
    4 import org.greenstone.gsdl3.util.*; 
    5 import org.greenstone.gsdl3.action.*; 
    6 // XML classes 
     30import org.w3c.dom.Comment; 
     31import org.w3c.dom.Document; 
     32import org.w3c.dom.Element; 
    733import org.w3c.dom.Node; 
    834import org.w3c.dom.NodeList; 
    9 import org.w3c.dom.Comment; 
    1035import org.w3c.dom.Text; 
    11 import org.w3c.dom.Document; 
    12 import org.w3c.dom.Element; 
    1336import org.xml.sax.InputSource; 
    14 import org.w3c.dom.NamedNodeMap; 
    15  
    16 // other java classes 
    17 import java.io.ByteArrayInputStream; 
    18 import java.io.File; 
    19 import java.io.Serializable; 
    20 import java.io.StringReader; 
    21 import java.io.StringWriter; 
    22 import java.io.FileReader; 
    23 import java.io.FileNotFoundException; 
    24 import java.util.ArrayList; 
    25 import java.util.HashMap; 
    26 import java.util.Enumeration; 
    27  
    28 import javax.xml.parsers.*; 
    29 import javax.xml.transform.*; 
    30 import javax.xml.transform.dom.*; 
    31 import javax.xml.transform.stream.*; 
    32 import org.apache.log4j.*; 
    33 import org.apache.tools.zip.ExtraFieldUtils; 
    34 import org.apache.xerces.dom.*; 
    35 import org.apache.xerces.parsers.DOMParser; 
    36  
    37 import org.apache.commons.lang3.StringUtils; 
    3837 
    3938/** 
     
    5150 
    5251    /** The preprocess.xsl file is in a fixed location */ 
    53   static final String preprocess_xsl_filename = GlobalProperties.getGSDL3Home() + File.separatorChar + "interfaces" + File.separatorChar + "core" + File.separatorChar + "transform" + File.separatorChar + "preProcess.xsl"; 
     52    static final String preprocess_xsl_filename = GlobalProperties.getGSDL3Home() + File.separatorChar + "interfaces" + File.separatorChar + "core" + File.separatorChar + "transform" + File.separatorChar + "preProcess.xsl"; 
    5453 
    5554    /** the list of xslt to use for actions */ 
     
    492491        Element page_response = (Element) GSXML.getChildByTagName(page, GSXML.PAGE_RESPONSE_ELEM); 
    493492        Element format_elem = (Element) GSXML.getChildByTagName(page_response, GSXML.FORMAT_ELEM); 
     493 
    494494        if (output.equals("formatelem")) 
    495495        { 
     
    803803        } 
    804804 
    805         if(_debug) 
     805        if (_debug) 
    806806        { 
    807807            GSXML.addDebugSpanTags(skinAndLibraryDoc); 
    808808        } 
    809809 
    810         return this.transformer.transform(skinAndLibraryDoc, doc, config_params, docWithDoctype); // The default 
     810        return this.transformer.transform(skinAndLibraryDoc, doc, config_params, docWithDoctype); 
    811811 
    812812        // The line below will do the transformation like we use to do before having Skin++ implemented,