wipo-gbd-transformation 1.1.61__py3-none-any.whl → 1.1.63__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wipo-gbd-transformation might be problematic. Click here for more details.

@@ -0,0 +1,3 @@
1
+ # instruction to render the output to JSON format
2
+ render = 'JSON'
3
+ source = 'national'
@@ -0,0 +1,121 @@
1
+ # namespaces defined in XML and to be ignored in procecssing
2
+ ignore_namespace = [
3
+ 'http://tmview.europa.eu/trademark/data',
4
+ 'http://www.oami.europa.eu/TM-Search'
5
+ ]
6
+
7
+ def get_entity_addr(addr):
8
+ if not addr: return None
9
+ return "%s %s %s" % (addr.AddressStreet, addr.AddressCity, addr.AddressPostcode)
10
+
11
+ def create_full_name(name):
12
+ result = ""
13
+
14
+ if name.FirstName:
15
+ result += name.FirstName + " "
16
+ if name.LastName:
17
+ result += name.LastName
18
+ if name.OrganizationName and name.OrganizationName != name.LastName and name.OrganizationName != result:
19
+ if name.FirstName or name.LastName:
20
+ result += ", "
21
+ result += name.OrganizationName
22
+ return result
23
+
24
+ # -------------------------------------------------------------
25
+ # data translation helpers:
26
+ # translate values from office interpretation to gbd equivalent
27
+ # -------------------------------------------------------------
28
+ def translate_kind(kind):
29
+ if not kind: return ['Individual']
30
+
31
+ if kind == 'Individual': return ['Individual']
32
+ if kind == 'Collective': return ['Collective']
33
+
34
+ raise Exception('kind "%s" is not mapped.' % kind)
35
+
36
+ def translate_status(status):
37
+ if not status: return 'Unknown'
38
+
39
+ if status == 'Registered': return 'Registered'
40
+
41
+ if status in ['Application published',
42
+ 'Application filed',
43
+ 'Application opposed',
44
+ 'Filed']:
45
+ return 'Pending'
46
+
47
+ if status in ['Expired']:
48
+ return 'Expired'
49
+
50
+ if status in ['Ended']:
51
+ return 'Ended'
52
+
53
+ return 'Unknown'
54
+ #raise Exception('Status "%s" unmapped' % status)
55
+
56
+ def get_termination(value, gbd_status):
57
+ if gbd_status == 'Ended':
58
+ return value
59
+ return None
60
+
61
+ def translate_feature(feature):
62
+ """translation of mark feature"""
63
+
64
+ # needed information from office
65
+ # if office cannot provide information, then agree on a way to guess (uatm)
66
+ if not feature: return 'Undefined'
67
+ feature = feature.upper()
68
+ if feature == 'COMBINED': return 'Combined'
69
+ if feature == 'WORD': return 'Word'
70
+ if feature == 'STYLIZED_CHARACTERS': return 'Stylized characters'
71
+ if feature == 'FIGURATIVE': return 'Figurative'
72
+ if feature == 'SOUND': return 'Sound'
73
+ if feature == ' 3 d': return 'Three dimensional'
74
+ if feature == '3-d': return 'Three dimensional'
75
+ if feature == '_3_D': return 'Three dimensional'
76
+ if feature == '3-D': return 'Three dimensional'
77
+ return feature.lower().capitalize()
78
+ # raise Exception to recognize unmapped values
79
+ raise Exception('Feature "%s" unmapped' % feature)
80
+
81
+ def get_registration_nb(trademark, tmstatus):
82
+ if "RegistrationNumber" in trademark and trademark.RegistrationNumber:
83
+ return trademark.RegistrationNumber
84
+
85
+ # default registration number to application number
86
+ # in case none is provided
87
+ if tmstatus in ['Registered', 'Expired']:
88
+ return trademark.ApplicationNumber
89
+
90
+ # -----------------------
91
+ # filtering empty tags
92
+ # -----------------------
93
+ def get_goods_services(goods_services):
94
+ nc_gs = {} # classified
95
+ if not goods_services:
96
+ goods_services = []
97
+
98
+ if not isinstance(goods_services, list):
99
+ goods_services = [goods_services]
100
+
101
+ for goods_service in goods_services:
102
+ code = goods_service.ClassNumber
103
+ if code and not code == '0':
104
+ nc_gs[code] = {}
105
+ desc = goods_service.GoodsServicesDescription
106
+
107
+ if hasattr(desc, '__value'):
108
+ terms = desc.__value
109
+ else:
110
+ terms = desc
111
+
112
+ if terms:
113
+ nc_gs[code]['terms'] = terms
114
+ else:
115
+ continue
116
+
117
+ if hasattr(desc, '_languageCode'):
118
+ lang = desc._languageCode
119
+ nc_gs[code]['lang'] = lang.lower()
120
+
121
+ return nc_gs
@@ -0,0 +1,43 @@
1
+ /Transaction
2
+ __/TradeMarkTransactionBody
3
+ ____/TransactionContentDetails
4
+ ______/TransactionCode
5
+ ______/TransactionData
6
+ ________/TradeMarkDetails
7
+ __________/TradeMark
8
+ ____________/ApplicantDetails
9
+ ______________/Applicant
10
+ ________________/ApplicantAddressBook
11
+ __________________/FormattedNameAddress
12
+ ____________________/Name
13
+ ______________________/FreeFormatName
14
+ ________________________/FreeFormatNameDetails
15
+ __________________________/FreeFormatNameLine
16
+ ________________/ApplicantURI
17
+ ____________/ApplicationDate
18
+ ____________/ApplicationNumber
19
+ ____________/GoodsServicesDetails
20
+ ______________/GoodsServices
21
+ ________________/ClassDescriptionDetails
22
+ __________________/ClassDescription
23
+ ____________________/ClassNumber
24
+ ____________/MarkCurrentStatusCode
25
+ ____________/MarkFeature
26
+ ____________/MarkImageDetails
27
+ ______________/MarkImage
28
+ ________________/MarkImageCategory
29
+ __________________/CategoryCodeDetails
30
+ ____________________/CategoryCode
31
+ ________________/MarkImageURI
32
+ ____________/OppositionPeriodEndDate
33
+ ____________/OppositionPeriodStartDate
34
+ ____________/RegistrationOfficeCode
35
+ ____________/TradeMarkURI
36
+ ____________/WordMarkSpecification
37
+ ______________/MarkVerbalElementText
38
+ __________/TradeMark[@operationCode=Insert]
39
+ ______/TransactionIdentifier
40
+ __/TransactionHeader
41
+ ____/SenderDetails
42
+ ______/RequestProducerDateTime
43
+ ______/TM-Search TM-Search-TradeMarkList-V1-8.xsd]
@@ -0,0 +1,196 @@
1
+ {% from 'navigation.tmpl' import match %}
2
+
3
+ {% set TradeMark = Transaction.TradeMarkTransactionBody.TransactionContentDetails.TransactionData.TradeMarkDetails.TradeMark %}
4
+ {% set status = TradeMark.MarkCurrentStatusCode | translate_status %}
5
+
6
+ st13: {{ TradeMark.ApplicationNumber | st13('HR', appdate=TradeMark.ApplicationDate) }}
7
+ gbdStatus: {{ status }}
8
+ registrationOfficeCode: {{ TradeMark.RegistrationOfficeCode }}
9
+ type: TRADEMARK
10
+
11
+ {% if not status == 'Delete' %}
12
+ kind: {{ TradeMark.KindMark | translate_kind }}
13
+ markFeature: {{ TradeMark.MarkFeature | translate_feature }}
14
+ designatedCountries:
15
+ - {{ TradeMark.RegistrationOfficeCode }}
16
+ applicationNumber: {{ TradeMark.ApplicationNumber }}
17
+ applicationDate: {{ TradeMark.ApplicationDate | convertdate('%Y-%m-%d') }}
18
+ registrationNumber: {{ TradeMark | get_registration_nb(TradeMark.MarkCurrentStatusCode) }}
19
+ registrationDate: {{ TradeMark.RegistrationDate }}
20
+ applicationLanguageCode: {{ TradeMark.ApplicationLanguageCode }}
21
+ officeStatus: {{ TradeMark.MarkCurrentStatusCode }}
22
+ statusDate: {{ TradeMark.MarkCurrentStatusDate | convertdate('%Y-%m-%d') }}
23
+
24
+ markDisclaimerDetails:
25
+ {% call(desc) match('MarkDisclaimerDetails.MarkDisclaimer', TradeMark) %}
26
+ - text: {{ desc }}
27
+ languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode) }}
28
+ {% endcall %}
29
+
30
+ markDescriptionDetails:
31
+ {% call(desc) match('MarkDisclaimerDetails.MarkDisclaimer', TradeMark) %}
32
+ - text: {{ desc }}
33
+ languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode) }}
34
+ {% endcall %}
35
+
36
+ wordMarkSpecification:
37
+ markVerbalElement:
38
+ {% call(desc) match('WordMarkSpecification.MarkVerbalElementText', TradeMark) %}
39
+ - text: {{ desc }}
40
+ languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode) }}
41
+ {% endcall %}
42
+
43
+ markImageDetails:
44
+ {% call(img) match('MarkImageDetails.MarkImage', TradeMark) %}
45
+ - name: {{ img.MarkImageURI }}
46
+ colourIndicator: {{ img.MarkImageColourClaimedText | get_true_or_false }}
47
+ colourClaimed:
48
+ {% call(desc) match('MarkImageColourClaimedText', img) %}
49
+ - text: {{ desc }}
50
+ languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode) }}
51
+ {% endcall %}
52
+ classification:
53
+ kind: Vienna
54
+ code:
55
+ {% call(code) match('MarkImageCategory.CategoryCodeDetails.CategoryCode', img) %}
56
+ - {{ code }}
57
+ {% endcall %}
58
+ {% endcall %}
59
+
60
+ markSoundDetails:
61
+ {% call(sound) match('MarkSoundDetails.MarkSound', TradeMark) %}
62
+ - filename: {{ sound.MarkSoundFilename }}
63
+ fileformat: {{ sound.MarkSoundFileFormat }}
64
+ {% endcall %}
65
+
66
+ markVideoDetails:
67
+ {% call(video) match('MarkVideoDetails.MarkVideo', TradeMark) %}
68
+ - filename: {{ video.MarkVideoFilename }}
69
+ fileformat: {{ video.MarkVideoFileFormat }}
70
+ {% endcall %}
71
+
72
+ {% set nc_gs = TradeMark.GoodsServicesDetails.GoodsServices.ClassDescriptionDetails.ClassDescription | get_goods_services %}
73
+ {% if (nc_gs.keys() | length) > 0 %}
74
+ goodsServicesClassification:
75
+ kind: Nice
76
+ version: {{ ASK_THE_OFFICE }}
77
+ class:
78
+ {% for nc in nc_gs.keys() %}
79
+ - code: {{ nc | int }}
80
+ {% if nc_gs[nc]['terms'] %}
81
+ terms:
82
+ {{ nc_gs[nc]['terms'] | guess_language(nc_gs[nc]['lang'], TradeMark.ApplicationLanguageCode) | field_name}}:
83
+ {% for gsline in nc_gs[nc]['terms'] | remove_trailing('.', '-') | split_terms %}
84
+ - {{ gsline | lower }}
85
+ {% endfor %}
86
+ {% endif %}
87
+ {% endfor %}
88
+ {% endif %}
89
+
90
+ priorities:
91
+ {% call(priority) match('PriorityDetails.Priority', TradeMark) %}
92
+ - countryCode: {{ priority.PriorityCountryCode }}
93
+ number: {{ priority.PriorityNumber }}
94
+ date: {{ priority.PriorityDate }}
95
+ {% endcall %}
96
+
97
+ publications:
98
+ {% call(publication) match('PublicationDetails.Publication', TradeMark) %}
99
+ - identifier: {{ publication.PublicationIdentifier }}
100
+ date: {{ publication.PublicationDate }}
101
+ section: {{ publication.PublicationSection }}
102
+ {% endcall %}
103
+
104
+ applicants:
105
+ {% call(Applicant) match('ApplicantDetails.Applicant', TradeMark) %}
106
+ - identifier: {{ Applicant.ApplicantURI }}
107
+ kind: {{ Applicant.ApplicantLegalEntity}}
108
+ fullName:
109
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName', Applicant.ApplicantAddressBook) %}
110
+ - text: {{ nameline | create_full_name }}
111
+ languageCode: {{ nameline.LastName | guess_language('en') }}
112
+ {% endcall %}
113
+ firstName:
114
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.FirstName', Applicant.ApplicantAddressBook) %}
115
+ - languageCode: {{ nameline | guess_language('en') }}
116
+ text: {{ nameline }}
117
+ {% endcall %}
118
+ lastName:
119
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.LastName', Applicant.ApplicantAddressBook) %}
120
+ - languageCode: {{ nameline | guess_language('en') }}
121
+ text: {{ nameline }}
122
+ {% endcall %}
123
+ middleName:
124
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.MiddleName', Applicant.ApplicantAddressBook) %}
125
+ - languageCode: {{ nameline | guess_language('en') }}
126
+ text: {{ nameline }}
127
+ {% endcall %}
128
+ organizationName:
129
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.OrganizationName', Applicant.ApplicantAddressBook) %}
130
+ - languageCode: {{ nameline | guess_language('en') }}
131
+ text: {{ nameline }}
132
+ {% endcall %}
133
+ fullAddress:
134
+ {% call(adrline) match('FormattedNameAddress.Address.FormattedAddress', Applicant.ApplicantAddressBook) %}
135
+ - text: {{ adrline | get_entity_addr }}
136
+ languageCode: {{ nameline | guess_language('en') }}
137
+ {% endcall %}
138
+ detailedAddress:
139
+ - languageCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet | guess_language('en') }}
140
+ text: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet }}
141
+ cityName: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressCity }}
142
+ geographicRegionName: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressState }}
143
+ postalCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressPostcode }}
144
+ {% call(adrline) match('FormattedNameAddress.Address', Applicant.ApplicantAddressBook) %}
145
+ countryCode: {{ adrline.AddressCountryCode }}
146
+ {% endcall %}
147
+ {% endcall %}
148
+
149
+ representatives:
150
+ {% call(Representative) match('RepresentativeDetails.Representative', TradeMark) %}
151
+ {% if not Representative.RepresentativeIdentifier.endswith('-null') %}
152
+ - identifier: {{ Representative.RepresentativeURI }}
153
+ kind: {{ Representative.RepresentativeLegalEntity}}
154
+ fullName:
155
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName', Representative.RepresentativeAddressBook) %}
156
+ - text: {{ nameline | create_full_name }}
157
+ languageCode: {{ nameline.LastName | guess_language('en') }}
158
+ {% endcall %}
159
+ firstName:
160
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.FirstName', Representative.RepresentativeAddressBook) %}
161
+ - languageCode: {{ nameline | guess_language('en') }}
162
+ text: {{ nameline }}
163
+ {% endcall %}
164
+ lastName:
165
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.LastName', Representative.RepresentativeAddressBook) %}
166
+ - languageCode: {{ nameline | guess_language('en') }}
167
+ text: {{ nameline }}
168
+ {% endcall %}
169
+ middleName:
170
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.MiddleName', Representative.RepresentativeAddressBook) %}
171
+ - languageCode: {{ nameline | guess_language('en') }}
172
+ text: {{ nameline }}
173
+ {% endcall %}
174
+ organizationName:
175
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.OrganizationName', Representative.RepresentativeAddressBook) %}
176
+ - languageCode: {{ nameline | guess_language('en') }}
177
+ text: {{ nameline }}
178
+ {% endcall %}
179
+ fullAddress:
180
+ {% call(adrline) match('FormattedNameAddress.Address.FormattedAddress', Representative.RepresentativeAddressBook) %}
181
+ - text: {{ adrline | get_entity_addr}}
182
+ languageCode: {{ adrline | guess_language('en') }}
183
+ {% endcall %}
184
+ detailedAddress:
185
+ - languageCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet | guess_language('en') }}
186
+ text: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet }}
187
+ cityName: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressCity }}
188
+ geographicRegionName: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressState }}
189
+ postalCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressPostcode }}
190
+ {% call(adrline) match('FormattedNameAddress.Address', Representative.RepresentativeAddressBook) %}
191
+ countryCode: {{ adrline.AddressCountryCode }}
192
+ {% endcall %}
193
+ {% endif %}
194
+ {% endcall %}
195
+
196
+ {% endif %}
@@ -166,9 +166,32 @@ applicants:
166
166
  fullName:
