Class CompModels

java.lang.Object
org.cy3sbml.comp.CompModels

public final class CompModels extends Object
Resolves the model references of the comp package for one document: the model a Submodel instantiates, which is the main model, a ModelDefinition or the model of an ExternalModelDefinition.

External model definitions are loaded from their source, resolved relative to the location of the document that defines them (SBMLDocument.getLocationURI()), also chains of external model definitions. Every source is read once. A failure, e.g. a missing file or a cycle, is returned as ModelResolution.Failed, nothing is thrown.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    An external model definition with the resolution of its model.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompModels(org.sbml.jsbml.SBMLDocument document)
    Resolver for the model references of the document and the documents it loads.
    CompModels(org.sbml.jsbml.SBMLDocument document, Map<URI,org.sbml.jsbml.SBMLDocument> openDocuments)
    Resolver that uses the given open documents for their locations instead of reading the files again, e.g. the documents of a restored session.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.sbml.jsbml.SBMLDocument
    The document whose model references are resolved.
    Every external model definition of the document and of the documents it loads, each once, in document order, with the resolution of its model.
    boolean
    owns(org.sbml.jsbml.SBMLDocument other)
    True if the document is the document of this resolver or one it read.
    resolve(org.sbml.jsbml.ext.comp.Submodel submodel)
    The model the submodel instantiates.
    resolve(org.sbml.jsbml.SBMLDocument scope, String modelRef)
    The model with the id in the scope document: its main model, a model definition or the model of an external model definition.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CompModels

      public CompModels(org.sbml.jsbml.SBMLDocument document)
      Resolver for the model references of the document and the documents it loads.
    • CompModels

      public CompModels(org.sbml.jsbml.SBMLDocument document, Map<URI,org.sbml.jsbml.SBMLDocument> openDocuments)
      Resolver that uses the given open documents for their locations instead of reading the files again, e.g. the documents of a restored session.
  • Method Details

    • document

      public org.sbml.jsbml.SBMLDocument document()
      The document whose model references are resolved.
    • owns

      public boolean owns(org.sbml.jsbml.SBMLDocument other)
      True if the document is the document of this resolver or one it read.
    • resolve

      public ModelResolution resolve(org.sbml.jsbml.ext.comp.Submodel submodel)
      The model the submodel instantiates.
    • resolve

      public ModelResolution resolve(org.sbml.jsbml.SBMLDocument scope, String modelRef)
      The model with the id in the scope document: its main model, a model definition or the model of an external model definition.
    • externalModels

      public List<CompModels.External> externalModels()
      Every external model definition of the document and of the documents it loads, each once, in document order, with the resolution of its model.