|
def | __init__ (self, cls, storageCfg) |
|
def | ppprint (self) |
|
def | __repr__ (self) |
|
def | __getitem__ (self, name) |
|
def | __setitem__ (self, name, value) |
|
def | __contains__ (self, key) |
|
def | update (self, other) |
|
def | merge (self, other) |
|
def | names (self, topLevelOnly=False) |
|
def | asArray (self, name) |
|
def | getValue (self, name) |
|
def | setValue (self, name, value) |
|
def | mergeDefaults (self, other) |
|
def | exists (self, key) |
|
def | getString (self, key) |
|
def | getBool (self, key) |
|
def | getPolicy (self, key) |
|
def | getStringArray (self, key) |
|
def | __lt__ (self, other) |
|
def | __le__ (self, other) |
|
def | __eq__ (self, other) |
|
def | __ne__ (self, other) |
|
def | __gt__ (self, other) |
|
def | __ge__ (self, other) |
|
def | dump (self, output) |
| i/o # More...
|
|
def | dumpToFile (self, path) |
|
Definition at line 29 of file access.py.
◆ __init__()
def lsst.daf.persistence.access.AccessCfg.__init__ |
( |
|
self, |
|
|
|
cls, |
|
|
|
storageCfg |
|
) |
| |
◆ __contains__()
def lsst.daf.persistence.policy.Policy.__contains__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
|
inherited |
◆ __eq__()
def lsst.daf.persistence.policy.Policy.__eq__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
◆ __ge__()
def lsst.daf.persistence.policy.Policy.__ge__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
◆ __getitem__()
def lsst.daf.persistence.policy.Policy.__getitem__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
inherited |
◆ __gt__()
def lsst.daf.persistence.policy.Policy.__gt__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
◆ __le__()
def lsst.daf.persistence.policy.Policy.__le__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
◆ __lt__()
def lsst.daf.persistence.policy.Policy.__lt__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
◆ __ne__()
def lsst.daf.persistence.policy.Policy.__ne__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
◆ __repr__()
def lsst.daf.persistence.policy.Policy.__repr__ |
( |
|
self | ) |
|
|
inherited |
◆ __setitem__()
def lsst.daf.persistence.policy.Policy.__setitem__ |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
|
inherited |
◆ asArray()
def lsst.daf.persistence.policy.Policy.asArray |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
inherited |
Get a value as an array. May contain one or more elements.
:param key:
:return:
Definition at line 280 of file policy.py.
◆ defaultPolicyFile()
def lsst.daf.persistence.policy.Policy.defaultPolicyFile |
( |
|
productName, |
|
|
|
fileName, |
|
|
|
relativePath = None |
|
) |
| |
|
staticinherited |
Get the path to a default policy file.
Determines a directory for the product specified by productName. Then Concatenates
productDir/relativePath/fileName (or productDir/fileName if relativePath is None) to find the path
to the default Policy file
@param productName (string) The name of the product that the default policy is installed as part of
@param fileName (string) The name of the policy file. Can also include a path to the file relative to
the directory where the product is installed.
@param relativePath (string) The relative path from the directior where the product is installed to
the location where the file (or the path to the file) is found. If None
(default), the fileName argument is relative to the installation
directory.
Definition at line 203 of file policy.py.
◆ dump()
def lsst.daf.persistence.policy.Policy.dump |
( |
|
self, |
|
|
|
output |
|
) |
| |
|
inherited |
i/o #
Writes the policy to a yaml stream.
:param stream:
:return:
Definition at line 406 of file policy.py.
◆ dumpToFile()
def lsst.daf.persistence.policy.Policy.dumpToFile |
( |
|
self, |
|
|
|
path |
|
) |
| |
|
inherited |
Writes the policy to a file.
:param path:
:return:
Definition at line 427 of file policy.py.
◆ exists()
def lsst.daf.persistence.policy.Policy.exists |
( |
|
self, |
|
|
|
key |
|
) |
| |
|
inherited |
Query if a key exists in this Policy
:param key:
:return: True if the key exists, else false.
Definition at line 323 of file policy.py.
◆ getBool()
def lsst.daf.persistence.policy.Policy.getBool |
( |
|
self, |
|
|
|
key |
|
) |
| |
|
inherited |
Get the value of a key.
:param key:
:return: the value for key
Definition at line 341 of file policy.py.
◆ getPolicy()
def lsst.daf.persistence.policy.Policy.getPolicy |
( |
|
self, |
|
|
|
key |
|
) |
| |
|
inherited |
Get a subpolicy.
:param key:
:return:
Definition at line 350 of file policy.py.
◆ getString()
def lsst.daf.persistence.policy.Policy.getString |
( |
|
self, |
|
|
|
key |
|
) |
| |
|
inherited |
Get the string value of a key.
:param key:
:return: the value for key
Definition at line 332 of file policy.py.
◆ getStringArray()
def lsst.daf.persistence.policy.Policy.getStringArray |
( |
|
self, |
|
|
|
key |
|
) |
| |
|
inherited |
Get a value as an array. May contain one or more elements.
:param key:
:return:
Definition at line 359 of file policy.py.
◆ getValue()
def lsst.daf.persistence.policy.Policy.getValue |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
inherited |
Get the value for a parameter name/key. See class notes about dot-delimited access.
:param name:
:return: the value for the given name.
Definition at line 296 of file policy.py.
◆ merge()
def lsst.daf.persistence.policy.Policy.merge |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
Like Policy.update, but will add keys & values from other that DO NOT EXIST in self. Keys and
values that already exist in self will NOT be overwritten.
:param other:
:return:
Definition at line 250 of file policy.py.
◆ mergeDefaults()
def lsst.daf.persistence.policy.Policy.mergeDefaults |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
For any keys in other that are not present in self, sets that key and its value into self.
:param other: another Policy
:return: None
Definition at line 314 of file policy.py.
◆ names()
def lsst.daf.persistence.policy.Policy.names |
( |
|
self, |
|
|
|
topLevelOnly = False |
|
) |
| |
|
inherited |
Get the dot-delimited name of all the keys in the hierarchy.
NOTE: this is different than the built-in method dict.keys, which will return only the first level
keys.
Definition at line 261 of file policy.py.
◆ ppprint()
def lsst.daf.persistence.policy.Policy.ppprint |
( |
|
self | ) |
|
|
inherited |
helper function for debugging, prints a policy out in a readable way in the debugger.
use: pdb> print myPolicyObject.pprint()
:return: a prettyprint formatted string representing the policy
Definition at line 88 of file policy.py.
◆ setValue()
def lsst.daf.persistence.policy.Policy.setValue |
( |
|
self, |
|
|
|
name, |
|
|
|
value |
|
) |
| |
|
inherited |
Set the value for a parameter name/key. See class notes about dot-delimited access.
:param name:
:return: None
Definition at line 305 of file policy.py.
◆ update()
def lsst.daf.persistence.policy.Policy.update |
( |
|
self, |
|
|
|
other |
|
) |
| |
|
inherited |
Like dict.update, but will add or modify keys in nested dicts, instead of overwriting the nested
dict entirely.
For example, for the given code:
foo = {'a': {'b': 1}}
foo.update({'a': {'c': 2}})
If foo is a dict, then after the update foo == {'a': {'c': 2}}
But if foo is a Policy, then after the update foo == {'a': {'b': 1, 'c': 2}}
Definition at line 226 of file policy.py.
◆ data
lsst.daf.persistence.policy.Policy.data |
|
inherited |
◆ yaml_tag
string lsst.daf.persistence.access.AccessCfg.yaml_tag = u"!AccessCfg" |
|
static |
The documentation for this class was generated from the following file: