lib.renderer.extract.json_

Module Contents

Classes

Renderer(self,info)
class Renderer(info)
__init__(info)

Creates a new JSON renderer instance for extract rendering.

Args:
info (pyramid.interfaces.IRendererInfo): Info object.
__call__(value, system)

Returns the JSON encoded extract, according to the specification.

Args:
value (tuple): A tuple containing the generated extract record and the params
dictionary.

system (dict): The available system properties.

Returns:
str: The JSON encoded extract.
_render(extract, param)

Serializes the extract record.

Args:

extract (pyramid_oereb.lib.records.extract.ExtractRecord): The extract record param (pyramid_oereb.views.webservice.Parameter): The parameter instance holding information and

methods for handling request parameters.
Returns:
str: The JSON encoded extract.
format_real_estate(real_estate)

Formats a real estate record for rendering according to the federal specification.

Args:
real_estate (pyramid_oereb.lib.records.real_estate.RealEstateRecord): The real
estate record to be formatted.
Returns:
dict: The formatted dictionary for rendering.
format_plr(plrs)

Formats a public law restriction record for rendering according to the federal specification.

Args:
plrs (list of pyramid_oereb.lib.records.plr.PlrRecord): The public law restriction
records to be formatted.
Returns:
list of dict: The formatted dictionaries for rendering.
format_law_status(law_status)
Args:
law_status (pyramid_oereb.lib.records.law_status.LawStatusRecord): The law status to format into
a dictionary.
Returns:
dict: The transformed law status.
format_document(document)

Formats a document record for rendering according to the federal specification. If the render is requested with a full flavour, it will render the textAtWeb into a Base64TextAtWeb field (for LegalProvisionRecord documents).

Args:
document (pyramid_oereb.lib.records.documents.DocumentBaseRecord): The document
record to be formatted.
Returns:
dict: The formatted dictionary for rendering.
format_geometry(geometry)

Formats a geometry record for rendering according to the federal specification.

Args:
geometry (pyramid_oereb.lib.records.geometry.GeometryRecord): The geometry record to
be formatted.
Returns:
dict: The formatted dictionary for rendering.
format_office(office)

Formats an office record for rendering according to the federal specification.

Args:
office (pyramid_oereb.lib.records.office.OfficeRecord): The office record to be
formatted.
Returns:
dict: The formatted dictionary for rendering.
format_theme(theme)

Formats a theme record for rendering according to the federal specification.

Args:
theme (pyramid_oereb.lib.records.theme.ThemeRecord): The theme record to be
formatted.
Returns:
dict: The formatted dictionary for rendering.
format_map(map_)

Formats a view service record for rendering according to the federal specification.

Args:
map_ (pyramid_oereb.lib.records.view_service.ViewServiceRecord): The view service
record to be formatted.
Returns:
dict: The formatted dictionary for rendering.
format_legend_entry(legend_entry)

Formats a legend entry record for rendering according to the federal specification.

Args:
legend_entry (pyramid_oereb.lib.records.view_service.LegendEntryRecord): The legend
entry record to be formatted.
Returns:
dict: The formatted dictionary for rendering.
from_shapely()

Formats shapely geometry for rendering according to the federal specification.

Args:
geom (shapely.geometry.base.BaseGeometry): The geometry object to be formatted.
Returns:
dict: The formatted geometry.
format_embeddable(embeddable)

Formats a embeddable record for rendering according to the specification.

Args:
embeddable (pyramid_oereb.lib.records.embeddable.EmbeddableRecord): The record to be formatted.
Returns:
dict: The formatted record for rendering.