fire.api.model package
Module contents
SQLAlchemy models for the application
- class fire.api.model.BetterBehavedEnum(enumtype: Enum, *args, **kwargs)
Bases:
TypeDecorator
SQLAlchemy ignorer som standard værdierne i tilknyttet labels i en Enum. Denne klasse sørger for at de korrekte værdier indsættes, sådan at
Boolean.FALSE oversættes til 'false' og ikke 'FALSE'.
- process_bind_param(value, dialect)
Receive a bound parameter value to be converted.
Custom subclasses of
_types.TypeDecorator
should override this method to provide custom behaviors for incoming data values. This method is called at statement execution time and is passed the literal Python data value which is to be associated with a bound parameter in the statement.The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.
- Parameters:
value -- Data to operate upon, of any type expected by this method in the subclass. Can be
None
.dialect -- the
Dialect
in use.
See also
types_typedecorator
_types.TypeDecorator.process_result_value()
- process_result_value(value, dialect)
Receive a result-row column value to be converted.
Custom subclasses of
_types.TypeDecorator
should override this method to provide custom behaviors for data values being received in result rows coming from the database. This method is called at result fetching time and is passed the literal Python data value that's extracted from a database result row.The operation could be anything desired to perform custom behavior, such as transforming or deserializing data.
- Parameters:
value -- Data to operate upon, of any type expected by this method in the subclass. Can be
None
.dialect -- the
Dialect
in use.
See also
types_typedecorator
_types.TypeDecorator.process_bind_param()
- class fire.api.model.Boolean(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- FALSE = 'false'
- TRUE = 'true'
- class fire.api.model.IntEnum(enumtype: Enum, *args, **kwargs)
Bases:
BetterBehavedEnum
Add an integer enum class
- impl
alias of
Integer
- class fire.api.model.RegisteringFraObjekt(**kwargs)
Bases:
Base
- objektid = Column(None, Integer(), table=None, primary_key=True, nullable=False)
- property registreringfra
- class fire.api.model.RegisteringTidObjekt(**kwargs)
Bases:
Base
- objektid = Column(None, Integer(), table=None, primary_key=True, nullable=False)
- property registreringfra
- property registreringtil
- class fire.api.model.ReprBase
Bases:
object
Udvid SQLAlchemys Base klasse.
Giver pænere repr() output. Modificeret fra StackOverflow: https://stackoverflow.com/a/54034962
- class fire.api.model.StringEnum(enumtype: Enum, *args, **kwargs)
Bases:
BetterBehavedEnum
Add an integer enum class
- impl
alias of
String
Submodules
- class fire.api.model.columntypes.Curve(dimension=None, srid=-1)
Bases:
Geometry
- cache_ok = True
Indicate if statements using this
ExternalType
are "safe to cache".The default value
None
will emit a warning and then not allow caching of a statement which includes this type. Set toFalse
to disable statements using this type from being cached at all without a warning. When set toTrue
, the object's class and selected elements from its state will be used as part of the cache key. For example, using aTypeDecorator
:class MyType(TypeDecorator): impl = String cache_ok = True def __init__(self, choices): self.choices = tuple(choices) self.internal_only = True
The cache key for the above type would be equivalent to:
>>> MyType(["a", "b", "c"])._static_cache_key (<class '__main__.MyType'>, ('choices', ('a', 'b', 'c')))
The caching scheme will extract attributes from the type that correspond to the names of parameters in the
__init__()
method. Above, the "choices" attribute becomes part of the cache key but "internal_only" does not, because there is no parameter named "internal_only".The requirements for cacheable elements is that they are hashable and also that they indicate the same SQL rendered for expressions using this type every time for a given cache value.
To accommodate for datatypes that refer to unhashable structures such as dictionaries, sets and lists, these objects can be made "cacheable" by assigning hashable structures to the attributes whose names correspond with the names of the arguments. For example, a datatype which accepts a dictionary of lookup values may publish this as a sorted series of tuples. Given a previously un-cacheable type as:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. this is the non-cacheable version, as "self.lookup" is not hashable. ''' def __init__(self, lookup): self.lookup = lookup def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self.lookup" ...
Where "lookup" is a dictionary. The type will not be able to generate a cache key:
>>> type_ = LookupType({"a": 10, "b": 20}) >>> type_._static_cache_key <stdin>:1: SAWarning: UserDefinedType LookupType({'a': 10, 'b': 20}) will not produce a cache key because the ``cache_ok`` flag is not set to True. Set this flag to True if this type object's state is safe to use in a cache key, or False to disable this warning. symbol('no_cache')
If we did set up such a cache key, it wouldn't be usable. We would get a tuple structure that contains a dictionary inside of it, which cannot itself be used as a key in a "cache dictionary" such as SQLAlchemy's statement cache, since Python dictionaries aren't hashable:
>>> # set cache_ok = True >>> type_.cache_ok = True >>> # this is the cache key it would generate >>> key = type_._static_cache_key >>> key (<class '__main__.LookupType'>, ('lookup', {'a': 10, 'b': 20})) >>> # however this key is not hashable, will fail when used with >>> # SQLAlchemy statement cache >>> some_cache = {key: "some sql value"} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'dict'
The type may be made cacheable by assigning a sorted tuple of tuples to the ".lookup" attribute:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. The dictionary is stored both as itself in a private variable, and published in a public variable as a sorted tuple of tuples, which is hashable and will also return the same value for any two equivalent dictionaries. Note it assumes the keys and values of the dictionary are themselves hashable. ''' cache_ok = True def __init__(self, lookup): self._lookup = lookup # assume keys/values of "lookup" are hashable; otherwise # they would also need to be converted in some way here self.lookup = tuple( (key, lookup[key]) for key in sorted(lookup) ) def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self._lookup" ...
Where above, the cache key for
LookupType({"a": 10, "b": 20})
will be:>>> LookupType({"a": 10, "b": 20})._static_cache_key (<class '__main__.LookupType'>, ('lookup', (('a', 10), ('b', 20))))
Added in version 1.4.14: - added the
cache_ok
flag to allow some configurability of caching forTypeDecorator
classes.Added in version 1.4.28: - added the
ExternalType
mixin which generalizes thecache_ok
flag to both theTypeDecorator
andUserDefinedType
classes.See also
sql_caching
- name = 'CURVE'
- class fire.api.model.columntypes.Geometry(dimension=None, srid=-1)
Bases:
UserDefinedType
Oracle geometri Column type.
- adapt(impltype)
Produce an "adapted" form of this type, given an "impl" class to work with.
This method is used internally to associate generic types with "implementation" types that are specific to a particular dialect.
- bind_expression(bindvalue)
- bind_processor(dialect)
Return a conversion function for processing bind values.
Returns a callable which will receive a bind parameter value as the sole positional argument and will return a value to send to the DB-API.
If processing is not necessary, the method should return
None
.Note
This method is only called relative to a dialect specific type object, which is often private to a dialect in use and is not the same type object as the public facing one, which means it's not feasible to subclass a
types.TypeEngine
class in order to provide an alternate_types.TypeEngine.bind_processor()
method, unless subclassing the_types.UserDefinedType
class explicitly.To provide alternate behavior for
_types.TypeEngine.bind_processor()
, implement a_types.TypeDecorator
class and provide an implementation of_types.TypeDecorator.process_bind_param()
.See also
types_typedecorator
- Parameters:
dialect -- Dialect instance in use.
- cache_ok = True
Indicate if statements using this
ExternalType
are "safe to cache".The default value
None
will emit a warning and then not allow caching of a statement which includes this type. Set toFalse
to disable statements using this type from being cached at all without a warning. When set toTrue
, the object's class and selected elements from its state will be used as part of the cache key. For example, using aTypeDecorator
:class MyType(TypeDecorator): impl = String cache_ok = True def __init__(self, choices): self.choices = tuple(choices) self.internal_only = True
The cache key for the above type would be equivalent to:
>>> MyType(["a", "b", "c"])._static_cache_key (<class '__main__.MyType'>, ('choices', ('a', 'b', 'c')))
The caching scheme will extract attributes from the type that correspond to the names of parameters in the
__init__()
method. Above, the "choices" attribute becomes part of the cache key but "internal_only" does not, because there is no parameter named "internal_only".The requirements for cacheable elements is that they are hashable and also that they indicate the same SQL rendered for expressions using this type every time for a given cache value.
To accommodate for datatypes that refer to unhashable structures such as dictionaries, sets and lists, these objects can be made "cacheable" by assigning hashable structures to the attributes whose names correspond with the names of the arguments. For example, a datatype which accepts a dictionary of lookup values may publish this as a sorted series of tuples. Given a previously un-cacheable type as:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. this is the non-cacheable version, as "self.lookup" is not hashable. ''' def __init__(self, lookup): self.lookup = lookup def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self.lookup" ...
Where "lookup" is a dictionary. The type will not be able to generate a cache key:
>>> type_ = LookupType({"a": 10, "b": 20}) >>> type_._static_cache_key <stdin>:1: SAWarning: UserDefinedType LookupType({'a': 10, 'b': 20}) will not produce a cache key because the ``cache_ok`` flag is not set to True. Set this flag to True if this type object's state is safe to use in a cache key, or False to disable this warning. symbol('no_cache')
If we did set up such a cache key, it wouldn't be usable. We would get a tuple structure that contains a dictionary inside of it, which cannot itself be used as a key in a "cache dictionary" such as SQLAlchemy's statement cache, since Python dictionaries aren't hashable:
>>> # set cache_ok = True >>> type_.cache_ok = True >>> # this is the cache key it would generate >>> key = type_._static_cache_key >>> key (<class '__main__.LookupType'>, ('lookup', {'a': 10, 'b': 20})) >>> # however this key is not hashable, will fail when used with >>> # SQLAlchemy statement cache >>> some_cache = {key: "some sql value"} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'dict'
The type may be made cacheable by assigning a sorted tuple of tuples to the ".lookup" attribute:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. The dictionary is stored both as itself in a private variable, and published in a public variable as a sorted tuple of tuples, which is hashable and will also return the same value for any two equivalent dictionaries. Note it assumes the keys and values of the dictionary are themselves hashable. ''' cache_ok = True def __init__(self, lookup): self._lookup = lookup # assume keys/values of "lookup" are hashable; otherwise # they would also need to be converted in some way here self.lookup = tuple( (key, lookup[key]) for key in sorted(lookup) ) def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self._lookup" ...
Where above, the cache key for
LookupType({"a": 10, "b": 20})
will be:>>> LookupType({"a": 10, "b": 20})._static_cache_key (<class '__main__.LookupType'>, ('lookup', (('a', 10), ('b', 20))))
Added in version 1.4.14: - added the
cache_ok
flag to allow some configurability of caching forTypeDecorator
classes.Added in version 1.4.28: - added the
ExternalType
mixin which generalizes thecache_ok
flag to both theTypeDecorator
andUserDefinedType
classes.See also
sql_caching
- column_expression(col)
- get_col_spec()
- name = 'GEOMETRY'
- result_processor(dialect, coltype)
Return a conversion function for processing result row values.
Returns a callable which will receive a result row column value as the sole positional argument and will return a value to return to the user.
If processing is not necessary, the method should return
None
.Note
This method is only called relative to a dialect specific type object, which is often private to a dialect in use and is not the same type object as the public facing one, which means it's not feasible to subclass a
types.TypeEngine
class in order to provide an alternate_types.TypeEngine.result_processor()
method, unless subclassing the_types.UserDefinedType
class explicitly.To provide alternate behavior for
_types.TypeEngine.result_processor()
, implement a_types.TypeDecorator
class and provide an implementation of_types.TypeDecorator.process_result_value()
.See also
types_typedecorator
- Parameters:
dialect -- Dialect instance in use.
coltype -- DBAPI coltype argument received in cursor.description.
- class fire.api.model.columntypes.LineString(dimension=None, srid=-1)
Bases:
Curve
- cache_ok = True
Indicate if statements using this
ExternalType
are "safe to cache".The default value
None
will emit a warning and then not allow caching of a statement which includes this type. Set toFalse
to disable statements using this type from being cached at all without a warning. When set toTrue
, the object's class and selected elements from its state will be used as part of the cache key. For example, using aTypeDecorator
:class MyType(TypeDecorator): impl = String cache_ok = True def __init__(self, choices): self.choices = tuple(choices) self.internal_only = True
The cache key for the above type would be equivalent to:
>>> MyType(["a", "b", "c"])._static_cache_key (<class '__main__.MyType'>, ('choices', ('a', 'b', 'c')))
The caching scheme will extract attributes from the type that correspond to the names of parameters in the
__init__()
method. Above, the "choices" attribute becomes part of the cache key but "internal_only" does not, because there is no parameter named "internal_only".The requirements for cacheable elements is that they are hashable and also that they indicate the same SQL rendered for expressions using this type every time for a given cache value.
To accommodate for datatypes that refer to unhashable structures such as dictionaries, sets and lists, these objects can be made "cacheable" by assigning hashable structures to the attributes whose names correspond with the names of the arguments. For example, a datatype which accepts a dictionary of lookup values may publish this as a sorted series of tuples. Given a previously un-cacheable type as:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. this is the non-cacheable version, as "self.lookup" is not hashable. ''' def __init__(self, lookup): self.lookup = lookup def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self.lookup" ...
Where "lookup" is a dictionary. The type will not be able to generate a cache key:
>>> type_ = LookupType({"a": 10, "b": 20}) >>> type_._static_cache_key <stdin>:1: SAWarning: UserDefinedType LookupType({'a': 10, 'b': 20}) will not produce a cache key because the ``cache_ok`` flag is not set to True. Set this flag to True if this type object's state is safe to use in a cache key, or False to disable this warning. symbol('no_cache')
If we did set up such a cache key, it wouldn't be usable. We would get a tuple structure that contains a dictionary inside of it, which cannot itself be used as a key in a "cache dictionary" such as SQLAlchemy's statement cache, since Python dictionaries aren't hashable:
>>> # set cache_ok = True >>> type_.cache_ok = True >>> # this is the cache key it would generate >>> key = type_._static_cache_key >>> key (<class '__main__.LookupType'>, ('lookup', {'a': 10, 'b': 20})) >>> # however this key is not hashable, will fail when used with >>> # SQLAlchemy statement cache >>> some_cache = {key: "some sql value"} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'dict'
The type may be made cacheable by assigning a sorted tuple of tuples to the ".lookup" attribute:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. The dictionary is stored both as itself in a private variable, and published in a public variable as a sorted tuple of tuples, which is hashable and will also return the same value for any two equivalent dictionaries. Note it assumes the keys and values of the dictionary are themselves hashable. ''' cache_ok = True def __init__(self, lookup): self._lookup = lookup # assume keys/values of "lookup" are hashable; otherwise # they would also need to be converted in some way here self.lookup = tuple( (key, lookup[key]) for key in sorted(lookup) ) def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self._lookup" ...
Where above, the cache key for
LookupType({"a": 10, "b": 20})
will be:>>> LookupType({"a": 10, "b": 20})._static_cache_key (<class '__main__.LookupType'>, ('lookup', (('a', 10), ('b', 20))))
Added in version 1.4.14: - added the
cache_ok
flag to allow some configurability of caching forTypeDecorator
classes.Added in version 1.4.28: - added the
ExternalType
mixin which generalizes thecache_ok
flag to both theTypeDecorator
andUserDefinedType
classes.See also
sql_caching
- name = 'LINESTRING'
- class fire.api.model.columntypes.Point(dimension=None, srid=-1)
Bases:
Geometry
- cache_ok = True
Indicate if statements using this
ExternalType
are "safe to cache".The default value
None
will emit a warning and then not allow caching of a statement which includes this type. Set toFalse
to disable statements using this type from being cached at all without a warning. When set toTrue
, the object's class and selected elements from its state will be used as part of the cache key. For example, using aTypeDecorator
:class MyType(TypeDecorator): impl = String cache_ok = True def __init__(self, choices): self.choices = tuple(choices) self.internal_only = True
The cache key for the above type would be equivalent to:
>>> MyType(["a", "b", "c"])._static_cache_key (<class '__main__.MyType'>, ('choices', ('a', 'b', 'c')))
The caching scheme will extract attributes from the type that correspond to the names of parameters in the
__init__()
method. Above, the "choices" attribute becomes part of the cache key but "internal_only" does not, because there is no parameter named "internal_only".The requirements for cacheable elements is that they are hashable and also that they indicate the same SQL rendered for expressions using this type every time for a given cache value.
To accommodate for datatypes that refer to unhashable structures such as dictionaries, sets and lists, these objects can be made "cacheable" by assigning hashable structures to the attributes whose names correspond with the names of the arguments. For example, a datatype which accepts a dictionary of lookup values may publish this as a sorted series of tuples. Given a previously un-cacheable type as:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. this is the non-cacheable version, as "self.lookup" is not hashable. ''' def __init__(self, lookup): self.lookup = lookup def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self.lookup" ...
Where "lookup" is a dictionary. The type will not be able to generate a cache key:
>>> type_ = LookupType({"a": 10, "b": 20}) >>> type_._static_cache_key <stdin>:1: SAWarning: UserDefinedType LookupType({'a': 10, 'b': 20}) will not produce a cache key because the ``cache_ok`` flag is not set to True. Set this flag to True if this type object's state is safe to use in a cache key, or False to disable this warning. symbol('no_cache')
If we did set up such a cache key, it wouldn't be usable. We would get a tuple structure that contains a dictionary inside of it, which cannot itself be used as a key in a "cache dictionary" such as SQLAlchemy's statement cache, since Python dictionaries aren't hashable:
>>> # set cache_ok = True >>> type_.cache_ok = True >>> # this is the cache key it would generate >>> key = type_._static_cache_key >>> key (<class '__main__.LookupType'>, ('lookup', {'a': 10, 'b': 20})) >>> # however this key is not hashable, will fail when used with >>> # SQLAlchemy statement cache >>> some_cache = {key: "some sql value"} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unhashable type: 'dict'
The type may be made cacheable by assigning a sorted tuple of tuples to the ".lookup" attribute:
class LookupType(UserDefinedType): '''a custom type that accepts a dictionary as a parameter. The dictionary is stored both as itself in a private variable, and published in a public variable as a sorted tuple of tuples, which is hashable and will also return the same value for any two equivalent dictionaries. Note it assumes the keys and values of the dictionary are themselves hashable. ''' cache_ok = True def __init__(self, lookup): self._lookup = lookup # assume keys/values of "lookup" are hashable; otherwise # they would also need to be converted in some way here self.lookup = tuple( (key, lookup[key]) for key in sorted(lookup) ) def get_col_spec(self, **kw): return "VARCHAR(255)" def bind_processor(self, dialect): # ... works with "self._lookup" ...
Where above, the cache key for
LookupType({"a": 10, "b": 20})
will be:>>> LookupType({"a": 10, "b": 20})._static_cache_key (<class '__main__.LookupType'>, ('lookup', (('a', 10), ('b', 20))))
Added in version 1.4.14: - added the
cache_ok
flag to allow some configurability of caching forTypeDecorator
classes.Added in version 1.4.28: - added the
ExternalType
mixin which generalizes thecache_ok
flag to both theTypeDecorator
andUserDefinedType
classes.See also
sql_caching
- name = 'POINT'
- class fire.api.model.geometry.Geometry(geometry, srid=4326)
Bases:
Function
Repræsenterer en geometri værdi.
- inherit_cache = True
Indicate if this
HasCacheKey
instance should make use of the cache key generation scheme used by its immediate superclass.The attribute defaults to
None
, which indicates that a construct has not yet taken into account whether or not its appropriate for it to participate in caching; this is functionally equivalent to setting the value toFalse
, except that a warning is also emitted.This flag can be set to
True
on a particular class, if the SQL that corresponds to the object does not change based on attributes which are local to this class, and not its superclass.See also
compilerext_caching - General guideslines for setting the
HasCacheKey.inherit_cache
attribute for third-party or user defined SQL constructs.
- property wkt
- class fire.api.model.geometry.Point(p, srid=4326)
Bases:
Geometry
- inherit_cache = True
Indicate if this
HasCacheKey
instance should make use of the cache key generation scheme used by its immediate superclass.The attribute defaults to
None
, which indicates that a construct has not yet taken into account whether or not its appropriate for it to participate in caching; this is functionally equivalent to setting the value toFalse
, except that a warning is also emitted.This flag can be set to
True
on a particular class, if the SQL that corresponds to the object does not change based on attributes which are local to this class, and not its superclass.See also
compilerext_caching - General guideslines for setting the
HasCacheKey.inherit_cache
attribute for third-party or user defined SQL constructs.
- class fire.api.model.punkttyper.Artskode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Uddybende beskrivelser fra REFGEO:
artskode = 1 control point in fundamental network, first order. artskode = 2 control point in superior plane network. artskode = 2 control point in superior height network. artskode = 3 control point in network of high quality. artskode = 4 control point in network of lower or unknown quality. artskode = 5 coordinate computed on just a few measurements. artskode = 6 coordinate transformed from local or an not valid coordinate system. artskode = 7 coordinate computed on an not valid coordinate system, or system of unknown origin. artskode = 8 coordinate computed on few measurements, and on an not valid coordinate system. artskode = 9 location coordinate or location height.
- BESTEMT_FRA_FAA_OBSERVATIONER = 5
- FAA_OBS_OG_UKENDT_KOORDINATSYSTEM = 8
- FUNDAMENTAL_PUNKT = 1
- LOKATIONSKOORDINAT = 9
- NETVAERK_AF_GOD_KVALITET = 2
- NETVAERK_AF_HOEJ_KVALITET = 3
- NETVAERK_AF_LAV_KVALITET = 4
- NULL = None
- TRANSFORMERET = 6
- UKENDT_KOORDINATSYSTEM = 7
- class fire.api.model.punkttyper.Beregning(**kwargs)
Bases:
FikspunktregisterObjekt
- koordinater
- objektid
- observationer
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- class fire.api.model.punkttyper.Boolean(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- FALSE = 'false'
- TRUE = 'true'
- class fire.api.model.punkttyper.FikspunktregisterObjekt(**kwargs)
Bases:
RegisteringTidObjekt
- class fire.api.model.punkttyper.FikspunktsType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- GI = 1
- HJÆLPEPUNKT = 5
- HØJDE = 3
- JESSEN = 4
- MV = 2
- VANDSTANDSBRÆT = 6
- class fire.api.model.punkttyper.GeometriObjekt(**kwargs)
Bases:
FikspunktregisterObjekt
- geometri
- property koordinater
- objektid
- punkt
- punktid
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- class fire.api.model.punkttyper.Grafik(**kwargs)
Bases:
FikspunktregisterObjekt
- grafik
- mimetype
- objektid
- punkt
- punktid
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- type
- class fire.api.model.punkttyper.GrafikType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- FOTO = 'foto'
- SKITSE = 'skitse'
- class fire.api.model.punkttyper.Ident(punktinfo: PunktInformation | str)
Bases:
object
- class fire.api.model.punkttyper.Koordinat(**kwargs)
Bases:
FikspunktregisterObjekt
- artskode
- property beregning
Returner beregning der ligger til grund for koordinaten.
- beregninger
- property fejlmeldt
- objektid
- property observationer
Returner alle observationer der direkte har bidraget til en koordinat.
- punkt
- punktid
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- srid
- sridid
- sx
- sy
- sz
- t
- tidsserier
- transformeret
- x
- y
- z
- class fire.api.model.punkttyper.Punkt(*args, **kwargs)
Bases:
FikspunktregisterObjekt
- property geometri
- geometriobjekter
- grafikker
- id
- property ident: str
Udtræk det geodætisk mest læsbare ident.
- I nævnte rækkefølge:
IDENT:GI
IDENT:GNSS,
IDENT:landsr
IDENT:jessen
IDENT:station
IDENT:ekstern
IDENT:diverse
IDENT:refgeo_id.
Hvis et punkt overhovedet ikke har noget ident returneres uuiden uforandret.
- property identer: List[str]
Returner liste over alle identer der er tilknyttet Punktet
- property jessennummer: str
- koordinater
- property landsnummer: str
- objektid
- observationer_fra
- observationer_til
- punktinformationer
- punktsamlinger
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- property tabtgået: bool
- tidsserier
- class fire.api.model.punkttyper.PunktInformation(**kwargs)
Bases:
FikspunktregisterObjekt
- infotype
- infotypeid
- objektid
- punkt
- punktid
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- tal
- tekst
- class fire.api.model.punkttyper.PunktInformationType(**kwargs)
Bases:
Base
- anvendelse
- beskrivelse
- infotypeid
- name
- objektid
- class fire.api.model.punkttyper.PunktInformationTypeAnvendelse(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- FLAG = 'FLAG'
- TAL = 'TAL'
- TEKST = 'TEKST'
- class fire.api.model.punkttyper.PunktSamling(**kwargs)
Bases:
FikspunktregisterObjekt
- fjern_punkter(punkter: list[Punkt]) None
Fjern punkter fra punktsamlingen.
Ændrer punktsamlingens liste af punkter in-place. Hvis et eller flere punkter ikke findes i punktsamlingen i forvejen udsendes en ValueError.
- formål
- jessenkoordinat
- jessenkoordinatid
- property jessenkote: float
Referencekoten for tidsserier tilknyttet punktsamlingen.
Koten for en tilknyttet tidsserie fratrukket jessenkoten giver højden over jessenpunktet. Punktsamlinger som ikke har et jessenkoordinat, antages at have jessenkoten 0.
- jessenpunkt
- jessenpunktid
- objektid
- punkter
- sagsevent
- sagseventfraid
- sagseventtilid
- slettet
- tidsserier
- class fire.api.model.punkttyper.Srid(**kwargs)
Bases:
Base
- beskrivelse
- name
- objektid
- sridid
- x
- y
- z
- class fire.api.model.sagstyper.EventType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
- GRAFIK_INDSAT = 10
- GRAFIK_NEDLAGT = 11
- KOMMENTAR = 9
- KOORDINAT_BEREGNET = 1
- KOORDINAT_NEDLAGT = 2
- OBSERVATION_INDSAT = 3
- OBSERVATION_NEDLAGT = 4
- PUNKTGRUPPE_MODIFICERET = 12
- PUNKTGRUPPE_NEDLAGT = 13
- PUNKTINFO_FJERNET = 6
- PUNKTINFO_TILFOEJET = 5
- PUNKT_NEDLAGT = 8
- PUNKT_OPRETTET = 7
- TIDSSERIE_MODIFICERET = 14
- TIDSSERIE_NEDLAGT = 15
- class fire.api.model.sagstyper.Sag(**kwargs)
Bases:
RegisteringFraObjekt
- property aktiv: bool
- property behandler: str
- property beskrivelse: str
- id
- property journalnummer: str
- ny_sagsevent(beskrivelse: str, materialer: List[bytes] = [], htmler: List[str] = [], id: str = None, **kwargs) Sagsevent
Fabrik til oprettelse af nye sagsevents.
Oprettede sagsevents er altid tilknyttet sagen de blev skabt fra. Sagseventtypen bestemmes automatisk ud fra det tilknyttede indhold.
kwargs føres direkte videre til Sagsevent og skal altså være et gyldigt argument til Sagsevent. Fælgende muligheder er tilgængelige:
punkter geometriobjekter beregninger koordinater observationer punktinformationer grafikker punktsamlinger tidsserier punkter_slettede geometriobjekter_slettede beregninger_slettede koordinater_slettede observationer_slettede punktinformationer_slettede grafikker_slettede punktsamlinger_slettede tidsserier_slettede
- objektid
- sagsevents
- sagsinfos
- class fire.api.model.sagstyper.Sagsevent(**kwargs)
Bases:
RegisteringFraObjekt
- beregninger
- beregninger_slettede
- property beskrivelse: str
- eventtype
- geometriobjekter
- geometriobjekter_slettede
- grafikker
- grafikker_slettede
- id
- koordinater
- koordinater_slettede
- objektid
- observationer
- observationer_slettede
- punkter
- punkter_slettede
- punktinformationer
- punktinformationer_slettede
- punktsamlinger
- punktsamlinger_slettede
- sag
- sagseventinfos
- sagsid
- tidsserier
- tidsserier_slettede
- class fire.api.model.sagstyper.SagseventInfo(**kwargs)
Bases:
RegisteringTidObjekt
- beskrivelse
- htmler
- materialer
- objektid
- sagsevent
- sagseventid
- class fire.api.model.sagstyper.SagseventInfoHtml(**kwargs)
Bases:
Base
- html
- objektid
- sagseventinfo
- sagseventinfoobjektid