Class SBaseHTMLFactory

java.lang.Object
org.cy3sbml.gui.SBaseHTMLFactory

public class SBaseHTMLFactory extends Object
Creates HTML information for given SBase. Core information is parsed from the NamedSBase object, with additional information like resources retrieved via web services (MIRIAM).

Here the HTML information string is created which is displayed on selection of SBML objects in the graph.

  • Field Details

  • Constructor Details

    • SBaseHTMLFactory

      public SBaseHTMLFactory(String baseDir, MiriamRegistry miriamRegistry, OlsClient olsClient, UniprotAccess uniprotAccess, ChebiAccess chebiAccess)
      Creates the factory.
      Parameters:
      baseDir - base URL of the gui resources, which resolves the relative resources within the WebView
      miriamRegistry - data collections for resolving annotation URIs
      olsClient - resolves ontology terms for display
      uniprotAccess - resolves UniProt accessions for display
      chebiAccess - resolves ChEBI ids for display
    • SBaseHTMLFactory

      public SBaseHTMLFactory(String baseDir, MiriamRegistry miriamRegistry, OlsClient olsClient, UniprotAccess uniprotAccess, ChebiAccess chebiAccess, CompTargets compTargets)
      Creates the factory, which shows the targets of the comp references.
      Parameters:
      compTargets - the comp references of the open documents, may be null
    • SBaseHTMLFactory

      public SBaseHTMLFactory(String baseDir, MiriamRegistry miriamRegistry, OlsClient olsClient, UniprotAccess uniprotAccess, ChebiAccess chebiAccess, CompTargets compTargets, Function<org.sbml.jsbml.SBMLDocument,Optional<ArchiveImport>> archives)
      Creates the factory, which shows the targets of the comp references and the COMBINE archive a document was imported from.
      Parameters:
      compTargets - the comp references of the open documents, may be null
      archives - the archive of a document, may be null
  • Method Details

    • baseDirFromAppDir

      public static String baseDirFromAppDir(File appDir)
      Returns the base URL of the gui resources in the given application directory.
    • createHTMLText

      public String createHTMLText(String text, String title)
      Creates HTML for given text String.
    • createHTMLText

      public String createHTMLText(String text)
      Creates HTML text.
    • createInfo

      public String createInfo(org.sbml.jsbml.SBase sbase) throws IOException
      Creates the HTML information for the given SBase.
      Throws:
      IOException
    • createSecondaryInformation

      public String createSecondaryInformation(Namespace dataType, String identifier)
      Resolves secondary resourses and returns the HTML.
      Returns:
      html string
    • booleanHTML

      public static String booleanHTML(boolean b)
      Creates true or false HTML depending on boolean.
    • getPrefixValue

      public static String getPrefixValue(String keyToFind)