Interfaces

pyramid_oereb

OeREBKRMtrsfr_V2_0 generators

This interface offers methods to access python classes matching the OeREBKRMtrsfr_V2_0 INTERLIS model. It is used mainly for translation and handling between pyramid_oereb and OeREBKRMtrsfr_V2_0.

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.generators.document_record_to_oerebkrmtrsfr(document_record)[source]

Translates a pyramid_oereb document record object to an OeREBKRM_V2_0_Dokumente_Dokument object.

Parameters:

document_record (pyramid_oereb.core.records.documents.DocumentRecord) – The record to translate.

Returns:

tuple containing:

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_Amt_Amt:

The office which belongs to the document (responsible office).

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_Dokumente_Dokument:

The document.

Return type:

(tuple)

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.generators.fix_url(url)[source]

Helper method to hotfix an often occurring problem with urls not being valid in the ili sense. The URLs out of ÖREBlex are missing the http/https part often. So we try to fix this on the fly.

Parameters:

url (str) – The URL string which might be fixed.

Returns:

The maybe fixed URL.

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.generators.multilingual_text_from_dict(multilingual_dict)[source]

Produces a MultilingualText object out of a dict in the form:

{
  "de": "Test",
  "it": "Testo"
}
Parameters:

multilingual_dict (dict or None) – The definition of the multilingual element or None.

Returns:

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.TitelType

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.generators.multilingual_uri_from_dict(multilingual_dict)[source]

Produces a MultilingualText object out of a dict in the form:

{
  "de": "Test",
  "it": "Testo"
}
Parameters:

multilingual_dict (dict or None) – The definition of the multilingual element or None.

Returns:

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.TextImWebType

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.generators.office_record_to_oerebkrmtrsfr(office_record)[source]

Translates a pyramid_oereb office record object to an OeREBKRM_V2_0_Amt_Amt object.

Parameters:

office_record (pyramid_oereb.core.records.office.OfficeRecord) – The office record to translate.

Returns:

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_Amt_Amt

OeREBKRMtrsfr_V2_0 classes

This is a selection of classes available to adapt to OeREBKRMtrsfr_V2_0. The selection shows the classes used in the current implementation. Please have a look in the source file to see the complete implementation.

