wipo-gbd-transformation 1.1.84__py3-none-any.whl → 1.1.86__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.

@@ -14,8 +14,7 @@ def translate_status(trademark):
14
14
 
15
15
  if trademark.STATUSAPPLICATION == 'true': return ('Pending', 'Application filed')
16
16
 
17
- return 'Unknown'
18
- #raise Exception('Could not deduce status')
17
+ raise Exception('Could not deduce status')
19
18
 
20
19
  def translate_kind(kind):
21
20
  if not kind: return ['Individual']
@@ -24,8 +23,7 @@ def translate_kind(kind):
24
23
  if kind == 'kollektiv': return ['Collective']
25
24
  if kind == 'gewaehrleistung': return ['Certificate']
26
25
 
27
- return 'Other'
28
- #raise Exception('kind "%s" is not mapped' % kind)
26
+ raise Exception('kind "%s" is not mapped' % kind)
29
27
 
30
28
  def translate_feature(feature):
31
29
  if not feature: return 'Undefined'
@@ -44,30 +42,15 @@ def translate_feature(feature):
44
42
  if feature.WORD: return 'Word'
45
43
  if feature.WORDIMAGE: return 'Figurative'
46
44
 
47
- return 'Unknown'
48
- #raise Exception('Feature could not be deduced')
45
+
46
+ raise Exception('Feature could not be deduced')
47
+
49
48
 
50
49
  # if Registered or Expired =>
51
50
  # if RENEWALDATE: 10y after RENEWALDATE and endofmonth of FILDATE
52
51
  # else: 10y and endofmonth of FILDATE
53
-
54
- # PL: Missing cancelation
55
-
56
52
  def get_expiry_date(trademark, gbd_status):
57
53
  if gbd_status in ['Registered', 'Expired']:
58
-
59
- if trademark.STATUSCANCELLED == "true":
60
- # expiry date is cancelation date, which in this case is the same as the PROCDATE
61
- pdate = trademark.PROCDATE
62
- if pdate:
63
- try:
64
- pdate = datetime.strptime(pdate.strip(), '%Y-%m-%dT%H:%M:%S')
65
- pdate = pdate.date()
66
- except:
67
- pdate = None
68
- if pdate:
69
- return pdate
70
-
71
54
  rdate = trademark.RENEWALDATE
72
55
  fdate = trademark.FILDATE
73
56
  edate = datetime.strptime(rdate if rdate else fdate, '%Y-%m-%d')
@@ -8,21 +8,6 @@ ignore_namespace = [
8
8
  'http://www.euipo.europa.eu/EUTM/EUTM_Download'
9
9
  ]
10
10
 
11
- def filter_language(value, app_language):
12
- if not value: return []
13
-
14
- languages = set(['en', 'fr', 'es'])
15
- languages.add(app_language.lower())
16
- new_matches = []
17
- for match in value:
18
- if not match: continue
19
- if not isinstance(match, dict):
20
- new_matches.append(match)
21
- elif not match.get('_languageCode', None):
22
- new_matches.append(match)
23
- elif match['_languageCode'].lower() in languages:
24
- new_matches.append(match)
25
- return new_matches
26
11
 
27
12
  def get_termination(value, gbd_status):
28
13
  if gbd_status == 'Ended':
@@ -1,9 +1,4 @@
1
1
  {% from 'navigation.tmpl' import match %}
2
- {% macro match_with_language(path, scope, app_language) -%}
3
- {% for elem in scope | matchpath(path) | filter_language(app_language) %}
4
- {{ caller(elem) }}
5
- {% endfor %}
6
- {%- endmacro %}
7
2
 
8
3
  {% set _space = " " %}
9
4
  {% set status = TradeMark | translate_status %}
@@ -30,18 +25,18 @@ officeStatus: {{ TradeMark.MarkCurrentStatusCode }}
30
25
  terminationDate: {{ TradeMark.MarkCurrentStatusDate | get_termination(status) }}
31
26
  statusDate: {{ TradeMark.MarkCurrentStatusDate | convertdate('%Y-%m-%d') }}
32
27
  markDisclaimerDetails:
33
- {% call(desc) match_with_language('MarkDisclaimerDetails.MarkDisclaimer', TradeMark, TradeMark.ApplicationLanguageCode) %}
28
+ {% call(desc) match('MarkDisclaimerDetails.MarkDisclaimer', TradeMark) %}
34
29
  - text: {{ desc }}
35
30
  languageCode: {{ desc | guess_language(desc._languageCode, TradeMark.ApplicationLanguageCode) }}
36
31
  {% endcall %}
37
32
  markDescriptionDetails:
38
- {% call(desc) match_with_language('MarkDescriptionDetails.MarkDescription', TradeMark, TradeMark.ApplicationLanguageCode) %}
33
+ {% call(desc) match('MarkDescriptionDetails.MarkDescription', TradeMark) %}
39
34
  - text: {{ desc }}
40
35
  languageCode: {{ desc | guess_language(desc._languageCode, TradeMark.ApplicationLanguageCode) }}
41
36
  {% endcall %}
42
37
  wordMarkSpecification:
43
38
  markVerbalElement:
44
- {% call(desc) match_with_language('WordMarkSpecification.MarkVerbalElementText', TradeMark, TradeMark.ApplicationLanguageCode) %}
39
+ {% call(desc) match('WordMarkSpecification.MarkVerbalElementText', TradeMark) %}
45
40
  - text: {{ desc | remove_cr }}
46
41
  languageCode: {{ desc | guess_language(desc._languageCode, TradeMark.ApplicationLanguageCode) }}
