public class SBMLFileResolver extends SBMLResolver
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 (&ldquocomp&rdquo) 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
&ldquocomp&rdquo 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 methods
SBMLFileResolver.addAdditionalDir(String dir)
and
SBMLFileResolver.clearAdditionalDirs()
.
SBMLResolver
,
SBMLUri
Constructor and Description |
---|
SBMLFileResolver()
Creates a new
SBMLFileResolver object. |
SBMLFileResolver(SBMLFileResolver c)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalDir(java.lang.String dir)
Adds a directory to the list of directories to search for files to
resolve.
|
void |
clearAdditionalDirs()
Removes the list of directories to search for files to resolve.
|
SBMLResolver |
cloneObject()
Creates and returns a deep copy of this
SBMLFileResolver object. |
void |
delete()
Explicitly deletes the underlying native object.
|
SBMLDocument |
resolve(java.lang.String uri)
Resolves the document for the given URI.
|
SBMLDocument |
resolve(java.lang.String uri,
java.lang.String baseUri)
Resolves the document for the given URI.
|
SBMLUri |
resolveUri(java.lang.String uri)
Resolves the full URI for a given URI without actually reading the
document.
|
SBMLUri |
resolveUri(java.lang.String uri,
java.lang.String baseUri)
Resolves the full URI for a given URI without actually reading the
document.
|
public SBMLFileResolver()
SBMLFileResolver
object.public SBMLFileResolver(SBMLFileResolver c)
SBMLFileResolver
object.
c
- the SBMLFileResolver
object to copy.
SBMLConstructorException
- Thrown if the argument orig
is null.
public void addAdditionalDir(java.lang.String dir)
dir
- the directory to add.
SBMLFileResolver.clearAdditionalDirs()
public void clearAdditionalDirs()
After this method is called,
SBMLFileResolver.resolve(String uri, String baseUri)
will only search absolute or relative directories. New directories can
be added using SBMLFileResolver.addAdditionalDir(String
dir)
.
public SBMLResolver cloneObject()
SBMLFileResolver
object.
cloneObject
 in class SBMLResolver
SBMLFileResolver
object.public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the SBMLFileResolver.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke SBMLFileResolver.delete()
themselves.
delete
 in class SBMLResolver
public SBMLDocument resolve(java.lang.String uri)
resolve
 in class SBMLResolver
uri
- the URI to the target documentbaseUri
- base URI, in case the URI is a relative one
public SBMLDocument resolve(java.lang.String uri, java.lang.String baseUri)
resolve
 in class SBMLResolver
uri
- the URI to the target documentbaseUri
- base URI, in case the URI is a relative one
public SBMLUri resolveUri(java.lang.String uri)
resolveUri
 in class SBMLResolver
uri
- the URI to the target documentbaseUri
- base URI, in case the URI is a relative one
public SBMLUri resolveUri(java.lang.String uri, java.lang.String baseUri)
resolveUri
 in class SBMLResolver
uri
- the URI to the target documentbaseUri
- base URI, in case the URI is a relative one