167
167
  - languageCode:
168
168
  text:
169
+ firstName:
170
+ - languageCode:
171
+ text:
172
+ lastName:
173
+ - languageCode:
174
+ text:
175
+ middleName:
176
+ - languageCode:
177
+ text:
178
+ organizationName:
179
+ - languageCode:
180
+ text:
169
181
  fullAddress:
170
182
  - languageCode:
171
183
  text:
184
+ detailedAddress:
185
+ - languageCode:
186
+ text:
187
+ cityName:
188
+ geographicRegionName:
189
+ postalCode:
190
+ contact:
191
+ phone:
192
+ fax:
193
+ email:
194
+ url:
172
195
  countryCode: # sometimes, country name is provided instead
173
196
 
174
197
  representatives:
@@ -177,18 +200,64 @@ representatives:
177
200
  fullName:
178
201
  - languageCode:
179
202
  text:
203
+ firstName:
204
+ - languageCode:
205
+ text:
206
+ lastName:
207
+ - languageCode:
208
+ text:
209
+ middleName:
210
+ - languageCode:
211
+ text:
212
+ organizationName:
213
+ - languageCode:
214
+ text:
180
215
  fullAddress:
181
216
  - languageCode:
182
217
  text:
183
- countryCode:
218
+ detailedAddress:
219
+ - languageCode:
220
+ text:
221
+ cityName:
222
+ geographicRegionName:
223
+ postalCode:
224
+ contact:
225
+ phone:
226
+ fax:
227
+ email:
228
+ url:
229
+ countryCode: # sometimes, country name is provided instead
184
230
 
