gatelogue_types.sea.SeaLine

class gatelogue_types.sea.SeaLine(conn: sqlite3.Connection, i: int)

Bases: Node

__init__(conn: sqlite3.Connection, i: int)

Methods

__init__(conn, i)

auto_type(conn, i)

Automatically find and get the Node subclass from the index i

create(conn, src, **kwargs)

Internal use

create_node(conn, src, *, ty)

Internal use

delete()

Internal use

equivalent_nodes()

Internal use

format_create_kwargs(**kwargs)

Internal use

merge(other, warn_fn, object] =)

Internal use

Attributes

COLUMNS

STR2TYPE

Internal use

code

Unique code identifying the sea line

colour

Colour of the line (on a map)

company

The SeaCompany that operates the line

docks

List of all SeaDocks s the line stops at

local

Whether the company operates within the city, e.g. a local ferry service.

mode

Type of sea vehicle or technology the line uses

name

Name of the line

source

Returns a single source.

stops

List of all SeaStop s the line stops at

i

The ID of the node

type

The type of the node

sources

All sources that prove the node's existence.

COLUMNS: ClassVar = (<gatelogue_types._util._Column object>, <gatelogue_types._util._FKColumn object>, <gatelogue_types._util._Column object>, <gatelogue_types._util._Column object>, <gatelogue_types._util._Column object>, <gatelogue_types._util._Column object>)
class CreateParams

Bases: TypedDict

Internal use

clear()

Remove all items from the dict.

code: Required[str]
colour: str | None
company: Required[SeaCompany]
copy()

Return a shallow copy of the dict.

classmethod fromkeys(iterable, value=None, /)

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)

Return the value for key if key is in the dictionary, else default.

items()

Return a set-like object providing a view on the dict’s items.

keys()

Return a set-like object providing a view on the dict’s keys.

local: bool | None
mode: SeaMode | None
name: str | None
pop(k[, d]) v, remove specified key and return the corresponding value.

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault(key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update([E, ]**F) None.  Update D from mapping/iterable E and F.

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

Return an object providing a view on the dict’s values.

STR2TYPE: ClassVar[dict] = {'AirAirline': <class 'gatelogue_types.air.AirAirline'>, 'AirAirport': <class 'gatelogue_types.air.AirAirport'>, 'AirFlight': <class 'gatelogue_types.air.AirFlight'>, 'AirGate': <class 'gatelogue_types.air.AirGate'>, 'BusBerth': <class 'gatelogue_types.bus.BusBerth'>, 'BusCompany': <class 'gatelogue_types.bus.BusCompany'>, 'BusConnection': <class 'gatelogue_types.bus.BusConnection'>, 'BusLine': <class 'gatelogue_types.bus.BusLine'>, 'BusStop': <class 'gatelogue_types.bus.BusStop'>, 'LocatedNode': <class 'gatelogue_types.node.LocatedNode'>, 'RailCompany': <class 'gatelogue_types.rail.RailCompany'>, 'RailConnection': <class 'gatelogue_types.rail.RailConnection'>, 'RailLine': <class 'gatelogue_types.rail.RailLine'>, 'RailPlatform': <class 'gatelogue_types.rail.RailPlatform'>, 'RailStation': <class 'gatelogue_types.rail.RailStation'>, 'SeaCompany': <class 'gatelogue_types.sea.SeaCompany'>, 'SeaConnection': <class 'gatelogue_types.sea.SeaConnection'>, 'SeaDock': <class 'gatelogue_types.sea.SeaDock'>, 'SeaLine': <class 'gatelogue_types.sea.SeaLine'>, 'SeaStop': <class 'gatelogue_types.sea.SeaStop'>, 'SpawnWarp': <class 'gatelogue_types.spawn_warp.SpawnWarp'>, 'Town': <class 'gatelogue_types.town.Town'>}

Internal use

classmethod auto_type(conn: sqlite3.Connection, i: int) Node

Automatically find and get the Node subclass from the index i

code

Unique code identifying the sea line

colour

Colour of the line (on a map)

company

The SeaCompany that operates the line

classmethod create(conn: sqlite3.Connection, src: int, **kwargs: Unpack[CreateParams]) Self

Internal use

classmethod create_node(conn: sqlite3.Connection, src: int, *, ty: str) int

Internal use

delete()

Internal use

property docks: Iterator[SeaDock]

List of all SeaDocks s the line stops at

equivalent_nodes() Iterator[Self]

Internal use

classmethod format_create_kwargs(**kwargs) dict

Internal use

i

The ID of the node

local

Whether the company operates within the city, e.g. a local ferry service

merge(other: Self, warn_fn: Callable[[str], object] = <built-in function warn>) set[int] | None

Internal use

mode

Type of sea vehicle or technology the line uses

name

Name of the line

property source: int

Returns a single source. :exception AssertionError: if this node has more than one source, or if querying a non-source database.

sources

All sources that prove the node’s existence. Does not exist in no-source databases.

property stops: Iterator[SeaStop]

List of all SeaStop s the line stops at

type

The type of the node