47
42
  {% endcall %}
@@ -50,7 +45,7 @@ markImageDetails:
50
45
  - name: {{ img.MarkImageFilename }}
51
46
  colourIndicator: {{ img.MarkImageColourClaimedText | get_true_or_false }}
52
47
  colourClaimed:
53
- {% call(desc) match_with_language('MarkImageColourClaimedText', img, TradeMark.ApplicationLanguageCode) %}
48
+ {% call(desc) match('MarkImageColourClaimedText', img) %}
54
49
  - text: {{ desc }}
55
50
  languageCode: {{ desc | guess_language(desc._languageCode, TradeMark.ApplicationLanguageCode) }}
56
51
  {% endcall %}
@@ -81,7 +76,7 @@ goodsServicesClassification:
81
76
  {% call(nice) match('ClassDescriptionDetails.ClassDescription', nc_gs) %}
82
77
  - code: {{ nice.ClassNumber | int }}
83
78
  terms:
84
- {% call(desc) match_with_language('GoodsServicesDescription', nice, TradeMark.ApplicationLanguageCode) %}
79
+ {% call(desc) match('GoodsServicesDescription', nice) %}
85
80
  {{ desc | guess_language(desc._languageCode, TradeMark.ApplicationLanguageCode) | field_name }}:
86
81
  {% for gsline in desc.__value | remove_trailing('.') | split_terms %}
87
82
  - {{ gsline }}
