Changeset 1266 for MDService2/trunk
- Timestamp:
- 04/29/11 21:07:37 (13 years ago)
- Location:
- MDService2/trunk/MDService2/WebContent
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/trunk/MDService2/WebContent/scripts/mdservice_searchclause.js
r1234 r1266 200 200 }); 201 201 202 this.initAutocomplete(); 202 try{ 203 this.initAutocomplete(); 204 } catch (e){ 205 } 206 203 207 204 208 /* … … 552 556 //notifyUser("scarr:" + scarr[0] + scarr[1],'debug'); 553 557 if (scarr == undefined) { 554 sc = new SearchClause('',' =','');558 sc = new SearchClause('','',''); 555 559 } else { 556 560 sc = new SearchClause(scarr[0],rel,scarr[1]); 557 561 } 558 562 559 searchclauseset.addsearchclause(sc,screl,i,j); 563 this.addsearchclause(sc,screl,i,j); 564 //searchclauseset.addsearchclause(sc,screl,i,j); 560 565 } 561 566 } -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui.js
r1260 r1266 161 161 $('.detail-content a').live('click', function(event) { 162 162 163 event.preventDefault(); 164 var uri = $(this).attr('href'); // + " body"; 165 if (uri.indexOf("?") > 0) { //($(this).attr("target") == "query"){ 166 var urlparams = getUrlVars(uri); 167 loadQueryFromUriParams(urlparams); 163 if ($(this).attr("target") == "_blank"){ 164 return true; 168 165 } else { 169 var type = $(this).parents('.detail-wrapper').attr("id"); 170 type = type.substring(7,type.length); 171 // $.get(uri, showDetail,'html'); */ 172 detailcaller.calldetail(undefined, type, uri); 166 event.preventDefault(); 167 var uri = $(this).attr('href'); // + " body"; 168 if ($(this).attr("class") == "query"){ 169 var urlparams = getUrlVars(uri); 170 loadQueryFromUriParams(urlparams); 171 } else { 172 var type; 173 if ($(this).attr("class") == "bookmark"){ 174 type = "record"; 175 } else { 176 type = $(this).parents('.detail-wrapper').attr("id"); 177 type = type.substring(7,type.length); 178 } 179 // $.get(uri, showDetail,'html'); */ 180 detailcaller.calldetail(undefined, type, uri); 181 } 173 182 } 174 183 }); … … 907 916 }; 908 917 909 918 function loadQuery(q){ 919 if (q["bookmark"] == "1") { 920 var uri = "/MDService2/record/htmldetail/" + q["querystring"]; 921 detailcaller.calldetail(undefined, "record", uri); 922 //var uri = "/MDService2/record/htmldetail/" + q["querystring"]; 923 //showDetail(null,'html'); 924 //$.get(uri, showDetail,'html'); 925 } else { 926 //hideWelcomeMessage(); 927 var query = new Query([],"","",""); 928 query.load(q); 929 query.repository = getSelectedRepository(); 930 queryset.addquery(query); 931 932 searchclauseset.sctext = query.query; 933 notifyUser(searchclauseset.sctext,'debug'); 934 searchclauseset.buildfromquerystring(); 935 936 //collections = query.collection; 937 collections_widget.load(query.collection); 938 columns_widget.load(query.columns.split(',')); 939 $('#input-simplequery').attr("value",query.squery); 940 $('#input-withsummary').attr("checked",(query.options != null)); 941 updateCollectionTree(); 942 } 943 944 } 945 946 function loadQueryFromUriParams(local_uri){ 947 var url; 948 949 if (local_uri == undefined){ 950 url = url_params; 951 } else { 952 url = local_uri; 953 } 954 var q = url["q"]; 955 var squery = url["squery"]; 956 var collection = url["collection"]; 957 var startItem = url["startItem"]; 958 var maximumItems = url["maximumItems"]; 959 var repository = url["repository"]; 960 var columns = url["columns"]; 961 if ((q != undefined) || (squery != undefined) || (collection != undefined)) { 962 if (q == undefined) { 963 q = ""; 964 } else { 965 q = Url.decode(q); 966 } 967 if (squery == undefined) { 968 squery = ""; 969 } 970 if (columns == undefined) { 971 columns = ""; 972 } 973 if (startItem == undefined) { 974 startItem = 1; 975 } 976 if (maximumItems == undefined) { 977 maximumItems = 10; 978 } 979 if (repository == undefined) { 980 repository = getSelectedRepository(); 981 } 982 if (collection == undefined){ 983 collection = ""; 984 } 985 var collections = []; 986 if (collection.length > 0 ){ 987 var coll = collection.split(","); 988 $.each(coll,function(i,item){ 989 var n; 990 n = $('#collections').find(".folder:[handle='"+item+"']").text(); 991 var simple_collection = new Collection(item, n); 992 collections[i] = simple_collection; 993 }); 994 } 995 996 var query = new Query(collections, columns, q, squery); 997 query.startItem = startItem; 998 query.maximumItems = maximumItems; 999 query.repository = repository; 1000 1001 1002 queryset.addquery(query); 1003 1004 searchclauseset.sctext = query.query; 1005 notifyUser(searchclauseset.sctext,'debug'); 1006 searchclauseset.buildfromquerystring(); 1007 1008 //collections = query.collection; 1009 collections_widget.load(query.collection); 1010 columns_widget.load(query.columns.split(',')); 1011 $('#input-simplequery').attr("value",query.squery); 1012 $('#input-withsummary').attr("checked",(query.options != null)); 1013 updateCollectionTree(); 1014 /* 1015 1016 searchclauseset.sctext = query.query; 1017 notifyUser(searchclauseset.sctext,'debug'); 1018 1019 searchclauseset.buildfromquerystring(); 1020 1021 $('#collection_list').attr("value",query.getcollectiontext("name")); 1022 1023 columns_widget.load(query.columns.split(',')); 1024 //$('#columns_list').attr("value",query.columns); 1025 $('#input-simplequery').attr("value",query.squery); 1026 1027 $('#query-input').show(); 1028 1029 //hideWelcomeMessage(); 1030 */ 1031 } 1032 1033 } 1034 1035 -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui_helpers.js
r1234 r1266 362 362 363 363 364 function loadQuery(q){365 if (q["bookmark"] == "1") {366 var uri = "/MDService2/record/htmldetail/" + q["querystring"];367 detailcaller.calldetail(undefined, "record", uri);368 //var uri = "/MDService2/record/htmldetail/" + q["querystring"];369 //showDetail(null,'html');370 //$.get(uri, showDetail,'html');371 } else {372 //hideWelcomeMessage();373 var query = new Query([],"","","");374 query.load(q);375 query.repository = getSelectedRepository();376 queryset.addquery(query);377 378 searchclauseset.sctext = query.query;379 notifyUser(searchclauseset.sctext,'debug');380 searchclauseset.buildfromquerystring();381 382 collections = query.collection;383 collections_widget.load(query.collection);384 columns_widget.load(query.columns.split(','));385 $('#input-simplequery').attr("value",query.squery);386 $('#input-withsummary').attr("checked",(query.options != null));387 updateCollectionTree();388 }389 390 }391 392 364 393 365 //TOOLTIP -
MDService2/trunk/MDService2/WebContent/scripts/mdservice_ui_load.js
r1260 r1266 432 432 } 433 433 434 function loadQueryFromUriParams(local_uri){ 435 var url; 436 437 if (local_uri == undefined){ 438 url = url_params; 439 } else { 440 url = local_uri; 441 } 442 var q = url["q"]; 443 var squery = url["squery"]; 444 var collection = url["collection"]; 445 var startItem = url["startItem"]; 446 var maximumItems = url["maximumItems"]; 447 var repository = url["repository"]; 448 var columns = url["columns"]; 449 if ((q != undefined) || (squery != undefined) || (collection != undefined)) { 450 if (q == undefined) { 451 q = ""; 452 } else { 453 q = Url.decode(q); 454 } 455 if (squery == undefined) { 456 squery = ""; 457 } 458 if (columns == undefined) { 459 columns = ""; 460 } 461 if (startItem == undefined) { 462 startItem = 1; 463 } 464 if (maximumItems == undefined) { 465 maximumItems = 10; 466 } 467 if (repository == undefined) { 468 repository = getSelectedRepository(); 469 } 470 if (collection == undefined){ 471 collection = ""; 472 } 473 var collections = []; 474 if (collection.length > 0 ){ 475 var coll = collection.split(","); 476 $.each(coll,function(i,item){ 477 var n; 478 n = $('#collections').find(".folder:[handle='"+item+"']").text(); 479 var simple_collection = new Collection(item, n); 480 collections[i] = simple_collection; 481 }); 482 } 483 484 var query = new Query(collections, columns, q, squery); 485 query.startItem = startItem; 486 query.maximumItems = maximumItems; 487 query.repository = repository; 488 489 490 queryset.addquery(query); 491 492 searchclauseset.sctext = query.query; 493 notifyUser(searchclauseset.sctext,'debug'); 494 495 searchclauseset.buildfromquerystring(); 496 497 $('#collection_list').attr("value",query.getcollectiontext("name")); 498 499 columns_widget.load(query.columns.split(',')); 500 //$('#columns_list').attr("value",query.columns); 501 $('#input-simplequery').attr("value",query.squery); 502 503 $('#query-input').show(); 504 505 //hideWelcomeMessage(); 506 } 507 508 } 434 509 435 510 436 -
MDService2/trunk/MDService2/WebContent/static/data.xml
r1129 r1266 4 4 <p>There are currently two to three repositories running, with largely overlapping but not fully identical datasets. (Not mirrors.) 5 5 <ul> 6 <li><a href="http://demo.spraakdata.gu.se/clarin/cmd/model/stats?operation=getCollections&maxdepth=3" >Spraakbanken, Gothenburg University</a> (main)</li>7 <li><a href="http://clarin.aac.ac.at/exist/rest/db/clarin/cmd-model.xql/?operation=getCollections&maxdepth=3" >ICLTT, Vienna</a></li>6 <li><a target="_blank" href="http://demo.spraakdata.gu.se/clarin/cmd/model/stats?operation=getCollections&maxdepth=3" >Spraakbanken, Gothenburg University</a> (main)</li> 7 <li><a target="_blank" href="http://clarin.aac.ac.at/exist/rest/db/clarin/cmd-model.xql/?operation=getCollections&maxdepth=3" >ICLTT, Vienna</a></li> 8 8 <li>MPI Psycholinguistics, Nijmegen</li> 9 9 </ul> … … 15 15 <li>in the repository at <strong>Spraakbanken, Gothenburg</strong>: 16 16 <ul> 17 <li>by <a href="/MDService2/collections/htmlpage?maxdepth=3&repository=2" >Collections</a></li>18 <li>by <a href="/MDService2/terms/htmlpage/?q=all&repository=2" >Profiles</a></li>17 <li>by <a class="collections" href="/MDService2/collections/htmlpage?maxdepth=3&repository=gu.se-main" >Collections</a></li> 18 <li>by <a class="profiles" href="/MDService2/terms/htmlpage/?q=all&repository=gu.se-main" >Profiles</a></li> 19 19 </ul> 20 20 </li> 21 21 <li>at <strong>ICLTT, Vienna</strong>: 22 22 <ul> 23 <li>by <a href="/MDService2/collections/htmlpage?maxdepth=3&repository=1" >Collections</a></li>24 <li>by <a href="/MDService2/terms/htmlpage/?q=all&repository=1" >Profiles</a></li>23 <li>by <a class="collections" href="/MDService2/collections/htmlpage?maxdepth=3&repository=clarin.at-mirror" >Collections</a></li> 24 <li>by <a class="profiles" href="/MDService2/terms/htmlpage/?q=all&repository=clarin.at-mirror" >Profiles</a></li> 25 25 </ul> 26 26 </li> -
MDService2/trunk/MDService2/WebContent/static/info.xml
r1085 r1266 16 16 <li><a target="_blank" href="/MDService2/static/CMDRSB_20110123.pdf" >Presentation about CMDRSB at CMDI-Workshop, Nijmegen 2011-01-17</a></li> 17 17 <li><a target="_blank" href="/MDService2/static/MDService2.wadl" >WADL-file</a> describing the REST-interface of MDService (<a href="/MDService2/static/MDService2.wadl.html" >HTML-version</a>) </li> 18 <li><a target="_blank"href="/MDService2/docs/htmlpage/data" >Data statistics</a> - some numbers about the current dataset in the repository</li>18 <li><a href="/MDService2/docs/htmlpage/data" >Data statistics</a> - some numbers about the current dataset in the repository</li> 19 19 </ul> 20 20 </p> … … 43 43 <div> 44 44 <p>Explanation of the usage/functionality of individual user-interface elements:</p> 45 <a href="/MDService2/static/MDBrowser_explained_5_resize2000.png" >45 <a target="_blank" href="/MDService2/static/MDBrowser_explained_5_resize2000.png" > 46 46 <img src="/MDService2/static/MDBrowser_explained_5_resize800.png" title="MDBrowser explained2" /></a> 47 47 </div> -
MDService2/trunk/MDService2/WebContent/static/queries.xml
r1260 r1266 6 6 <dd><p>just one word like:</p> 7 7 <ul> 8 <li><a target="query" href="/MDService2/?squery=system">system</a></li>8 <li><a class="query" href="/MDService2/?squery=system">system</a></li> 9 9 <li><a class="query" href="/MDService2/?squery=-year-olds">-year-olds</a> - a bug there (don't use '-'!)</li> 10 10 <li><a class="query" href="/MDService2/?squery=acquisition">acquisition</a></li> … … 27 27 <dd>a sequence of terms 28 28 <ul> 29 <li><a href="/MDService2/?squery=%22longitudinal%20study%22">"longitudinal study"</a></li>29 <li><a class="query" href="/MDService2/?squery=%22longitudinal%20study%22">"longitudinal study"</a></li> 30 30 </ul> 31 31 </dd> … … 33 33 <dd>search/remember individual records (by handle/identifier) 34 34 <ul> 35 <li><a href="/MDService2/record/htmlpage/clarin-at:aac-test-corpus:C4:158">clarin-at:aac-test-corpus:C4:158</a></li>36 <li><a href="/MDService2/record/htmlpage/clarin%252Eeu%3Alrt%3A1001">GENOMA</a></li>35 <li><a class="bookmark" href="/MDService2/record/htmlpage/clarin-at:aac-test-corpus:C4:158">clarin-at:aac-test-corpus:C4:158</a></li> 36 <li><a class="bookmark" href="/MDService2/record/htmlpage/clarin%252Eeu%3Alrt%3A1001">GENOMA</a></li> 37 37 </ul> 38 38 </dd> … … 40 40 <dd><code>index relation term</code> 41 41 <ul> 42 <li><a href="/MDService2/?q=author any Adler">author any Adler</a></li>43 <li><a href="/MDService2/?q=title contains system">title contains system</a></li>42 <li><a class="query" href="/MDService2/?q=author any Adler">author any Adler</a></li> 43 <li><a class="query" href="/MDService2/?q=title contains system">title contains system</a></li> 44 44 45 45 </ul> … … 47 47 <code>phrase in index </code> 48 48 <ul> 49 <li><a href='/MDService2/?q=Description contains "spoken language"'>Description contains "spoken language"</a></li>49 <li><a class="query" href='/MDService2/?q=Description contains "spoken language"'>Description contains "spoken language"</a></li> 50 50 </ul> 51 51 </dd> … … 53 53 <dd>combine search clauses with boolean operators: AND, OR, (AND NOT) 54 54 <ul> 55 <li><a href="/MDService2/?q=(title contains a) and ( tei%3Aimprint.date > 1910) and (tei%3Aimprint.date < 1920)">title contains a and imprint.date between 1910 and 1920</a></li>56 <li><a href="/MDService2/?q=( title any system ) and ( description contains ethnologue )" > ( title any system ) and ( description contains ethnologue )</a></li>57 <li><a href="/MDService2/?q=%20%28%20%20%28%20title%20any%20language%20%29%20%20%29%20%20and%20%20%28%20%20%28%20identifier%20contains%20rosettaproject%20%29%20%20or%20%20%28%20publisher%20contains%20%22SIL%20International%22%20%29%20%20%29%20" >title any language and (identifier contains rosettaproject or publisher contains "SIL International")</a></li>55 <li><a class="query" href="/MDService2/?q=(title contains a) and ( tei%3Aimprint.date > 1910) and (tei%3Aimprint.date < 1920)">title contains a and imprint.date between 1910 and 1920</a></li> 56 <li><a class="query" href="/MDService2/?q=( title any system ) and ( description contains ethnologue )" > ( title any system ) and ( description contains ethnologue )</a></li> 57 <li><a class="query" href="/MDService2/?q=%20%28%20%20%28%20title%20any%20language%20%29%20%20%29%20%20and%20%20%28%20%20%28%20identifier%20contains%20rosettaproject%20%29%20%20or%20%20%28%20publisher%20contains%20%22SIL%20International%22%20%29%20%20%29%20" >title any language and (identifier contains rosettaproject or publisher contains "SIL International")</a></li> 58 58 59 59 </ul> … … 62 62 <dd> 63 63 <ul> 64 <li><a href="/MDService2/?q=( title any system )&squery=university">university and (title any system)</a></li>64 <li><a class="query" href="/MDService2/?q=( title any system )&squery=university">university and (title any system)</a></li> 65 65 </ul> 66 66 </dd> … … 69 69 <dd> Either all resources of a given collection, or restrict the search to selected collection(s) (not working at the moment) 70 70 <ul> 71 <li><a href="/MDService2/?q=&squery=&collection=clarin-at:aac-test-corpus">aac-test-corpus</a></li>71 <li><a class="query" href="/MDService2/?q=&squery=&collection=clarin-at:aac-test-corpus">aac-test-corpus</a></li> 72 72 </ul> 73 73 </dd> … … 75 75 <dd>show all records of given profile, or 76 76 <ul> 77 <li><a href="/MDService2/?q= ( LrtInventoryResource contains * )">LrtInventoryResource</a></li>78 <li><a href="/MDService2/?q= ( LrtInventoryResource contains system )">LrtInventoryResource contains system</a></li>77 <li><a class="query" href="/MDService2/?q= ( LrtInventoryResource contains * )">LrtInventoryResource</a></li> 78 <li><a class="query" href="/MDService2/?q= ( LrtInventoryResource contains system )">LrtInventoryResource contains system</a></li> 79 79 </ul> 80 80 </dd> … … 82 82 <dd>search over elements linked to the same Data cagetory, irrespectively of the containing profile 83 83 <ul> 84 <li><a href="MDService2/?q=%20%28%20%20%28%20relcat%3Adescription%20contains%20*%20%29%20%20%29%20">relcat:description</a></li>85 <li><a href="/MDService2/?q=%20%28%20%20%28%20isocat%3Acreation_date%20contains%20191%20%29%20%20%29%20">isocat:creationDate contains 191</a></li>84 <li><a class="query" href="MDService2/?q=%20%28%20%20%28%20relcat%3Adescription%20contains%20*%20%29%20%20%29%20">relcat:description</a></li> 85 <li><a class="query" href="/MDService2/?q=%20%28%20%20%28%20isocat%3Acreation_date%20contains%20191%20%29%20%20%29%20">isocat:creationDate contains 191</a></li> 86 86 </ul> 87 87 </dd>
Note: See TracChangeset
for help on using the changeset viewer.