Package uk.ac.ebi.biomodels.ws

Examples of uk.ac.ebi.biomodels.ws.BioModelsWSClient


    if (ids == null){ return new LinkedList<String>(); }
    return Arrays.asList(ids);
  }
 
  public String getBioModelNameById(String id){
    BioModelsWSClient client = createBioModelsWSClient();
    String name = "";
    try {
      name = client.getModelNameById(id);
    } catch (BioModelsWSException e) {
      e.printStackTrace();
    }
    return name;
  }
View Full Code Here


    }
    return name;
  }
 
  public String getDateLastModifiedByModelId(String id){   
    BioModelsWSClient client = createBioModelsWSClient();
    String date = "";
    try {
      // Date expressed according to ISO 8601
      date = client.getLastModifiedDateByModelId(id);
    } catch (BioModelsWSException e) {
      e.printStackTrace();
    }
    return date;
  }
View Full Code Here

    }
    return date;
  }
 
  public List<String> getAuthorsByModelId(String id){   
    BioModelsWSClient client = createBioModelsWSClient();
    String[] authors = null;
    try {
      authors = client.getAuthorsByModelId(id);
    } catch (BioModelsWSException e) {
      e.printStackTrace();
    }
    if (authors == null){ return new LinkedList<String>(); }
    return Arrays.asList(authors);
View Full Code Here

    if (authors == null){ return new LinkedList<String>(); }
    return Arrays.asList(authors);
  }
 
  public List<String> getEncodersByModelId(String id){
      BioModelsWSClient client = createBioModelsWSClient();
      String[] encoders = null;
      try {
      encoders = client.getEncodersByModelId(id);
    } catch (BioModelsWSException e) {
      e.printStackTrace();
    }
      if (encoders == null){ return new LinkedList<String>(); }
    return Arrays.asList(encoders);
View Full Code Here

      if (encoders == null){ return new LinkedList<String>(); }
    return Arrays.asList(encoders);
  }
 
  public String getBioModelSBMLById(String id){
      BioModelsWSClient client = createBioModelsWSClient();
      String sbml = "";
      try {
      sbml = client.getModelSBMLById(id);
      if (sbml == null){
        sbml = "";
      }
    } catch (BioModelsWSException e) {
      e.printStackTrace();
View Full Code Here

    }
      return sbml;
  }
 
  public SimpleModel getSimpleModelById(String id){
    BioModelsWSClient client = createBioModelsWSClient();
    SimpleModel model = null;
    try {
      model = client.getSimpleModelById(id);
    } catch (BioModelsWSException e) {
      e.printStackTrace();
    }
    return model;
  }
View Full Code Here

    }
    return model;
  }
 
  public LinkedHashMap<String, SimpleModel> getSimpleModelsByIds(String[] ids){
    BioModelsWSClient client = createBioModelsWSClient();
    LinkedHashMap<String, SimpleModel> simpleModels = null;
    try {
      List<SimpleModel> simpleModelsList = client.getSimpleModelsByIds(ids);
      simpleModels = new LinkedHashMap<String, SimpleModel>();
      for(int k=0; k<simpleModelsList.size(); ++k){
        simpleModels.put(ids[k], simpleModelsList.get(k));
      }
    } catch (BioModelsWSException e) {
View Full Code Here

      boolean connected = gbm.testBioModel();
      return connected;
  }
 
  private boolean testBioModel(){
     BioModelsWSClient client = createBioModelsWSClient();
    String test = null;
    try {
      test = client.getModelNameById("BIOMD0000000070");
    } catch (BioModelsWSException e) {
      //e.printStackTrace();
      CySBML.LOGGER.warning("BioModelsWSException accessing BioModels");
      return false;
    }
View Full Code Here

 
 
 
  @SuppressWarnings("unused")
  private static void test() throws BioModelsWSException{
    BioModelsWSClient client = new BioModelsWSClient();
    /* Proxy necessary for Charite */
    String proxyHost = "proxy.charite.de";
    String proxyPort = "8080";
     client.setProperty("http.proxyHost", proxyHost);
     client.setProperty("http.proxyPort", proxyPort);
     client.setProperty("socks.proxyHost", proxyHost);
     client.setProperty("socks.proxyPort", proxyPort);
   
     String searchString = "glycolysis";
    String[] modelIds = client.getModelsIdByName(searchString);
    System.out.println(getTextReportForIds(modelIds));
   
    // get simple model for first returned id
    if (modelIds.length > 0){
     
      String id = modelIds[0];
      SimpleModel simpleModel = client.getSimpleModelById(id);
     
      String textReport = getTextReportForSimpleModel(simpleModel);
      System.out.println(textReport);
    }
   
    // get SimpleModels for all the search results
    List<SimpleModel> simpleModels = client.getSimpleModelsByIds(modelIds)
   
    // Test special case
    String id = "MODEL8293171637";
    SimpleModel simpleModel = client.getSimpleModelById(id);
    System.out.println(id);
    System.out.println(simpleModel.getId());
  }
View Full Code Here

TOP

Related Classes of uk.ac.ebi.biomodels.ws.BioModelsWSClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.