<%-- $HeadURL$ --%>
<%--
 This file is part of deegree, http://deegree.org/
 Copyright (C) 2001-2009 by:
 - Department of Geography, University of Bonn -
 and
 - lat/lon GmbH -

 This library is free software; you can redistribute it and/or modify it under
 the terms of the GNU Lesser General Public License as published by the Free
 Software Foundation; either version 2.1 of the License, or (at your option)
 any later version.
 This library is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 details.
 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation, Inc.,
 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

 Contact information:

 lat/lon GmbH
 Aennchenstr. 19, 53177 Bonn
 Germany
 http://lat-lon.de/

 Department of Geography, University of Bonn
 Prof. Dr. Klaus Greve
 Postfach 1147, 53001 Bonn
 Germany
 http://www.geographie.uni-bonn.de/deegree/

 e-mail: info@deegree.org
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="org.deegree.enterprise.control.*" %>
<%@ page import="org.deegree.portal.standard.csw.control.DetailedSearchListener" %>
<%
    RPCParameter[] params = ( RPCParameter[] )session.getAttribute( DetailedSearchListener.SESSION_DETAILEDSEARCHPARAM );
    String tc = "";
    RPCStruct struct = null;
    if ( params != null ) {
        for ( int i = 0; i < params.length; i++ ) {
            Object o = params[i].getValue();
            if ( o instanceof RPCStruct ) {
                struct = ( RPCStruct )o;
                if ( struct.getMember( "RPC_TOPICCATEGORY" ) != null )  {
                    tc = ( String )struct.getMember( "RPC_TOPICCATEGORY" ).getValue();
                    break;
                }
            }
        }
    }
%>
<tr>
    <td colspan="2">
        <span class="title" style="line-height:16pt">Thematic Search Parameter</span>
    </td>
</tr>
<tr>
    <td valign="top">
        <p>Search Object Name / Description</p>
    </td>
    <td >
        <input type="text" size="55" name="terms" value="<%
            if( struct != null && struct.getMember("RPC_SIMPLESEARCH") != null)  {
                out.print( struct.getMember("RPC_SIMPLESEARCH").getValue() );
            }
        %>" title="Insert at least three characters"/><br />
        <!-- csw 2.0.0 -->
        <!-- <input type="radio" name="resourceType" value="dataset" checked="checked" />data set
        <input type="radio" name="resourceType" value="series" />data series<br /><br /> -->
        <input type="checkbox" name="datasetChk" checked="checked">dataset
        <input type="checkbox" name="seriesChk" checked="checked">data series
        <input type="checkbox" name="applicationChk" checked="checked">application
        <p style="line-height:2pt;">&nbsp;</p>
    </td>
</tr>
<tr>
    <td>
        <p>Topic Category</p>
    </td>
    <td valign="top">
        <select name="TOPICCATEGORY">
            <option value="... select"
                <% if ( tc.equals( "" ) ) { out.print( " selected " ); } %>
                >... select</option>
             <option value="farming"
                <% if ( tc.equals( "farming" ) ) { out.print( " selected " ); } %>
                >farming</option>
             <option value="biota"
                <% if ( tc.equals( "biota" ) ) { out.print( " selected " ); } %>
                >biota</option>
             <option value="boundaries"
                <% if ( tc.equals( "boundaries" ) ) { out.print( " selected " ); } %>
                >boundaries</option>
             <option value="climatologyMeteorologyAtmosphere"
                <% if ( tc.equals( "climatologyMeteorologyAtmosphere" ) ) { out.print( " selected " ); } %>
                >climatology meteorology atmosphere</option>
             <option value="economy"
                <% if ( tc.equals( "economy" ) ) { out.print( " selected " ); } %>
                 >economy</option>
             <option value="elevation"
                <% if ( tc.equals( "elevation" ) ) { out.print( " selected " ); } %>
                >elevation</option>
             <option value="environment"
                <% if ( tc.equals( "environment" ) ) { out.print( " selected " ); } %>
                >environment</option>
             <option value="geoscientificInformation"
                <% if ( tc.equals( "geoscientificInformation" ) ) { out.print( " selected " ); } %>
                >geoscientific information</option>
             <option value="health"
                <% if ( tc.equals( "health" ) ) { out.print( " selected " ); } %>
                >health</option>
             <option value="imageryBaseMapsEarthCover"
                <% if ( tc.equals( "imageryBaseMapEarthCover" ) ) { out.print( " selected " ); } %>
                >imagery base map earth cover</option>
             <option value="intelligenceMilitary"
                <% if ( tc.equals( "intelligenceMilitary" ) ) { out.print( " selected " ); } %>
                >intelligence military</option>
             <option value="inlandWaters"
                <% if ( tc.equals( "inlandWaters" ) ) { out.print( " selected " ); } %>
                >inland waters</option>
             <option value="location"
                <% if ( tc.equals( "location" ) ) { out.print( " selected " ); } %>
                >location</option>
             <option value="oceans"
                <% if ( tc.equals( "oceans" ) ) { out.print( " selected " ); } %>
                >oceans</option>
             <option value="planningCadastre"
                <% if ( tc.equals( "planningCadastre" ) ) { out.print( " selected " ); } %>
                >planning cadastre</option>
             <option value="society"
                <% if ( tc.equals( "society" ) ) { out.print( " selected " ); } %>
                >scociety</option>
             <option value="structure"
                <% if ( tc.equals( "structure" ) ) { out.print( " selected " ); } %>
                >structure</option>
             <option value="transportation"
                <% if ( tc.equals( "transportation" ) ) { out.print( " selected " ); } %>
                >transportation</option>
             <option value="utilitiesCommunication"
                <% if ( tc.equals( "utilitiesCommunication" ) ) { out.print( " selected " ); } %>
                >utilities communication</option>
        </select>
    </td>
</tr>