Skip to content

Commit c6308fa

Browse files
committed
WSDL: Update to latest version available online
* Add DTS_SUBDOM in "content" * Add WORK_TITLE and LATEST_CONSLEG_DATE in WORK * Remove MANIFESTATION_HAS_ITEM from MANIFESTATION Update the corresponding classes, and add some tests for the new information.
1 parent d9ce9bd commit c6308fa

File tree

6 files changed

+95
-12
lines changed

6 files changed

+95
-12
lines changed

data/WSDL/eurlex-ws_2.xsd

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55

66
<xs:complexType name="documentType">
77
<xs:sequence maxOccurs="unbounded">
8+
<xs:element ref="DTS_SUBDOM" minOccurs="0" maxOccurs="unbounded"/>
89
<xs:element ref="NOTICE" minOccurs="0"/>
910
<xs:element ref="CONTENT_URL" minOccurs="0" maxOccurs="unbounded"/>
1011
</xs:sequence>
1112
</xs:complexType>
1213

14+
<xs:element name="DTS_SUBDOM" type="xs:string"/>
15+
1316
<xs:element name="CONTENT_URL">
1417
<xs:complexType>
1518
<xs:sequence>
@@ -268,6 +271,8 @@
268271
<xs:element ref="WORK_PART_OF_COLLECTION_DOCUMENT" minOccurs="0" maxOccurs="unbounded"/>
269272
<xs:element ref="WORK_RELATED_TO_WORK" minOccurs="0" maxOccurs="unbounded"/>
270273
<xs:element ref="WORK_TABLE-OF-CONTENTS" minOccurs="0" maxOccurs="unbounded"/>
274+
<xs:element ref="WORK_TITLE" minOccurs="0" maxOccurs="unbounded"/>
275+
<xs:element ref="LATEST_CONSLEG_DATE" minOccurs="0"/>
271276
</xs:sequence>
272277
</xs:complexType>
273278

@@ -286,7 +291,6 @@
286291
<xs:element ref="MANIFESTATION_COURT-REPORT_PART_PAGE_FIRST" minOccurs="0" maxOccurs="unbounded"/>
287292
<xs:element ref="MANIFESTATION_COURT-REPORT_PART_TYPE" minOccurs="0" maxOccurs="unbounded"/>
288293
<xs:element ref="MANIFESTATION_COURT-REPORT_PART_YEAR" minOccurs="0" maxOccurs="unbounded"/>
289-
<xs:element ref="MANIFESTATION_HAS_ITEM" minOccurs="0" maxOccurs="unbounded"/>
290294
<xs:element ref="MANIFESTATION_OFFICIA-JOURNAL_PART_NUMBER_PAGE_DEBATE_EP" minOccurs="0" maxOccurs="unbounded"/>
291295
<xs:element ref="MANIFESTATION_OFFICIAL-JOURNAL_PART_AUTHOR_PRINTER" minOccurs="0" maxOccurs="unbounded"/>
292296
<xs:element ref="MANIFESTATION_OFFICIAL-JOURNAL_PART_NUMBER_PUBLICATION_DEBATE_EP" minOccurs="0" maxOccurs="unbounded"/>
@@ -718,14 +722,7 @@
718722
</xs:sequence>
719723
</xs:complexType>
720724
</xs:element>
721-
722-
<xs:element name="MANIFESTATION_HAS_ITEM">
723-
<xs:complexType>
724-
<xs:sequence maxOccurs="unbounded">
725-
<xs:group ref="Identifier" minOccurs="0"/>
726-
</xs:sequence>
727-
</xs:complexType>
728-
</xs:element>
725+
729726
<xs:element name="WORK_IS_ABOUT_CONCEPT_EUROVOC">
730727
<xs:complexType>
731728
<xs:sequence maxOccurs="unbounded">
@@ -997,6 +994,8 @@
997994
<xs:element name="SUMMARY_LEGISLATION_EU_OBSOLETE" type="Literal"/>
998995
<xs:element name="TERM_PARLIAMENTARY" type="Literal"/>
999996
<xs:element name="WORK_TABLE-OF-CONTENTS" type="Literal"/>
997+
<xs:element name="WORK_TITLE" type="Literal"/>
998+
<xs:element name="LATEST_CONSLEG_DATE" type="date"/>
1000999

10011000
<xs:element name="ACT_CONSOLIDATED_BASED_ON_RESOURCE_LEGAL" type="Concept"/>
10021001
<xs:element name="AGREEMENT_INTERNATIONAL_HAS_TYPE_COMMENT_CONCEPT_TYPE_COMMENT" type="Concept"/>

