java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.plugins.gui.layout_control.biomodels.RestApiBiomodels

public class RestApiBiomodels
extends Object
API for establishing a connection to the Biomodels database with the functionality of retrieving Simple Models and SBML Models.
Since:
2.8.3
Author:
niklas-groene
  • Field Details

    • path

      public String path
    • format

      public String format
    • status

      public int status
    • filename

      public String filename
  • Constructor Details

    • RestApiBiomodels

      public RestApiBiomodels()
  • Method Details

    • fetchData

      public String fetchData()
    • setPath

      public void setPath​(String path)
    • setFormat

      public void setFormat​(String format)
    • setFilename

      public void setFilename​(String filename)
    • helloBioModels

      public static String helloBioModels()
      Checks if the web services are working properly.
      Returns:
      "Hello BioModels", if the call is a success
    • getModelSBMLById

      public static String getModelSBMLById​(String id)
      Retrieves the SBML form of a model (in a string) given its identifier.
      Parameters:
      id - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
      Returns:
      SBML model in a string, or 'null' if the provided identifier is not valid or the model does not exist
    • searchForModels

      public static List<SimpleModel> searchForModels​(String searchParameter)
      Calls to the database, for a given HTTP request and creates a Simple Model of all models found in the Database.
      Parameters:
      searchParameter - part of the HTTP request for searching the right Models
      Returns:
      Returns a List of all Simple Models associated with the request.