@@ -0,0 +1,3 @@
1
+ # instruction to render the output to JSON format
2
+ render = 'JSON'
3
+ source = 'national'
@@ -0,0 +1,90 @@
1
+ # namespaces defined in XML and to be ignored in procecssing
2
+ ignore_namespace = [
3
+ 'http://www.oami.europa.eu/TM-Search',
4
+ 'http://pe.oami.europa.eu/TM-Search'
5
+ ]
6
+
7
+ def translate_kind(kind, ipr_kind):
8
+ if kind == None and ipr_kind != None:
9
+ return [ ipr_kind ]
10
+ if not kind: return 'Undefined'
11
+
12
+ if kind == 'Individual': return ['Individual']
13
+ if kind == 'Collective': return ['Collective']
14
+ if kind == 'State property': return ['Collective']
15
+ if kind == 'Certificate': return ['Certificate']
16
+
17
+ return ['Other']
18
+ #raise Exception('kind "%s" is not mapped.' % kind)
19
+
20
+ def translate_status(status):
21
+ if not status: return 'Unknown'
22
+ if status == 'Registration cancelled': return 'Expired'
23
+ if status == 'Expired': return 'Expired'
24
+ if status == 'Registration surrendered': return 'Expired'
25
+
26
+ if status in [ 'Registered trademark',
27
+ 'Registered',
28
+ 'Registration renewed']:
29
+ return 'Registered'
30
+
31
+ if status in [ 'Application withdrawn',
32
+ 'Ended',
33
+ 'Application refused' ]:
34
+ return 'Ended'
35
+
36
+ if status in [ 'Application published',
37
+ 'Application Filed',
38
+ 'Application filed',
39
+ 'Examination of opposition',
40
+ 'Opposition pending',
41
+ 'Appeal pending',
42
+ 'Application opposed',
43
+ 'Registration cancellation pending' ]:
44
+ return 'Pending'
45
+
46
+ return 'Unknown'
47
+ #raise Exception('Status "%s" unmapped' % status)
48
+
49
+ def translate_feature(feature):
50
+ if not feature: return 'Undefined'
51
+
52
+ if feature == 'Word': return 'Word'
53
+ if feature == 'Figurative': return 'Figurative'
54
+ if feature == 'Combined': return 'Combined'
55
+ if feature == '3-D': return 'Three dimensional'
56
+ if feature == 'Sound': return 'Sound'
57
+ if feature == 'Motion': return 'Motion'
58
+ if feature == 'Other': return 'Other'
59
+ if feature == 'Colour' or feature == 'Color': return 'Colour'
60
+ if feature == 'Hologram': return 'Hologram'
61
+
62
+ return 'Unknown'
63
+ #raise Exception('Feature "%s" unmapped' % feature)
64
+
65
+ def get_entity_addr(addr):
66
+ els = ['AddressStreet', 'AddressCity', 'AddressPostcode', 'AddressCounty']
67
+ res = []
68
+ if not addr: return None
69
+ for el in els:
70
+ if addr.get(el, None):
71
+ res.append(addr[el])
72
+ return ', '.join(res)
73
+
74
+ def get_entity_name(name):
75
+ if not name: return
76
+ if name.OrganizationName: return name.OrganizationName
77
+ els = ['FirstName', 'LastName']
78
+ res = []
79
+ for el in els:
80
+ if name.get(el, None):
81
+ res.append(name[el])
82
+ return ' '.join(res)
83
+
84
+ def get_entity_kind(name):
85
+ if name == 'Legal':
86
+ return 'Legal Entity'
87
+ elif name == 'Physical person':
88
+ return 'Natural Person'
89
+ else:
90
+ return None
@@ -0,0 +1,114 @@
1
+ /Transaction
2
+ __/TradeMarkTransactionBody
3
+ ____/TransactionContentDetails
4
+ ______/TransactionCode
5
+ ______/TransactionData
6
+ ________/TradeMarkDetails
7
+ __________/TradeMark
8
+ ____________/AppealDetails
9
+ ______________/Appeal
10
+ ________________/AppealDate
11
+ ________________/AppealDecisionDate
12
+ ____________/ApplicantDetails
13
+ ______________/Applicant
14
+ ________________/ApplicantAddressBook
15
+ __________________/FormattedNameAddress
16
+ ____________________/Name
17
+ ______________________/FormattedName
18
+ ________________________/FirstName
19
+ ________________________/LastName
20
+ ________________________/OrganizationName
21
+ ________________/ApplicantLegalEntity
22
+ ________________/ApplicantNationalityCode
23
+ ____________/ApplicationDate
24
+ ____________/ApplicationLanguageCode
25
+ ____________/ApplicationNumber
26
+ ____________/Comment
27
+ ____________/ExpiryDate
28
+ ____________/FilingPlace
29
+ ____________/GoodsServicesDetails
30
+ ______________/GoodsServices
31
+ ________________/ClassDescriptionDetails
32
+ __________________/ClassDescription
33
+ ____________________/ClassNumber
34
+ ____________________/GoodsServicesDescription
35
+ ________________/ClassificationKindCode
36
+ ____________/IPRKind
37
+ ____________/KindMark
38
+ ____________/MarkCurrentStatusCode
39
+ ____________/MarkCurrentStatusDate
40
+ ____________/MarkDescriptionDetails
41
+ ______________/MarkDescription
42
+ ____________/MarkDisclaimerDetails
43
+ ______________/MarkDisclaimer
44
+ ____________/MarkFeature
45
+ ____________/MarkImageDetails
46
+ ______________/MarkImage
47
+ ________________/MarkImageCategory
48
+ __________________/CategoryCodeDetails
49
+ ____________________/CategoryCode
50
+ __________________/CategoryKind
51
+ ________________/MarkImageColourIndicator
52
+ ________________/MarkImageFilename
53
+ ____________/MarkRecordDetails
54
+ ______________/MarkRecord
55
+ ________________/BasicRecord
56
+ __________________/BasicRecordKind
57
+ __________________/BeneficiaryDetails
58
+ ____________________/Applicant
59
+ ______________________/ApplicantAddressBook
60
+ ________________________/FormattedNameAddress
61
+ __________________________/Name
62
+ ____________________________/FormattedName
63
+ ______________________________/FirstName
64
+ ______________________________/LastName
65
+ ______________________________/OrganizationName
66
+ ______________________/ApplicantLegalEntity
67
+ ______________________/ApplicantNationalityCode
68
+ __________________/OriginalProprietorDetails
69
+ ____________________/Applicant
70
+ ______________________/ApplicantAddressBook
71
+ ________________________/FormattedNameAddress
72
+ __________________________/Name
73
+ ____________________________/FormattedName
74
+ ______________________________/FirstName
75
+ ______________________________/LastName
76
+ ______________________________/OrganizationName
77
+ ______________________/ApplicantLegalEntity
78
+ ______________________/ApplicantNationalityCode
79
+ __________________/RecordCurrentStatusCode
80
+ __________________/RecordCurrentStatusDate
81
+ __________________/RecordEffectiveDate
82
+ __________________/RecordFilingDate
83
+ __________________/RecordIdentifier
84
+ ____________/OppositionDetails
85
+ ______________/Opposition
86
+ ________________/OpponentDetails
87
+ __________________/Opponent
88
+ ____________________/OpponentAddressBook
89
+ ______________________/FormattedNameAddress
90
+ ________________________/Name
91
+ __________________________/FormattedName
92
+ ____________________________/FirstName
93
+ ________________/OppositionDate
94
+ ____________/OppositionPeriodEndDate
95
+ ____________/OppositionPeriodStartDate
96
+ ____________/PriorityDetails
97
+ ______________/Priority
98
+ ________________/PriorityCountryCode
99
+ ________________/PriorityDate
100
+ ________________/PriorityNumber
101
+ ____________/PublicationDetails
102
+ ______________/Publication
103
+ ________________/PublicationDate
104
+ ________________/PublicationIdentifier
105
+ ________________/PublicationSection
106
+ ____________/RegistrationDate
107
+ ____________/RegistrationNumber
108
+ ____________/RegistrationOfficeCode
109
+ ____________/WordMarkSpecification
110
+ ______________/MarkVerbalElementText
111
+ ______/TransactionIdentifier
112
+ __/TransactionHeader
113
+ ____/SenderDetails
114
+ ______/RequestProducerDateTime
@@ -0,0 +1,143 @@
1
+ {% from 'navigation.tmpl' import match %}
2
+ {% set trademark = Transaction.TradeMarkTransactionBody.TransactionContentDetails.TransactionData.TradeMarkDetails.TradeMark %}
3
+
4
+ {% set status = trademark.MarkCurrentStatusCode | translate_status %}
5
+ type: TRADEMARK
6
+ kind: {{ trademark.KindMark | translate_kind(trademark.IPRKind) }}
7
+ st13: {{ trademark.ApplicationNumber | st13('PE', appdate=trademark.ApplicationDate) }}
8
+ gbdStatus: {{ status }}
9
+ markFeature: {{ trademark.MarkFeature | translate_feature }}
10
+ registrationOfficeCode: PE
11
+ designatedCountries:
12
+ - PE
13
+ applicationNumber: {{ trademark.ApplicationNumber }}
14
+ applicationDate: {{ trademark.ApplicationDate | convertdate('%Y-%m-%d') }}
15
+ registrationNumber: {{ trademark.RegistrationNumber}}
16
+ registrationDate: {{ trademark.RegistrationDate }}
17
+ applicationLanguageCode: 'es'
18
+ officeStatus: {{ trademark.MarkCurrentStatusCode }}
19
+ statusDate: {{ trademark.MarkCurrentStatusDate | convertdate('%Y-%m-%d') }}
20
+ expiryDate: {{ trademark.ExpiryDate }}
21
+
22
+ {% if status == 'Ended' %}
23
+ terminationDate: {{ trademark.MarkCurrentStatusDate }}
24
+ {% endif %}
25
+
26
+ markDisclaimerDetails:
27
+ {% call(desc) match('MarkDisclaimerDetails.MarkDisclaimer', trademark) %}
28
+ - text: {{ desc }}
29
+ languageCode: {{ desc | guess_language('es') }}
30
+ {% endcall %}
31
+
32
+ wordMarkSpecification:
33
+ markVerbalElement:
34
+ {% call(desc) match('WordMarkSpecification.MarkVerbalElementText', trademark) %}
35
+ - text: {{ desc }}
36
+ languageCode: {{ desc | guess_language('es') }}
37
+ {% endcall %}
38
+
39
+ markDescriptionDetails:
40
+ {% call(desc) match('MarkDescriptionDetails.MarkDescription', trademark) %}
41
+ - languageCode: {{ desc | guess_language('es') }}
42
+ text: {{ desc }}
43
+ {% endcall %}
44
+
45
+ markImageDetails:
46
+ {% call(img) match('MarkImageDetails.MarkImage', trademark) %}
47
+ - name: {{ img.MarkImageFilename }}
48
+ colourIndicator: {{ img.MarkImageColourIndicator | get_true_or_false }}
49
+ colourClaimed:
50
+ {% call(desc) match('MarkImageColourClaimedText', img) %}
51
+ - text: {{ desc }}
52
+ languageCode: {{ desc | guess_language(desc._languageCode, 'es') }}
53
+ {% endcall %}
54
+ classification:
55
+ kind: Vienna
56
+ version: {{ ASK_THE_OFFICE }}
57
+ code:
58
+ {% call(code) match('MarkImageCategory.CategoryCodeDetails.CategoryCode', img) %}
59
+ - {{ code }}
60
+ {% endcall %}
61
+ {% endcall %}
62
+
63
+ {% call(nc_gs) match('GoodsServicesDetails.GoodsServices', trademark) %}
64
+ goodsServicesClassification:
65
+ kind: Nice
66
+ version: {{ ASK_THE_OFFICE }}
67
+ class:
68
+ {% call(nice) match('ClassDescriptionDetails.ClassDescription', nc_gs) %}
69
+ - code: {{ nice.ClassNumber | int }}
70
+ terms:
71
+ {% if nice.GoodsServicesDescription | has_value %}
72
+ {% call(desc) match('GoodsServicesDescription', nice) %}
73
+ {{ desc | guess_language(desc._languageCode, 'es') | field_name }}:
74
+ {% for gsline in desc | remove_trailing('.') | split_terms %}
75
+ - {{ gsline | lower }}
76
+ {% endfor %}
77
+ {% endcall %}
78
+ {% endif %}
79
+ {% endcall %}
80
+ {% endcall %}
81
+
82
+ priorities:
83
+ {% call(priority) match('PriorityDetails.Priority', trademark) %}
84
+ - countryCode: {{ priority.PriorityCountryCode }}
85
+ number: {{ priority.PriorityNumber }}
86
+ date: {{ priority.PriorityDate }}
87
+ {% endcall %}
88
+
89
+ publications:
90
+ {% call(publication) match('PublicationDetails.Publication', trademark) %}
91
+ - identifier: {{ publication.PublicationIdentifier }}
92
+ section: {{ publication.PublicationSection }}
93
+ {% endcall %}
94
+
95
+ applicants:
96
+ {% call(Applicant) match('ApplicantDetails.Applicant', trademark) %}
97
+ - identifier: {{ Applicant.ApplicantIdentifier }}
98
+ kind: {{ Applicant.ApplicantLegalEntity | get_entity_kind}}
99
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName', Applicant.ApplicantAddressBook) %}
100
+ fullName:
101
+ - text: {{ nameline | get_entity_name }}
102
+ languageCode: {{ nameline | guess_language('es') }}
103
+ {% endcall %}
104
+ fullAddress:
105
+ {% call(adrline) match('FormattedNameAddress.Address.FormattedAddress', Applicant.ApplicantAddressBook) %}
106
+ - text: {{ adrline | get_entity_addr}}
107
+ languageCode: {{ adrline | get_entity_addr | guess_language('es') }}
108
+ {% endcall %}
109
+ {% call(adrline) match('FormattedNameAddress.Address', Applicant.ApplicantAddressBook) %}
110
+ countryCode: {{ adrline.AddressCountryCode }}
111
+ {% endcall %}
112
+ countryCode: {{ Applicant.ApplicantNationalityCode }}
113
+ {% endcall %}
114
+
115
+ representatives:
116
+ {% call(Representative) match('RepresentativeDetails.Representative', trademark) %}
117
+ - identifier: {{ Representative.RepresentativeIdentifier }}
118
+ kind: {{ Representative.ApplicantLegalEntity | get_entity_kind}}
119
+ {% call(nameline) match('FormattedNameAddress.Name.FormattedName', Representative.RepresentativeAddressBook) %}
120
+ fullName:
121
+ - text: {{ nameline | get_entity_name}}
122
+ languageCode: {{ nameline | get_entity_name | guess_language('section') }}
123
+ {% endcall %}
124
+ fullAddress:
125
+ {% call(adrline) match('FormattedNameAddress.Address.FormattedAddress', Representative.RepresentativeAddressBook) %}
126
+ - text: {{ adrline | get_entity_addr}}
127
+ languageCode: {{ adrline | get_entity_addr | guess_language('es') }}
128
+ {% endcall %}
129
+ {% call(adrline) match('FormattedNameAddress.Address', Representative.RepresentativeAddressBook) %}
130
+ countryCode: {{ adrline.AddressCountryCode }}
131
+ {% endcall %}
132
+ countryCode: {{ Representative.RepresentativeNationalityCode }}
133
+ {% endcall %}
134
+
135
+ appeals:
136
+ {% call(appeal) match('AppealDetails.Appeal', trademark) %}
137
+ - date: {{ appeal.AppealDate | convertdate('%Y-%m-%d') }}
138
+ decisionDate: {{ appeal.AppealDecisionDate | convertdate('%Y-%m-%d') }}
139
+ {% endcall %}
140
+
141
+ extra:
142
+ oppositionPeriodStartDate: {{ trademark.OppositionPeriodStartDate | convertdate('%Y-%m-%d') }}
143
+ oppositionPeriodEndDate: {{ trademark.OppositionPeriodEndDate | convertdate('%Y-%m-%d') }}
@@ -176,16 +176,31 @@ def get_applicants(owners, status):
176
176
  if(owner.get('add%s' % i)):
