Readers¶
Regarding to the main documentation you find here all the stuff which is related to the reader layer. This layer is part of the core server application. It is addressed directly by the processor. Its main task is to call the user configured sources and read all the necessary records from them. This is the lowest core layer.
Note
This layer is not meant to be adapted in normal.
AddressReader¶
- class pyramid_oereb.core.readers.address.AddressReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader accessor for addresses. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
The address is here the real combination of a street name, a zip code and a street number.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path (str or pyramid_oereb.lib.sources.address.AddressBaseSource) – The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the AddressBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read(params, street_name, zip_code, street_number)[source]¶
The read method of this reader. There we invoke the read method of the bound source.
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 list of AddressRecord. Otherwise the API like way the server works would be broken.
- 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.
- Returns:
The list of found records filtered by the passed criteria.
- Return type:
AvailabilityReader¶
- class pyramid_oereb.core.readers.availability.AvailabilityReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the disclaimer definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
or (dotted_source_class_path (str) – pyramid_oereb.core.sources.availability.AvailabilityBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the DisclaimerBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The read method of this reader. There we invoke the read method of the bound source.
Note
If you construct a subclass of 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 list of AvailabilityRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.availability.AvailabilityRecord
DataIntegrationReader¶
- class pyramid_oereb.core.readers.data_integration.DataIntegrationReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the data integration definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
or (dotted_source_class_path (str) – pyramid_oereb.core.sources.data_integration.DataIntegrationBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the DataIntegrationBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The read method of this reader. There we invoke the read method of the bound source.
Note
If you construct a subclass of 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 list of DataIntegrationRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.data_integration.DataIntegrationRecord
DisclaimerReader¶
- class pyramid_oereb.core.readers.disclaimer.DisclaimerReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the disclaimer definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
or (dotted_source_class_path (str) – pyramid_oereb.core.records.disclaimer.DisclaimerRecord): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the DisclaimerBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The read method of this reader. There we invoke the read method of the bound source.
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 list of AvailabilityRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.disclaimer.DisclaimerRecord
DocumentReader¶
- class pyramid_oereb.core.readers.document.DocumentReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the document definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.document.DocumentBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the DocumentBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read(office_records)[source]¶
The central read accessor method to get all desired records from configured source.
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 list of DocumentRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
DocumentTypeReader¶
- class pyramid_oereb.core.readers.document_types.DocumentTypeReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the document type definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.document_types.DocumentTypesBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the DocumentTypesBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of DocumentTypeRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.document_types.DocumentTypeRecord
ExtractReader¶
- class pyramid_oereb.core.readers.extract.ExtractReader(plr_sources, plr_cadastre_authority)[source]¶
Bases:
object
The class which generates the extract as a record (ExtractRecord). This is the point where all necessary and extract related components are bound together.
- extract¶
The extract as a record representation. On initialisation this is None. It will be set by calling the read method of the instance.
- Type:
pyramid_oereb.lib.records.extract.ExtractRecord or None
- __init__(plr_sources, plr_cadastre_authority)[source]¶
- Parameters:
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.OfficeRecord) – The authority responsible for the PLR cadastre.
- property plr_cadastre_authority¶
Returns: pyramid_oereb.lib.records.office.OfficeRecord: The authority responsible for the PLR cadastre.
- read(params, real_estate, municipality)[source]¶
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 ExtractRecord. Otherwise the API like way the server works would be broken.
- 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 for which the report should be generated
municipality (pyramid_oereb.lib.records.municipality.MunicipalityRecord) – The municipality record.
- Returns:
The extract record containing all gathered data.
- Return type:
pyramid_oereb.lib.records.extract.ExtractRecord
GeneralInformationReader¶
- class pyramid_oereb.core.readers.general_information.GeneralInformationReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the OEREB general information. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.general_information.GeneralInformationBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the GeneralInformationBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of GeneralInformationRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.general_information.GeneralInformationRecord
GlossaryReader¶
- class pyramid_oereb.core.readers.glossary.GlossaryReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the glossary definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.glossary.GlossaryBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the GlossaryBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of GlossaryRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
LawStatusReader¶
- class pyramid_oereb.core.readers.law_status.LawStatusReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the law status definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.lawstatus.LawStatusBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the LawStatusBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of LawStatusRecord. Otherwise the API like way the server works would be broken.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.lawstatus.LawStatusRecord
LogoReader¶
- class pyramid_oereb.core.readers.logo.LogoReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the logo images. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.logo.LogoBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the LogoBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of LogoRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
MapLayeringReader¶
- class pyramid_oereb.core.readers.map_layering.MapLayeringReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the map layering definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.map_layering.MapLayeringBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the GlossaryBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of MapLayeringRecord. Otherwise the API like way the server works would be broken.
- Parameters:
params (pyramid_oereb.views.webservice.Parameter) – The parameters of the extract request.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.map_layering.MapLayeringRecord
MunicipalityReader¶
- class pyramid_oereb.core.readers.municipality.MunicipalityReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for municipalities. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.municipality.MunicipalityBaseSource): The path to the class which represents the source used by this reader. This class must implement basic source behaviour of the MunicipalityBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of MunicipalityRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of all found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.lib.records.municipality.MunicipalityRecord
OfficeReader¶
- class pyramid_oereb.core.readers.office.OfficeReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the office definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.office.OfficeBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the OfficeBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of OfficeRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
RealEstateReader¶
- class pyramid_oereb.core.readers.real_estate.RealEstateReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for real estates. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path (str or pyramid_oereb.lib.sources.real_estate.RealEstateBaseSource) – The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the RealEstateBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read(params, nb_ident=None, number=None, egrid=None, geometry=None)[source]¶
The central read accessor method to get all desired records from configured source.
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 list of RealEstateRecord. Otherwise the API like way the server works would be broken.
- 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 will deliver only one result or crashes.
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 will deliver only one result or crashes.
egrid (str or None) – The unique identifier of the desired real estate. This will deliver only one result or crashes.
geometry (str or None) – A geometry as WKT string which is used to obtain intersected real estates. This may deliver several results.
- Returns:
The list of all found records filtered by the passed criteria.
- Return type:
list of pyramid_oereb.core.records.real_estate.RealEstateRecord
RealEstateTypeReader¶
- class pyramid_oereb.core.readers.real_estate_type.RealEstateTypeReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the real estate type definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.realestatetype.RealEstateTypeBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the RealEstateTypeBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of RealEstateTypeRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.realestatetype.RealEstateTypeRecord
ThemeReader¶
- class pyramid_oereb.core.readers.theme.ThemeReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the theme definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.theme.ThemeBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the ThemeBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of ThemeRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
ThemeDocumentReader¶
- class pyramid_oereb.core.readers.theme_document.ThemeDocumentReader(dotted_source_class_path, **params)[source]¶
Bases:
object
The central reader for the theme_document definitions. It is directly bound to a so called source which is defined by a pythonic dotted string to the class definition of this source. An instance of the passed source will be created on instantiation of this reader class by passing through the parameter kwargs.
- __init__(dotted_source_class_path, **params)[source]¶
- Parameters:
dotted_source_class_path – (str or pyramid_oereb.core.sources.theme_document.ThemeDocumentBaseSource): The path to the class which represents the source used by this reader. This class must exist and it must implement basic source behaviour of the ThemeDocumentBaseSource.
(kwargs) – kwargs, which are necessary as configuration parameter for the above by dotted name defined class.
- read()[source]¶
The central read accessor method to get all desired records from configured source.
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 list of ThemeDocumentRecord. Otherwise the API like way the server works would be broken.
- Returns:
The list of found records. Since these are not filtered by any criteria the list simply contains all records delivered by the source.
- Return type:
list of pyramid_oereb.core.records.theme_document.ThemeDocumentRecord