Ignore:
Timestamp:
10/21/11 10:29:20 (13 years ago)
Author:
gaba
Message:

squery removing changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/internal/Cache.java

    r1584 r1588  
    117117     *   query=""
    118118     *   repository="localhost-mirror"
    119      *   squery=""
    120119     *   startItem=""
    121120     *   type="collections"/>
     
    156155                }
    157156                if (key_array.length > 3){
    158                         e.setAttribute("squery", key_array[3]);
    159                 }else{
    160                         e.setAttribute("squery", "");
     157                        e.setAttribute("startItem", key_array[3]);
     158                }else{
     159                        e.setAttribute("startItem", "");
    161160                }
    162161                if (key_array.length > 4){
    163                         e.setAttribute("startItem", key_array[4]);
    164                 }else{
    165                         e.setAttribute("startItem", "");
    166                 }
     162                        e.setAttribute("maximumItems", key_array[4]);
     163                }else{
     164                        e.setAttribute("maximumItems", "");
     165                }
     166               
    167167                if (key_array.length > 5){
    168                         e.setAttribute("maximumItems", key_array[5]);
    169                 }else{
    170                         e.setAttribute("maximumItems", "");
    171                 }
    172                
     168                        e.setAttribute("repository", key_array[5]);
     169                }else{
     170                        e.setAttribute("repository", "");
     171                }
    173172                if (key_array.length > 6){
    174                         e.setAttribute("repository", key_array[6]);
    175                 }else{
    176                         e.setAttribute("repository", "");
     173                        e.setAttribute("maxDepth", key_array[6]);
     174                }else{
     175                        e.setAttribute("maxDepth", "");
    177176                }
    178177                if (key_array.length > 7){
    179                         e.setAttribute("maxDepth", key_array[7]);
    180                 }else{
    181                         e.setAttribute("maxDepth", "");
     178                        e.setAttribute("lang", key_array[7]);
     179                }else{
     180                        e.setAttribute("lang", "");
    182181                }
    183182                if (key_array.length > 8){
    184                         e.setAttribute("lang", key_array[8]);
    185                 }else{
    186                         e.setAttribute("lang", "");
    187                 }
    188                 if (key_array.length > 9){
    189                         e.setAttribute("duration", key_array[9]);
     183                        e.setAttribute("duration", key_array[8]);
    190184                }else{
    191185                        e.setAttribute("duration", "");
     
    281275                }
    282276                if (key_array.length > 3){
    283                         xpath_expr = xpath_expr + "and @squery='"+key_array[3]+"'";
    284                 }else{
    285                         xpath_expr = xpath_expr + " and @squery=''";
     277                        xpath_expr = xpath_expr + "and @startItem='"+key_array[3]+"'";
     278                }else{
     279                        xpath_expr = xpath_expr + " and @startItem=''";
    286280                }
    287281                if (key_array.length > 4){
    288                         xpath_expr = xpath_expr + "and @startItem='"+key_array[4]+"'";
    289                 }else{
    290                         xpath_expr = xpath_expr + " and @startItem=''";
    291                 }
     282                        xpath_expr = xpath_expr + "and @maximumItems='"+key_array[4]+"'";
     283                }else{
     284                        xpath_expr = xpath_expr + " and @maximumItems=''";
     285                }
     286               
    292287                if (key_array.length > 5){
    293                         xpath_expr = xpath_expr + "and @maximumItems='"+key_array[5]+"'";
    294                 }else{
    295                         xpath_expr = xpath_expr + " and @maximumItems=''";
    296                 }
    297                
     288                        xpath_expr = xpath_expr + "and @repository='"+key_array[5]+"'";
     289                }else{
     290                        xpath_expr = xpath_expr + " and @repository=''";
     291                }
    298292                if (key_array.length > 6){
    299                         xpath_expr = xpath_expr + "and @repository='"+key_array[6]+"'";
    300                 }else{
    301                         xpath_expr = xpath_expr + " and @repository=''";
     293                        xpath_expr = xpath_expr + "and @maxDepth='"+key_array[6]+"'";
     294                }else{
     295                        xpath_expr = xpath_expr + " and @maxDepth=''";
    302296                }
    303297                if (key_array.length > 7){
    304                         xpath_expr = xpath_expr + "and @maxDepth='"+key_array[7]+"'";
    305                 }else{
    306                         xpath_expr = xpath_expr + " and @maxDepth=''";
    307                 }
    308                 if (key_array.length > 8){
    309                         xpath_expr = xpath_expr + "and @lang='"+key_array[8]+"']";
     298                        xpath_expr = xpath_expr + "and @lang='"+key_array[7]+"']";
    310299                }else{
    311300                        xpath_expr = xpath_expr + " and @lang='']";
Note: See TracChangeset for help on using the changeset viewer.