Package omero :: Module config :: Class ConfigXml
[hide private]
[frames] | no frames]

Class ConfigXml

source code


Instance Methods [hide private]
 
__init__(self, filename, env_config=None, exclusive=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_open_lock(self) source code
 
_close_lock(self) source code
 
version(self, id=None) source code
 
version_check(self) source code
 
version_fix(self, props, version)
Currently we are assuming that all blocks without a 4.2.0 version are bogus.
source code
 
internal(self) source code
 
properties(self, id=None, filter_internal=False) source code
 
remove(self, id=None) source code
 
default(self, value=None) source code
 
dump(self) source code
 
save(self)
Creates a fresh <icegrid> block (removing any unwanted intra-element whitespace) and overwrites the file on disk.
source code
 
close(self) source code
 
props_to_dict(self, c) source code
 
dict_to_text(self, parsed=None) source code
 
element_to_xml(self, elem) source code
 
clear_text(self, p)
To prevent the accumulation of text outside of elements (including whitespace) we walk the given element and remove tail from it and it's children.
source code
 
as_map(self) source code
 
keys(self) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__delitem__(self, key) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  KEY = "omero.config.version"
  VERSION = "4.2.1"
  INTERNAL = "__ACTIVE__"
  DEFAULT = "omero.config.profile"
  IGNORE = KEY, DEFAULT
Instance Variables [hide private]
  logger
Logs to the class name
  XML
Parsed XML Element
  env_config
Environment override
  filename
Path to the file to be read and written
  source
Open file handle
  lock
Open file handle for lock
  exclusive
Whether or not an exclusive lock should be acquired
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, env_config=None, exclusive=True)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

version_fix(self, props, version)

source code 

Currently we are assuming that all blocks without a 4.2.0 version are bogus. The configuration script when it generates an initial config.xml will use prefs.class to parse the existing values and immediately do the upgrade.