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

Files changed (54) hide show
  1. gbdtransformation/.DS_Store +0 -0
  2. gbdtransformation/brands/brtm/filters.py +66 -3
  3. gbdtransformation/brands/brtm/template.yml +21 -0
  4. gbdtransformation/brands/emtm/filters.py +1 -1
  5. gbdtransformation/brands/estm/filters.py +4 -3
  6. gbdtransformation/brands/estm/template.yml +1 -1
  7. gbdtransformation/brands/filters.py +7 -2
  8. gbdtransformation/brands/gbtm/filters.py +10 -3
  9. gbdtransformation/brands/gbtm/template.yml +3 -3
  10. gbdtransformation/brands/ipas/filters.py +10 -1
  11. gbdtransformation/brands/ipas/template.yml +9 -2
  12. gbdtransformation/brands/mctm/filters.py +1 -1
  13. gbdtransformation/brands/rotm/__init__.py +3 -0
  14. gbdtransformation/brands/rotm/filters.py +82 -0
  15. gbdtransformation/brands/rotm/schema +128 -0
  16. gbdtransformation/brands/rotm/template.yml +121 -0
  17. gbdtransformation/brands/rutm/__init__.py +1 -0
  18. gbdtransformation/brands/rutm/filters.py +26 -23
  19. gbdtransformation/brands/rutm/template.yml +38 -33
  20. gbdtransformation/brands/sgtm/filters.py +1 -1
  21. gbdtransformation/brands/sttm/__init__.py +16 -0
  22. gbdtransformation/brands/sttm/filters.py +70 -0
  23. gbdtransformation/brands/sttm/schema +83 -0
  24. gbdtransformation/brands/sttm/template.yml +1 -0
  25. gbdtransformation/brands/sttm/tests/__init__.py +0 -0
  26. gbdtransformation/brands/ustm/filters.py +1 -3
  27. gbdtransformation/brands/vntm/__init__.py +2 -1
  28. gbdtransformation/brands/vntm/filters.py +14 -6
  29. gbdtransformation/brands/xxtm/__init__.py +2 -0
  30. gbdtransformation/brands/xxtm/filters.py +60 -0
  31. gbdtransformation/brands/xxtm/schema +4 -0
  32. gbdtransformation/brands/xxtm/template.yml +183 -0
  33. gbdtransformation/common/filters.py +9 -3
  34. gbdtransformation/designs/alid/__init__.py +5 -0
  35. gbdtransformation/designs/alid/filters.py +56 -0
  36. gbdtransformation/designs/alid/schema +89 -0
  37. gbdtransformation/designs/alid/template.yml +1 -0
  38. gbdtransformation/designs/bnid/__init__.py +5 -0
  39. gbdtransformation/designs/bnid/filters.py +57 -0
  40. gbdtransformation/designs/bnid/schema +80 -0
  41. gbdtransformation/designs/bnid/template.yml +1 -0
  42. gbdtransformation/designs/ipas/__init__.py +0 -0
  43. gbdtransformation/designs/ipas/filters.py +99 -0
  44. gbdtransformation/designs/ipas/template.yml +163 -0
  45. gbdtransformation/designs/xxid/__init__.py +2 -0
  46. gbdtransformation/designs/xxid/filters.py +60 -0
  47. gbdtransformation/designs/xxid/schema +4 -0
  48. gbdtransformation/designs/xxid/template.yml +146 -0
  49. {wipo_gbd_transformation-1.1.35.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/METADATA +1 -4
  50. {wipo_gbd_transformation-1.1.35.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/RECORD +54 -25
  51. {wipo_gbd_transformation-1.1.35.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/WHEEL +1 -1
  52. {wipo_gbd_transformation-1.1.35.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/entry_points.txt +0 -1
  53. {wipo_gbd_transformation-1.1.35.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/top_level.txt +0 -0
  54. {wipo_gbd_transformation-1.1.35.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/LICENSE.md +0 -0
Binary file
@@ -18,6 +18,7 @@ def translate_type(header):
18
18
  if not code:
19
19
  raise Exception('Incomplete Document Info')
20
20
  if code == 'Marca': return 'TRADEMARK'
21
+ if code == 'Marca Madri': return 'TRADEMARK'
21
22
  """
22
23
  if code == 'National TradeMarks': return 'TRADEMARK'
23
24
  if code == 'Zimbabwe': return 'TRADEMARK'
@@ -31,7 +32,15 @@ def translate_kind(trademark, header):
31
32
  if subcode == 'Marca de Produto': return ['Individual']
32
33
  if subcode == 'Marca de Serviço': return ['Individual']
33
34
  if subcode == 'Marca Genérica': return ['Individual']
35
+ if subcode == 'Marca de Produto/Serviço': return ['Individual']
36
+ if subcode == 'Madri Produto/Serviço': return ['Individual']
37
+ if subcode == 'Madri Coletiva': return ['Collective']
38
+ if subcode == 'Marca Coletiva': return ['Collective']
39
+ if subcode == 'Marca de Propaganda': return ['Individual']
40
+ if subcode == 'Marca de Certificação': return ['Certificate']
41
+ if subcode == 'Madri Certificação': return ['Certificate']
34
42
  """
43
+ if subcode == 'Marca de Certificação': return ['Certificate']
35
44
  if subcode == 'Part A': return ['Individual']
36
45
  if subcode == 'Part B': return ['Individual']
37
46
  if subcode == 'Part C': return ['Individual']
@@ -44,13 +53,39 @@ def translate_kind(trademark, header):
44
53
 
45
54
  def translate_status(trademark):
46
55
  status = trademark.MarkCurrentStatusCode
56
+ if status in ['Registrado']: return 'Registered'
57
+ if status in ['Expirado']: return 'Expired'
58
+ if status in ['Recorrido','Examinado', 'Publicado','Oposto', 'Pendente', 'Sub judice', 'Sobrestado']: return 'Pending'
59
+ if status in ['Abandonado/arquivado', 'Depositado', 'Anulado','Indeferido']: return 'Ended'
47
60
 
48
- if status == 'Inactive':
61
+ if status == 'Inativo':
49
62
  if trademark.ExpiryDate: return 'Expired'
50
63
  else: return 'Ended'
51
64
 
65
+ raise Exception('status "%s" not mapped.' % status)
52
66
  return ipas.translate_status(status)
53
67
 
68
+ def parseStatus(status):
69
+ if status == 'Depositado': return "Filed"
70
+ if status == 'Publicado': return "Published"
71
+ if status == 'Oposto': return "Opposed"
72
+ if status == 'Registrado': return "Registered"
73
+ if status == 'Indeferido': return "Rejected"
74
+ if status == 'Desistido': return "Withdrawn"
75
+ if status == 'Recorrido': return "Appealed"
76
+ if status == 'Sobrestado': return "Suspended"
77
+ if status == 'Abandonado/arquivado': return "Abandoned"
78
+ if status == 'Convertido': return "Converted"
79
+ if status == 'Renunciado': return "Surrendered"
80
+ if status == 'Anulado': return "Invalidated"
81
+ if status == 'Sub judice': return "Awaiting Court Action"
82
+ if status == 'Examinado': return "Examined"
83
+ if status == 'Expirado': return "Expired"
84
+ if status == 'Reinstado': return "Reinstated"
85
+ if status == 'Inativo': return "Inactive"
86
+ if status == 'Pendente': return "Pending"
87
+ return status
88
+
54
89
  def translate_feature(trademark):
55
90
  feature = trademark.MarkFeature
56
91
 
@@ -86,5 +121,33 @@ def is_international(header):
86
121
  def get_ir_refnum(appnum):
87
122
  return appnum.split('/')[-1]
88
123
 
89
- def get_goods_services(goods_services):
90
- return ipas.get_goods_services(goods_services)
124
+ def parse_version(version):
125
+ return None
126
+ def get_goods_services(goods_services, nice_only = True):
127
+ nc_gs = {} # classified
128
+ if not goods_services:
129
+ goods_services = []
130
+
131
+ if not isinstance(goods_services, list):
132
+ goods_services = [goods_services]
133
+
134
+ for goods_service in goods_services:
135
+ code = goods_service.ClassNumber
136
+ if code and not code == '0' and (not nice_only and int(code) >= 110 or int(code) <= 45 and nice_only):
137
+ nc_gs[code] = {}
138
+ desc = goods_service.GoodsServicesDescription
139
+
140
+ if hasattr(desc, '__value'):
141
+ terms = desc.__value
142
+ else:
143
+ terms = desc
144
+
145
+ if terms:
146
+ nc_gs[code]['terms'] = terms
147
+ else:
148
+ continue
149
+
150
+ if hasattr(desc, '_languageCode'):
151
+ lang = desc._languageCode
152
+ nc_gs[code]['lang'] = lang.lower()
153
+ return nc_gs
@@ -1 +1,22 @@
1
1
  {% include "ipas/template.yml" %}
2
+ {% from 'navigation.tmpl' import match %}
3
+ {% call(header) match('TradeMarkTransactionBody.TransactionContentDetails', Transaction) %}
4
+ {% call(trademark) match('TransactionData.TradeMarkApplication.TradeMarkDetails.TradeMark', header) %}
5
+ {% set nc_gs = trademark.GoodsServicesDetails.GoodsServices.ClassDescriptionDetails.ClassDescription | get_goods_services(nice_only=False) %}
6
+ {% if (nc_gs.keys() | length) > 0 %}
7
+ nationalGoodsServicesClassification:
8
+ kind: INPI
9
+ class:
10
+ {% for nc in nc_gs.keys() %}
11
+ - code: {{ nc | int }}
12
+ {% if nc_gs[nc]['terms'] %}
13
+ terms:
14
+ {{ nc_gs[nc]['terms'] | guess_language(nc_gs[nc['terms']], trademark.ApplicationLanguageCode) | field_name}}:
15
+ {% for gsline in nc_gs[nc]['terms'] | remove_trailing('.', '-') | split_terms %}
16
+ - {{ gsline | lower }}
17
+ {% endfor %}
18
+ {% endif %}
19
+ {% endfor %}
20
+ {% endif %}
21
+ {% endcall %}
22
+ {% endcall %}
@@ -91,6 +91,7 @@ def translate_status(trademark):
91
91
  if status in ['Application filed',
92
92
  'Application published',
93
93
  'Application under examination',
94
+ 'Application opposed',
94
95
  'Registration pending',
95
96
  'Appeal pending',
96
97
  'Registration cancellation pending']:
@@ -98,7 +99,6 @@ def translate_status(trademark):
98
99
 
99
100
  if status in ['Application refused',
100
101
  'Application withdrawn',
101
- 'Application opposed',
102
102
  'Registration cancelled',
103
103
  'Registration surrendered']:
104
104
  return 'Ended'
@@ -1,6 +1,7 @@
1
1
  # namespaces defined in XML and to be ignored in procecssing
2
2
  ignore_namespace = [
3
- 'http://es.tmview.europa.eu/trademark/data'
3
+ 'http://es.tmview.europa.eu/trademark/data',
4
+ 'http://tmview.europa.eu/trademark/data'
4
5
  ]
5
6
 
6
7
  def get_entity_addr(addr):
@@ -50,7 +51,7 @@ def translate_feature(feature):
50
51
  # needed information from office
51
52
  # if office cannot provide information, then agree on a way to guess (uatm)
52
53
  if not feature: return 'Undefined'
53
-
54
+ feature = feature.upper()
54
55
  if feature == 'COMBINED': return 'Combined'
55
56
  if feature == 'WORD': return 'Word'
56
57
  if feature == 'STYLIZED_CHARACTERS': return 'Stylized characters'
@@ -60,7 +61,7 @@ def translate_feature(feature):
60
61
  if feature == '3-d': return 'Three dimensional'
61
62
  if feature == '_3_D': return 'Three dimensional'
62
63
  if feature == '3-D': return 'Three dimensional'
63
-
64
+ return feature.lower().capitalize()
64
65
  # raise Exception to recognize unmapped values
65
66
  raise Exception('Feature "%s" unmapped' % feature)
66
67
 
@@ -15,7 +15,7 @@ designatedCountries:
15
15
  - {{ TradeMark.RegistrationOfficeCode }}
16
16
  applicationNumber: {{ TradeMark.ApplicationNumber }}
17
17
  applicationDate: {{ TradeMark.ApplicationDate | convertdate('%Y-%m-%d') }}
18
- registrationNumber: {{ TradeMark | get_registration_nb(TradeMark.MarkCurrentStatusCode)}}
18
+ registrationNumber: {{ TradeMark | get_registration_nb(TradeMark.MarkCurrentStatusCode) }}
19
19
  registrationDate: {{ TradeMark.RegistrationDate }}
20
20
  applicationLanguageCode: {{ TradeMark.ApplicationLanguageCode }}
21
21
  officeStatus: {{ TradeMark.MarkCurrentStatusCode }}
@@ -3,6 +3,12 @@ import re
3
3
  from gbdtransformation.brands import st13_identifier
4
4
  from gbdtransformation.common.filters import *
5
5
 
6
+ def parseStatus(x):
7
+ return x
8
+
9
+ def parse_version(x):
10
+ return x
11
+
6
12
  def split_vienna(data, separator='.'):
7
13
  """when the class is xxyyzz"""
8
14
  if not len(data) == 6:
@@ -96,7 +102,7 @@ def st13(appnum, office, type='TRADEMARK', appdate=None, roffice=None, sanitize=
96
102
  if not matches:
97
103
  raise Exception('could not apply appnum mask %s on %s' % (mask, appnum))
98
104
 
99
- # print(appnum, ''.join(matches.groups()))
105
+ #print(appnum, ''.join(matches.groups()))
100
106
  appnum = ''.join(matches.groups())
101
107
 
102
108
  prefix = st13_identifier[source.lower()][type.lower()]
@@ -111,7 +117,6 @@ def st13(appnum, office, type='TRADEMARK', appdate=None, roffice=None, sanitize=
111
117
  appnum = '%s%s' % (roffice.upper(), appnum)
112
118
 
113
119
  st13 = '%s%s' % (office.upper(), prefix)
114
-
115
120
  if appdate:
116
121
  st13 = '%s%s' % (st13, appdate[:4])
117
122
 
@@ -1,7 +1,6 @@
1
1
  # namespaces defined in XML and to be ignored in procecssing
2
2
  import os.path
3
3
  from datetime import datetime
4
-
5
4
  ignore_namespace = []
6
5
 
7
6
  def multipleFileds(original, api):
@@ -9,6 +8,11 @@ def multipleFileds(original, api):
9
8
  return api
10
9
  return original
11
10
 
11
+ def format_addr(value):
12
+ if isinstance(value, list):
13
+ return ' '.join(value)
14
+ return value
15
+
12
16
  def convertdateGB(date):
13
17
  """Date convertor from input_format to output_format"""
14
18
  if not date:
@@ -23,7 +27,10 @@ def convertdateGB(date):
23
27
 
24
28
  def get_entity_addr(addr):
25
29
  if not addr: return None
26
- return ("%s %s %s" % (addr.AddressLine.join('\n'), addr.Town, addr.Postcode)).replace("None", "").strip()
30
+ if not isinstance(addr.AddressLine, list):
31
+ addr.AddressLine = [addr.AddressLine]
32
+ addr.AddressLine = [x for x in addr.AddressLine if x is not None]
33
+ return ("%s %s %s" % ('\n'.join(addr.AddressLine), addr.Town, addr.Postcode)).replace("None", "").strip()
27
34
 
28
35
  def get_entity_name(name):
29
36
  if not name: return
@@ -60,7 +67,7 @@ def translate_status(status):
60
67
  if status in [ 'Registered','Registration renewed']:
61
68
  return 'Registered'
62
69
  if status in ['DO-NOT-DISPLAY']:
63
- return 'Deleted'
70
+ return 'Delete'
64
71
  if status in [ 'Cancelled','Merged' ,'Removed', 'Withdrawn','Refused','Surrendered',
65
72
  'Dead', ]:
66
73
  return 'Ended'
@@ -4,7 +4,7 @@
4
4
 
5
5
  type: TRADEMARK
6
6
  kind: {{ TradeMark.KindMark | translate_kind }}
7
- st13: {{ TradeMark.ApplicationNumber | st13('GB', appdate=TradeMark.ApplicationDate) }}
7
+ st13: {{ TradeMark.ApplicationNumber | st13('GB')}}
8
8
  gbdStatus: {{ status }}
9
9
  markFeature: {{ TradeMark.MarkFeature | translate_feature }}
10
10
  registrationOfficeCode: GB
@@ -113,7 +113,7 @@ applicants:
113
113
  - text: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Name.FreeFormatName.FreeFormatNameDetails.FreeFormatNameLine}}
114
114
  languageCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Name.FreeFormatName.FreeFormatNameDetails.FreeFormatNameLine| guess_language('en') }}
115
115
  fullAddress:
116
- - text: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FreeFormatAddress.FreeFormatAddressLine | join(' ')}}
116
+ - text: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FreeFormatAddress.FreeFormatAddressLine | format_addr}}
117
117
  languageCode: {{Applicant.ApplicantAddressBook.FormattedNameAddress.Address.FreeFormatAddress.FreeFormatAddressLine | guess_language('en') }}