185
231
  correspondence:
186
232
  fullName:
187
233
  - languageCode:
188
234
  text:
235
+ firstName:
236
+ - languageCode:
237
+ text:
238
+ lastName:
239
+ - languageCode:
240
+ text:
241
+ middleName:
242
+ - languageCode:
243
+ text:
244
+ organizationName:
245
+ - languageCode:
246
+ text:
189
247
  fullAddress:
190
248
  - languageCode:
191
249
  text:
250
+ detailedAddress:
251
+ - languageCode:
252
+ text:
253
+ cityName:
254
+ geographicRegionName:
255
+ postalCode:
256
+ contact:
257
+ phone:
258
+ fax:
259
+ email:
260
+ url:
192
261
  countryCode:
193
262
 
194
263
  events:
@@ -1 +1,16 @@
1
- ignore_namespace = ['http://www.euipo.europa.eu/EUTM/EUTM_Download']
1
+ ignore_namespace = ['http://www.euipo.europa.eu/EUTM/EUTM_Download']
2
+
3
+ def create_full_name(name):
4
+ result = ""
5
+
6
+ if name.FirstName:
7
+ result += name.FirstName + " "
8
+ if name.LastName:
9
+ result += name.LastName
10
+ if name.OrganizationName and name.OrganizationName != name.LastName and name.OrganizationName != result:
11
+ if name.FirstName or name.LastName:
12
+ result += ", "
13
+ result += name.OrganizationName
14
+ return result
15
+
16
+
@@ -10,20 +10,46 @@ applicant:
10
10
  identifier: {{ Applicant.ApplicantIdentifier }}
