Sources

This is package provides the minimum requirements on the classes which can be used as a source.

Base

class pyramid_oereb.core.sources.Base[source]

The basic source class. This is not meant to be used directly as a source at runtime. But more as a basic class for inherit in special designed classes.

records

The list which will be filled up with records in the process.

Type:

list

__init__()

BaseDatabaseSource

class pyramid_oereb.core.sources.BaseDatabaseSource(**kwargs)[source]

The plug for addresses which uses a database as source.

TIMEOUT

Seconds to wait until database should be ready

Type:

int

__init__(**kwargs)[source]
Keyword Arguments:
  • db_connection (str) – A rfc1738 conform database connection string in the form of: <driver_name>://<username>:<password>@<database_host>:<port>/<database_name>

  • model (str) – A valid dotted name string which leads to an importable representation of sqlalchemy.ext.declarative.DeclarativeMeta or the real class itself.

AddressBaseSource

class pyramid_oereb.core.sources.address.AddressBaseSource[source]

Base class for address sources.

records

List of address records.

Type:

list of pyramid_oereb.lib.records.address.AddressRecord

__init__()
read(params, street_name, zip_code, street_number)[source]

Every address source has to implement a read method. This method must accept the three parameters. If you want adapt to your own source for addresses, this is the point where to hook in.

Parameters:
  • params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.

  • street_name (unicode) – The name of the street for the desired address.

  • zip_code (int) – The postal zipcode for the desired address.

  • street_number (str) – The house or so called street number of the desired address.

AvailabilityBaseSource

class pyramid_oereb.core.sources.availability.AvailabilityBaseSource[source]

Base class for availability sources.

records

List of availability records.

Type:

list of pyramid_oereb.core.records.availability.AvailabilityRecord

__init__()
read()[source]

Every availability source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want to adapt to your own source for availability, this is the point where to hook in.

DataIntegrationBaseSource

class pyramid_oereb.core.sources.data_integration.DataIntegrationBaseSource[source]

Base class for data integration sources.

records

List of availability records.

Type:

list of pyramid_oereb.core.records.data_integration.DataIntegrationRecord

__init__()
read()[source]

Every availability source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want to adapt to your own source for data integration, this is the point where to hook in.

DisclaimerBaseSource

class pyramid_oereb.core.sources.disclaimer.DisclaimerBaseSource[source]

Base class for exclusion of liability sources.

records

List of exclusion of liability records.

Type:

list of pyramid_oereb.lib.records.disclaimer.DisclaimerRecord

__init__()
read()[source]

Every disclaimer source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for disclaimer, this is the point where to hook in.

DocumentBaseSource

class pyramid_oereb.core.sources.document.DocumentBaseSource[source]

Base class for document sources.

records

List of document records.

Type:

list of pyramid_oereb.lib.records.documents.DocumentRecord

__init__()
read(office_records)[source]

Every document source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for documents, this is the point where to hook in.

Parameters:

office_records (pyramid_oereb.views.webservice.Parameter) – The office records of the exact request.

DocumentTypesBaseSource

class pyramid_oereb.core.sources.document_types.DocumentTypesBaseSource[source]

Base class for document type values source.

records

List of document

Type:

list of pyramid_oereb.lib.records.document_types.DocumentTypeRecord

type records.
__init__()
read()[source]

Every document type source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for document type labels, this is the point where to hook in.

GeneralInformationBaseSource

class pyramid_oereb.core.sources.general_information.GeneralInformationBaseSource[source]

Base class for GeneralInformation values source.

records

List of

Type:

list of pyramid_oereb.lib.records.general_information.GeneralInformationRecord

general information records.
__init__()
read()[source]

Every general information source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for general information labels, this is the point where to hook in.

GlossaryBaseSource

class pyramid_oereb.core.sources.glossary.GlossaryBaseSource[source]

Base class for address sources.

records

List of glossary records.

Type:

list of pyramid_oereb.lib.records.glossary.GlossaryRecord

__init__()
read()[source]

Every glossary source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for glossaries, this is the point where to hook in.

LawStatusBaseSource

class pyramid_oereb.core.sources.law_status.LawStatusBaseSource[source]

Base class for law status values source. .. attribute:: records

List of law status

type:

list of pyramid_oereb.lib.records.law_status.LawStatusRecord

records.
__init__()
read(params=None)[source]

Every law status source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for real estate type labels, this is the point where to hook in.

Parameters:

params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.

LegendBaseSource

class pyramid_oereb.core.sources.legend.LegendBaseSource[source]

Base class for exclusion of liability sources.

records

List of legend entry records.

Type:

list of pyramid_oereb.lib.records.view_service.LegendEntryRecord

__init__()
read(params, **kwargs)[source]

Every legend entry source has to implement a read method. If you want adapt to your own source for legend entries, this is the point where to hook in.

Parameters:
  • params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.

  • (kwargs) – Arbitrary keyword arguments.

LogoBaseSource

class pyramid_oereb.core.sources.logo.LogoBaseSource[source]

Base class for logo images source.

records

List of logos

Type:

list of pyramid_oereb.lib.records.logo.LogoRecord

type records.
__init__()
read()[source]

Every logo source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for logo images, this is the point where to hook in.

MapLayeringBaseSource