118
118
  countryCode: {{ Applicant.ApplicantAddressBook.FormattedNameAddress.Address.AddressCountryCode }}
119
119
  {% endcall %}
@@ -139,7 +139,7 @@ representatives:
139
139
  - text: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Name.FreeFormatName.FreeFormatNameDetails.FreeFormatNameLine}}
140
140
  languageCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Name.FreeFormatName.FreeFormatNameDetails.FreeFormatNameLine| guess_language('en') }}
141
141
  fullAddress:
142
- - text: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FreeFormatAddress.FreeFormatAddressLine}}
142
+ - text: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FreeFormatAddress.FreeFormatAddressLine | format_addr}}
143
143
  languageCode: {{Representative.RepresentativeAddressBook.FormattedNameAddress.Address.FreeFormatAddress.FreeFormatAddressLine | guess_language('en') }}
144
144
  countryCode: {{ Representative.RepresentativeAddressBook.FormattedNameAddress.Address.AddressCountryCode }}
145
145
  {% endcall %}
@@ -12,6 +12,14 @@ def translate_kind(kind):
12
12
 
13
13
  raise Exception('Kind "%s" not mapped.' % kind)
14
14
 
15
+ def parse_version(version):
16
+ """ Function is here to be overriden in child elements( e.g BRTM)"""
17
+ return version
18
+
19
+ def parseStatus(status):
20
+ """ Function is here to be overriden in child elements( e.g BRTM)"""
21
+ return status
22
+
15
23
  def translate_event(event):
