lib.readers.extract

Module Contents

Classes

ExtractReader(self,plr_sources,plr_cadastre_authority,logos) The class which generates the extract as a record
class ExtractReader(plr_sources, plr_cadastre_authority, logos)

The class which generates the extract as a record (api-pyramid_oereb-lib-records-extract-extractrecord). This is the point where all necessary and extract related components are bound together.

Attributes:
extract (pyramid_oereb.lib.records.extract.ExtractRecord or None): The extract as a record
representation. On initialisation this is None. It will be set by calling the read method of the instance.
__init__(plr_sources, plr_cadastre_authority, logos)

Args: plr_sources (list of pyramid_oereb.lib.sources.plr.PlrBaseSource): The list of PLR source

instances which the achieved extract should be about.
plr_cadastre_authority (pyramid_oereb.lib.records.office.OffcieRecord): The authority responsible
for the PLR cadastre.

logos (dict): The logos of confederation, canton and oereb wrapped in a ImageRecord.

plr_cadastre_authority()

Returns the authority responsible for the PLR cadastre.

Returns:
pyramid_oereb.lib.records.office.OffcieRecord: The authority responsible for the PLR cadastre.
logo_plr_cadastre()

The logo of the PLR-Cadastre.

Returns:
pyramid_oereb.lib.records.image.ImageRecord: The logo for oereb as a ImageRecord.

The logo of the confederation.

Returns:
pyramid_oereb.lib.records.image.ImageRecord: The federal logo as a ImageRecord.

The cantonal logo.

Returns:
pyramid_oereb.lib.records.image.ImageRecord: The cantonal logos as a ImageRecord.
read(real_estate, municipality_logo, params)

This method finally creates the extract.

Note

If you subclass this class your implementation needs to offer this method in the same signature. Means the parameters must be the same and the return must be a api-pyramid_oereb-lib-records-extract-extractrecord. Otherwise the API like way the server works would be broken.

Args:
real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord): The real
estate for which the report should be generated
municipality_logo (pyramid_oereb.lib.records.image.ImageRecord): The municipality
logo.
params (pyramid_oereb.views.webservice.Parameter): The parameters of the extract
request.
Returns:
pyramid_oereb.lib.records.extract.ExtractRecord:
The extract record containing all gathered data.