11
11
  kind: {{ Applicant.ApplicantLegalEntity}}
12
12
  fullName:
13
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName', Applicant.ApplicantAddressBook) %}
14
+ - text: {{ nameline | create_full_name }}
15
+ languageCode: {{ nameline.LastName | guess_language('en') }}
16
+ {% endcall %}
17
+ firstName:
18
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.FirstName', Applicant.ApplicantAddressBook) %}
19
+ - languageCode: {{ nameline | guess_language('en') }}
20
+ text: {{ nameline }}
21
+ {% endcall %}
22
+ lastName:
13
23
  {% call(nameline) match('FormattedNameAddress.Name.FormattedName.LastName', Applicant.ApplicantAddressBook) %}
14
- - text: {{ nameline }}
15
- languageCode: {{ nameline | guess_language('en') }}
24
+ - languageCode: {{ nameline | guess_language('en') }}
25
+ text: {{ nameline }}
26
+ {% endcall %}
27
+ middleName:
28
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.MiddleName', Applicant.ApplicantAddressBook) %}
29
+ - languageCode: {{ nameline | guess_language('en') }}
30
+ text: {{ nameline }}
31
+ {% endcall %}
32
+ organizationName:
33
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.OrganizationName', Applicant.ApplicantAddressBook) %}
34
+ - languageCode: {{ nameline | guess_language('en') }}
35
+ text: {{ nameline }}
16
36
  {% endcall %}