16
24
  # out-of-the-box match
17
25
  if event.capitalize() in std_events:
@@ -33,6 +41,7 @@ def translate_feature(feature):
33
41
  if feature == 'Sound': return 'Sound'
34
42
  if feature == 'Hologram': return 'Hologram'
35
43
  if feature == 'Olfactory': return 'Olfactory'
44
+ if feature == 'Position': return 'Position'
36
45
  if feature == 'Other': return 'Other'
37
46
  if feature == 'Undefined': return 'Undefined'
38
47
 
@@ -95,7 +104,7 @@ def verbal_lang_map(markVerbalElements, applang=None, remove=[]):
95
104
 
96
105
  if hasattr(elt, '_languageCode'):
97
106
  lang = elt._languageCode
98
- elif default_lang:
107
+ elif applang:
99
108
  lang = applang
100
109
  else:
101
110
  if commons.is_latin(text):
@@ -32,7 +32,7 @@ applicationLanguageCode: {{ trademark.ApplicationLanguageCode }}
32
32
 
33
33
 
34
34
  gbdStatus: {{ tmstatus }}
35
- officeStatus: {{ trademark.MarkCurrentStatusCode }}
35
+ officeStatus: {{ trademark.MarkCurrentStatusCode | parseStatus }}
36
36
  statusDate: {{ trademark.MarkCurrentStatusDate }}
