wipo-gbd-transformation 1.1.36__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.
- gbdtransformation/.DS_Store +0 -0
- gbdtransformation/brands/brtm/filters.py +66 -3
- gbdtransformation/brands/brtm/template.yml +21 -0
- gbdtransformation/brands/emtm/filters.py +1 -1
- gbdtransformation/brands/estm/filters.py +4 -3
- gbdtransformation/brands/estm/template.yml +1 -1
- gbdtransformation/brands/filters.py +7 -2
- gbdtransformation/brands/gbtm/filters.py +5 -3
- gbdtransformation/brands/ipas/filters.py +10 -1
- gbdtransformation/brands/ipas/template.yml +9 -2
- gbdtransformation/brands/mctm/filters.py +1 -1
- gbdtransformation/brands/rotm/__init__.py +3 -0
- gbdtransformation/brands/rotm/filters.py +82 -0
- gbdtransformation/brands/rotm/schema +128 -0
- gbdtransformation/brands/rotm/template.yml +121 -0
- gbdtransformation/brands/rutm/__init__.py +1 -0
- gbdtransformation/brands/rutm/filters.py +26 -23
- gbdtransformation/brands/rutm/template.yml +38 -33
- gbdtransformation/brands/sgtm/filters.py +1 -1
- gbdtransformation/brands/sttm/__init__.py +16 -0
- gbdtransformation/brands/sttm/filters.py +70 -0
- gbdtransformation/brands/sttm/schema +83 -0
- gbdtransformation/brands/sttm/template.yml +1 -0
- gbdtransformation/brands/sttm/tests/__init__.py +0 -0
- gbdtransformation/brands/ustm/filters.py +1 -3
- gbdtransformation/brands/vntm/__init__.py +2 -1
- gbdtransformation/brands/vntm/filters.py +14 -6
- gbdtransformation/brands/xxtm/__init__.py +2 -0
- gbdtransformation/brands/xxtm/filters.py +60 -0
- gbdtransformation/brands/xxtm/schema +4 -0
- gbdtransformation/brands/xxtm/template.yml +183 -0
- gbdtransformation/common/filters.py +9 -3
- gbdtransformation/designs/alid/__init__.py +5 -0
- gbdtransformation/designs/alid/filters.py +56 -0
- gbdtransformation/designs/alid/schema +89 -0
- gbdtransformation/designs/alid/template.yml +1 -0
- gbdtransformation/designs/bnid/__init__.py +5 -0
- gbdtransformation/designs/bnid/filters.py +57 -0
- gbdtransformation/designs/bnid/schema +80 -0
- gbdtransformation/designs/bnid/template.yml +1 -0
- gbdtransformation/designs/ipas/__init__.py +0 -0
- gbdtransformation/designs/ipas/filters.py +99 -0
- gbdtransformation/designs/ipas/template.yml +163 -0
- gbdtransformation/designs/xxid/__init__.py +2 -0
- gbdtransformation/designs/xxid/filters.py +60 -0
- gbdtransformation/designs/xxid/schema +4 -0
- gbdtransformation/designs/xxid/template.yml +146 -0
- {wipo_gbd_transformation-1.1.36.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/METADATA +1 -4
- {wipo_gbd_transformation-1.1.36.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/RECORD +53 -24
- {wipo_gbd_transformation-1.1.36.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/WHEEL +1 -1
- {wipo_gbd_transformation-1.1.36.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/entry_points.txt +0 -1
- {wipo_gbd_transformation-1.1.36.dist-info → wipo_gbd_transformation-1.1.37.dist-info}/top_level.txt +0 -0
- {wipo_gbd_transformation-1.1.36.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 == '
|
|
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
|
|
90
|
-
return
|
|
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
|
-
#
|
|
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):
|
|
@@ -28,7 +27,10 @@ def convertdateGB(date):
|
|
|
28
27
|
|
|
29
28
|
def get_entity_addr(addr):
|
|
30
29
|
if not addr: return None
|
|
31
|
-
|
|
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()
|
|
32
34
|
|
|
33
35
|
def get_entity_name(name):
|
|
34
36
|
if not name: return
|
|
@@ -65,7 +67,7 @@ def translate_status(status):
|
|
|
65
67
|
if status in [ 'Registered','Registration renewed']:
|
|
66
68
|
return 'Registered'
|
|
67
69
|
if status in ['DO-NOT-DISPLAY']:
|
|
68
|
-
return '
|
|
70
|
+
return 'Delete'
|
|
69
71
|
if status in [ 'Cancelled','Merged' ,'Removed', 'Withdrawn','Refused','Surrendered',
|
|
70
72
|
'Dead', ]:
|
|
71
73
|
return 'Ended'
|
|
@@ -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
|
|
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,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
|
|
@@ -0,0 +1,121 @@
|
|
|
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 }}
|
|
7
|
+
st13: {{ TradeMark.ApplicationNumber | st13('RO', appdate=TradeMark.ApplicationDate) }}
|
|
8
|
+
gbdStatus: {{ status }}
|
|
9
|
+
markFeature: {{ TradeMark.MarkFeature | translate_feature }}
|
|
10
|
+
registrationOfficeCode: RO
|
|
11
|
+
designatedCountries:
|
|
12
|
+
- RO
|
|
13
|
+
applicationNumber: {{ TradeMark.ApplicationNumber }}
|
|
14
|
+
applicationDate: {{ TradeMark.ApplicationDate | convertdate('%Y-%m-%d') }}
|
|
15
|
+
registrationNumber: {{ TradeMark.RegistrationNumber}}
|
|
16
|
+
registrationDate: {{ TradeMark.RegistrationDate }}
|
|
17
|
+
applicationLanguageCode: 'ro'
|
|
18
|
+
officeStatus: {{ TradeMark.MarkCurrentStatusCode }}
|
|
19
|
+
statusDate: {{ TradeMark.MarkCurrentStatusDate | convertdate('%Y-%m-%d') }}
|
|
20
|
+
expiryDate: {{ TradeMark.ExpiryDate }}
|
|
21
|
+
{% if status == 'Ended' %}
|
|
22
|
+
terminationDate: {{ TradeMark.MarkCurrentStatusDate }}
|
|
23
|
+
{% endif %}
|
|
24
|
+
markDisclaimerDetails:
|
|
25
|
+
{% call(desc) match('MarkDisclaimerDetails.MarkDisclaimer', TradeMark) %}
|
|
26
|
+
- text: {{ desc }}
|
|
27
|
+
languageCode: {{ desc | guess_language('ro') }}
|
|
28
|
+
{% endcall %}
|
|
29
|
+
wordMarkSpecification:
|
|
30
|
+
markVerbalElement:
|
|
31
|
+
{% call(desc) match('WordMarkSpecification.MarkVerbalElementText', TradeMark) %}
|
|
32
|
+
- text: {{ desc }}
|
|
33
|
+
languageCode: {{ desc | guess_language('ro') }}
|
|
34
|
+
{% endcall %}
|
|
35
|
+
markImageDetails:
|
|
36
|
+
{% call(img) match('MarkImageDetails.MarkImage', TradeMark) %}
|
|
37
|
+
- name: {{ img.MarkImageFilename }}
|
|
38
|
+
colourIndicator: {{ img.MarkImageColourClaimedText | get_true_or_false }}
|
|
39
|
+
colourClaimed:
|
|
40
|
+
{% call(desc) match('MarkImageColourClaimedText', img) %}
|
|
41
|
+
- text: {{ desc }}
|
|
42
|
+
languageCode: {{ desc | guess_language(desc._languageCode, 'ro') }}
|
|
43
|
+
{% endcall %}
|
|
44
|
+
classification:
|
|
45
|
+
kind: Vienna
|
|
46
|
+
version: {{ ASK_THE_OFFICE }}
|
|
47
|
+
code:
|
|
48
|
+
{% call(code) match('MarkImageCategory.CategoryCodeDetails.CategoryCode', img) %}
|
|
49
|
+
- {{ code }}
|
|
50
|
+
{% endcall %}
|
|
51
|
+
{% endcall %}
|
|
52
|
+
|
|
53
|
+
{% call(nc_gs) match('GoodsServicesDetails.GoodsServices', TradeMark) %}
|
|
54
|
+
goodsServicesClassification:
|
|
55
|
+
kind: Nice
|
|
56
|
+
version: {{ ASK_THE_OFFICE }}
|
|
57
|
+
class:
|
|
58
|
+
{% call(nice) match('ClassDescriptionDetails.ClassDescription', nc_gs) %}
|
|
59
|
+
- code: {{ nice.ClassNumber | int }}
|
|
60
|
+
terms:
|
|
61
|
+
{% if nice.GoodsServicesDescription | has_value %}
|
|
62
|
+
{% call(desc) match('GoodsServicesDescription', nice) %}
|
|
63
|
+
{{ desc | guess_language(desc._languageCode, 'ro') | field_name }}:
|
|
64
|
+
{% for gsline in desc | remove_trailing('.') | split_terms %}
|
|
65
|
+
- {{ gsline | lower }}
|
|
66
|
+
{% endfor %}
|
|
67
|
+
{% endcall %}
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% endcall %}
|
|
70
|
+
{% endcall %}
|
|
71
|
+
|
|
72
|
+
priorities:
|
|
73
|
+
{% call(priority) match('PriorityDetails.Priority', TradeMark) %}
|
|
74
|
+
- countryCode: {{ priority.PriorityCountryCode }}
|
|
75
|
+
number: {{ priority.PriorityNumber }}
|
|
76
|
+
date: {{ priority.PriorityDate }}
|
|
77
|
+
{% endcall %}
|
|
78
|
+
|
|
79
|
+
publications:
|
|
80
|
+
{% call(publication) match('PublicationDetails.Publication', TradeMark) %}
|
|
81
|
+
- identifier: {{ publication.PublicationIdentifier }}
|
|
82
|
+
section: {{ publication.PublicationSection }}
|
|
83
|
+
{% endcall %}
|
|
84
|
+
|
|
85
|
+
applicants:
|
|
86
|
+
{% call(Applicant) match('ApplicantDetails.Applicant', TradeMark) %}
|
|
87
|
+
- identifier: {{ Applicant.ApplicantIdentifier }}
|
|
88
|
+
{% call(nameline) match('FormattedNameAddress.Name.FormattedName', Applicant.ApplicantAddressBook) %}
|
|
89
|
+
fullName:
|
|
90
|
+
- text: {{ nameline | get_entity_name }}
|
|
91
|
+
languageCode: {{ nameline | guess_language('ro') }}
|
|
92
|
+
{% endcall %}
|
|
93
|
+
fullAddress:
|
|
94
|
+
{% call(adrline) match('FormattedNameAddress.Address.FormattedAddress', Applicant.ApplicantAddressBook) %}
|
|
95
|
+
- text: {{ adrline | get_entity_addr}}
|
|
96
|
+
languageCode: {{ adrline | get_entity_addr | guess_language('ro') }}
|
|
97
|
+
{% endcall %}
|
|
98
|
+
{% call(adrline) match('FormattedNameAddress.Address', Applicant.ApplicantAddressBook) %}
|
|
99
|
+
countryCode: {{ adrline.AddressCountryCode }}
|
|
100
|
+
{% endcall %}
|
|
101
|
+
{% endcall %}
|
|
102
|
+
representatives:
|
|
103
|
+
{% call(Representative) match('RepresentativeDetails.Representative', TradeMark) %}
|
|
104
|
+
- identifier: {{ Representative.RepresentativeIdentifier }}
|
|
105
|
+
{% call(nameline) match('FormattedNameAddress.Name.FormattedName', Representative.RepresentativeAddressBook) %}
|
|
106
|
+
kind: {{ nameline | get_entity_kind}}
|
|
107
|
+
fullName:
|
|
108
|
+
- text: {{ nameline | get_entity_name}}
|
|
109
|
+
languageCode: {{ nameline | get_entity_name | guess_language('ro') }}
|
|
110
|
+
{% endcall %}
|
|
111
|
+
fullAddress:
|
|
112
|
+
{% call(adrline) match('FormattedNameAddress.Address.FormattedAddress', Representative.RepresentativeAddressBook) %}
|
|
113
|
+
- text: {{ adrline | get_entity_addr}}
|
|
114
|
+
languageCode: {{ adrline | get_entity_addr | guess_language('ro') }}
|
|
115
|
+
{% endcall %}
|
|
116
|
+
{% call(adrline) match('FormattedNameAddress.Address', Representative.RepresentativeAddressBook) %}
|
|
117
|
+
countryCode: {{ adrline.AddressCountryCode }}
|
|
118
|
+
{% endcall %}
|
|
119
|
+
{% endcall %}
|
|
120
|
+
extra:
|
|
121
|
+
id: {{ TradeMark.ID }}
|