17
37
  fullAddress:
18
38
  {% call(adrline) match('PostalAddress', Applicant.ApplicantAddressBook) %}
19
39
  - text: {{ adrline }}
20
40
  languageCode: {{ adrline | guess_language('en') }}
21
41
  {% endcall %}
42
+ detailedAddress:
43
+ - languageCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet | guess_language('en') }}
44
+ text: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet }}
45
+ cityName: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressCity }}
46
+ geographicRegionName: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressState }}
47
+ postalCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressPostcode }}
22
48
  contact:
23
49
  phone: {{ Applicant.ApplicantAddressBook.ContactInformationDetails.Phone }}
24
50
  fax: {{ Applicant.ApplicantAddressBook.ContactInformationDetails.Fax }}
25
51
  email: {{ Applicant.ApplicantAddressBook.ContactInformationDetails.Email }}
26
52
  url: {{ Applicant.ApplicantAddressBook.ContactInformationDetails.URL }}
27
- {% call(adrline) match('FormattedNameAddress.Address', Applicant.ApplicantAddressBook) %}
28
- countryCode: {{ adrline.AddressCountryCode }}
29
- {% endcall %}
53
+ countryCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.AddressCountryCode }}
54
+
55
+
@@ -1 +1,14 @@
1
- ignore_namespace = ['http://www.euipo.europa.eu/EUTM/EUTM_Download']
1
+ ignore_namespace = ['http://www.euipo.europa.eu/EUTM/EUTM_Download']
2
+
3
+ def create_full_name(name):
4
+ result = ""
5
+
6
+ if name.FirstName:
7
+ result += name.FirstName + " "
8
+ if name.LastName:
9
+ result += name.LastName
10
+ if name.OrganizationName and name.OrganizationName != name.LastName and name.OrganizationName != result:
11
+ if name.FirstName or name.LastName:
12
+ result += ", "
13
+ result += name.OrganizationName
14
+ return result
@@ -6,24 +6,48 @@
6
6
 
