| |
- rosetta.basic.resource_manager.ResourceLocator(builtins.object)
-
- DatabaseResourceLocator
- FileListResourceLocator
- FileSystemResourceLocator
- NullResourceLocator
- rosetta.basic.resource_manager.ResourceLocatorCreator(builtins.object)
-
- DatabaseResourceLocatorCreator
- FileListResourceLocatorCreator
- FileSystemResourceLocatorCreator
- NullResourceLocatorCreator
- rosetta.basic.resource_manager.ResourceStream(builtins.object)
-
- FileStream
- NullStream
- StringResourceStream
class DatabaseResourceLocator(rosetta.basic.resource_manager.ResourceLocator) |
|
The %DatabaseResourceLocator class is responsible for retreiving data
from a Database so that that data can then be used to construct a Resource.
Upon construction or in its parse_my_tag method, the
%DatabaseResourceLocator needs to be given the name of the database-session
resource that it will use to communicate with the database and a partially
formatted SQL command (a SELECT statement) that will be used to query the
database for the resource that it will be pulling from the database. This
SQL command should have a single question mark ("?") for the variable that
will be replaced by the locator_id that will be given to the
%DatabaseResourceLocator when its locate_resource_stream method is invoked.
In that method, the %DatabaseResourceLocator will ask the ResourceManager
for the database session object and then bind the input "locator_id" to the
previously provided SQL command, and finally will query the database with that
statement. The resulting output is packaged in a string stream and returned
to the code that called locate_resource_stream (e.g. the ResourceManager)
and then can be used to construct a resource. |
|
- Method resolution order:
- DatabaseResourceLocator
- rosetta.basic.resource_manager.ResourceLocator
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(self : handle, database_session_resource_tag : str, sql_command : str) -> NoneType
3. __init__(handle, rosetta.basic.resource_manager.locator.DatabaseResourceLocator) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.basic.resource_manager.locator.DatabaseResourceLocator, : rosetta.basic.resource_manager.locator.DatabaseResourceLocator) -> rosetta.basic.resource_manager.locator.DatabaseResourceLocator
- locate_resource_stream(...) from builtins.PyCapsule
- locate_resource_stream(self : rosetta.basic.resource_manager.locator.DatabaseResourceLocator, locator_tag : str) -> rosetta.basic.resource_manager.ResourceStream
Create a ResourceStream object from the given resource
source, so that its stream can be passed to the ResourceLoader
using the input "locator_tag" which is bound to the partially formed
SQL select statement that was provided at construction or in
parse_my_tag
- parse_my_tag(...) from builtins.PyCapsule
- parse_my_tag(self : rosetta.basic.resource_manager.locator.DatabaseResourceLocator, tag : utility::tag::Tag) -> NoneType
Initialize the %DatabaseResourceLoader from the input set of tags
which should contain both the name of the database session resource that
will be used to talk to the database, and the partially formed SQL
select statement that will be used to query the database.
- type(...) from builtins.PyCapsule
- type(rosetta.basic.resource_manager.locator.DatabaseResourceLocator) -> str
Return the typename for this class: "DatabaseResourceLocator"
Methods inherited from rosetta.basic.resource_manager.ResourceLocator:
- locator_tag(...) from builtins.PyCapsule
- locator_tag(*args, **kwargs)
Overloaded function.
1. locator_tag(self : rosetta.basic.resource_manager.ResourceLocator, locator_tag : str) -> NoneType
Set the name for this %ResourceLocator
2. locator_tag(rosetta.basic.resource_manager.ResourceLocator) -> str
Return the name for this %ResourceLocator
|
class FileListResourceLocator(rosetta.basic.resource_manager.ResourceLocator) |
|
The %FileListResourceLocator concatenates a set of listed files; e.g. useful
for constructing a pose from two separate PDB files. |
|
- Method resolution order:
- FileListResourceLocator
- rosetta.basic.resource_manager.ResourceLocator
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(handle, rosetta.basic.resource_manager.locator.FileListResourceLocator) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.basic.resource_manager.locator.FileListResourceLocator, : rosetta.basic.resource_manager.locator.FileListResourceLocator) -> rosetta.basic.resource_manager.locator.FileListResourceLocator
- get_open_mode(...) from builtins.PyCapsule
- get_open_mode(rosetta.basic.resource_manager.locator.FileListResourceLocator) -> rosetta.std._Ios_Openmode
- locate_resource_stream(...) from builtins.PyCapsule
- locate_resource_stream(self : rosetta.basic.resource_manager.locator.FileListResourceLocator, locator_tag : str) -> rosetta.basic.resource_manager.ResourceStream
Take the input locator tag and split it by whitespace, interpret each substring
as the name of a file, and concatenate each file into a single stringstream to be
returned.
- parse_my_tag(...) from builtins.PyCapsule
- parse_my_tag(self : rosetta.basic.resource_manager.locator.FileListResourceLocator, tag : utility::tag::Tag) -> NoneType
Do nothing, since there is no data that the %FileListResourceLocator needs.
- set_open_mode(...) from builtins.PyCapsule
- set_open_mode(self : rosetta.basic.resource_manager.locator.FileListResourceLocator, open_mode : rosetta.std._Ios_Openmode) -> NoneType
- type(...) from builtins.PyCapsule
- type(rosetta.basic.resource_manager.locator.FileListResourceLocator) -> str
Return the name for this class: "FileListResourceLocator"
Methods inherited from rosetta.basic.resource_manager.ResourceLocator:
- locator_tag(...) from builtins.PyCapsule
- locator_tag(*args, **kwargs)
Overloaded function.
1. locator_tag(self : rosetta.basic.resource_manager.ResourceLocator, locator_tag : str) -> NoneType
Set the name for this %ResourceLocator
2. locator_tag(rosetta.basic.resource_manager.ResourceLocator) -> str
Return the name for this %ResourceLocator
|
class FileStream(rosetta.basic.resource_manager.ResourceStream) |
|
%FileStream is a wrapper class for a utility::io::izstream object that
derives from ResourceStream. |
|
- Method resolution order:
- FileStream
- rosetta.basic.resource_manager.ResourceStream
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(handle, str) -> NoneType
doc
3. __init__(self : handle, filename : str, open_mode : rosetta.std._Ios_Openmode) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- open(...) from builtins.PyCapsule
- open(*args, **kwargs)
Overloaded function.
1. open(self : rosetta.basic.resource_manager.locator.FileStream, filename : str) -> NoneType
Open a particular file; must be called if the default constructor is used.
2. open(self : rosetta.basic.resource_manager.locator.FileStream, filename : str, open_mode : rosetta.std._Ios_Openmode) -> NoneType
Open a particular file; must be called if the default constructor is used.
Methods inherited from rosetta.basic.resource_manager.ResourceStream:
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.basic.resource_manager.ResourceStream, : rosetta.basic.resource_manager.ResourceStream) -> rosetta.basic.resource_manager.ResourceStream
|
class FileSystemResourceLocator(rosetta.basic.resource_manager.ResourceLocator) |
|
The %FileSystemResourceLocator is responsible for opening a file from the
file system given its name (as the "locator tag" in the locate_resource_stream
method ) and returning a FileStream object that wraps this file. This FileStream
can then be used to construct a resource. |
|
- Method resolution order:
- FileSystemResourceLocator
- rosetta.basic.resource_manager.ResourceLocator
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
doc
2. __init__(self : handle, open_mode : rosetta.std._Ios_Openmode) -> NoneType
3. __init__(handle, rosetta.basic.resource_manager.locator.FileSystemResourceLocator) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.basic.resource_manager.locator.FileSystemResourceLocator, : rosetta.basic.resource_manager.locator.FileSystemResourceLocator) -> rosetta.basic.resource_manager.locator.FileSystemResourceLocator
- get_open_mode(...) from builtins.PyCapsule
- get_open_mode(rosetta.basic.resource_manager.locator.FileSystemResourceLocator) -> rosetta.std._Ios_Openmode
- locate_resource_stream(...) from builtins.PyCapsule
- locate_resource_stream(self : rosetta.basic.resource_manager.locator.FileSystemResourceLocator, locator_tag : str) -> rosetta.basic.resource_manager.ResourceStream
Construct a FileStream object given a file's name (its locator_tag)
- parse_my_tag(...) from builtins.PyCapsule
- parse_my_tag(self : rosetta.basic.resource_manager.locator.FileSystemResourceLocator, tag : utility::tag::Tag) -> NoneType
Allows a default base_path to be specified for the locator.
- set_open_mode(...) from builtins.PyCapsule
- set_open_mode(self : rosetta.basic.resource_manager.locator.FileSystemResourceLocator, open_mode : rosetta.std._Ios_Openmode) -> NoneType
- type(...) from builtins.PyCapsule
- type(rosetta.basic.resource_manager.locator.FileSystemResourceLocator) -> str
Methods inherited from rosetta.basic.resource_manager.ResourceLocator:
- locator_tag(...) from builtins.PyCapsule
- locator_tag(*args, **kwargs)
Overloaded function.
1. locator_tag(self : rosetta.basic.resource_manager.ResourceLocator, locator_tag : str) -> NoneType
Set the name for this %ResourceLocator
2. locator_tag(rosetta.basic.resource_manager.ResourceLocator) -> str
Return the name for this %ResourceLocator
|
class NullResourceLocator(rosetta.basic.resource_manager.ResourceLocator) |
|
The %NullResourceLocator is meant for cases where a resource can
be created without reading from an input file. It goes through the motions
of returning a ResourceStream (an empty NullStream) as is required of all
ResourceLocators, but the stream that it creates will not be used. |
|
- Method resolution order:
- NullResourceLocator
- rosetta.basic.resource_manager.ResourceLocator
- builtins.object
Methods defined here:
- __init__(...) from builtins.PyCapsule
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(handle) -> NoneType
2. __init__(handle, rosetta.basic.resource_manager.locator.NullResourceLocator) -> NoneType
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
- assign(...) from builtins.PyCapsule
- assign(self : rosetta.basic.resource_manager.locator.NullResourceLocator, : rosetta.basic.resource_manager.locator.NullResourceLocator) -> rosetta.basic.resource_manager.locator.NullResourceLocator
- locate_resource_stream(...) from builtins.PyCapsule
- locate_resource_stream(self : rosetta.basic.resource_manager.locator.NullResourceLocator, locator_tag : str) -> rosetta.basic.resource_manager.ResourceStream
Create an empty NullResource object that will not be used
- parse_my_tag(...) from builtins.PyCapsule
- parse_my_tag(self : rosetta.basic.resource_manager.locator.NullResourceLocator, tag : utility::tag::Tag) -> NoneType
Noop, since there is no data in this class.
- type(...) from builtins.PyCapsule
- type(rosetta.basic.resource_manager.locator.NullResourceLocator) -> str
Return the name of this class: "NullResourceLocator"
Methods inherited from rosetta.basic.resource_manager.ResourceLocator:
- locator_tag(...) from builtins.PyCapsule
- locator_tag(*args, **kwargs)
Overloaded function.
1. locator_tag(self : rosetta.basic.resource_manager.ResourceLocator, locator_tag : str) -> NoneType
Set the name for this %ResourceLocator
2. locator_tag(rosetta.basic.resource_manager.ResourceLocator) -> str
Return the name for this %ResourceLocator
|
|