<commit_before># -*- coding: utf-8 -*-
"""Module containing the DOV data type for bodemobservaties, including
subtypes."""
from pydov.types.fields import WfsField, XmlField

from .abstract import AbstractDovType


class Bodemobservatie(AbstractDovType):
    """Class representing the DOV data type for bodemobservaties."""

    subtypes = []

    fields = [
        WfsField(name='pkey_bodemlocatie',
                 source_field='Bodemobservatiefiche',
                 datatype='string'),
        WfsField(name='parameter', source_field='Parameter',
                 datatype='string'),
        XmlField(name='parametergroep',
                 source_xpath='/bodemobservatie/parametergroep',
                 definition='Indeling van de parameter naar groep, '
                 + 'bvb anionen, kationen, .... Is indicatief.',
                 datatype='string'),
        WfsField(name='waarde', source_field='Waarde', datatype='string'),
        WfsField(name='eenheid', source_field='Eenheid', datatype='string'),
        XmlField(name='ondergrens',
                 source_xpath='/bodemobservatie/ondergrens',
                 definition='Het mogelijke minimum van de meting.',
                 datatype='float'),
        XmlField(name='bovengrens',
                 source_xpath='/bodemobservatie/bovengrens',
                 definition='Het mogelijke maximum van de meting.',
                 datatype='float'),
        WfsField(name='methode', source_field='Observatiemethode',
                 datatype='string'),
        XmlField(name='betrouwbaarheid',
                 source_xpath='/bodemobservatie/betrouwbaarheid',
                 definition='Betrouwbaarheid van de meting.',
                 datatype='string'),
        WfsField(name='veld_labo', source_field='Labo_of_veld',
                 datatype='string'),
        WfsField(name='diepte_van', source_field='Diepte_van',
                 datatype='float'),
        WfsField(name='diepte_tot', source_field='Diepte_tot',
                 datatype='float'),
        XmlField(name='observatiedatum',
                 source_xpath='/bodemobservatie/observatiedatum',
                 definition='Observatiedatum van de bodemobservatie',
                 datatype='date'),
        XmlField(name='invoerdatum',
                 source_xpath='/bodemobservatie/invoerdatum',
                 definition='Invoerdatum van de bodemobservatie.',
                 datatype='date'),
        XmlField(name='auteur',
                 source_xpath='/bodemobservatie/auteur',
                 definition='Auteur van de bodemobservatie.',
                 datatype='string')
    ]

    def __init__(self, pkey):
        """Initialisation.

        Parameters
        ----------
        pkey : str
            Permanent key of the Bodemobservatie, being a URI of the form
            `https://www.dov.vlaanderen.be/data/bodemobservatie/<id>`.

        """
        super(Bodemobservatie, self).__init__('bodemobservatie', pkey)

    @classmethod
    def from_wfs_element(cls, feature, namespace):
        b = cls(feature.findtext('./{{{}}}Bodemobservatiefiche'
                                 .format(namespace)))

        for field in cls.get_fields(source=('wfs',)).values():<commit_msg>Edit bodemobservatie configuration<commit_after># -*- coding: utf-8 -*-
"""Module containing the DOV data type for bodemobservaties, including
subtypes."""
from pydov.types.fields import WfsField, XmlField

from .abstract import AbstractDovType


class Bodemobservatie(AbstractDovType):
    """Class representing the DOV data type for bodemobservaties."""

    subtypes = []

    fields = [
        WfsField(name='pkey_bodemobservatie',
                 source_field='Bodemobservatiefiche',
                 datatype='string'),
        WfsField(name='pkey_bodemlocatie',
                 source_field='Bodemlocatiefiche',
                 datatype='string'),
        WfsField(name='Aan',
                 source_field='Aan',
                 datatype='string'),
        WfsField(name='pkey_parent',
                 source_field='Parentfiche',
                 datatype='string'),
        WfsField(name='parameter', source_field='Parameter',
                 datatype='string'),
        XmlField(name='parametergroep',
                 source_xpath='/bodemobservatie/parametergroep',
                 definition='Indeling van de parameter naar groep, '
                 + 'bvb anionen, kationen, .... Is indicatief.',
                 datatype='string'),
        WfsField(name='waarde', source_field='Waarde', datatype='string'),
        WfsField(name='eenheid', source_field='Eenheid', datatype='string'),
        XmlField(name='ondergrens',
                 source_xpath='/bodemobservatie/ondergrens',
                 definition='Het mogelijke minimum van de meting.',
                 datatype='float'),
        XmlField(name='bovengrens',
                 source_xpath='/bodemobservatie/bovengrens',
                 definition='Het mogelijke maximum van de meting.',
                 datatype='float'),
        WfsField(name='methode', source_field='Observatiemethode',
                 datatype='string'),
        XmlField(name='betrouwbaarheid',
                 source_xpath='/bodemobservatie/betrouwbaarheid',
                 definition='Betrouwbaarheid van de meting.',
                 datatype='string'),
        WfsField(name='veld_labo', source_field='Labo_of_veld',
                 datatype='string'),
        WfsField(name='diepte_van', source_field='Diepte_van',
                 datatype='float'),
        WfsField(name='diepte_tot', source_field='Diepte_tot',
                 datatype='float'),
        XmlField(name='observatiedatum',
                 source_xpath='/bodemobservatie/observatiedatum',
                 definition='Observatiedatum van de bodemobservatie',
                 datatype='date'),
        XmlField(name='invoerdatum',
                 source_xpath='/bodemobservatie/invoerdatum',
                 definition='Invoerdatum van de bodemobservatie.',
                 datatype='date')
    ]

    def __init__(self, pkey):
        """Initialisation.

        Parameters
        ----------
        pkey : str
            Permanent key of the Bodemobservatie, being a URI of the form
            `https://www.dov.vlaanderen.be/data/bodemobservatie/<id>`.

        """
        super(Bodemobservatie, self).__init__('bodemobservatie', pkey)

    @classmethod
    def from_wfs_element(cls, feature, namespace):
        b = cls(feature.findtext('./{{{}}}Bodemobservatiefiche'
                                 .format(namespace)))

        for field in cls.get_fields(source=('wfs',)).values():
{'fraction_non_alphanumeric': 0.1203356811029522, 'fraction_numerical': 0.0002997152704930316, 'mean_word_length': 2.231961259079903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1530948', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1835, 'n_words': 307}