src/EULex/Model/Document.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ namespace EULex.Model
3131
[XmlType (Namespace="http://eur-lex.europa.eu/search")]
3232
public partial class Document
3333
{
34+
[XmlElement ("DTS_SUBDOM")]
35+
public Collection<String> SubDomains { get; set; }
36+
3437
[XmlElement ("NOTICE")]
3538
public Notice Notice { get; set; }
3639

src/EULex/Model/Manifestation.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ public partial class Manifestation
6767
[XmlElement ("MANIFESTATION_COURT-REPORT_PART_YEAR")]
6868
public Literal CourtReportPartYear { get; set; }
6969

70-
[XmlElement ("MANIFESTATION_HAS_ITEM")]
71-
public Collection<ManifestationItem> Items { get; set; }
72-
7370
[XmlElement ("MANIFESTATION_OFFICIAL-JOURNAL_PART_AUTHOR_PRINTER")]
7471
public Collection<Literal> OfficialJournalPartPrinterAuthors { get; set; }
7572

src/EULex/Model/Work.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,12 @@ public bool? IsInForce {
674674

675675
[XmlElement ("WORK_TABLE-OF-CONTENTS")]
676676
public Collection<Literal> TableOfContents { get; set; }
677+
678+
[XmlElement ("WORK_TITLE")]
679+
public Collection<Literal> Title { get; set; }
680+
681+
[XmlElement ("LATEST_CONSLEG_DATE")]
682+
public Date LatestConsolidation { get; set; }
677683
}
678684
}
679685

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
//
2+
// Copyright 2021 Bertrand Lorentz
3+
//
4+
// Permission is hereby granted, free of charge, to any person obtaining a copy
5+
// of this software and associated documentation files (the "Software"), to deal
6+
// in the Software without restriction, including without limitation the rights
7+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
// copies of the Software, and to permit persons to whom the Software is
9+
// furnished to do so, subject to the following conditions:
10+
//
11+
// The above copyright notice and this permission notice shall be included in
12+
// all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20+
// THE SOFTWARE.
21+
22+
using System;
23+
using System.Linq;
24+
using System.Threading.Tasks;
25+
using NUnit.Framework;
26+
27+
using EULex.Model;
28+
29+
namespace EULex.IntegrationTests
30+
{
31+
[TestFixture]
32+
public class Document32021D1073Test
33+
{
34+
Notice notice;
35+
36+
[OneTimeSetUp]
37+
protected async Task SetUp ()
38+
{
39+
notice = await TestUtils.GetSingleNotice ("DN = 32021D1073", Language.en);
40+
}
41+
42+
[Test]
43+
public void HasWork ()
44+
{
45+
Assert.That (notice.Work, Is.Not.Null);
46+
}
47+
48+
[Test]
49+
public void CheckCelex ()
50+
{
51+
var v = notice.Work.Celex [0].Value;
52+
Assert.That (v, Is.EqualTo ("32021D1073"));
53+
}
54+
55+
[Test]
56+
public void CheckWorkTitle ()
57+
{
58+
var v = notice.Work.Title [0].Value;
59+
Assert.That (v, Does.StartWith ("COMMISSION IMPLEMENTING DECISION"));
60+
}
61+
}
62+
}

tests/IntegrationTests/ResultsListTests.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ public async Task CheckSecondAndLastPages ()
9696
Assert.That (response.Results [last_count - 1].Content.Notice, Is.Not.Null);
9797
}
9898

99+
[Test]
100+
public async Task CheckResultItem ()
101+
{
102+
var response = await client.DoQueryAsync (search_request);
103+
104+
var item = response.Results[0];
105+
106+
Assert.That (item.Reference, Does.StartWith ("eng_cellar:"));
107+
Assert.That (item.Rank, Is.EqualTo(1));
108+
Assert.That (item.DocumentLinks[0].Type, Is.AnyOf("doc", "html", "pdf"));
109+
Assert.That (item.DocumentLinks[0].Value, Does.StartWith("https://eur-lex.europa.eu"));
110+
111+
Assert.That (item.Content, Is.Not.Null);
112+
Assert.That (item.Content.SubDomains, Does.Contain("ALL_ALL"));
113+
Assert.That (item.Content.Notice, Is.Not.Null);
114+
}
99115
}
100116
}
101117

0 commit comments

Comments
 (0)