177
177
  adrlines.append(owner['add%s' % i].replace(';', ''))
178
178
 
179
+ address_str = ', '.join(adrlines)
180
+ address_str = address_str.replace(",,", ",")
181
+ if address_str.endswith(","):
182
+ address_str = address_str[:-1]
183
+
184
+ if len(address_str.strip()) == 0:
185
+ address_str = None
186
+
179
187
  city = []
188
+ city_str = None
189
+ postCode_str = None
180
190
  if owner.postCode:
181
191
  city.append(owner.postCode)
192
+ postCode_str = owner.postCode
182
193
  if owner.city:
183
194
  city.append(owner.city)
195
+ city_str = owner.city
184
196
 
185
197
  if len(city):
186
198
  adrlines.append(' '.join(city))
199
+
200
+ state_str = None
187
201
  if owner.state:
188
202
  adrlines.append(owner.state)
203
+ state_str = owner.state
189
204
 
190
205
  address = '; '.join(adrlines)
191
206
 
@@ -197,7 +212,11 @@ def get_applicants(owners, status):
197
212
  'kind': 'Natural Person' if owner.entType == '01' else 'Legal Entity',
198
213
  'name': owner.partyName,
199
214
  'address': address,
200
- 'country': country
215
+ 'country': country,
216
+ 'city': city_str,
217
+ 'postCode': postCode_str,
218
+ 'addressLines': address_str,
219
+ 'state': state_str
201
220
  })