37
37
  publicationDate: {{ (trademark.PublicationDetails.Publication | last).PublicationDate }}
38
38
 
@@ -87,7 +87,7 @@ markImageDetails:
87
87
  {% call(category) match('MarkImageCategory', img) %}
88
88
  classification:
89
89
  kind: {{ category.CategoryKind }}
90
- version: {{ category.CategoryVersion }}
90
+ version: {{ category.CategoryVersion | parse_version }}
91
91
  code:
92
92
  {% call(vc) match('CategoryCodeDetails.CategoryCode', category) %}
93
93
  - {{ vc }}
@@ -169,9 +169,16 @@ priorities:
169
169
 
170
170
  events:
171
171
  {% call(event) match('MarkEventDetails.MarkEvent', trademark) %}
172
+ {% if event.MarkEventCode %}
172
173
  - officeKind: {{ event.MarkEventCode }}
173
174
  gbdKind: {{ event.MarkEventCode | translate_event }}
174
175
  date: {{ event.MarkEventDate }}
176
+ {% else %}
177
+ - officeKind: {{ event.OfficeSpecificMarkEventName }}
178
+ gbdKind: {{ event.OfficeSpecificMarkEventName | translate_event }}
179
+ date: {{ event.MarkEventDate }}
180
+
181
+ {% endif %}
175
182
  {% endcall %}
