123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- /********************************************************************
- # Copyright 2016-2017 Daniel 'grindhold' Brendle
- #
- # This file is part of liboparl.
- #
- # liboparl is free software: you can redistribute it and/or
- # modify it under the terms of the GNU Lesser General Public License
- # as published by the Free Software Foundation, either
- # version 3 of the License, or (at your option) any later
- # version.
- #
- # liboparl is distributed in the hope that it will be
- # useful, but WITHOUT ANY WARRANTY; without even the implied
- # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- # PURPOSE. See the GNU Lesser General Public License for more details.
- #
- # You should have received a copy of the GNU Lesser General Public
- # License along with liboparl.
- # If not, see http://www.gnu.org/licenses/.
- *********************************************************************/
- using OParl;
- namespace OParlTest.Fixtures {
- public const string object_sane = """
- {
- "id": "https://oparl.example.org/",
- "type": "https://schema.oparl.org/1.0/System",
- "name": "Testsystem und so",
- "shortName": "Testsystem",
- "license": "CC-BY-SA",
- "created": "2016-01-01T13:12:22+00:00",
- "modified": "2016-05-23T21:18:29+00:00",
- "keyword": ["some","neat","object"],
- "web": "https://foobar.invalid",
- "deleted": false
- }
- """;
- public const string object_sane_vendor_attrs = """
- {
- "id": "https://oparl.example.org/",
- "type": "https://schema.oparl.org/1.0/System",
- "name": "Testsystem und so",
- "shortName": "Testsystem",
- "license": "CC-BY-SA",
- "created": "2016-01-01T13:12:22+00:00",
- "modified": "2016-05-23T21:18:29+00:00",
- "keyword": ["some","neat","object"],
- "web": "https://foobar.invalid",
- "deleted": false,
- "ris:state":"old",
- "ris:vendor":"somerisvendor"
- }
- """;
- public const string system_sane = """
- {
- "id": "https://oparl.example.org/",
- "type": "https://schema.oparl.org/1.0/System",
- "oparlVersion": "https://schema.oparl.org/1.0/",
- "body": "https://oparl.example.org/bodies",
- "name": "Beispiel-System",
- "contactEmail": "info@example.org",
- "contactName": "Allgemeiner OParl Kontakt",
- "website": "http://www.example.org/",
- "vendor": "http://example-software.com/",
- "product": "http://example-software.com/oparl-server/",
- "otherOparlVersions": ["https://oparl2.example.org/"]
- }
- """;
- public const string body_list_sane = """
- {
- "pagination": {
- "totalElements":1,
- "elementsPerPage":1,
- "currentPage":1,
- "totalPages":1
- },
- "data": [
- """+ body_sane +"""
- ],
- "links":{}
- }
- """;
- public const string legislative_term_sane_1 = """
- {
- "id": "https://oparl.example.org/term/21",
- "type": "https://schema.oparl.org/1.0/LegislativeTerm",
- "body": "https://oparl.example.org/body/0",
- "name": "21. Wahlperiode",
- "startDate": "2010-12-03",
- "endDate": "2013-12-03"
- }
- """;
- public const string legislative_term_sane_2 = """
- {
- "id": "https://oparl.example.org/term/22",
- "type": "https://schema.oparl.org/1.0/LegislativeTerm",
- "body": "https://oparl.example.org/body/0",
- "name": "21. Wahlperiode",
- "startDate": "2014-01-01T14:28:31.568+0000",
- "endDate": "2015-01-01T14:28:31.568+0000"
- }
- """;
- public const string body_sane = """
- {
- "id": "https://oparl.example.org/body/0",
- "type": "https://schema.oparl.org/1.0/Body",
- "system": "https://oparl.example.org/",
- "contactEmail": "ris@beispielstadt.de",
- "contactName": "RIS-Betreuung",
- "ags": "05315000",
- "rgs": "053150000000",
- "equivalent": [
- "http://d-nb.info/gnd/2015732-0",
- "http://dbpedia.org/resource/Cologne"
- ],
- "shortName": "Köln",
- "name": "Stadt Köln, kreisfreie Stadt",
- "website": "http://www.beispielstadt.de/",
- "license": "http://creativecommons.org/licenses/by/4.0/",
- "licenseValidSince": "2015-01-01T14:28:31.568+0000",
- "oparlSince": "2014-01-01T14:28:31.568+0000",
- "organization": "https://oparl.example.org/body/0/organizations/",
- "person": "https://oparl.example.org/body/0/people/",
- "meeting": "https://oparl.example.org/body/0/meetings/",
- "paper": "https://oparl.example.org/body/0/papers/",
- "legislativeTerm": [
- """ + legislative_term_sane_1 + """,
- """ + legislative_term_sane_2 + """
- ],
- "location": """+ location_sane +""",
- "classification": "Kreisfreie Stadt",
- "created": "2014-01-08T14:28:31.568+0100",
- "modified": "2014-01-08T14:28:31.568+0100"
- }
- """;
- public const string organization_sane = """
- {
- "id": "https://oparl.example.org/organization/0",
- "type": "https://schema.oparl.org/1.0/Organization",
- "body": "https://oparl.example.org/body/0",
- "name": "Ausschuss für Haushalt und Finanzen",
- "shortName": "Finanzausschuss",
- "startDate": "2012-07-17",
- "endDate": "2014-07-17",
- "organizationType": "Gremium",
- "location": """ + location_sane + """,
- "post": [
- "Vorsitzender",
- "1. Stellvertreter",
- "Mitglied"
- ],
- "meeting": "https://oparl.example.org/organization/0/meetings",
- "membership": [
- "https://oparl.example.org/membership/1"
- ],
- "classification": "Ausschuss",
- "keyword": [
- "finanzen",
- "haushalt"
- ],
- "created": "2012-07-16",
- "modified": "2012-08-16"
- }
- """;
- public const string organization_list_sane = """
- {
- "pagination": {
- "totalElements":1,
- "elementsPerPage":1,
- "currentPage":1,
- "totalPages":1
- },
- "data": [
- """+ organization_sane +"""
- ],
- "links":{}
- }
- """;
- public const string membership_sane_1 = """
- {
- "id": "https://oparl.example.org/membership/0",
- "type": "https://schema.oparl.org/1.0/Membership",
- "organization": "https://oparl.example.org/organization/0",
- "role": "Vorsitzende",
- "votingRight": true,
- "startDate": "2013-12-03"
- }
- """;
- public const string membership_sane_2 = """
- {
- "id": "https://oparl.example.org/membership/1",
- "type": "https://schema.oparl.org/1.0/Membership",
- "organization": "https://oparl.example.org/organization/0",
- "onBehalfOf": "https://oparl.example.org/organization/0",
- "role": "Sachkundige Bürgerin",
- "votingRight": false,
- "startDate": "2013-12-02",
- "endDate": "2014-07-27"
- }
- """;
- public const string person_sane = """
- {
- "id": "https://oparl.example.org/person/0",
- "type": "https://schema.oparl.org/1.0/Person",
- "body": "https://oparl.example.org/body/0",
- "name": "Prof. Dr. Max Mustermann",
- "familyName": "Mustermann",
- "givenName": "Max",
- "title": [
- "Prof.",
- "Dr."
- ],
- "formOfAddress": "Ratsfrau",
- "gender": "male",
- "email": ["max@mustermann.de"],
- "phone": ["+493012345678"],
- "status": [
- "Bezirksbürgermeister"
- ],
- "membership": [
- """ + membership_sane_1 + """,
- """ + membership_sane_2 + """
- ],
- "created": "2011-11-11T11:11:00+00:00",
- "modified": "2012-08-16T14:05:27+00:00"
- }
- """;
- public const string person_list_sane = """
- {
- "pagination": {
- "totalElements":1,
- "elementsPerPage":1,
- "currentPage":1,
- "totalPages":1
- },
- "data": [
- """ + person_sane + """
- ],
- "links":{}
- }
- """;
- public const string membership_sane = """
- {
- "id": "https://oparl.example.org/membership/1",
- "type": "https://schema.oparl.org/1.0/Membership",
- "organization": "https://oparl.example.org/organization/0",
- "onBehalfOf": "https://oparl.example.org/organization/0",
- "person": "https://oparl.example.org/person/0",
- "role": "Sachkundige Bürgerin",
- "votingRight": false,
- "startDate": "2013-12-02",
- "endDate": "2014-07-27"
- }
- """;
- public const string meeting_sane = """
- {
- "id": "https://oparl.example.org/meeting/0",
- "type": "https://schema.oparl.org/1.0/Meeting",
- "name": "4. Sitzung des Finanzausschusses",
- "cancelled": false,
- "start": "2013-01-04T08:00:00+00:00",
- "end": "2013-01-04T12:00:00+00:00",
- "location": """ + location_sane + """,
- "organization": [
- "https://oparl.example.org/organization/0"
- ],
- "participant": [
- "https://oparl.example.org/person/0"
- ],
- "invitation": """ + file_sane + """,
- "resultsProtocol": """ + file_sane + """,
- "verbatimProtocol": """ + file_sane + """,
- "auxiliaryFile": ["""+ file_sane + """],
- "agendaItem": ["""+ agenda_item_sane + """],
- "created": "2012-01-06T12:01:00+00:00",
- "modified": "2012-01-08T14:05:27+00:00"
- }
- """;
- public const string meeting_list_sane = """
- {
- "pagination": {
- "totalElements":1,
- "elementsPerPage":1,
- "currentPage":1,
- "totalPages":1
- },
- "data": [
- """ + meeting_sane + """
- ],
- "links":{}
- }
- """;
- public const string location_sane = """
- {
- "id": "https://oparl.example.org/location/0",
- "type": "https://schema.oparl.org/1.0/Location",
- "description": "Rathaus der Beispielstadt, Ratshausplatz 1, 12345 Beispielstadt",
- "streetAddress": "Rathausplatz 1",
- "room": "1337",
- "postalCode": "13337",
- "subLocality": "Beispielbezirk",
- "locality": "Beispielstadt",
- "bodies": [
- "https://oparl.example.org/body/0"
- ],
- "organizations": [
- "https://oparl.example.org/organization/0"
- ],
- "meetings": [
- "https://oparl.example.org/meeting/0"
- ],
- "papers": [
- "https://oparl.example.org/paper/0"
- ],
- "geojson": {
- "type": "Feature",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 50.1234,
- 10.4321
- ]
- },
- "properties": {
- "name": "Rathausplatz"
- }
- }
- }
- """;
- public const string file_sane = """
- {
- "id": "https://oparl.example.org/file/0",
- "type": "https://schema.oparl.org/1.0/File",
- "name": "Nachtrags-Tagesordnung",
- "fileName": "nachtrag-TO.pdf",
- "mimeType": "application/pdf",
- "date": "2012-01-08",
- "sha1Checksum": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
- "size": 82930,
- "accessUrl": "https://oparl.example.org/file/0.pdf",
- "downloadUrl": "https://oparl.example.org/file/download/0.pdf",
- "externalServiceUrl": "https://www.youtube.com/watch?v=MKp30C3MwVk",
- "masterFile" : "https://oparl.example.org/file/0",
- "derivativeFile" : ["https://oparl.example.org/file/0"],
- "fileLicense": "http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-1.png",
- "modified": "2012-01-08T14:05:27+00:00",
- "text": "blablatextblabla",
- "meeting": [ "https://oparl.example.org/meeting/0"],
- "agendaItem": [ "https://oparl.example.org/agendaitem/0"],
- "paper": [ "https://oparl.example.org/paper/0"]
- }
- """;
- public const string paper_sane = """
- {
- "id": "https://oparl.example.org/paper/0",
- "type": "https://schema.oparl.org/1.0/Paper",
- "body": "https://oparl.example.org/body/0",
- "name": "Antwort auf Anfrage 1200/2014",
- "reference": "1234/2014",
- "date": "2014-04-04",
- "paperType": "Beantwortung einer Anfrage",
- "relatedPaper": [
- "https://oparl.example.org/paper/0"
- ],
- "mainFile": {
- "id": "https://oparl.example.org/file/57737",
- "type": "https://schema.oparl.org/1.0/File",
- "name": "Anlage 1 zur Anfrage",
- "fileName": "anlage_1_zur_anfrage.pdf",
- "mimeType": "application/pdf",
- "date": "2013-01-04",
- "sha1Checksum": "d749751af44a32c818b9b1e1515251c67734f5d2",
- "size": 82930,
- "accessUrl": "https://oparl.example.org/file/57737.pdf",
- "downloadUrl": "https://oparl.example.org/file/download/57737.pdf",
- "license": "http://www.opendefinition.org/licenses/cc-by",
- "created": "2013-01-04T07:54:13+01:00",
- "modified": "2013-01-04T07:54:13+01:00"
- },
- "auxiliaryFile": [ """ + file_sane + """ ],
- "location": [
- {
- "id": "https://oparl.example.org/locations/0",
- "type": "https://schema.oparl.org/1.0/Location",
- "description": "Honschaftsstraße 312, Köln",
- "geometry": {
- "type": "Point",
- "coordinates": [
- 7.03291,
- 50.98249
- ]
- }
- }
- ],
- "originatorPerson": [
- "https://oparl.example.org/person/0"
- ],
- "originatorOrganization": [
- "https://oparl.example.org/organization/0"
- ],
- "consultation": [""" + consultation_sane + """],
- "underDirectionOf": [
- "https://oparl.example.org/organization/0"
- ],
- "created": "2013-01-08T12:05:27+00:00",
- "modified": "2013-01-08T12:05:27+00:00"
- }
- """;
- public const string paper_list_sane = """
- {
- "pagination": {
- "totalElements":1,
- "elementsPerPage":1,
- "currentPage":1,
- "totalPages":1
- },
- "data": [
- """+ paper_sane +"""
- ],
- "links":{}
- }
- """;
- public const string agenda_item_sane = """
- {
- "id": "https://oparl.example.org/agendaitem/0",
- "type": "https://schema.oparl.org/1.0/AgendaItem",
- "meeting": "https://oparl.example.org/meeting/0",
- "number": "10.1",
- "name": "Satzungsänderung für Ausschreibungen",
- "public": true,
- "consultation": "https://oparl.example.org/consultation/0",
- "result": "Geändert beschlossen",
- "resolutionText": "Der Beschluss weicht wie folgt vom Antrag ab: ...",
- "resolutionFile": """+ file_sane +""",
- "auxiliaryFile": ["""+ file_sane +"""],
- "start": "2012-02-06T12:01:00+00:00",
- "end": "2012-02-08T14:05:27+00:00",
- "created": "2012-01-06T12:01:00+00:00",
- "modified": "2012-08-16T14:05:27+00:00"
- }
- """;
- public const string consultation_sane = """
- {
- "id": "https://oparl.example.org/consultation/0",
- "type": "https://schema.oparl.org/1.0/Consultation",
- "agendaItem": "https://oparl.example.org/agendaitem/0",
- "meeting": "https://oparl.example.org/meeting/0",
- "organization": ["https://oparl.example.org/organization/0"],
- "authoritative": false,
- "role": "Beschlussfassung"
- }
- """;
- }
|