7
7
  {% from 'navigation.tmpl' import match %}
8
8
 
9
- representativ:
9
+ representative:
10
10
  identifier: {{ Representative.RepresentativeIdentifier }}
11
11
  kind: {{ Representative.RepresentativeLegalEntity}}
12
12
  fullName:
13
- {% call(nameline) match('FormattedNameAddress.Name.FormattedName.LastName', Representative.RepresentativeAddressBook) %}
14
- - text: {{ nameline }}
15
- languageCode: {{ nameline | guess_language('en') }}
13
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName', Representative.RepresentativeAddressBook) %}
14
+ - text: {{ nameline | create_full_name }}
15
+ languageCode: {{ nameline.LastName | guess_language('en') }}
16
16
  {% endcall %}
17
+ firstName:
18
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.FirstName', Representative.RepresentativeAddressBook) %}
19
+ - languageCode: {{ nameline | guess_language('en') }}
20
+ text: {{ nameline }}
21
+ {% endcall %}
22
+ lastName:
23
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.LastName', Representative.RepresentativeAddressBook) %}
24
+ - languageCode: {{ nameline | guess_language('en') }}
25
+ text: {{ nameline }}
26
+ {% endcall %}
27
+ middleName:
28
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.MiddleName', Representative.RepresentativeAddressBook) %}
29
+ - languageCode: {{ nameline | guess_language('en') }}
30
+ text: {{ nameline }}
31
+ {% endcall %}
32
+ organizationName:
33
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName.OrganizationName', Representative.RepresentativeAddressBook) %}
34
+ - languageCode: {{ nameline | guess_language('en') }}
35
+ text: {{ nameline }}
36
+ {% endcall %}
17
37
  fullAddress:
18
38
  {% call(adrline) match('PostalAddress', Representative.RepresentativeAddressBook) %}
19
39
  - text: {{ adrline }}
20
40
  languageCode: {{ adrline | guess_language('en') }}
21
41
  {% endcall %}
42
+ detailedAddress:
43
+ - languageCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet | guess_language('en') }}
44
+ text: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressStreet }}
45
+ cityName: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressCity }}
46
+ geographicRegionName: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressState }}
47
+ postalCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FormattedAddress.AddressPostcode }}
22
48
  contact:
23
49
  phone: {{ Representative.RepresentativeAddressBook.ContactInformationDetails.Phone }}
24
50
  fax: {{ Representative.RepresentativeAddressBook.ContactInformationDetails.Fax }}
25
51
  email: {{ Representative.RepresentativeAddressBook.ContactInformationDetails.Email }}
26
52
  url: {{ Representative.RepresentativeAddressBook.ContactInformationDetails.URL }}
27
- {% call(adrline) match('FormattedNameAddress.Address', Representative.RepresentativeAddressBook) %}
28
- countryCode: {{ adrline.AddressCountryCode }}
29
- {% endcall %}
53
+ countryCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.AddressCountryCode }}
@@ -1 +1,3 @@
1
+ from gbdtransformation.common.filters import *
2
+
1
3
  ignore_namespace = ['http://www.euipo.europa.eu/EUTM/EUTM_Download']
@@ -39,11 +39,12 @@ class Parser:
39
39
  self.type = 'brands'
40
40
  elif template_name == 'whoinn':
41
41
  self.type = 'brands'
42
-
43
42
  elif template_name.endswith('tm'):
44
43
  self.type = 'brands'
45
44
  elif template_name.endswith('id'):
46
45
  self.type = 'designs'
46
+ elif template_name == 'emap' or template_name == 'emrp':
47
+ self.type = 'commons'
47
48
  else:
48
49
  self.type = 'common'
49
50
  self.render = self.get_render()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wipo-gbd-transformation
3
- Version: 1.1.61
3
+ Version: 1.1.63
4
4
  Summary: GBD XML ETL package
5
5
  Home-page: https://github.com/GBD-Wipo/xmlE
6
6
  Author: WIPO GDB team
@@ -2,7 +2,7 @@ gbdtransformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
2
2
  gbdtransformation/execs-nico.py,sha256=UC8E6CPLS5YwhB8AC_Z9_VIxlDGjweOv7NEMMxEVte0,24514
3
3
  gbdtransformation/execs.py,sha256=h4BBz3YrEBwPRwt312iNf2tAT_AglqLbssa1faJe1PA,25450
