DbNetwork

class mss_dataserver.geometry.db_inventory.DbNetwork(orm=None, **kwargs)[source]

Bases: mss_dataserver.geometry.inventory.Network

The database network.

Parameters

orm (mss_data_server.geometry.databaseFactory.GeomNetwork) – The sqlalchemy table mapper class for the network.

Keyword Arguments

**kwargs – The keyword arguments passed to the __init__ method of the parent class mss_dataserver.geoemetry.inventory.Network.

Properties

id

int: The database id.

Methods

__init__([orm])

Initialize the instance.

add_station(station)

Add a station to the network.

as_dict([style])

Get a dictionary representation of the instance.

from_dict(d)

Create a network from a dictionary.

from_inventory_instance(parent_inventory, …)

Create a DbNetwork instance from a mss_data_server.geometry.inventory.Network instance.

from_sqlalchemy_orm(parent_inventory, orm)

Create a DbNetwork instance from a mss_data_server.geometry.databaseFactory.GeomNetwork table mapper class.

get_station(**kwargs)

Get a station from the network.

merge(merge_network)

Merge a network with the existing.

remove_station(name, location)

Remove a station from the network.

remove_station_by_instance(station_to_remove)

Remove a station instance from the network.

Inheritence diagram

Inheritance diagram of mss_dataserver.geometry.db_inventory.DbNetwork