Changeset 23606


Ignore:
Timestamp:
2011-01-17T17:42:35+13:00 (13 years ago)
Author:
sjm84
Message:

Merging the latest Greenstone 3 trunk changes into the 64-bit branch

Location:
main/branches/64_bit_Greenstone/greenstone3
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • main/branches/64_bit_Greenstone/greenstone3

  • main/branches/64_bit_Greenstone/greenstone3/build.xml

    r23443 r23606  
    223223  <!-- If building a release then we want to adjust environment variables so that the support library can be see during compilation -->
    224224  <if><bool><isset property="use.support.lib"/></bool>
    225     <if><bool><isset property="env.CFLAGS"/></bool>
    226       <property name="cflags.arg" value="CFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include ${env.CFLAGS}&quot;"/>
    227       <else>
    228         <property name="cflags.arg" value="CFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include&quot;"/>
    229       </else>
    230     </if>
    231     <else>
    232       <if><bool><isset property="env.CFLAGS"/></bool>
    233         <property name="cflags.arg" value="CFLAGS=&quot;${env.CFLAGS}&quot;"/>
    234         <else>
    235           <property name="cflags.arg" value=" "/>
    236         </else>
    237       </if>
    238     </else>
    239   </if>
    240 
    241   <if><bool><isset property="use.support.lib"/></bool>
    242     <if><bool><isset property="env.CPPFLAGS"/></bool>
    243       <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include ${env.CPPFLAGS}&quot;"/>
    244       <else>
    245         <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include&quot;"/>
    246       </else>
    247     </if>
    248     <else>
    249       <if><bool><isset property="env.CPPFLAGS"/></bool>
    250         <property name="cppflags.arg" value="CPPFLAGS=&quot;${env.CPPFLAGS}&quot;"/>
    251         <else>
    252           <property name="cppflags.arg" value=" "/>
    253         </else>
    254       </if>
    255     </else>
    256   </if>
    257 
    258   <if><bool><isset property="use.support.lib"/></bool>
    259     <if><bool><isset property="env.CXXFLAGS"/></bool>
    260       <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include ${env.CXXFLAGS}&quot;"/>
    261       <else>
    262         <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${basedir}/ext/gnome-lib/${os.bin.dir}/include&quot;"/>
    263       </else>
    264     </if>
    265     <else>
    266       <if><bool><isset property="env.CXXFLAGS"/></bool>
    267         <property name="cxxflags.arg" value="CXXFLAGS=&quot;${env.CXXFLAGS}&quot;"/>
    268         <else>
    269           <property name="cxxflags.arg" value=" "/>
    270         </else>
    271       </if>
    272     </else>
    273   </if>
    274 
    275   <if><bool><isset property="use.support.lib"/></bool>
    276     <if><bool><isset property="env.LDFLAGS"/></bool>
    277       <property name="ldflags.arg" value="LDFLAGS=&quot;-L${basedir}/ext/gnome-lib/${os.bin.dir}/lib ${env.LDFLAGS}&quot;"/>
    278       <else>
    279         <property name="ldflags.arg" value="LDFLAGS=&quot;-L${basedir}/ext/gnome-lib/${os.bin.dir}/lib&quot;"/>
    280       </else>
    281     </if>
    282     <else>
    283       <if><bool><isset property="env.LDFLAGS"/></bool>
    284         <property name="ldflags.arg" value="LDFLAGS=&quot;${env.LDFLAGS}&quot;"/>
    285         <else>
    286           <property name="ldflags.arg" value=" "/>
    287         </else>
    288       </if>
    289     </else>
    290   </if>
    291 
    292   <if><bool><isset property="use.support.lib"/></bool>
    293     <if><bool><isset property="env.PATH"/></bool>
    294       <property name="path.arg" value="PATH=&quot;${basedir}/ext/gnome-lib/${os.bin.dir}/bin:${env.PATH}&quot;"/>
    295       <else>
    296         <property name="path.arg" value="PATH=&quot;${basedir}/ext/gnome-lib/${os.bin.dir}/bin&quot;"/>
    297       </else>
    298     </if>
    299     <else>   
    300       <if><bool><isset property="env.PATH"/></bool>
    301         <property name="path.arg" value="PATH=&quot;${env.PATH}&quot;"/>
    302         <else>
    303           <property name="path.arg" value=" "/>
    304         </else>
    305       </if>
    306     </else>
     225
     226    <property name="gnome-lib-dir" value="${basedir}/ext/gnome-lib-minimal/${os.bin.dir}"/>
     227
     228    <if><bool><isset property="env.CFLAGS"/></bool>
     229        <property name="cflags.arg" value="CFLAGS=&quot;-I${gnome-lib-dir}/include ${env.CFLAGS}&quot;"/>
     230    <else>
     231        <property name="cflags.arg" value="CFLAGS=&quot;-I${gnome-lib-dir}/include&quot;"/>
     232    </else>
     233    </if>
     234
     235    <if><bool><isset property="env.CPPFLAGS"/></bool>
     236        <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${gnome-lib-dir}/include ${env.CPPFLAGS}&quot;"/>
     237    <else>
     238        <property name="cppflags.arg" value="CPPFLAGS=&quot;-I${gnome-lib-dir}/include&quot;"/>
     239    </else>
     240    </if>
     241
     242    <if><bool><isset property="env.CXXFLAGS"/></bool>
     243        <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${gnome-lib-dir}/include ${env.CXXFLAGS}&quot;"/>
     244    <else>
     245            <property name="cxxflags.arg" value="CXXFLAGS=&quot;-I${gnome-lib-dir}/include&quot;"/>
     246    </else>
     247    </if>
     248
     249    <if><bool><isset property="env.LDFLAGS"/></bool>
     250        <property name="ldflags.arg" value="LDFLAGS=&quot;-L${gnome-lib-dir}/lib ${env.LDFLAGS}&quot;"/>
     251    <else>
     252            <property name="ldflags.arg" value="LDFLAGS=&quot;-L${gnome-lib-dir}/lib&quot;"/>
     253    </else>
     254    </if>
     255
     256    <if><bool><isset property="env.PATH"/></bool>
     257        <property name="path.arg" value="PATH=&quot;${gnome-lib-dir}/bin:${env.PATH}&quot;"/>
     258    <else>
     259            <property name="path.arg" value="PATH=&quot;${gnome-lib-dir}/bin&quot;"/>
     260    </else>
     261    </if>
     262
     263    <if><bool><isset property="env.PKG_CONFIG_PATH"/></bool>
     264        <property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${gnome-lib-dir}/lib/pkgconfig:${env.PKG_CONFIG_PATH}&quot;"/>
     265    <else>
     266            <property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${gnome-lib-dir}/lib/pkgconfig&quot;"/>
     267    </else>
     268    </if>
     269
     270    <if><bool><isset property="env.LD_LIBRARY_PATH"/></bool>
     271        <property name="ldlpath.arg" value="LD_LIBRARY_PATH=&quot;${gnome-lib-dir}/lib:${env.LD_LIBRARY_PATH}&quot;"/>
     272    <else>
     273            <property name="ldlpath.arg" value="LD_LIBRARY_PATH=&quot;${gnome-lib-dir}/lib&quot;"/>
     274    </else>
     275    </if>
     276
     277    <else>
     278        <if><bool><isset property="env.CFLAGS"/></bool>
     279            <property name="cflags.arg" value="CFLAGS=&quot;${env.CFLAGS}&quot;"/>
     280            <else>
     281            <property name="cflags.arg" value=" "/>
     282        </else>
     283        </if>
     284
     285        <if><bool><isset property="env.CPPFLAGS"/></bool>
     286                <property name="cppflags.arg" value="CPPFLAGS=&quot;${env.CPPFLAGS}&quot;"/>
     287            <else>
     288            <property name="cppflags.arg" value=" "/>
     289        </else>
     290        </if>
     291
     292        <if><bool><isset property="env.CXXFLAGS"/></bool>
     293            <property name="cxxflags.arg" value="CXXFLAGS=&quot;${env.CXXFLAGS}&quot;"/>
     294        <else>
     295            <property name="cxxflags.arg" value=" "/>
     296        </else>
     297        </if>
     298
     299        <if><bool><isset property="env.LDFLAGS"/></bool>
     300            <property name="ldflags.arg" value="LDFLAGS=&quot;${env.LDFLAGS}&quot;"/>
     301        <else>
     302            <property name="ldflags.arg" value=" "/>
     303        </else>
     304        </if>
     305
     306        <if><bool><isset property="env.PATH"/></bool>
     307            <property name="path.arg" value="PATH=&quot;${env.PATH}&quot;"/>
     308        <else>
     309            <property name="path.arg" value=" "/>
     310        </else>
     311        </if>
     312
     313        <if><bool><isset property="env.PKG_CONFIG_PATH"/></bool>
     314            <property name="pcpath.arg" value="PKG_CONFIG_PATH=&quot;${env.PKG_CONFIG_PATH}&quot;"/>
     315        <else>
     316            <property name="pcpath.arg" value=" "/>
     317        </else>
     318        </if>
     319
     320        <if><bool><isset property="env.LD_LIBRARY_PATH"/></bool>
     321            <property name="ldlpath.arg" value="LD_LIBRARY_PATH=&quot;${env.LD_LIBRARY_PATH}&quot;"/>
     322        <else>
     323            <property name="ldlpath.arg" value=" "/>
     324        </else>
     325        </if>
     326    </else>
    307327  </if>
    308328
     
    15091529      <arg line="${cxxflags.arg}"/>
    15101530      <arg line="${path.arg}"/>
     1531      <arg line="${pcpath.arg}"/>
     1532      <arg line="${ldlpath.arg}"/>
    15111533    </exec>
    15121534  </target>
     
    18321854      <arg line="${cxxflags.arg}"/>
    18331855      <arg line="${path.arg}"/>
     1856      <arg line="${pcpath.arg}"/>
     1857      <arg line="${ldlpath.arg}"/>
    18341858    </exec>
    18351859  </target>
  • main/branches/64_bit_Greenstone/greenstone3/ext/extension_project_list.xml

    r22065 r23606  
    1818    <sequenceList>
    1919      <step id="installOptions" action="properties" label="Install options" dependsOn="AUTOMATIC_DOWNLOAD">
    20     <optionList id="Mat" label="Mat options">
    21       <option id="User_Name" label="User name"/>
    22       <option id="Password" label="Password"/>
    23       <option id="Tomcat_Port" label="Tomcat port"/>
    24       <option id="JVM_Version" label="Java Virtual Machine version"/>
    25     </optionList>
     20        <optionList id="Mat" label="Mat options">
     21          <option id="User_Name" label="User name"/>
     22          <option id="Password" label="Password"/>
     23          <option id="Tomcat_Port" label="Tomcat port"/>
     24          <option id="JVM_Version" label="Java Virtual Machine version"/>
     25        </optionList>
    2626      </step>
     27     
    2728      <step id="install" action="button" label="Install" dependsOn="installOptions">
    28     <command>
    29       <os name="default">ant compile</os>
     29        <command>
     30          <os name="default">ant compile</os>
    3031        </command>
    3132      </step>
     33
    3234      <step id="controlPanel" action="panel" label="Control Panel" dependsOn="install">
    33     <class>org.greenstone.admin.guiext.mat.ControlPanel</class>
     35        <class>org.greenstone.admin.guiext.mat.ControlPanel</class>
    3436      </step>
     37
    3538      <step id="uninstall" action="button" label="Uninstall" dependsOn="install" rollbackTo="install">
    36     <command>
    37       <os name="default">ant clean</os>
    38     </command>
     39        <command>
     40          <os name="default">ant clean</os>
     41        </command>
    3942      </step>
    4043    </sequenceList>
    4144  </extension>
     45
    4246  <extension>
    4347    <name>EKit HTML Editor</name>
     
    4751    <sequenceList>
    4852      <step id="run" action="button" label="Run EKit" dependsOn="AUTOMATIC_DOWNLOAD">
    49     <command>
    50       <os name="default">java -jar ekit.jar</os>
    51     </command>
     53        <command>
     54          <os name="default">java -jar ekit.jar</os>
     55        </command>
    5256      </step>
     57     
    5358      <step id="assoc" action="button" label="Setup EKit for GLI" dependsOn="AUTOMATIC_DOWNLOAD">
    54     <command>
    55       <os name="default">java -jar GLIAssociate.jar</os>
    56     </command>
     59        <command>
     60          <os name="default">java -jar GLIAssociate.jar</os>
     61        </command>
    5762      </step>
    5863    </sequenceList>
    5964  </extension>
     65
    6066  <extension>
    6167    <name>Video Plugin</name>
     
    6571    <sequenceList>
    6672      <step id="download" action="download" label="Download Extension">
    67     <mainSource method="svn">http://svn.greenstone.org/gs2-extensions/video/trunk</mainSource>
     73        <mainSource method="svn">http://svn.greenstone.org/gs2-extensions/video-and-audio/trunk/src</mainSource>
    6874      </step>
     75
    6976      <step id="install" action="button" label="Compile" dependsOn="download">
    70     <command>
    71       <os name="default">./CASCADE-MAKE.sh</os>
    72       <os name="Windows">CASCADE-MAKE</os>
    73     </command>
     77        <command>
     78          <os name="default">./CASCADE-MAKE.sh</os>
     79          <os name="Windows">CASCADE-MAKE</os>
     80        </command>
    7481      </step>
     82
    7583      <step id="uninstall" action="button" label="Uninstall" dependsOn="install" rollbackTo="install">
    76     <command>
    77       <os name="default"/>
    78     </command>
     84        <command>
     85          <os name="default"/>
     86        </command>
    7987      </step>
    8088    </sequenceList>
  • main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/admin/guiext/DownloadStep.java

    r21954 r23606  
    5050    ExtensionInformation info = _parent.getParent();
    5151   
    52     _mainSource = new Source("svn", info.getBaseURL() + info.getFileStem() + "/trunk/", "", this);
     52    _mainSource = new Source("svn", info.getBaseURL() + info.getFileStem() + "/trunk/src", "", this);
    5353
    5454    _button.addActionListener(new DownloadButtonListener());
  • main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/action/FormatAction.java

    r23489 r23606  
    8585
    8686    String format_string = (String)params.get("data");
     87    //logger.error("Original format string");
     88    //logger.error(format_string);
    8789   
    8890    Element page_response = this.doc.createElement(GSXML.RESPONSE_ELEM);
     
    115117
    116118            // not sure what to do here - some code from Transforming Receptionist
    117             //String transformed = transformer.transformToString(style_doc, d);
     119            String transformed = transformer.transformToString(style_doc, d);
    118120            logger.error("About to transform");
    119             Node transformed = (Node) transformer.transform(style_doc, d);  // Failing org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. ; SystemID: file:///home/sam/greenstone3/packages/tomcat/bin/dummy.xsl
     121            //Node transformed = (Node) transformer.transform(style_doc, d);  // Failing org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. ; SystemID: file:///home/sam/greenstone3/packages/tomcat/bin/dummy.xsl
    120122
    121123            logger.error("Transform successful?");
     
    124126                logger.error("TRANSFORMED IS NULL");
    125127
    126             logger.error("begin import");
    127             Node imported = this.doc.importNode(transformed, true); // There was an exception org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
    128             logger.error("finished import");
     128            //logger.error("begin import");
     129            //Node imported = this.doc.importNode(transformed, true); // There was an exception org.w3c.dom.DOMException: NOT_SUPPORTED_ERR: The implementation does not support the requested type of object or operation.
     130            //logger.error("finished import");
    129131
    130             String format_string2 = GSXML.xmlNodeToString(imported); // null pointer exception occuring here
    131             logger.error("format string="+format_string2);
     132            //String format_string2 = GSXML.xmlNodeToString(imported); // null pointer exception occuring here
     133            //logger.error("format string="+format_string2);
    132134 
    133135            Element format = this.doc.createElement(GSXML.FORMAT_STRING_ELEM);
    134             //GSXML.setNodeText(format, transformed);
    135             format.appendChild(transformed);
     136            GSXML.setNodeText(format, transformed);
     137            //format.appendChild(transformed);
    136138            //format.setNodeValue(transformed);
    137139            mr_request.appendChild(format);
  • main/branches/64_bit_Greenstone/greenstone3/src/java/org/greenstone/gsdl3/collection/Collection.java

    r23505 r23606  
    3333import java.io.File;
    3434import java.util.HashMap;
     35
     36import javax.xml.parsers.DocumentBuilder;
     37import javax.xml.parsers.DocumentBuilderFactory;
     38
     39import org.xml.sax.*;
     40import javax.xml.parsers.SAXParserFactory;
     41import javax.xml.parsers.ParserConfigurationException;
     42import javax.xml.parsers.SAXParser;
    3543
    3644import org.apache.log4j.*;
     
    330338
    331339        Element format_element = (Element) GSXML.getChildByTagName(request, GSXML.FORMAT_STRING_ELEM);
    332         //String format_string = GSXML.getNodeText(format_element);
    333         Element format_statement = (Element) format_element.getFirstChild();
     340        String format_string = GSXML.getNodeText(format_element);
     341        //Element format_statement = (Element) format_element.getFirstChild();
    334342
    335343        //logger.error("Format string: " + format_string);
     
    386394
    387395                // Write format statement
    388                 String format_string = GSXML.xmlNodeToString(format_statement);
     396                //String format_string = GSXML.xmlNodeToString(format_statement);
    389397                writer = new BufferedWriter(new FileWriter(format_statement_filename));
    390398                writer.write(format_string);
     
    405413            logger.error("SAVE format statement");
    406414
    407             // open collectionConfig.xml and read in to w3 Document
    408             String collection_config = directory + "collectionConfig.xml";
    409             Document config = this.converter.getDOM(new File(collection_config), "UTF-8");
     415            try{
     416
     417                // Convert format string to a document
     418                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
     419                DocumentBuilder builder = factory.newDocumentBuilder();
     420                //String input = "<html><head><title></title></head><body>" + format_string + "</body></html>";
     421                String input = format_string.substring(0,format_string.length()-1)+"</xml>";
     422                logger.error(input);
     423                InputSource is = new InputSource( new StringReader( input ) );
     424                logger.error("About to parse format string");
     425                Document format_statement = (Document) builder.parse( is );
     426                logger.error("Done parsing format string");
     427
     428                // open collectionConfig.xml and read in to w3 Document
     429                String collection_config = directory + "collectionConfig.xml";
     430                Document config = this.converter.getDOM(new File(collection_config), "UTF-8");
    410431           
    411             //String tag_name = "";
    412             int k;
    413             int index;
    414             Element elem;
    415             Node current_node = GSXML.getChildByTagName(config, "CollectionConfig");
    416             NodeList current_node_list;
    417 
    418             if(service.equals("ClassifierBrowse"))
    419             {
    420                 //tag_name = "browse";
    421                 // if CLX then need to look in <classifier> X then <format>
    422                 // default is <browse><format>
    423 
    424                 current_node = GSXML.getChildByTagName(current_node, "browse");
    425 
    426                 // find CLX
    427                 if(classifier != null)
     432                //String tag_name = "";
     433                int k;
     434                int index;
     435                Element elem;
     436                Node current_node = GSXML.getChildByTagName(config, "CollectionConfig");
     437                NodeList current_node_list;
     438   
     439                if(service.equals("ClassifierBrowse"))
    428440                {
    429                     current_node_list = GSXML.getChildrenByTagName(current_node, "classifier");
    430                     index = Integer.parseInt(classifier.substring(2)) - 1;
    431                     // index should be given by X-1
    432                     current_node = current_node_list.item(index);
    433                     current_node = GSXML.getChildByTagName(current_node, "format");
     441                    //tag_name = "browse";
     442                    // if CLX then need to look in <classifier> X then <format>
     443                    // default is <browse><format>
     444
     445                    current_node = GSXML.getChildByTagName(current_node, "browse");
     446
     447                    // find CLX
     448                    if(classifier != null)
     449                    {
     450                        current_node_list = GSXML.getChildrenByTagName(current_node, "classifier");
     451                        index = Integer.parseInt(classifier.substring(2)) - 1;
     452                        // index should be given by X-1
     453                        current_node = current_node_list.item(index);
     454                        current_node = GSXML.getChildByTagName(current_node, "format");
     455                    }
     456                    else{
     457                        current_node = GSXML.getChildByTagName(current_node, "format");
     458                    }
    434459                }
    435                 else{
    436                     current_node = GSXML.getChildByTagName(current_node, "format");
     460                else
     461                {
     462                    // look in <format> with no attributes
     463           
     464                    current_node_list = GSXML.getChildrenByTagName(current_node, "search");
     465                    for(k=0; k<current_node_list.getLength(); k++)
     466                    {
     467                        current_node = current_node_list.item(k);
     468                        // if current_node has no attributes then break
     469                        elem = (Element) current_node;
     470                        if(elem.hasAttribute("name")==false)
     471                            break;
     472                    }
    437473                }
    438             }
    439             else
    440             {
    441                 // look in <format> with no attributes
    442            
    443                 current_node_list = GSXML.getChildrenByTagName(current_node, "search");
    444                 for(k=0; k<current_node_list.getLength(); k++)
     474
     475                // Current_node should be a format tag
     476                elem = (Element) current_node;
     477   
     478                logger.error("Current_node = " + elem.getNodeName());
     479
     480                // seems we want to remove current child/ren and replace with format_statement's child/ren?
     481
     482                // remove existing
     483                current_node_list = elem.getChildNodes();
     484                for(k=0; k<current_node_list.getLength(); k++)
    445485                {
    446                     current_node = current_node_list.item(k);
    447                     // if current_node has no attributes then break
    448                     elem = (Element) current_node;
    449                     if(elem.hasAttribute("name")==false)
    450                         break;
     486                    current_node = elem.removeChild(current_node_list.item(k));
    451487                }
    452             }
    453 
    454             // Current_node should be a format tag
    455             elem = (Element) current_node;
    456 
    457             logger.error("Current_node = " + elem.getNodeName());
    458 
    459             // seems we want to remove current child/ren and replace with format_statement's child/ren?
    460 
    461             // remove existing
    462             current_node_list = elem.getChildNodes();
    463             for(k=0; k<current_node_list.getLength(); k++)
    464             {
    465                 current_node = elem.removeChild(current_node_list.item(k));
    466             }
    467 
    468             // append new
    469             current_node_list = format_statement.getChildNodes();
    470             for(k=0; k<current_node_list.getLength(); k++)
    471             {
    472                 current_node = elem.appendChild(current_node_list.item(k));
    473             }
    474 
    475             //String text = GSXML.getNodeText(elem);
    476             //logger.error(text);
    477             //text = text.replaceAll("_httpsite_", http_site);
    478             //text = text.replaceAll("_httpcollection_", http_collection);
    479             //GSXML.setNodeText(d, text);
    480 
    481             // Now convert config document to string for writing to file
    482             String new_config = GSXML.xmlNodeToString(config);
    483 
    484             // Write to file (not original! for now)
    485             try{
     488
     489                // append new but we have a string!
     490                GSXML.setNodeText(elem, format_string);
     491
     492                //current_node_list = format_statement.getChildNodes();
     493                //for(k=0; k<current_node_list.getLength(); k++)
     494                //{
     495                //    current_node = elem.appendChild(current_node_list.item(k));
     496                //}
     497
     498                //String text = GSXML.getNodeText(elem);
     499                //logger.error(text);
     500                //text = text.replaceAll("_httpsite_", http_site);
     501                //text = text.replaceAll("_httpcollection_", http_collection);
     502                //GSXML.setNodeText(d, text);
     503
     504                // Now convert config document to string for writing to file
     505                String new_config = GSXML.xmlNodeToString(config);
     506   
     507                // Write to file (not original! for now)
    486508                BufferedWriter writer = new BufferedWriter(new FileWriter(collection_config+".new"));
    487509                writer.write(new_config);
    488510                writer.close();
    489             } catch (IOException e) {
    490                 logger.error("IO Exception "+e);
     511
     512             } catch( Exception ex ) {
     513                logger.error("There was an exception "+ex);
     514
     515                StringWriter sw = new StringWriter();
     516                PrintWriter pw = new PrintWriter(sw, true);
     517                ex.printStackTrace(pw);
     518                pw.flush();
     519                sw.flush();
     520                logger.error(sw.toString());
    491521            }
     522
    492523        }
    493524    }
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/gs2/transform/about.xsl

    r20232 r23606  
    6161    <div class="document">
    6262      <xsl:if test="not(/page/pageRequest/paramList/param[@name='qt']) or /page/pageRequest/paramList/param[@name='qt']/@value = 0">
    63       <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
    64     <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
    65       <xsl:call-template name="dividerBar"/>
     63    <xsl:if test="serviceList/service[@name='TextQuery']">
     64      <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
     65        <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
     66      <xsl:call-template name="dividerBar"/>
     67    </xsl:if>
    6668      </xsl:if>
    6769    </div>
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/js/gui_div.js

    r23489 r23606  
    33
    44var initialised_iframe = "false";
     5
     6function onTextChange(item, text)
     7{
     8    item.setAttribute("value",text);
     9}
     10
    511
    612//function createFormatStatement()
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/main.xsl

    r23489 r23606  
    245245
    246246<!-- *************************************************************************************** -->
    247 <H2>Preview</H2>
     247<!--<H2>Preview</H2>
    248248
    249249                    <div id="my_categories"><xsl:text> </xsl:text></div>
     
    251251                    <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe>
    252252
    253                     <xsl:variable name="preview">
     253                    <xsl:variable name="preview"> -->
    254254                    <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->
    255255                    <div id="gs_content">
     
    261261
    262262                    </div>
    263                     </xsl:variable>
     263   <!--                 </xsl:variable>
    264264
    265265                    <script type="text/javascript">
     
    269269                    <div id="result">
    270270                    Here
    271                     </div>
     271                    </div>-->
    272272
    273273                    <div id="gs_footer">
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl

    r23360 r23606  
    236236            <xsl:variable name="mode">
    237237                <xsl:choose>
    238                     <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical"><xsl:text></xsl:text></input></xsl:when>
    239                     <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}"/></xsl:otherwise>
     238                    <xsl:when test="not(@mode)">MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="vertical" onChange="onTextChange(this, this.value)"><xsl:text></xsl:text></input></xsl:when>
     239                    <xsl:otherwise>MODE=<input class="mode" type="text" name="rawtextinput" size="10" value="{@mode}" onChange="onTextChange(this, this.value)"/></xsl:otherwise>
    240240                </xsl:choose>
    241241            </xsl:variable>
    242242   
    243             <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
     243            <table class="header"><tbody><tr><td class="header">MATCH=<input class="match" type="text" name="rawtextinput" size="10" value="{@match}" onChange="onTextChange(this, this.value)"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table>
    244244
    245245                <table class="table" border="1">
     
    356356        <div class="block leaf gsf_text" title="gsf:text">
    357357                <xsl:variable name="rawtext"><xsl:value-of select="."/></xsl:variable>
    358                 <table class="header"><tbody><tr><td class="header"><input class="text" type="text" name="rawtextinput" size="10" value="{$rawtext}"></input></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
     358                <table class="header"><tbody><tr><td class="header"><input class="text" type="text" name="rawtextinput" size="10" value="{$rawtext}" onChange="onTextChange(this, this.value)"></input></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>
    359359        </div>
    360360    </xsl:template>
  • main/branches/64_bit_Greenstone/greenstone3/web/sites/localsite/collect/gs2mgppdemo/etc/collectionConfig.xml

    r22569 r23606  
    4040            <option name="stem"/>
    4141        </indexOption>
    42         <format name="searchType">plain,form</format>
     42        <searchType name="plain"/>
     43        <searchType name="simpleform"/>
     44        <searchType name="advancedform"/>
    4345        <format><gsf:template match="documentNode"><td valign="top"><gsf:link type="document"><gsf:icon type="document"/></gsf:link></td><td><gsf:switch><gsf:metadata name="Title" select="ancestors" separator=": "/><gsf:when test="exists"><gsf:metadata name="Title" select="ancestors" separator=": "/>:</gsf:when></gsf:switch><gsf:link type="document"><gsf:metadata name="Title"/></gsf:link></td></gsf:template></format>
    4446    </search>
Note: See TracChangeset for help on using the changeset viewer.