4
4
  gbdtransformation/gbd-transform.exec.tgz,sha256=fOcqmzJRIuAhCVtbhju3kaikTDAuQF2K16lt9xllnOE,6262
5
- gbdtransformation/parser.py,sha256=m6b1J0kJEaEDc0I8HKxzzN2nsQWKFfLlQqS3nT02kb4,7074
5
+ gbdtransformation/parser.py,sha256=AqJdd-soUJH5l6VN3aTAwPayoHaslFQT4zRuPKa52Q8,7180
6
6
  gbdtransformation/renders.py,sha256=RmvQgugnG2ErvDxP4I9yovW67gEZNpOd59nrzEYfQPI,4555
7
7
  gbdtransformation/brands/__init__.py,sha256=abDdinNkilR-qYg4dhVxP_e1-ZixCzVuHGxbFt710TE,1605
8
8
  gbdtransformation/brands/filters.py,sha256=2IbOBzLsfmgj8kfyEydmuB-VmpO4UMkvtnymVrxTIwc,3674
@@ -148,6 +148,10 @@ gbdtransformation/brands/gstm/__init__.py,sha256=yqzC7OagUR0RLui3pHPWo5WxLyksznH
148
148
  gbdtransformation/brands/gstm/filters.py,sha256=QGOXTX5HsoOoxfY9a31adtujzOS7C0KQx0V9wYKIr2o,2291
149
149
  gbdtransformation/brands/gstm/template.gs.yml,sha256=tQOXTIpmurgytddfqyWvKuCx-7K6ZxALMGXLn0mjg0s,1711
150
150
  gbdtransformation/brands/gstm/template.yml,sha256=INQBe908BttDal83tMEXkpAOTasJ0vo5Myl_kFuatR8,1000
151
+ gbdtransformation/brands/hrtm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib-IVMR5kCVMTY,86
152
+ gbdtransformation/brands/hrtm/filters.py,sha256=aJ-8yQr9VQJ2JHD5BKxMqHnhTgUl7u_gEur86VUqlyA,3853
153
+ gbdtransformation/brands/hrtm/schema,sha256=7jQ-PC0VTx5NZ79Qf8xAZEX8sqFSUtjPwsvVYV8XZAs,1376
154
+ gbdtransformation/brands/hrtm/template.yml,sha256=YOCRTH-fUzaB2DLa-k7bEKeurtW67kxvyUpChj2ioLY,9162
151
155
  gbdtransformation/brands/idtm/__init__.py,sha256=MBVFGkMlqAi-s2ur7pCLYe2uxtjIxx9n9wo2bpESvxU,311
152
156
  gbdtransformation/brands/idtm/filters.py,sha256=HbcLmB9KTBFjLwHJdkJmM-u5wdE2JmxlqJvlSz1cTKk,3018
153
157
  gbdtransformation/brands/idtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
@@ -452,7 +456,7 @@ gbdtransformation/brands/wstm/tests/test.xml.gz,sha256=UKm7LTvKaETUtHMKurFGqkqXO
452
456
  gbdtransformation/brands/xxxx/__init__.py,sha256=fricc3VHm4BwGRFKIIqB0t-NtP3tTVRrEYee_gWpiFo,172
453
457
  gbdtransformation/brands/xxxx/filters.py,sha256=YCaQ6yH2LINwCQvbPHDhnORQyWglbswLlSOY6ur3KXQ,1874
454
458
  gbdtransformation/brands/xxxx/schema,sha256=g_oWkd7k2e5fAQR1BdNkPSsIgP3dkTyc7esWo_UOHQA,163
455
- gbdtransformation/brands/xxxx/template.yml,sha256=yQJOtXcpbpsJRkVY2HBvY9ih39YFN0hSfgYqsGDFD6Y,4672
459
+ gbdtransformation/brands/xxxx/template.yml,sha256=OscSZDrec-rCfK0HVbOaIPmhkykZCWcxK54Zf7iZe6o,5872
456
460
  gbdtransformation/brands/zmtm/__init__.py,sha256=Mtsi_-CaLQirHkhnletNhJ4li-pZlzEZMcKjv6mEk50,256
457
461
  gbdtransformation/brands/zmtm/filters.py,sha256=FkGfv3nPiYDUy97O7bDzPp824qoDsqX-oh2Ox01NTpA,2344
458
462
  gbdtransformation/brands/zmtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
@@ -476,13 +480,13 @@ gbdtransformation/common/jprp/__init__.py,sha256=0zpD6c5XcsLqKBLRVgRUSImZrCQMgtY
476
480
  gbdtransformation/common/jprp/filters.py,sha256=89NR8ZgekoeGnRfhPkXjzasDfWLolsGs7rpcT_BSANc,2234
