HAALCENTRAAL English translation
BRP API / Personen / Features / adellijk

As a municipality I want the correct and consistent aanschrijfwijze for my residents

# language: en

Feature: As a municipality I want the correct and consistent aanschrijfwijze for my residents
  The fields aanschrijfwijze.naam and aanschrijfwijze.aanspreekvorm for a person are filled by the provider, so that a person can be addressed unambiguously.
  
  The aanschrijfwijze is used as the first line or lines of the address on an envelope, or at the top left of a letter, directly above the address.

  When composing the aanschrijfwijze, the title of nobility or predicate of the person is used.

  When composing the aanschrijfwijze, the following is determined in order:
    1. Whether a courtesy title may be used. This is described in aanschrijfwijze/hoffelijkheidstitel.feature.
    2. If not, whether a title of nobility or predicate may be used. This is described in aanschrijfwijze/adellijk.feature.
    3. If not, the aanschrijfwijze is composed without a title of nobility or predicate. This is described in aanschrijfwijze/niet-adellijk.feature.
  

  Background:
    Given national table "Adellijke_Titel_Predicaat" has the following values
    | code | omschrijving | soort     |
    | B    | Baron        | titel     |
    | BS   | Barones      | titel     |
    | G    | Graaf        | titel     |
    | GI   | Gravin       | titel     |
    | H    | Hertog       | titel     |
    | HI   | Hertogin     | titel     |
    | JH   | Jonkheer     | predicaat |
    | JV   | Jonkvrouw    | predicaat |
    | M    | Markies      | titel     |
    | MI   | Markiezin    | titel     |
    | P    | Prins        | titel     |
    | PS   | Prinses      | titel     |
    | R    | Ridder       | titel     |

  Rule: For a person with a title of nobility, the name in aanschrijfwijze is composed as follows:
    | aanduiding naamgebruik | omschrijving                 | naam in aanschrijfwijze |
    | E                      | eigen naam                   | VL AT VV GN             |
    | P                      | partner naam                 | VL VP GP                |
    | V                      | partner naam voor eigen naam | VL VP GP-AT VV GN       |
    | N                      | partner naam na eigen naam   | VL AT VV GN-VP GP       |
    
    Meaning of the abbreviations in aanschrijfwijze:
      VL = initials
      VV = voorvoegselGeslachtsnaam (surname prefix)
      GN = surname
      VP = voorvoegselGeslachtsnaam of the partner
      GP = surname of the partner
      AT = title of nobility

    The aanspreekvorm in aanschrijfwijze is filled on the basis of the title of nobility:
    | adellijke titel/predicaat | aanspreekvorm in aanschrijfwijze |
    | R                         | De hoogwelgeboren heer           |
    | B                         | De hoogwelgeboren heer           |
    | BS                        | De hoogwelgeboren vrouwe         |
    | H                         | De hoogwelgeboren heer           |
    | HI                        | De hoogwelgeboren vrouwe         |
    | G                         | De hooggeboren heer              |
    | GI                        | De hooggeboren vrouwe            |
    | M                         | De hoogwelgeboren heer           |
    | MI                        | De hoogwelgeboren vrouwe         |
    | P                         | De hoogheid                      |
    | PS                        | De hoogheid                      |

    The aanschrijfwijze is composed without the title of nobility, as described in aanschrijfwijze/niet-adellijk.feature, where:
    - the person uses the surname of the spouse/partner without their own surname: aanduidingNaamgebruik is "P"

    The following also applies:
    - spaces at the start or end of aanschrijfwijze.naam are removed
    - double spaces are removed from aanschrijfwijze.naam
    - a space before or after the "-" is removed from aanschrijfwijze.naam
    - the initials are included as described in voorletters.feature
    - the title of nobility is written in lower case
    - the first name component in aanschrijfwijze.naam begins with a capital letter

    Scenario Outline: A name without a voorvoegsel and no partner
      Given the person with citizen service number '000000103' has the following data
      | naam                                 | waarde      |
      | geslachtsaanduiding (04.10)          | <geslacht>  |
      | voornamen (02.10)                    | <voornamen> |
      | adellijke titel of predicaat (02.20) | <titel>     |
      | geslachtsnaam (02.40)                | Aedel       |
      | aanduiding naamgebruik (61.10)       | E           |
      And the person has never had a current or dissolved marriage or partnership
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000103                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                          | waarde                    |
      | aanschrijfwijze.naam          | <naam in aanschrijfwijze> |
      | aanschrijfwijze.aanspreekvorm | <aanspreekvorm>           |

      Examples:
      | titel | voornamen            | geslacht | naam in aanschrijfwijze | aanspreekvorm            |
      | BS    | Albertine Philippine | V        | A.P. barones Aedel      | De hoogwelgeboren vrouwe |
      | G     | Bølle Ólafur         | M        | B.Ó. graaf Aedel        | De hooggeboren heer      |


    Scenario Outline: A name with a voorvoegsel and no partner
      Given the person with citizen service number '000000115' has the following data
      | naam                                 | waarde        |
      | geslachtsaanduiding (04.10)          | <geslacht>    |
      | voornamen (02.10)                    | <voornamen>   |
      | adellijke titel of predicaat (02.20) | <titel>       |
      | voorvoegsel (02.30)                  | <voorvoegsel> |
      | geslachtsnaam (02.40)                | Aedel         |
      | aanduiding naamgebruik (61.10)       | E             |
      And the person has never had a current or dissolved marriage or partnership
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000115                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                          | waarde                    |
      | aanschrijfwijze.naam          | <naam in aanschrijfwijze> |
      | aanschrijfwijze.aanspreekvorm | <aanspreekvorm>           |

      Examples:
      | titel | voornamen     | voorvoegsel | geslacht | naam in aanschrijfwijze | aanspreekvorm          |
      | B     | Arent Binnert | van         | M        | A.B. baron van Aedel    | De hoogwelgeboren heer |
      | GI    | Christina     | In Den      | V        | C. gravin In Den Aedel  | De hooggeboren vrouwe  |
      | H     | Diederik      | 'S          | M        | D. hertog 'S Aedel      | De hoogwelgeboren heer |

    Scenario: a person with a title of nobility and aanduidingNaamgebruik "P" bears no title and no form of address
      Given the person with citizen service number '000000127' has the following data
      | naam                                 | waarde  |
      | geslachtsaanduiding (04.10)          | V       |
      | voornamen (02.10)                    | Jo Anne |
      | adellijke titel of predicaat (02.20) | BS      |
      | voorvoegsel (02.30)                  | van den |
      | geslachtsnaam (02.40)                | Aedel   |
      | aanduiding naamgebruik (61.10)       | P       |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000127                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                 | waarde       |
      | aanschrijfwijze.naam | J.A. de Boer |

    Scenario Outline: a person with a title of nobility has aanduidingNaamgebruik "<naamgebruik>"
      Given the person with citizen service number '000000127' has the following data
      | naam                                 | waarde        |
      | geslachtsaanduiding (04.10)          | V             |
      | voornamen (02.10)                    | Jo Anne       |
      | adellijke titel of predicaat (02.20) | BS            |
      | voorvoegsel (02.30)                  | van den       |
      | geslachtsnaam (02.40)                | Aedel         |
      | aanduiding naamgebruik (61.10)       | <naamgebruik> |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000127                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                          | waarde                    |
      | aanschrijfwijze.naam          | <naam in aanschrijfwijze> |
      | aanschrijfwijze.aanspreekvorm | De hoogwelgeboren vrouwe  |

      Examples:
      | naamgebruik | naam in aanschrijfwijze            |
      | E           | J.A. barones van den Aedel         |
      | V           | J.A. de Boer-barones van den Aedel |
      | N           | J.A. barones van den Aedel-de Boer |


  Rule: For a person with a noble predicate, the name in aanschrijfwijze is composed as follows:
    | aanduiding naamgebruik | omschrijving                 | naam in aanschrijfwijze |
    | E                      | eigen naam                   | PK VL VV GN             |
    | P                      | partner naam                 | VL VP GP                |
    | V                      | partner naam voor eigen naam | VL VP GP-PK VV GN       |
    | N                      | partner naam na eigen naam   | PK VL VV GN-VP GP       |
    
    Meaning of the abbreviations in aanschrijfwijze:
      VL = initials
      VV = voorvoegselGeslachtsnaam (surname prefix)
      GN = surname
      VP = voorvoegselGeslachtsnaam of the partner
      GP = surname of the partner
      PK = predicate

    The aanschrijfwijze is composed without the predicate, as described in aanschrijfwijze/niet-adellijk.feature, where:
    - the person uses the surname of the spouse/partner without their own surname: aanduidingNaamgebruik is "P"
    - the person is female (gender "V") and has a partner (the marriage or partnership has not ended)
    - the person is female (gender "V") and uses the name of the (former) partner (naamgebruik not equal to "E")

    The following also applies:
    - spaces at the start or end of aanschrijfwijze.naam are removed
    - double spaces are removed from aanschrijfwijze.naam
    - a space before or after the "-" is removed from aanschrijfwijze.naam
    - the initials are included as described in voorletters.feature
    - the noble predicate is written in lower case
    - the first name component in aanschrijfwijze.naam begins with a capital letter

    The aanspreekvorm in aanschrijfwijze is filled on the basis of the predicate:
    | adellijke titel/predicaat | aanspreekvorm in aanschrijfwijze |
    | JH                        | De hoogwelgeboren heer           |
    | JV                        | De hoogwelgeboren vrouwe         |

    Scenario Outline: Jonkheer with naamgebruik "<aanduiding naamgebruik>"
      Given the person with citizen service number '000000139' has the following data
      | naam                                 | waarde        |
      | geslachtsaanduiding (04.10)          | M             |
      | voornamen (02.10)                    | James Antoine |
      | adellijke titel of predicaat (02.20) | JH            |
      | voorvoegsel (02.30)                  | van den       |
      | geslachtsnaam (02.40)                | Aedel         |
      | aanduiding naamgebruik (61.10)       | <naamgebruik> |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000139                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                          | waarde                    |
      | aanschrijfwijze.naam          | <naam in aanschrijfwijze> |
      | aanschrijfwijze.aanspreekvorm | De hoogwelgeboren heer    |

      Examples:
      | naamgebruik | naam in aanschrijfwijze             |
      | E           | Jonkheer J.A. van den Aedel         |
      | V           | J.A. de Boer-jonkheer van den Aedel |
      | N           | Jonkheer J.A. van den Aedel-de Boer |

    Scenario: Jonkheer with naamgebruik "P" bears no predicate and no form of address
      Given the person with citizen service number '000000139' has the following data
      | naam                                 | waarde        |
      | geslachtsaanduiding (04.10)          | M             |
      | voornamen (02.10)                    | James Antoine |
      | adellijke titel of predicaat (02.20) | JH            |
      | voorvoegsel (02.30)                  | van den       |
      | geslachtsnaam (02.40)                | Aedel         |
      | aanduiding naamgebruik (61.10)       | P             |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000139                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                 | waarde       |
      | aanschrijfwijze.naam | J.A. de Boer |

    Scenario Outline: Jonkvrouw with a partner and naamgebruik "<aanduiding naamgebruik>" bears no predicate and no form of address
      Given the person with citizen service number '000000139' has the following data
      | naam                                 | waarde        |
      | geslachtsaanduiding (04.10)          | V             |
      | voornamen (02.10)                    | Jeanne Anne   |
      | adellijke titel of predicaat (02.20) | JV            |
      | voorvoegsel (02.30)                  | van den       |
      | geslachtsnaam (02.40)                | Aedel         |
      | aanduiding naamgebruik (61.10)       | <naamgebruik> |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000139                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                 | waarde                    |
      | aanschrijfwijze.naam | <naam in aanschrijfwijze> |

      Examples:
      | naamgebruik | naam in aanschrijfwijze    |
      | E           | J.A. van den Aedel         |
      | P           | J.A. de Boer               |
      | V           | J.A. de Boer-van den Aedel |
      | N           | J.A. van den Aedel-de Boer |

    Scenario Outline: Jonkvrouw with a former partner and naamgebruik "<aanduiding naamgebruik>" bears no predicate and no form of address
      Given the person with citizen service number '000000139' has the following data
      | naam                                 | waarde        |
      | geslachtsaanduiding (04.10)          | V             |
      | voornamen (02.10)                    | Jeanne Anne   |
      | adellijke titel of predicaat (02.20) | JV            |
      | voorvoegsel (02.30)                  | van den       |
      | geslachtsnaam (02.40)                | Aedel         |
      | aanduiding naamgebruik (61.10)       | <naamgebruik> |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      And the 'partner' has been changed to the following data
      | naam                                                         | waarde   |
      | voorvoegsel (02.30)                                          | de       |
      | geslachtsnaam (02.40)                                        | Boer     |
      | datum ontbinding huwelijk/geregistreerd partnerschap (07.10) | 20211109 |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000139                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                 | waarde                    |
      | aanschrijfwijze.naam | <naam in aanschrijfwijze> |

      Examples:
      | naamgebruik | naam in aanschrijfwijze    |
      | P           | J.A. de Boer               |
      | V           | J.A. de Boer-van den Aedel |
      | N           | J.A. van den Aedel-de Boer |

    Scenario: Jonkvrouw with a former partner and naamgebruik "E" bears her predicate and form of address again
      Given the person with citizen service number '000000139' has the following data
      | naam                                 | waarde      |
      | geslachtsaanduiding (04.10)          | V           |
      | voornamen (02.10)                    | Jeanne Anne |
      | adellijke titel of predicaat (02.20) | JV          |
      | voorvoegsel (02.30)                  | van den     |
      | geslachtsnaam (02.40)                | Aedel       |
      | aanduiding naamgebruik (61.10)       | E           |
      And the person has a 'partner' with the following data
      | naam                  | waarde |
      | voorvoegsel (02.30)   | de     |
      | geslachtsnaam (02.40) | Boer   |
      And the 'partner' has been changed to the following data
      | naam                                                         | waarde   |
      | voorvoegsel (02.30)                                          | de       |
      | geslachtsnaam (02.40)                                        | Boer     |
      | datum ontbinding huwelijk/geregistreerd partnerschap (07.10) | 20211109 |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000139                       |
      | fields              | adressering.aanschrijfwijze     |
      Then the response has a person with only the following 'adressering' data
      | naam                          | waarde                       |
      | aanschrijfwijze.naam          | Jonkvrouw J.A. van den Aedel |
      | aanschrijfwijze.aanspreekvorm | De hoogwelgeboren vrouwe     |