class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_Dokumente_Dokument(TID=None, Typ=None, Titel=None, Abkuerzung=None, OffizielleNr=None, NurInGemeinde=None, TextImWeb=None, Dokument=None, AuszugIndex=None, Rechtsstatus=None, publiziertAb=None, publiziertBis=None, ZustaendigeStelle=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='OeREBKRM_V2_0.Dokumente.Dokument', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_Abkuerzung()[source]
get_AuszugIndex()[source]
get_Dokument()[source]
get_NurInGemeinde()[source]
get_OffizielleNr()[source]
get_Rechtsstatus()[source]
get_TID()[source]
get_TextImWeb()[source]
get_Titel()[source]
get_Typ()[source]
get_ZustaendigeStelle()[source]
get_ns_prefix_()[source]
get_publiziertAb()[source]
get_publiziertBis()[source]
member_data_items_ = {'Abkuerzung': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'AuszugIndex': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Dokument': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'NurInGemeinde': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'OffizielleNr': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Rechtsstatus': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'TID': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'TextImWeb': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Titel': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Typ': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'ZustaendigeStelle': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'publiziertAb': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'publiziertBis': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_Abkuerzung(Abkuerzung)[source]
set_AuszugIndex(AuszugIndex)[source]
set_Dokument(Dokument)[source]
set_NurInGemeinde(NurInGemeinde)[source]
set_OffizielleNr(OffizielleNr)[source]
set_Rechtsstatus(Rechtsstatus)[source]
set_TID(TID)[source]
set_TextImWeb(TextImWeb)[source]
set_Titel(Titel)[source]
set_Typ(Typ)[source]
set_ZustaendigeStelle(ZustaendigeStelle)[source]
set_ns_prefix_(ns_prefix)[source]
set_publiziertAb(publiziertAb)[source]
set_publiziertBis(publiziertBis)[source]
subclass = None
superclass = None
validate_AuszugIndexType(value)[source]
validate_CHAdminCodes_V1_CHMunicipalityCode(value)[source]
validate_IliID(value)[source]
validate_IliID_patterns_ = [['^(([a-zA-Z_][0-9a-zA-Z_\\-\\.]*:)?[0-9a-zA-Z_][0-9a-zA-Z_\\-\\.]*)$']]
validate_OeREBKRM_V2_0_Datum(value)[source]
validate_OeREBKRM_V2_0_DokumentTyp(value)[source]
validate_OeREBKRM_V2_0_RechtsStatus(value)[source]
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_Amt_Amt(TID=None, Name=None, AmtImWeb=None, UID=None, Zeile1=None, Zeile2=None, Strasse=None, Hausnr=None, PLZ=None, Ort=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='OeREBKRM_V2_0.Amt.Amt', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_AmtImWeb()[source]
get_Hausnr()[source]
get_Name()[source]
get_Ort()[source]
get_PLZ()[source]
get_Strasse()[source]
get_TID()[source]
get_UID()[source]
get_Zeile1()[source]
get_Zeile2()[source]
get_ns_prefix_()[source]
member_data_items_ = {'AmtImWeb': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Hausnr': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Name': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Ort': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'PLZ': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Strasse': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'TID': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'UID': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Zeile1': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Zeile2': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_AmtImWeb(AmtImWeb)[source]
set_Hausnr(Hausnr)[source]
set_Name(Name)[source]
set_Ort(Ort)[source]
set_PLZ(PLZ)[source]
set_Strasse(Strasse)[source]
set_TID(TID)[source]
set_UID(UID)[source]
set_Zeile1(Zeile1)[source]
set_Zeile2(Zeile2)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
validate_HausnrType(value)[source]
validate_IliID(value)[source]
validate_IliID_patterns_ = [['^(([a-zA-Z_][0-9a-zA-Z_\\-\\.]*:)?[0-9a-zA-Z_][0-9a-zA-Z_\\-\\.]*)$']]
validate_OeREBKRM_V2_0_UID(value)[source]
validate_OrtType(value)[source]
validate_PLZType(value)[source]
validate_StrasseType(value)[source]
validate_Zeile1Type(value)[source]
validate_Zeile2Type(value)[source]
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.ZustaendigeStelleType(REF=None, BID=None, ORDER_POS=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_='', name_='ZustaendigeStelleType', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_BID()[source]
get_ORDER_POS()[source]
get_REF()[source]
get_ns_prefix_()[source]
member_data_items_ = {'BID': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'ORDER_POS': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'REF': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_BID(BID)[source]
set_ORDER_POS(ORDER_POS)[source]
set_REF(REF)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
validate_IliID(value)[source]
validate_IliID_patterns_ = [['^(([a-zA-Z_][0-9a-zA-Z_\\-\\.]*:)?[0-9a-zA-Z_][0-9a-zA-Z_\\-\\.]*)$']]
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.TitelType(LocalisationCH_V1_MultilingualText=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='TitelType', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_LocalisationCH_V1_MultilingualText()[source]
get_ns_prefix_()[source]
member_data_items_ = {'LocalisationCH_V1_MultilingualText': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_LocalisationCH_V1_MultilingualText(LocalisationCH_V1_MultilingualText)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.TextImWebType(OeREBKRM_V2_0_MultilingualUri=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='TextImWebType', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_OeREBKRM_V2_0_MultilingualUri()[source]
get_ns_prefix_()[source]
member_data_items_ = {'OeREBKRM_V2_0_MultilingualUri': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_OeREBKRM_V2_0_MultilingualUri(OeREBKRM_V2_0_MultilingualUri)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_MultilingualUri(LocalisedText=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='OeREBKRM_V2_0.MultilingualUri', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_LocalisedText()[source]
get_ns_prefix_()[source]
member_data_items_ = {'LocalisedText': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_LocalisedText(LocalisedText)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.OeREBKRM_V2_0_LocalisedUri(Language=None, Text=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='OeREBKRM_V2_0.LocalisedUri', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_Language()[source]
get_Text()[source]
get_ns_prefix_()[source]
member_data_items_ = {'Language': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Text': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_Language(Language)[source]
set_Text(Text)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
validate_INTERLIS_URI(value)[source]
validate_InternationalCodes_V1_LanguageCode_ISO639_1(value)[source]
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.LocalisedTextType(LocalisationCH_V1_LocalisedText=None, gds_collector_=None, **kwargs_)[source]
add_LocalisationCH_V1_LocalisedText(value)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='LocalisedTextType', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_LocalisationCH_V1_LocalisedText()[source]
get_ns_prefix_()[source]
insert_LocalisationCH_V1_LocalisedText_at(index, value)[source]
member_data_items_ = {'LocalisationCH_V1_LocalisedText': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
replace_LocalisationCH_V1_LocalisedText_at(index, value)[source]
set_LocalisationCH_V1_LocalisedText(LocalisationCH_V1_LocalisedText)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.LocalisedTextType86(OeREBKRM_V2_0_LocalisedUri=None, gds_collector_=None, **kwargs_)[source]
add_OeREBKRM_V2_0_LocalisedUri(value)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='LocalisedTextType86', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_OeREBKRM_V2_0_LocalisedUri()[source]
get_ns_prefix_()[source]
insert_OeREBKRM_V2_0_LocalisedUri_at(index, value)[source]
member_data_items_ = {'OeREBKRM_V2_0_LocalisedUri': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
replace_OeREBKRM_V2_0_LocalisedUri_at(index, value)[source]
set_OeREBKRM_V2_0_LocalisedUri(OeREBKRM_V2_0_LocalisedUri)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.LocalisationCH_V1_LocalisedText(Language=None, Text=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='LocalisationCH_V1.LocalisedText', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_Language()[source]
get_Text()[source]
get_ns_prefix_()[source]
member_data_items_ = {'Language': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>, 'Text': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_Language(Language)[source]
set_Text(Text)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None
validate_InternationalCodes_V1_LanguageCode_ISO639_1(value)[source]
validate_TextType79(value)[source]
class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.LocalisationCH_V1_MultilingualText(LocalisedText=None, gds_collector_=None, **kwargs_)[source]
build(node, gds_collector_=None)[source]
export(outfile, level, namespaceprefix_='', namespacedef_=' xmlns:None="http://www.interlis.ch/INTERLIS2.3" ', name_='LocalisationCH_V1.MultilingualText', pretty_print=True)[source]
static factory(*args_, **kwargs_)[source]
get_LocalisedText()[source]
get_ns_prefix_()[source]
member_data_items_ = {'LocalisedText': <geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.MemberSpec_ object>}
set_LocalisedText(LocalisedText)[source]
set_ns_prefix_(ns_prefix)[source]
subclass = None
superclass = None

geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.GeneratedsSuper is the superclass all above mentioned classes are inheriting from.

class geolink2oereb.lib.interfaces.oerebkrmtrsfr.v2_0.classes.GeneratedsSuper[source]
Tag_strip_pattern_ = re.compile('\\{.*\\}')
static convert_unicode(instring)[source]
gds_build_any(node, type_name=None)[source]
gds_check_cardinality_(value, input_name, min_occurs=0, max_occurs=1, required=None)[source]
gds_djo_etl_transform()[source]
gds_djo_etl_transform_db_obj(dbobj)[source]
static gds_encode(instring)[source]
gds_format_base64(input_data, input_name='')[source]
gds_format_boolean(input_data, input_name='')[source]
gds_format_boolean_list(input_data, input_name='')[source]
gds_format_date(input_data, input_name='')[source]
gds_format_datetime(input_data, input_name='')[source]
gds_format_decimal(input_data, input_name='')[source]
gds_format_decimal_list(input_data, input_name='')[source]
gds_format_double(input_data, input_name='')[source]
gds_format_double_list(input_data, input_name='')[source]
gds_format_float(input_data, input_name='')[source]
gds_format_float_list(input_data, input_name='')[source]
gds_format_integer(input_data, input_name='')[source]
gds_format_integer_list(input_data, input_name='')[source]
gds_format_string(input_data, input_name='')[source]
gds_format_time(input_data, input_name='')[source]
gds_get_node_lineno_()[source]
gds_parse_boolean(input_data, node=None, input_name='')[source]
classmethod gds_parse_date(input_data)[source]
classmethod gds_parse_datetime(input_data)[source]
gds_parse_decimal(input_data, node=None, input_name='')[source]
gds_parse_double(input_data, node=None, input_name='')[source]
gds_parse_float(input_data, node=None, input_name='')[source]
gds_parse_integer(input_data, node=None, input_name='')[source]
gds_parse_string(input_data, node=None, input_name='')[source]
classmethod gds_parse_time(input_data)[source]
classmethod gds_reverse_node_mapping(mapping)[source]
gds_sqa_etl_transform()[source]
gds_sqa_etl_transform_db_obj(dbobj)[source]
gds_str_lower(instring)[source]
gds_validate_base64(input_data, node=None, input_name='')[source]
gds_validate_boolean(input_data, node=None, input_name='')[source]
gds_validate_boolean_list(input_data, node=None, input_name='')[source]
gds_validate_builtin_ST_(validator, value, input_name, min_occurs=None, max_occurs=None, required=None)[source]
gds_validate_date(input_data, node=None, input_name='')[source]
gds_validate_datetime(input_data, node=None, input_name='')[source]
gds_validate_decimal(input_data, node=None, input_name='')[source]
gds_validate_decimal_list(input_data, node=None, input_name='')[source]
gds_validate_defined_ST_(validator, value, input_name, min_occurs=None, max_occurs=None, required=None)[source]
gds_validate_double(input_data, node=None, input_name='')[source]
gds_validate_double_list(input_data, node=None, input_name='')[source]
gds_validate_float(input_data, node=None, input_name='')[source]
gds_validate_float_list(input_data, node=None, input_name='')[source]
gds_validate_integer(input_data, node=None, input_name='')[source]
gds_validate_integer_list(input_data, node=None, input_name='')[source]
gds_validate_simple_patterns(patterns, target)[source]
gds_validate_string(input_data, node=None, input_name='')[source]
gds_validate_time(input_data, node=None, input_name='')[source]
get_class_obj_(node, default_class=None)[source]
get_path_(node)[source]
get_path_list_(node, path_list)[source]
tzoff_pattern = re.compile('(\\+|-)((0\\d|1[0-3]):[0-5]\\d|14:00)$')