477
481
  gbdtransformation/common/jprp/template.yml,sha256=cgPMMyQouaGTW-AzWCNlWcMDY8S6CbJCd9w-SyT1uds,1459
478
482
  gbdtransformation/commons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
479
- gbdtransformation/commons/filters.py,sha256=fsZTGgSwb7hOq1AyOaWOWwF9ibM_2jo7Fp0lK4zDyqM,69
483
+ gbdtransformation/commons/filters.py,sha256=_wBT4MmbFKgs2fTaom03BzAIdfW4NAn_KQHZQKe-EKc,117
480
484
  gbdtransformation/commons/emap/__init__.py,sha256=LPq1qlU4nPGFyKPsgKWZG9K2mV4vWR1OAZ1OGWH-NjU,16
481
- gbdtransformation/commons/emap/filters.py,sha256=CA7FRKxuhP1QVlB7hh6uIf7EVBXr1MkJ_NKAaP7nqBo,68
482
- gbdtransformation/commons/emap/template.yml,sha256=acb3nyjhNFSZa89KjIwrAhcc7Em2MrgjPgkvy-nBnYo,1308
485
+ gbdtransformation/commons/emap/filters.py,sha256=BdYFvQBOPtHNzN6nI-kxV_uLgJoJgo9zGqht3qRcfhU,426
486
+ gbdtransformation/commons/emap/template.yml,sha256=nSYD6hEn-8FDSprvBjMVn0IS_1stJO4gg4zqLqfmfw4,2884
483
487
  gbdtransformation/commons/emrp/__init__.py,sha256=LPq1qlU4nPGFyKPsgKWZG9K2mV4vWR1OAZ1OGWH-NjU,16
484
- gbdtransformation/commons/emrp/filters.py,sha256=CA7FRKxuhP1QVlB7hh6uIf7EVBXr1MkJ_NKAaP7nqBo,68
485
- gbdtransformation/commons/emrp/template.yml,sha256=Zor0npqNLZfY9oFs7Ts-bwbsLlUJGmZMHi1cb35MQmI,1402
488
+ gbdtransformation/commons/emrp/filters.py,sha256=JfysDlfkWS9f285UUwFmvXRkXtScF2pvdsyhDlm1_t4,424
489
+ gbdtransformation/commons/emrp/template.yml,sha256=bo6dfXKM-isbuZekWBvrKJ5cZ3t97oleEYSK3JoHHbQ,3076
486
490
  gbdtransformation/designs/__init__.py,sha256=0zM_Nw5d8cwxBsFq0NMxBRb21DiOUqgCb020CGJN_KY,242
487
491
  gbdtransformation/designs/filters.py,sha256=cFXAVGynjZjd5IX1CisEAfVhNLCMIZiu3xz1RUsX3zw,2584
488
492
  gbdtransformation/designs/alid/__init__.py,sha256=U1i1Qng034s7l_2No1yJKbHvUSnMWl66ZLSinKMMS7Y,95
@@ -580,9 +584,9 @@ gbdtransformation/utilities/st66.xsd,sha256=co8aFN3a5TpudllRttWmfLeiZu8ulNipfeXm
580
584
  schemas/ShazamConfig.py,sha256=D67os5B11C41h_WZ7kk54Ss0Kk7tHh8W0d_1c_aX-lY,1191
581
585
  schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
582
586
  schemas/schema_extractor.py,sha256=3-ImtnI777f6b3VA0A_w-NoXdlGz5VZMzK6MnPdQQAY,10294
583
- wipo_gbd_transformation-1.1.61.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
584
- wipo_gbd_transformation-1.1.61.dist-info/METADATA,sha256=swTfmewc4j_5M7BKtpEmGF9KLZ01_3X2wRfOV_NdrSo,577
585
- wipo_gbd_transformation-1.1.61.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
586
- wipo_gbd_transformation-1.1.61.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
587
- wipo_gbd_transformation-1.1.61.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
588
- wipo_gbd_transformation-1.1.61.dist-info/RECORD,,
587
+ wipo_gbd_transformation-1.1.63.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
588
+ wipo_gbd_transformation-1.1.63.dist-info/METADATA,sha256=BOHZBEjdpx3-ubArEHArq37zMCPWLgKGt89LI4TXvY0,577
589
+ wipo_gbd_transformation-1.1.63.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
590
+ wipo_gbd_transformation-1.1.63.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
591
+ wipo_gbd_transformation-1.1.63.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
592
+ wipo_gbd_transformation-1.1.63.dist-info/RECORD,,