Changeset 921 for branches/gdl-frontend


Ignore:
Timestamp:
09/19/11 09:28:50 (14 years ago)
Author:
lgiessmann
Message:

gdl-frontend: Widgets: changed the actual request for getting all psis of environment instances; changed the isidorus-url-constants

Location:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/GdlWebPage.java

    r920 r921  
    9090        private void requestPsis() throws ExecutionException {
    9191                String url = null;
    92                 if(IsidorusConstants.HASH_OBJECT_PSI.equals(GdlWebPage.this.topicTypePsi)) url = URL.encode(IsidorusConstants.GET_HASH_OBJECT_PSIS_URL);
    93                 else if(IsidorusConstants.ENVIRONMENT_PSI.equals(GdlWebPage.this.topicTypePsi)) url = URL.encode(IsidorusConstants.GET_ENVIRONMENT_PSIS_URL);
    94                 else throw new ExecutionException("the topic type PSI " + GdlWebPage.this.topicTypePsi + " is not supported!");
    95                 RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
    96                
    97                 try{
    98                         builder.sendRequest(null, new PsiRequest());
     92                String postData = null;
     93                if(IsidorusConstants.HASH_OBJECT_PSI.equals(GdlWebPage.this.topicTypePsi)){
     94                        url = URL.encode(IsidorusConstants.GET_HASH_OBJECT_PSIS_URL);
     95                        postData = "PREFIX pref:<http://textgrid.org/serviceregistry/model/types>\n" +
     96                                           "SELECT ?topics WHERE {\n" +
     97                                           "?topics a pref:Hash-Object.\n" +
     98                                           "}";
     99                }
     100                else if(IsidorusConstants.ENVIRONMENT_PSI.equals(GdlWebPage.this.topicTypePsi)){
     101                        url = URL.encode(IsidorusConstants.GET_ENVIRONMENT_PSIS_URL);
     102                        postData = "PREFIX pref:<http://textgrid.org/serviceregistry/model/types>\n" +
     103                           "SELECT ?topics WHERE {\n" +
     104                           "?topics a pref:Environment.\n" +
     105                           "}";
     106                }
     107                else{
     108                        throw new ExecutionException("the topic type PSI " + GdlWebPage.this.topicTypePsi + " is not supported!");
     109                }
     110               
     111                RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
     112                try{
     113                        builder.sendRequest(postData, new PsiRequest());
    99114                }catch(RequestException e){
    100115                        e.printStackTrace();
  • TabularUnified branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/IsidorusConstants.java

    r914 r921  
    22
    33
    4 
    5 import com.google.gwt.core.client.GWT;
    64import com.google.gwt.user.client.Window;
    75
     
    1614        public final static String COMMIT_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/commit";
    1715        public final static String GET_FRAGMENT_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/fragment/";
    18         //public final static String GET_SCHEMA_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/schema";
    19         public final static String GET_SCHEMA_REQUEST_URL = GWT.getModuleBaseURL() + "TextGrid_ServiceRegistry_required_TMCL_and_GDL_Schema_with_test_data.jtm";
    20         public final static String GET_HASH_OBJECT_PSIS_URL = GWT.getModuleBaseURL() + "HashObjectPsis.json";
    21         public final static String GET_ENVIRONMENT_PSIS_URL = GWT.getModuleBaseURL() + "EnvironmentPsis.json";
    22         public final static String TEXTGRID_LOGO_URL = GWT.getModuleBaseURL() + "textgrid_small.png";
     16        public final static String GET_SCHEMA_REQUEST_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/schema";
     17        //public final static String GET_SCHEMA_REQUEST_URL = GWT.getModuleBaseURL() + "TextGrid_ServiceRegistry_required_TMCL_and_GDL_Schema_with_test_data.jtm";
     18        public final static String GET_HASH_OBJECT_PSIS_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/tm-sparql";
     19        //public final static String GET_HASH_OBJECT_PSIS_URL = GWT.getModuleBaseURL() + "HashObjectPsis.json";
     20        public final static String GET_ENVIRONMENT_PSIS_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "/gdl/tm-sparql";
     21        //public final static String GET_ENVIRONMENT_PSIS_URL = GWT.getModuleBaseURL() + "EnvironmentPsis.json";
     22        public final static String TEXTGRID_LOGO_URL = Window.Location.getProtocol() + "//" + Window.Location.getHost() + "textgrid_small.png";
     23        //public final static String TEXTGRID_LOGO_URL = GWT.getModuleBaseURL() + "textgrid_small.png";
    2324}
Note: See TracChangeset for help on using the changeset viewer.