202
221
 
203
222
  return applicants
@@ -137,15 +137,40 @@ publications:
137
137
  {% set applicants = file.owners.owner | get_applicants(status['gbd']) %}
138
138
  applicants:
139
139
  {% for applicant in applicants %}
140
- - kind: {{ applicant.kind }}
140
+ - identifier:
141
+ kind: {{ applicant.kind }}
141
142
  fullName:
142
143
  - languageCode: en
143
144
  text: {{ applicant.name }}
145
+ firstName:
146
+ - languageCode:
147
+ text:
148
+ lastName:
149
+ - languageCode:
150
+ text:
151
+ middleName:
152
+ - languageCode:
153
+ text:
154
+ organizationName:
155
+ - languageCode:
156
+ text:
144
157
  fullAddress:
145
158
  - languageCode: en
146
159
  text: {{ applicant.address }}
160
+ detailedAddress:
161
+ - languageCode: en
162
+ text: {{ applicant.addressLines }}
163
+ cityName: {{ applicant.city }}
164
+ geographicRegionName: {{ applicant.state }}
165
+ postalCode: {{ applicant.postCode }}
166
+ countryCode: {{ applicant.country }}
167
+ contact:
168
+ phone:
169
+ fax:
170
+ email:
171
+ url:
147
172
  countryCode: {{ applicant.country }}
148
- {% endfor %}
173
+ {% endfor %}
149
174
 
150
175
  representatives:
151
176
  {% if file.head.attName %}
@@ -310,6 +310,7 @@ events:
310
310
  appeals:
311
311
  - kind:
312
312
  date:
313
+ decisionDate:
313
314
 
314
315
  # licence information, not frequent, but provided by Singapore, Norway and UK as of 2025-04-23
315
316
  licences:
@@ -66,7 +66,7 @@ def getLastRenewalDate(histories, designIdentifier=None, countryCode=None):
66
66
 
67
67
  renewalDate = None
68
68
  for history in histories:
69
- if "HagueRenewal" in history:
69
+ if "HagueRenewal" in history and isinstance(history, dict):
70
70
  if "ExpiryDate" in history.HagueRenewal:
71
71
  if designIdentifier == None:
72
72
  # no design restriction
@@ -90,7 +90,7 @@ def getRefusalDate(histories, designIdentifier=None, countryCode=None):
90
90
  refusalDate = None
91
91
  if histories != None:
92
92
  for history in histories:
93
- if "HagueRefusal" in history:
93
+ if "HagueRefusal" in history and isinstance(history, dict):
94
94
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueRefusal.AffectedDesign):
95
95
  if countryCode == None or isApplicableToCountry(countryCode, history.HagueRefusal):
96
96
  if "DecisionEffectiveDate" in history.HagueRefusal:
@@ -176,7 +176,7 @@ def getOfficeStatusDate(registrationDate, expiryDate, histories, designIdentifie
176
176
  if countryCode != None and histories != None:
177
177
  # check possible renunciation including the particular country if specified
178
178
  for history in histories:
179
- if "HagueRenunciation" in history:
179
+ if "HagueRenunciation" in history and isinstance(history, dict):
180
180
  # is the design identifier in the list of affected designs?
181
181
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueRenunciation):
182
182
  if "DesignatedCountryBag" in history.HagueRenunciation:
@@ -188,7 +188,7 @@ def getOfficeStatusDate(registrationDate, expiryDate, histories, designIdentifie
188
188
  return history.HagueRenunciation.InternationalRecordingDate
189
189
 
190
190
  # to be tested: same for HagueLimitation, which is very similar to HagueRenunciation
191
- if "HagueLimitation" in history:
191
+ if "HagueLimitation" in history and isinstance(history, dict):
192
192
  # is the design identifier in the list of affected designs?
193
193
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueLimitation):
194
194
  if "DesignatedCountryBag" in history.HagueLimitation:
@@ -199,7 +199,7 @@ def getOfficeStatusDate(registrationDate, expiryDate, histories, designIdentifie
199
199
  elif designatedCountry.DesignatedCountryCode == countryCode:
200
200
  return history.HagueLimitation.InternationalRecordingDate
201
201
 
202
- if "HagueGrantProtection" in history:
202
+ if "HagueGrantProtection" in history and isinstance(history, dict):
203
203
  # is the design identifier in the list of affected designs?
204
204
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueGrantProtection.AffectedDesign):
205
205
  if "RecordNotifyingOfficeCode" in history.HagueGrantProtection:
@@ -242,7 +242,7 @@ def getGbdStatus(registrationDate, expiryDate, histories, designIdentifier, coun
242
242
  grantedDate = None
243
243
  if countryCode != None and histories != None:
244
244
  for history in histories:
245
- if "HagueRenunciation" in history:
245
+ if "HagueRenunciation" in history and isinstance(history, dict):
246
246
  # is the design identifier in the list of affected designs?
247
247
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueRenunciation):
248
248
  if "DesignatedCountryBag" in history.HagueRenunciation:
@@ -254,7 +254,7 @@ def getGbdStatus(registrationDate, expiryDate, histories, designIdentifier, coun
254
254
  return "Ended"
255
255
 
256
256
  # to be tested: same for HagueLimitation, which is very similar to HagueRenunciation
257
- if "HagueLimitation" in history:
257
+ if "HagueLimitation" in history and isinstance(history, dict):
258
258
  # is the design identifier in the list of affected designs?
259
259
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueLimitation):
260
260
  if "DesignatedCountryBag" in history.HagueLimitation:
