Ignore:
Timestamp:
04/04/12 08:38:32 (12 years ago)
Author:
gaba
Message:

cache changes

File:
1 edited

Legend:

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

    r1654 r1852  
    150150                }
    151151                if (key_array.length > 2){
    152                         e.setAttribute("collection", key_array[2]);
     152                        e.setAttribute("operation", key_array[2]);
     153                }else{
     154                        e.setAttribute("operation", "");
     155                }
     156                if (key_array.length > 3){
     157                        e.setAttribute("collection", key_array[3]);
    153158                }else{
    154159                        e.setAttribute("collection", "");
    155160                }
    156                 if (key_array.length > 3){
    157                         e.setAttribute("startItem", key_array[3]);
     161                if (key_array.length > 4){
     162                        e.setAttribute("startItem", key_array[4]);
    158163                }else{
    159164                        e.setAttribute("startItem", "");
    160165                }
    161                 if (key_array.length > 4){
    162                         e.setAttribute("maximumItems", key_array[4]);
     166                if (key_array.length > 5){
     167                        e.setAttribute("maximumItems", key_array[5]);
    163168                }else{
    164169                        e.setAttribute("maximumItems", "");
    165170                }
    166171               
    167                 if (key_array.length > 5){
    168                         e.setAttribute("repository", key_array[5]);
     172                if (key_array.length > 6){
     173                        e.setAttribute("repository", key_array[6]);
    169174                }else{
    170175                        e.setAttribute("repository", "");
    171176                }
    172                 if (key_array.length > 6){
    173                         e.setAttribute("maxDepth", key_array[6]);
     177                if (key_array.length > 7){
     178                        e.setAttribute("maxDepth", key_array[7]);
    174179                }else{
    175180                        e.setAttribute("maxDepth", "");
    176181                }
    177                 if (key_array.length > 7){
    178                         e.setAttribute("lang", key_array[7]);
     182                if (key_array.length > 8){
     183                        e.setAttribute("lang", key_array[8]);
    179184                }else{
    180185                        e.setAttribute("lang", "");
    181186                }
    182                 if (key_array.length > 8){
    183                         e.setAttribute("duration", key_array[8]);
     187                if (key_array.length > 9){
     188                        e.setAttribute("duration", key_array[9]);
    184189                }else{
    185190                        e.setAttribute("duration", "");
     
    270275               
    271276                if (key_array.length > 2){
    272                         xpath_expr = xpath_expr + "and @collection='"+key_array[2]+"'";
     277                        xpath_expr = xpath_expr + "and @operation='"+key_array[2]+"'";
     278                }else{
     279                        xpath_expr = xpath_expr + " and @operation=''";
     280                }
     281               
     282                if (key_array.length > 3){
     283                        xpath_expr = xpath_expr + "and @collection='"+key_array[3]+"'";
    273284                }else{
    274285                        xpath_expr = xpath_expr + " and @collection=''";
    275286                }
    276                 if (key_array.length > 3){
    277                         xpath_expr = xpath_expr + "and @startItem='"+key_array[3]+"'";
     287                if (key_array.length > 4){
     288                        xpath_expr = xpath_expr + "and @startItem='"+key_array[4]+"'";
    278289                }else{
    279290                        xpath_expr = xpath_expr + " and @startItem=''";
    280291                }
    281                 if (key_array.length > 4){
    282                         xpath_expr = xpath_expr + "and @maximumItems='"+key_array[4]+"'";
     292                if (key_array.length > 5){
     293                        xpath_expr = xpath_expr + "and @maximumItems='"+key_array[5]+"'";
    283294                }else{
    284295                        xpath_expr = xpath_expr + " and @maximumItems=''";
    285296                }
    286297               
    287                 if (key_array.length > 5){
    288                         xpath_expr = xpath_expr + "and @repository='"+key_array[5]+"'";
     298                if (key_array.length > 6){
     299                        xpath_expr = xpath_expr + "and @repository='"+key_array[6]+"'";
    289300                }else{
    290301                        xpath_expr = xpath_expr + " and @repository=''";
    291302                }
    292                 if (key_array.length > 6){
    293                         xpath_expr = xpath_expr + "and @maxDepth='"+key_array[6]+"'";
     303                if (key_array.length > 7){
     304                        xpath_expr = xpath_expr + "and @maxDepth='"+key_array[7]+"'";
    294305                }else{
    295306                        xpath_expr = xpath_expr + " and @maxDepth=''";
    296307                }
    297                 if (key_array.length > 7){
    298                         xpath_expr = xpath_expr + "and @lang='"+key_array[7]+"']";
     308                if (key_array.length > 8){
     309                        xpath_expr = xpath_expr + "and @lang='"+key_array[8]+"']";
    299310                }else{
    300311                        xpath_expr = xpath_expr + " and @lang='']";
Note: See TracChangeset for help on using the changeset viewer.