The Virtual Brain Project

Table Of Contents

Previous topic

transient Package

Next topic

neotraits Package

This Page

neocom Package

_h5loader

class tvb.core.neocom._h5loader.DirLoader(base_dir, registry, recursive=False)[source]

Bases: builtins.object

A simple recursive loader. Stores all files in a directory. You refer to files by their gid

find_file_name(gid)[source]
load(gid)[source]
path_for(h5_file_class, gid)[source]

where will this Loader expect to find a file of this format and with this gid

path_for_has_traits(has_traits_class, gid)[source]
store(datatype)[source]
class tvb.core.neocom._h5loader.Loader(registry)[source]

Bases: builtins.object

A default simple loader. Does not do recursive loads. Loads stores just to paths.

load(source)[source]
store(datatype, destination)[source]
class tvb.core.neocom._h5loader.TVBLoader(registry)[source]

Bases: builtins.object

load_from_index(dt_index, dt_class=None)[source]
load_with_references(file_path)[source]
path_for(operation_dir, h5_file_class, gid)[source]
path_for_stored_index(dt_index_instance)[source]

Given a Datatype(HasTraitsIndex) instance, build where the corresponding H5 should be or is stored

_registry

class tvb.core.neocom._registry.Registry[source]

Bases: builtins.object

A configuration class that holds the one to one relationship between datatypes and H5Files that can read/write them to disk

get_datatype_for_h5file(h5file_class)[source]
get_datatype_for_index(index_class)[source]
get_h5file_for_datatype(datatype_class)[source]
get_h5file_for_index(index_class)[source]
get_index_for_datatype(datatype_class)[source]
register_datatype(datatype_class, h5file_class, datatype_index)[source]

h5

tvb.core.neocom.h5.h5_file_for_index(dt_index_instance)[source]
tvb.core.neocom.h5.load(source_path)[source]

Load a datatype stored in the tvb h5 file found at the given path

tvb.core.neocom.h5.load_from_dir(base_dir, gid, recursive=False)[source]

Loads a datatype with the requested gid from the given directory. The datatype should have been written with store_to_dir The name and location of the file is chosen for you. :param base_dir: The h5 storage directory :param gid: the gid of the to be loaded datatype :param recursive: if datatypes contained in this datatype should be loaded as well

tvb.core.neocom.h5.load_from_index(dt_index, dt_class=None)[source]
tvb.core.neocom.h5.load_with_references(source_path)[source]

Load a datatype stored in the tvb h5 file found at the given path, but also load linked entities through GID

tvb.core.neocom.h5.path_for(base_dir, h5_file_class, gid)[source]
tvb.core.neocom.h5.path_for_stored_index(dt_index_instance)[source]
tvb.core.neocom.h5.store(datatype, destination)[source]

Stores the given datatype in a tvb h5 file at the given path

tvb.core.neocom.h5.store_complete(datatype, base_dir)[source]

Stores the given HasTraits instance in a h5 file, and fill the Index entity for later storage in DB

tvb.core.neocom.h5.store_to_dir(base_dir, datatype, recursive=False)[source]

Stores the given datatype in the given directory. The name and location of the stored file(s) is chosen for you by this function. If recursive is true than datatypes referenced by this one are stored as well.