@@ -265,7 +265,7 @@ def getGbdStatus(registrationDate, expiryDate, histories, designIdentifier, coun
265
265
  elif designatedCountry.DesignatedCountryCode == countryCode:
266
266
  return "Ended"
267
267
 
268
- if "HagueGrantProtection" in history:
268
+ if "HagueGrantProtection" in history and isinstance(history, dict):
269
269
  # is the design identifier in the list of affected designs?
270
270
  if designIdentifier == None or isAffectedDesignIdentifier(designIdentifier, history.HagueGrantProtection.AffectedDesign):
271
271
  if "RecordNotifyingOfficeCode" in history.HagueGrantProtection:
@@ -1,22 +1,25 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wipo-gbd-transformation
3
- Version: 1.1.84
3
+ Version: 1.1.86
4
4
  Summary: GBD XML ETL package
5
5
  Home-page: https://github.com/GBD-Wipo/xmlE
6
6
  Author: WIPO GDB team
7
7
  Author-email: gbd@wipo.int
8
+ License: UNKNOWN
8
9
  Keywords: gbdtransformation
10
+ Platform: UNKNOWN
9
11
  Classifier: Programming Language :: Python :: 3.6
10
12
  License-File: LICENSE.md
13
+ Requires-Dist: PyYAML
11
14
  Requires-Dist: boto3
12
- Requires-Dist: jinja2 ==2.11.2
13
- Requires-Dist: xmltodict
14
15
  Requires-Dist: dicttoxml
15
- Requires-Dist: PyYAML
16
- Requires-Dist: munch
17
- Requires-Dist: tabulate
18
- Requires-Dist: markupsafe ==2.0.1
16
+ Requires-Dist: jinja2 (==2.11.2)
19
17
  Requires-Dist: lingua-language-detector
20
18
  Requires-Dist: lxml
19
+ Requires-Dist: markupsafe (==2.0.1)
20
+ Requires-Dist: munch
21
+ Requires-Dist: tabulate
22
+ Requires-Dist: xmltodict
21
23
 
22
24
  GBD XML ETL package
25
+
@@ -89,7 +89,7 @@ gbdtransformation/brands/cutm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRF
89
89
  gbdtransformation/brands/cutm/template.yml,sha256=TiC6Nf2MF8l1srCpvChPcS99KBaXSy-BGIVRkqQZVtU,138
90
90
  gbdtransformation/brands/cutm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
91
91
  gbdtransformation/brands/detm/__init__.py,sha256=eSKSOkwspXF3U7Sv7Z2KkOQSqzvghK5dD9vR-pmEPKQ,418
92
- gbdtransformation/brands/detm/filters.py,sha256=n-Y3dLxtgIRMCSoFqDXuKluf_uBwa-CXory8wCwmcXQ,3167
92
+ gbdtransformation/brands/detm/filters.py,sha256=kR_OKuRWEXymKKz-brh6CoO4kIsrvK-W2hGfgLsH0Yk,2611
93
93
  gbdtransformation/brands/detm/schema,sha256=SxOjgWehtwDP01TPFmMGsjWs1Sz6ijUlHB8WUMSBOeU,9451
94
94
  gbdtransformation/brands/detm/template.yml,sha256=Co2eFATPhDHDN0dz4tNNJsL8Mpl7qm2W6ejhZxEjHBg,3880
95
95
  gbdtransformation/brands/dktm/__init__.py,sha256=lQh4-cQE0kvjM75miSkI2As4xEgb9Em_4lJfnbgAbS8,180
@@ -111,9 +111,9 @@ gbdtransformation/brands/egtm/schema,sha256=AP0MxQyD0hY4APRh8nxitlxMqJYJB4AaaTJ8
111
111
  gbdtransformation/brands/egtm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
112
112
  gbdtransformation/brands/egtm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
113
  gbdtransformation/brands/emtm/__init__.py,sha256=9J9MpkcIR-7PWVjbzvT-ey9F400wxdlRAQF5ZiX8FX8,91
114
- gbdtransformation/brands/emtm/filters.py,sha256=vUAFaOGOx2l7VhIf1DcyyNfoGpJLudBP4wYm8ukCMCM,3294
114
+ gbdtransformation/brands/emtm/filters.py,sha256=KAPhAAtYyY_ODHALSZ5akgivDCpjPxDmE-xVxhTT18k,2781
115
115
  gbdtransformation/brands/emtm/schema,sha256=CCZ2HtmgidPqBs9byleAC6ksQ6jFgclmVewH3Vnex8w,9643
116
- gbdtransformation/brands/emtm/template.yml,sha256=L0pDlLO_xwksy_Bb_BiNSgorFAAysaPcojmJJnu4UZw,5561
116
+ gbdtransformation/brands/emtm/template.yml,sha256=rXAM3XkAx7Rf7OpH0w8WGWux0uPfy6cBqBT0O_shM4s,5118
117
117
  gbdtransformation/brands/estm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib-IVMR5kCVMTY,86
118
118
  gbdtransformation/brands/estm/filters.py,sha256=GzhXr2dnPmZ4l71q0a3ulNTJgdpLQI6qcQcNEK8E5Co,3553
119
119
  gbdtransformation/brands/estm/schema,sha256=y7ZeQPuHez-DbBs1wnQjkyPvQ3hQ2uX5eNdrimCnFh4,3334
@@ -314,6 +314,10 @@ gbdtransformation/brands/omtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRF
314
314
  gbdtransformation/brands/omtm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
315
315
  gbdtransformation/brands/omtm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
316
316
  gbdtransformation/brands/omtm/tests/test.xml,sha256=H5uPHRXq1IQc8WCKIISaTK8etM65rNcAmqWVl8c2QtM,3912
317
+ gbdtransformation/brands/petm/__init__.py,sha256=zAi2tO7hSmmkrYYq34_BW4J2QKQHG90WUVm4O0Tiwvw,85
318
+ gbdtransformation/brands/petm/filters.py,sha256=QPrHBSdJT0pKLa-vIOjAsYEduem_H2hlSPBsaHA6yY4,2870
319
+ gbdtransformation/brands/petm/schema,sha256=xLE6nWnE4XmNxwIUNzLKomvJ9UqIMRR8y7q96Dac-Bk,3878
320
+ gbdtransformation/brands/petm/template.yml,sha256=Tb6W5MhPNbeHPTFnEX8VTdmnNJS8Z-3A8WHLzSBo2BQ,5871
317
321
  gbdtransformation/brands/pgtm/__init__.py,sha256=Dl-9OGINzHIufZ6JBIuAzLzNozQdyZttdWwWw7Pl-RI,83
318
322
  gbdtransformation/brands/pgtm/filters.py,sha256=_f1jlWyeUyvlwfbqoS5rHroSfD-OJqbEJv5jF5sG_tY,2173
319
323
  gbdtransformation/brands/pgtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
@@ -408,9 +412,9 @@ gbdtransformation/brands/uatm/filters.py,sha256=Er8L7T5If-2s_oDZIhgIpUKBTHR9gN1Z
408
412
  gbdtransformation/brands/uatm/schema,sha256=xyi3dhfyhzwFzeNA4vl5CZ_3FGNm6kcePHQt4Nd_qWM,4318
409
413
  gbdtransformation/brands/uatm/template.yml,sha256=7E7Q9HUg8aFdiwzpYYqB0LIWbkG_zkRh8mGVpk7fL6k,5974
410
414
  gbdtransformation/brands/ustm/__init__.py,sha256=nAKYGg8pFwhesOakhSSbHADYx422ODF73hEIjbswwOw,9731
411
- gbdtransformation/brands/ustm/filters.py,sha256=_-Fk0jN3es5yr8AtRjYUXZ9ZTqmKMaJZrTAwQsPiJGw,5978
415
+ gbdtransformation/brands/ustm/filters.py,sha256=G6M2DHBnQUnBBK6gDYUXcTJ-dAe3AKILayaOXkFXfbA,6624
412
416
  gbdtransformation/brands/ustm/schema,sha256=7vcbDMFy76nAxZ5dRjssbOhHNFOqVIlVldrNssBB1Mc,133581
413
- gbdtransformation/brands/ustm/template.yml,sha256=btWlXhetvAFnng9IFMi264ZgXur2KRl_7er1GYGFt-8,5033
417
+ gbdtransformation/brands/ustm/template.yml,sha256=0stb2cq5WpWeeRwFO7o3cd1yq1KlQQiNI__ORcYPmt8,5592
414
418
  gbdtransformation/brands/uytm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib-IVMR5kCVMTY,86
415
419
  gbdtransformation/brands/uytm/filters.py,sha256=i7SBMVTF70OERVdsS3Dfv19S3-9kyxE-y4aYA59YxA4,1976
416
420
  gbdtransformation/brands/uytm/schema,sha256=uMd1E_XRVQ_wHVrGq5fqFH6Fyg8cWx2DTQbVvH8tmmA,3730
@@ -457,7 +461,7 @@ gbdtransformation/brands/wstm/tests/test.xml,sha256=YH6ym16Jot43w37Q4zRMktjXhrpd
457
461
  gbdtransformation/brands/xxxx/__init__.py,sha256=fricc3VHm4BwGRFKIIqB0t-NtP3tTVRrEYee_gWpiFo,172
458
462
  gbdtransformation/brands/xxxx/filters.py,sha256=YCaQ6yH2LINwCQvbPHDhnORQyWglbswLlSOY6ur3KXQ,1874
459
463
  gbdtransformation/brands/xxxx/schema,sha256=g_oWkd7k2e5fAQR1BdNkPSsIgP3dkTyc7esWo_UOHQA,163
460
- gbdtransformation/brands/xxxx/template.yml,sha256=0aNF040tiUwhb-Ujm0OmHNq0do9s_W6RX2cgEtOAOWs,7807
464
+ gbdtransformation/brands/xxxx/template.yml,sha256=edcVpB6OeNQ74AGZx9H-hhQFct1WMqtwmBG9iSc9mrY,7826
461
465
  gbdtransformation/brands/zmtm/__init__.py,sha256=Mtsi_-CaLQirHkhnletNhJ4li-pZlzEZMcKjv6mEk50,256
462
466
  gbdtransformation/brands/zmtm/filters.py,sha256=FkGfv3nPiYDUy97O7bDzPp824qoDsqX-oh2Ox01NTpA,2344
463
467
  gbdtransformation/brands/zmtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
@@ -566,7 +570,7 @@ gbdtransformation/designs/vnid/filters.py,sha256=HlZJp1Zb1zU37tZO-xBe0Kt-TlCT0nl
566
570
  gbdtransformation/designs/vnid/schema,sha256=HxkKmaih8mUTYZst9aIbEgv_uXhqS6PQp3C4S7utz18,3830
567
571
  gbdtransformation/designs/vnid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
568
572
  gbdtransformation/designs/woid/__init__.py,sha256=Cdy9Ki01mAvufymKb9QSLwfFggaoerOenq6BxhPu500,66
569
- gbdtransformation/designs/woid/filters.py,sha256=RVqDYsGL-9BNEpe5VmAXdBwtM8B5HuHDI1ycP65ssmc,17352
573
+ gbdtransformation/designs/woid/filters.py,sha256=YT2oC3KPkJM9TZ4eMToG0GNBhwRcnv7zxdp5OoAyWZo,17592
570
574
  gbdtransformation/designs/woid/schema,sha256=DoJKgqrbOIPrrSJ7WcJM6aQpDqG34yD0MT7bsxauNpM,19967
571
575
  gbdtransformation/designs/woid/template.yml,sha256=td3Y7vfssL569Anr4Sz1y11ejOZmbRbC_-xw2ON7Vk4,27778
572
576
  gbdtransformation/designs/xxid/__init__.py,sha256=Cdy9Ki01mAvufymKb9QSLwfFggaoerOenq6BxhPu500,66
@@ -585,9 +589,9 @@ gbdtransformation/utilities/st66.xsd,sha256=co8aFN3a5TpudllRttWmfLeiZu8ulNipfeXm
585
589
  schemas/ShazamConfig.py,sha256=D67os5B11C41h_WZ7kk54Ss0Kk7tHh8W0d_1c_aX-lY,1191
586
590
  schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
587
591
  schemas/schema_extractor.py,sha256=3-ImtnI777f6b3VA0A_w-NoXdlGz5VZMzK6MnPdQQAY,10294
588
- wipo_gbd_transformation-1.1.84.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
589
- wipo_gbd_transformation-1.1.84.dist-info/METADATA,sha256=v0jD6sQSUrdlPctbdJPhaAyCEMHj5yAAVkWY3CwYKjM,577
590
- wipo_gbd_transformation-1.1.84.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
591
- wipo_gbd_transformation-1.1.84.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
592
- wipo_gbd_transformation-1.1.84.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
593
- wipo_gbd_transformation-1.1.84.dist-info/RECORD,,
592
+ wipo_gbd_transformation-1.1.86.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
593
+ wipo_gbd_transformation-1.1.86.dist-info/METADATA,sha256=wJBiR5XKw7qXXwgo_ynOOkQn8L6oDdhKaEVVXBAYKi8,617
594
+ wipo_gbd_transformation-1.1.86.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
595
+ wipo_gbd_transformation-1.1.86.dist-info/entry_points.txt,sha256=KmwWxkYogxtcrgRU6miWDcikp4yJ3cqr68yMRJq4Pwo,224
596
+ wipo_gbd_transformation-1.1.86.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
597
+ wipo_gbd_transformation-1.1.86.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.37.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -3,3 +3,4 @@ gbd-transform = gbdtransformation.execs:run
3
3
  gbd-transform-organize = gbdtransformation.execs:organize
4
4
  gbd-transform-test = gbdtransformation.execs:test
5
5
  gbd-transform-xpath = gbdtransformation.execs:shazam
6
+