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.
This class implements functionality for parsing URIs and extracting information about them.
Public Member Functions | |
def | __init__ (self, args) |
This method has multiple variants; they differ in the arguments they accept. More... | |
def | clone (self) |
Creates and returns a deep copy of this SBMLUri object. More... | |
def | getHost (self) |
Returns the host portion of the stored URI. More... | |
def | getPath (self) |
Returns the path and filename portion of the stored URI. More... | |
def | getQuery (self) |
Returns the query portion of the stored URI. More... | |
def | getScheme (self) |
Returns the scheme of the stored URI. More... | |
def | getUri (self) |
Returns the full stored URI, after replacing backslashes with slashes. More... | |
def | relativeTo (self, uri) |
Constructs a new URI relative to this object and the given URI. More... | |
def libsbml.SBMLUri.__init__ | ( | self, | |
args | |||
) |
This method has multiple variants; they differ in the arguments they accept.
__init__(string uri) SBMLUri __init__(SBMLUri orig) SBMLUri
Each variant is described separately below.
SBMLUri(string uri)
Creates a new SBMLUri from the given string URI.
SBMLUri(SBMLUri orig)
Copy constructor. Creates a copy of an SBMLUri object.
orig | the SBMLUri object to copy. |
def libsbml.SBMLUri.clone | ( | self | ) |
Creates and returns a deep copy of this SBMLUri object.
clone() SBMLUri
def libsbml.SBMLUri.getHost | ( | self | ) |
Returns the host portion of the stored URI.
getHost() string
For a scheme such as 'http'
, this method returns the part of the URI after 'http://'
and before the next '/'
character. URIs with file or URN schemes have no host; in that case, this method returns an empty string.
def libsbml.SBMLUri.getPath | ( | self | ) |
Returns the path and filename portion of the stored URI.
getPath() string
This method returns the text after the scheme, colon, and host (if present), and before the next '
?' character. The result may be an empty string for some URIs.
def libsbml.SBMLUri.getQuery | ( | self | ) |
Returns the query portion of the stored URI.
getQuery() string
The equery portion of a URI is the text after a filename, starting with the character '
?'. For many URIs, this is an empty string.
def libsbml.SBMLUri.getScheme | ( | self | ) |
Returns the scheme of the stored URI.
getScheme() string
The scheme of the URI is the text before the first colon character. Typical examples of what this might return are the strings 'file'
or 'http'
. If the current URI does not have a scheme, this method returns an empty string.
'http'
, or an empty string if no scheme exists for the current URI. def libsbml.SBMLUri.getUri | ( | self | ) |
Returns the full stored URI, after replacing backslashes with slashes.
getUri() string
def libsbml.SBMLUri.relativeTo | ( | self, | |
uri | |||
) |
Constructs a new URI relative to this object and the given URI.
relativeTo(string uri) SBMLUri
For example,
would construct a new file URI, with path c:/test/test.xml
.
uri | a URI to be added to this object. |