libSBML Python API
5.18.0
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.
In SBML, resolvers come into play with the SBML Level 3 Hierarchical Model Composition package (“comp”); this package includes features that allow a model to be composed from pieces that are external to a given SBML document, which implies the need to be able to identify and locate those external pieces. The identifiers used in “comp” are URIs (Uniform Resource Identifiers).
SBMLFileResolver is a class implementing the ability to resolve URIs to files. It works on the local file system only. It can resolve relative and absolute paths, and directories to be searched can be specified using the methodsSBMLFileResolver.addAdditionalDir() and SBMLFileResolver.clearAdditionalDirs().
Public Member Functions | |
def | __init__ (self, args) |
This method has multiple variants; they differ in the arguments they accept. More... | |
def | addAdditionalDir (self, dir) |
Adds a directory to the list of directories to search for files to resolve. More... | |
def | clearAdditionalDirs (self) |
Removes the list of directories to search for files to resolve. More... | |
def | clone (self) |
Creates and returns a deep copy of this SBMLFileResolver object. More... | |
def | resolve (self, args) |
Resolves the document for the given URI. More... | |
def | resolveUri (self, args) |
Resolves the full URI for a given URI without actually reading the document. More... | |
def libsbml.SBMLFileResolver.__init__ | ( | self, | |
args | |||
) |
This method has multiple variants; they differ in the arguments they accept.
__init__() SBMLFileResolver __init__(SBMLFileResolver c) SBMLFileResolver
Each variant is described separately below.
SBMLFileResolver(SBMLFileResolver c)
Copy constructor. Creates a copy of an SBMLFileResolver object.
c | the SBMLFileResolver object to copy. |
SBMLFileResolver()
Creates a new SBMLFileResolver object.
def libsbml.SBMLFileResolver.addAdditionalDir | ( | self, | |
dir | |||
) |
Adds a directory to the list of directories to search for files to resolve.
addAdditionalDir(string dir)
dir | the directory to add. |
def libsbml.SBMLFileResolver.clearAdditionalDirs | ( | self | ) |
Removes the list of directories to search for files to resolve.
clearAdditionalDirs()
After this method is called, SBMLFileResolver.resolve() will only search absolute or relative directories. New directories can be added using SBMLFileResolver.addAdditionalDir().
def libsbml.SBMLFileResolver.clone | ( | self | ) |
Creates and returns a deep copy of this SBMLFileResolver object.
clone() SBMLFileResolver
def libsbml.SBMLFileResolver.resolve | ( | self, | |
args | |||
) |
Resolves the document for the given URI.
resolve(string uri, string baseUri) SBMLDocument resolve(string uri) SBMLDocument
uri | the URI to the target document. |
baseUri | base URI, in case the URI is a relative one. |
None
. def libsbml.SBMLFileResolver.resolveUri | ( | self, | |
args | |||
) |
Resolves the full URI for a given URI without actually reading the document.
resolveUri(string uri, string baseUri) SBMLUri resolveUri(string uri) SBMLUri
uri | the URI to the target document. |
baseUri | base URI, in case the URI is a relative one. |
None
.