class pyramid_oereb.core.sources.map_layering.MapLayeringBaseSource[source]

Base class for address sources.

records

List of map layering records.

Type:

list of pyramid_oereb.lib.records.map_layering.MapLayeringRecord

__init__()
read()[source]

Every map layering source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for map layering, this is the point where to hook in.

MunicipalityBaseSource

class pyramid_oereb.core.sources.municipality.MunicipalityBaseSource[source]

Base class for municipality sources.

records

List of municipality records.

Type:

list of pyramid_oereb.lib.records.municipality.MunicipalityRecord

__init__()
read()[source]

Every municipality source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for municipalities, this is the point where to hook in.

OfficeBaseSource

class pyramid_oereb.core.sources.office.OfficeBaseSource[source]

Base class for office sources.

records

List of office records.

Type:

list of pyramid_oereb.lib.records.office.OfficeRecord

__init__()
read()[source]

Every office source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for offices, this is the point where to hook in.

PlrBaseSource

class pyramid_oereb.core.sources.plr.PlrBaseSource(**kwargs)[source]

Base class for public law restriction sources.

records

List of public law restriction records.

Type:

list of pyramid_oereb.lib.records.plr.EmptyPlrRecord

datasource

List of data source records used for the additional data in flavour embeddable.

Type:

list of pyramid_oereb.lib.records.embeddable.DatasourceRecord

__init__(**kwargs)[source]
Keyword Arguments:
  • name (str) – The name. You are free to choose one.

  • code (str) – The official code. Regarding to the federal specifications.

  • geometry_type (str) – The geometry type. Possible are: POINT, POLYGON, LINESTRING, GEOMETRYCOLLECTION

  • thresholds (dict) – The configuration of limits and units used for processing.

  • text (dict of str) – The speaking title. It must be a dictionary containing language (as configured) as key and text as value.

  • language (str) – The language this public law restriction is originally shipped with.

  • federal (bool) – Switch if it is a federal topic. This will be taken into account in processing steps.

  • source (dict) – The configuration dictionary of the public law restriction

  • hooks (dict of str) – The hook methods: get_symbol, get_symbol_ref. They have to be provided as dotted string for further use with dotted name resolver of pyramid package.

  • law_status (dict of str) – The configuration dictionary of the law status. It consists of the code and text which must be a dictionary containing language (as configured) as key and text as value.

property info

Return the info dictionary.

Returns:

The info dictionary.

Return type:

dict

read(params, real_estate, bbox)[source]

Every public law restriction source has to implement a read method. This method must accept the two key word parameters. If you want adapt to your own source for real estates, this is the point where to hook in.

Parameters:
  • params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.

  • real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord) – The real estate which is used as filter to find all related public law restrictions.

  • bbox (shapely.geometry.base.BaseGeometry) – The bounding box which is used as a pre-filter to find all public law restrictions. This is related to the fact that we need to provide not only the public law restrictions that are related to the real estate but also the ones which are in the visible extent of the map.

RealEstateBaseSource

class pyramid_oereb.core.sources.real_estate.RealEstateBaseSource[source]

Base class for real estate sources.

records

List of real estate records.

Type:

list of pyramid_oereb.lib.records.real_estate.RealEstateRecord

__init__()
read(params, nb_ident=None, number=None, egrid=None, geometry=None)[source]

Every real estate source has to implement a read method. This method must accept the four key word parameters. If you want adapt to your own source for real estates, this is the point where to hook in.

Parameters:
  • params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.

  • nb_ident (int or None) – The identification number of the desired real estate. This parameter is directly related to the number parameter and both must be set! Combination must deliver only one result or must raise an error.

  • number (str or None) – The number of parcel or also known real estate. This parameter is directly related to the nb_ident parameter and both must be set! Combination must deliver only one result or must raise an error.

  • egrid (str or None) – The unique identifier of the desired real estate. This must deliver only one result or must raise an error.

  • geometry (str) – A geometry as WKT string which is used to obtain intersected real estates. This may deliver several results.

RealEstateTypeBaseSource

class pyramid_oereb.core.sources.real_estate_type.RealEstateTypeBaseSource[source]

Base class for real estate type values source. .. attribute:: records

List of real estate

type:

list of pyramid_oereb.lib.records.real_estate_type.RealEstateTypeRecord

type records.
__init__()
read(params=None)[source]

Every real estate type source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for real estate type labels, this is the point where to hook in. :param params: The parameters of the extract request. :type params: pyramid_oereb.views.webservice.Parameter

ThemeBaseSource

class pyramid_oereb.core.sources.theme.ThemeBaseSource[source]

Base class for theme sources.

records

List of theme records.

Type:

list of pyramid_oereb.lib.records.theme.ThemeRecord

__init__()
read()[source]

Every theme source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for themes, this is the point where to hook in.

ThemeDocumentBaseSource

class pyramid_oereb.core.sources.theme_document.ThemeDocumentBaseSource[source]

Base class for theme document sources.

records

List of theme document records.

Type:

list of pyramid_oereb.core.records.theme.ThemeDocumentRecord

__init__()
read()[source]

Every theme document source has to implement a read method. This method must accept no parameters. Because it should deliver all items available. If you want adapt to your own source for theme documents, this is the point where to hook in.