176
183
 
177
184
  {% endcall %}
@@ -24,7 +24,7 @@ def translate_kind(kind):
24
24
  if kind == 'Collective': return ['Collective']
25
25
  if kind == 'State property': return ['Collective']
26
26
  if kind == 'Certificate': return ['Certificate']
27
-
27
+ return ['Individual']
28
28
  raise Exception('kind "%s" is not mapped.' % kind)
29
29
 
30
30
 
@@ -0,0 +1,3 @@
1
+ # instruction to render the output to JSON format
2
+ render = 'JSON'
3
+ source = 'national'
@@ -0,0 +1,82 @@
1
+ # namespaces defined in XML and to be ignored in procecssing
2
+ ignore_namespace = [
3
+ 'http://www.oami.europa.eu/TM-Search',
4
+ 'http://ro.tmview.europa.eu/trademark/data'
5
+ ]
6
+
7
+
8
+ def get_entity_addr(addr):
9
+ els = ['AddressStreet', 'AddressCity', 'AddressPostcode', 'AddressCounty']
10
+ res = []
11
+ if not addr: return None
12
+ for el in els:
13
+ if addr.get(el, None):
14
+ res.append(addr[el])
15
+ return ', '.join(res)
16
+
17
+ def get_entity_name(name):
18
+ if not name: return
19
+ if name.OrganizationName: return name.OrganizationName
20
+ els = ['FirstName', 'LastName']
21
+ res = []
22
+ for el in els:
23
+ if name.get(el, None):
24
+ res.append(name[el])
25
+ return ' '.join(res)
26
+
27
+ def get_entity_kind(name):
28
+ if not name: return
29
+ if name.OrganizationName: return 'Legal Entity'
30
+ return 'Natural Person'
31
+
32
+ # -------------------------------------------------------------
33
+ # data translation helpers:
34
+ # translate values from office interpretation to gbd equivalent
35
+ # -------------------------------------------------------------
36
+ def translate_kind(kind):
37
+ if kind == 'Individual': return ['Individual']
38
+ if kind == 'Collective': return ['Collective']
39
+ if kind == 'State property': return ['Collective']
40
+ if kind == 'Certificate': return ['Certificate']
41
+ return ['Individual']
42
+
43
+ #raise Exception('kind "%s" is not mapped.' % kind)
44
+
45
+
46
+ def translate_status(status):
47
+ if not status: return 'Unknown'
48
+ if status == 'Registration cancelled': return 'Expired'
49
+ if status == 'Expired': return 'Expired'
50
+ if status == 'Registration surrendered': return 'Expired'
51
+
52
+ if status in [ 'Registered trademark',
53
+ 'Registered',
54
+ 'Registration renewed']:
55
+ return 'Registered'
56
+
57
+ if status in [ 'Application withdrawn',
58
+ 'Ended',
59
+ 'Application refused' ]:
60
+ return 'Ended'
61
+
62
+ if status in [ 'Application published',
63
+ 'Application Filed',
64
+ 'Application filed',
65
+ 'Examination of opposition',
66
+ 'Opposition pending',
67
+ 'Appeal pending' ]:
68
+ return 'Pending'
69
+
70
+ raise Exception('Status "%s" unmapped' % status)
71
+
72
+
73
+ def translate_feature(feature):
74
+ if not feature: return 'Undefined'
75
+
76
+ if feature == 'Word': return 'Word'
77
+ if feature == 'Figurative': return 'Figurative'
78
+ if feature == 'Combined': return 'Combined'
79
+ if feature == '3-D': return 'Three dimensional'
80
+ if feature == 'Sound': return 'Sound'
81
+
82
+ raise Exception('Feature "%s" unmapped' % feature)
@@ -0,0 +1,128 @@
1
+ TradeMark
2
+ __/ApplicantDetails
3
+ ____/Applicant
4
+ ______/ApplicantAddressBook
5
+ ________/FormattedNameAddress
6
+ __________/Address
7
+ ____________/AddressCountryCode
8
+ ____________/FreeFormatAddress
9
+ ______________/FreeFormatAddressLine
10
+ __________/Name
11
+ ____________/FreeFormatName
12
+ ______________/FreeFormatNameDetails
13
+ ________________/FreeFormatNameLine
14
+ ______/ApplicantIdentifier
15
+ __/ApplicationDate
16
+ __/ApplicationNumber
17
+ __/ExhibitionPriorityDetails
18
+ ____/ExhibitionPriority
19
+ ______/ExhibitionCountryCode
20
+ ______/ExhibitionDate
21
+ __/ExpiryDate
22
+ __/GoodsServicesDetails
23
+ ____/GoodsServices
24
+ ______/ClassDescriptionDetails
25
+ ________/ClassDescription
26
+ __________/ClassNumber
27
+ __________/GoodsServicesDescription
28
+ __________/GoodsServicesDescription[@languageCode=ro]
29
+ __/ID
30
+ __/KindMark
31
+ __/MarkCurrentStatusCode
32
+ __/MarkCurrentStatusDate
33
+ __/MarkDisclaimerDetails
34
+ ____/MarkDisclaimer
35
+ __/MarkFeature
36
+ __/MarkImageDetails
37
+ ____/MarkImage
38
+ ______/MarkImageCategory
39
+ ________/CategoryCodeDetails
40
+ __________/CategoryCode
41
+ ________/CategoryKind
42
+ ______/MarkImageColourClaimedText
43
+ ______/MarkImageColourClaimedText[@languageCode=ro]
44
+ ______/MarkImageFileFormat
45
+ ______/MarkImageFilename
46
+ __/MarkRecordDetails
47
+ ____/MarkRecord
48
+ ______/RecordChangeNameAddress
49
+ ________/HolderDetails
50
+ __________/NewHolder
51
+ ____________/ApplicantAddressBook
52
+ ______________/FreeFormatAddressDetails
53
+ ________________/FreeFormatNameAddressLine
54
+ __________/PreviousHolder
55
+ ____________/ApplicantAddressBook
56
+ ______________/FreeFormatAddressDetails
57
+ ________________/FreeFormatNameAddressLine
58
+ ________/RecordChangeNameAddressKind
59
+ ________/RecordEffectiveDate
60
+ ________/RecordIdentifier
61
+ ______/RecordTransfer
62
+ ________/HolderDetails
63
+ __________/NewHolder
64
+ ____________/ApplicantAddressBook
65
+ ______________/FreeFormatAddressDetails
66
+ ________________/FreeFormatNameAddressLine
67
+ __________/PreviousHolder
68
+ ____________/ApplicantAddressBook
69
+ ______________/FreeFormatAddressDetails
70
+ ________________/FreeFormatNameAddressLine
71
+ ________/RecordEffectiveDate
72
+ ________/RecordIdentifier
73
+ ________/RecordTransferKind
74
+ __/OppositionDetails
75
+ ____/Opposition
76
+ ______/OpponentDetails
77
+ ________/Opponent
78
+ __________/OpponentAddressBook
79
+ ____________/FormattedNameAddress
80
+ ______________/Address
81
+ ________________/FreeFormatAddress
82
+ __________________/FreeFormatAddressLine
83
+ ______________/Name
84
+ ________________/FreeFormatName
85
+ __________________/FreeFormatNameDetails
86
+ ____________________/FreeFormatNameLine
87
+ ______/OppositionDate
88
+ ______/OppositionIdentifier
89
+ ______/RepresentativeDetails
90
+ ________/Representative
91
+ __________/RepresentativeAddressBook
92
+ ____________/FormattedNameAddress
93
+ ______________/Address
94
+ ________________/AddressCountryCode
95
+ ________________/FormattedAddress
96
+ __________________/AddressLine
97
+ ______________/Name
98
+ ________________/FormattedName
99
+ __________________/LastName
100
+ __________________/OrganizationName
101
+ __________/RepresentativeIdentifier
102
+ __/PriorityDetails
103
+ ____/Priority
104
+ ______/PriorityCountryCode
105
+ ______/PriorityDate
106
+ ______/PriorityNumber
107
+ __/PublicationDetails
108
+ ____/Publication
109
+ ______/PublicationIdentifier
110
+ ______/PublicationSection
111
+ __/RegistrationDate
112
+ __/RegistrationNumber
113
+ __/RegistrationOfficeCode
114
+ __/RepresentativeDetails
115
+ ____/Representative
116
+ ______/RepresentativeAddressBook
117
+ ________/FormattedNameAddress
118
+ __________/Address
119
+ ____________/AddressCountryCode
120
+ ____________/FormattedAddress
121
+ ______________/AddressLine
122
+ __________/Name
123
+ ____________/FormattedName
124
+ ______________/LastName
125
+ ______________/OrganizationName
126
+ ______/RepresentativeIdentifier
127
+ __/WordMarkSpecification
128
+ ____/MarkVerbalElementText