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
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# namespaces defined in XML and to be ignored in procecssing
|
|
2
|
-
ignore_namespace = [
|
|
2
|
+
ignore_namespace = [
|
|
3
|
+
'http://www.wipo.int/standards/XMLSchema/ST96/Common',
|
|
4
|
+
'http://www.wipo.int/standards/XMLSchema/ST96/Trademark',
|
|
5
|
+
'urn:ru:rupto:trademark'
|
|
6
|
+
]
|
|
3
7
|
|
|
4
8
|
|
|
5
9
|
# -------------------------------------------------------------
|
|
@@ -7,11 +11,10 @@ ignore_namespace = []
|
|
|
7
11
|
# translate values from office interpretation to gbd equivalent
|
|
8
12
|
# -------------------------------------------------------------
|
|
9
13
|
def translate_kind(kind):
|
|
10
|
-
if not kind: return ['Individual']
|
|
11
14
|
|
|
12
|
-
if kind == '
|
|
13
|
-
if kind == 'Collective': return ['Collective']
|
|
14
|
-
if kind == '
|
|
15
|
+
if kind == 'Trademark': return ['Individual']
|
|
16
|
+
if kind == 'Collective trademark ': return ['Collective']
|
|
17
|
+
if kind == 'Certification mark ': return ['Certificate']
|
|
15
18
|
|
|
16
19
|
raise Exception('kind "%s" is not mapped.' % kind)
|
|
17
20
|
|
|
@@ -31,15 +34,12 @@ def get_path(path, data):
|
|
|
31
34
|
|
|
32
35
|
|
|
33
36
|
def get_trademark(data):
|
|
34
|
-
if data.
|
|
35
|
-
|
|
36
|
-
trademark = data.TradeMarkDetails.TradeMark[0]
|
|
37
|
-
for transaction in data.TradeMarkDetails.TradeMark[1:]:
|
|
38
|
-
trademark.update(transaction)
|
|
39
|
-
else:
|
|
40
|
-
trademark = data.TradeMarkDetails.TradeMark
|
|
37
|
+
if data.TrademarkBag:
|
|
38
|
+
trademark = data.TrademarkBag.Trademark
|
|
41
39
|
status = 'Registered'
|
|
42
|
-
if get_path('
|
|
40
|
+
if get_path('MarkRecordBag.MarkRecord[-1].BasicRecord.BasicRecordKind', trademark) == 'Non Renewal':
|
|
41
|
+
et_path('MarkRepresentation.MarkReproduction.MarkImageBag.MarkImage.ImageFileName', trademark)
|
|
42
|
+
print("expired for %s" % trademark.ApplicationNumber.ApplicationNumberText)
|
|
43
43
|
status = 'Expired'
|
|
44
44
|
return trademark, status
|
|
45
45
|
if data.TradeMarkApplication:
|
|
@@ -51,10 +51,10 @@ def get_termination(value, gbd_status):
|
|
|
51
51
|
return value
|
|
52
52
|
return None
|
|
53
53
|
|
|
54
|
-
def translate_feature(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if feature == '
|
|
54
|
+
def translate_feature(trademark):
|
|
55
|
+
feature = get_path('MarkRepresentation.MarkFeatureCategory',
|
|
56
|
+
trademark)
|
|
57
|
+
if feature == 'Three dimensional': return 'Three dimensional'
|
|
58
58
|
if feature == 'Hologram': return 'Hologram'
|
|
59
59
|
if feature == 'Colour': return 'Colour'
|
|
60
60
|
if feature == 'Sound': return 'Sound'
|
|
@@ -64,11 +64,14 @@ def translate_feature(feature):
|
|
|
64
64
|
# the office wild card. bof
|
|
65
65
|
if feature == 'Other': return 'Other'
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
has_word = get_path('MarkRepresentation.MarkReproduction.WordMarkSpecification.MarkSignificantVerbalElementText',
|
|
68
|
+
trademark)
|
|
69
|
+
has_figure = get_path('MarkRepresentation.MarkReproduction.MarkImageBag.MarkImage.ImageFileName', trademark)
|
|
70
|
+
if has_word and has_figure:
|
|
71
|
+
return 'Combined'
|
|
72
|
+
elif has_word:
|
|
73
|
+
return 'Word'
|
|
74
|
+
elif has_figure:
|
|
75
|
+
return 'Figurative'
|
|
73
76
|
|
|
74
77
|
raise Exception('Feature "%s" unmapped' % feature)
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
{% from 'navigation.tmpl' import match %}
|
|
2
|
-
{% set TradeMark, status =
|
|
2
|
+
{% set TradeMark, status = TrademarkTransaction.TrademarkTransactionBody.TransactionContentBag.TransactionData | get_trademark %}
|
|
3
3
|
|
|
4
4
|
type: TRADEMARK
|
|
5
|
-
kind: {{ TradeMark.
|
|
6
|
-
st13: {{ TradeMark.ApplicationNumber | st13('RU', appdate=TradeMark.ApplicationDate) }}
|
|
5
|
+
kind: {{ TradeMark.MarkCategory | translate_kind }}
|
|
6
|
+
st13: {{ TradeMark.ApplicationNumber.ApplicationNumberText | st13('RU', appdate=TradeMark.ApplicationDate) }}
|
|
7
7
|
gbdStatus: {{ status }}
|
|
8
8
|
officeStatus: {{ status }}
|
|
9
|
-
markFeature: {{ TradeMark
|
|
9
|
+
markFeature: {{ TradeMark | translate_feature }}
|
|
10
10
|
registrationOfficeCode: {{ TradeMark.RegistrationOfficeCode }}
|
|
11
11
|
designatedCountries:
|
|
12
12
|
- {{ TradeMark.RegistrationOfficeCode }}
|
|
13
13
|
applicationLanguageCode: 'ru'
|
|
14
|
-
applicationNumber: {{ TradeMark.ApplicationNumber }}
|
|
14
|
+
applicationNumber: {{ TradeMark.ApplicationNumber.ApplicationNumberText }}
|
|
15
15
|
applicationDate: {{ TradeMark.ApplicationDate | convertdate('%Y-%m-%d') }}
|
|
16
16
|
registrationNumber: {{ TradeMark.RegistrationNumber }}
|
|
17
17
|
registrationDate: {{ TradeMark.RegistrationDate }}
|
|
18
|
+
expiryDate: {{ TradeMark.ExpiryDate | convertdate('%Y-%m-%d') }}
|
|
19
|
+
|
|
18
20
|
markDisclaimerDetails:
|
|
19
|
-
{% call(desc) match('
|
|
21
|
+
{% call(desc) match('MarkDisclaimerBag.MarkDisclaimerText', TradeMark) %}
|
|
20
22
|
- text: {{ desc }}
|
|
21
23
|
languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode, 'ru') }}
|
|
22
24
|
{% endcall %}
|
|
23
25
|
markDescriptionDetails:
|
|
24
|
-
{% call(desc) match('
|
|
26
|
+
{% call(desc) match('MarkDescriptionBag.MarkDescriptionText', TradeMark) %}
|
|
25
27
|
- text: {{ desc }}
|
|
26
28
|
languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode, 'ru') }}
|
|
27
29
|
{% endcall %}
|
|
28
30
|
wordMarkSpecification:
|
|
29
31
|
markVerbalElement:
|
|
30
|
-
{% call(desc) match('WordMarkSpecification.
|
|
32
|
+
{% call(desc) match('MarkRepresentation.MarkReproduction.WordMarkSpecification.MarkSignificantVerbalElementText', TradeMark) %}
|
|
31
33
|
- text: {{ desc }}
|
|
32
|
-
languageCode: {{ desc | guess_language('ru') }}
|
|
34
|
+
languageCode: {{ desc | guess_language(TradeMark.ApplicationLanguageCode, 'ru') }}
|
|
33
35
|
{% endcall %}
|
|
34
36
|
markImageDetails:
|
|
35
|
-
{% call(img) match('
|
|
36
|
-
- name: {{ img.
|
|
37
|
+
{% call(img) match('MarkRepresentation.MarkReproduction.MarkImageBag.MarkImage', TradeMark) %}
|
|
38
|
+
- name: {{ img.ImageFileName }}
|
|
37
39
|
colourIndicator: {{ img.MarkImageColourClaimedText | get_true_or_false }}
|
|
38
40
|
colourClaimed:
|
|
39
41
|
{% call(desc) match('MarkImageColourClaimedText', img) %}
|
|
@@ -42,16 +44,15 @@ markImageDetails:
|
|
|
42
44
|
{% endcall %}
|
|
43
45
|
{% endcall %}
|
|
44
46
|
|
|
45
|
-
{% call(nc_gs) match('
|
|
47
|
+
{% call(nc_gs) match('GoodsServicesBag.GoodsServices.ClassDescriptionBag', TradeMark) %}
|
|
46
48
|
goodsServicesClassification:
|
|
47
49
|
kind: Nice
|
|
48
|
-
version: {{ ASK_THE_OFFICE }}
|
|
49
50
|
class:
|
|
50
|
-
{% call(nice) match('
|
|
51
|
+
{% call(nice) match('ClassDescription', nc_gs) %}
|
|
51
52
|
- code: {{ nice.ClassNumber | int }}
|
|
52
53
|
terms:
|
|
53
|
-
{% if nice.
|
|
54
|
-
{% call(desc) match('
|
|
54
|
+
{% if nice.GoodsServicesDescriptionText | has_value %}
|
|
55
|
+
{% call(desc) match('GoodsServicesDescriptionText', nice) %}
|
|
55
56
|
ru:
|
|
56
57
|
{% for gsline in desc | remove_trailing('.') | split_terms %}
|
|
57
58
|
- {{ gsline | lower }}
|
|
@@ -61,39 +62,43 @@ goodsServicesClassification:
|
|
|
61
62
|
{% endcall %}
|
|
62
63
|
{% endcall %}
|
|
63
64
|
|
|
64
|
-
{% call(unclassified) match('GoodsServicesDetails.GoodsServices.Comment', TradeMark) %}
|
|
65
|
-
goodsServicesUnclassified:
|
|
66
|
-
ru:
|
|
67
|
-
- {{ unclassified }} #TODO sanitize
|
|
68
|
-
{% endcall %}
|
|
69
|
-
|
|
70
65
|
priorities:
|
|
71
|
-
{% call(priority) match('
|
|
66
|
+
{% call(priority) match('PriorityBag.Priority', TradeMark) %}
|
|
72
67
|
- countryCode: {{ priority.PriorityCountryCode }}
|
|
73
|
-
number: {{ priority.
|
|
74
|
-
date: {{ priority.
|
|
68
|
+
number: {{ priority.ApplicationNumberText }}
|
|
69
|
+
date: {{ priority.PriorityRegistrationDate }}
|
|
75
70
|
{% endcall %}
|
|
71
|
+
|
|
76
72
|
publications:
|
|
77
|
-
{% call(publication) match('
|
|
73
|
+
{% call(publication) match('RecordPublicationBag.RecordPublication', TradeMark) %}
|
|
78
74
|
- identifier: {{ publication.PublicationIdentifier }}
|
|
79
75
|
date: {{ publication.PublicationDate }}
|
|
80
|
-
section: {{ publication.PublicationSection }}
|
|
81
76
|
{% endcall %}
|
|
82
77
|
|
|
83
78
|
applicants:
|
|
84
|
-
{% call(Applicant) match('
|
|
85
|
-
- identifier: {{ Applicant.
|
|
79
|
+
{% call(Applicant) match('ApplicantBag.Applicant', TradeMark) %}
|
|
80
|
+
- identifier: {{ Applicant.AssignmentIdentifier }}
|
|
81
|
+
fullName:
|
|
82
|
+
- text: {{ Applicant.LegalEntityName }}
|
|
83
|
+
languageCode: {{ Applicant.LegalEntityName | guess_language('ru') }}
|
|
86
84
|
fullAddress:
|
|
87
|
-
{% call(adrline) match('
|
|
88
|
-
- text: {{ adrline}}
|
|
85
|
+
{% call(adrline) match('Contact.PostalAddressBag.PostalAddress.PostalAddressText', Applicant) %}
|
|
86
|
+
- text: {{ adrline }}
|
|
89
87
|
languageCode: {{ adrline | guess_language('ru') }}
|
|
88
|
+
countryCode: {{ Applicant.NationalityCode }}
|
|
89
|
+
|
|
90
90
|
{% endcall %}
|
|
91
91
|
{% endcall %}
|
|
92
92
|
|
|
93
93
|
correspondence:
|
|
94
|
-
{% call(corespondance) match('CorrespondenceAddress.
|
|
94
|
+
{% call(corespondance) match('CorrespondenceAddress.Contact', TradeMark) %}
|
|
95
|
+
fullName:
|
|
96
|
+
{% call(adrline) match('Name.EntityName', corespondance) %}
|
|
97
|
+
- text: {{ adrline }}
|
|
98
|
+
languageCode: {{ adrline | guess_language('ru') }}
|
|
99
|
+
{% endcall %}
|
|
95
100
|
fullAddress:
|
|
96
|
-
{% call(adrline) match('
|
|
101
|
+
{% call(adrline) match('PostalAddressBag.PostalAddress.PostalAddressText', corespondance) %}
|
|
97
102
|
- text: {{ adrline}}
|
|
98
103
|
languageCode: {{ adrline | guess_language('ru') }}
|
|
99
104
|
{% endcall %}
|
|
@@ -51,7 +51,7 @@ def translate_status(status, prev_status=''):
|
|
|
51
51
|
if status == 'Expunged': return 'Expired'
|
|
52
52
|
if status == 'Removed': return 'Expired'
|
|
53
53
|
if status == 'Removed (Restoration Possible)': return 'Expired'
|
|
54
|
-
|
|
54
|
+
if status == 'Expired (Renewal Possible)': return 'Expired'
|
|
55
55
|
raise Exception('status/prev_status "%s/%s" is not mapped.' % (status, prev_status))
|
|
56
56
|
|
|
57
57
|
def translate_feature(trademark):
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
render = 'JSON'
|
|
2
|
+
source = 'national'
|
|
3
|
+
|
|
4
|
+
# TN/M/100/901864 # madrid
|
|
5
|
+
# TN/E/2002/001864 # etrangere
|
|
6
|
+
# TN/T/2019/001877 # local
|
|
7
|
+
# TN/S/2005/001886
|
|
8
|
+
appnum_mask = [ 'TN/(T|E|S|M)/\\d{4}/(\\d*)',
|
|
9
|
+
'TN/(M)/100/(\\d*)',
|
|
10
|
+
'([A-D])/(M)/100/(\\d*)' ]
|
|
11
|
+
|
|
12
|
+
# 100/901864
|
|
13
|
+
# 2009/002484
|
|
14
|
+
# 001818
|
|
15
|
+
regnum_mask = [ '\\d*/(\\d*)',
|
|
16
|
+
'(\\d*)' ]
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import gbdtransformation.brands.ipas.filters as ipas
|
|
2
|
+
import gbdtransformation.common.filters as commons
|
|
3
|
+
|
|
4
|
+
ignore_namespace = [
|
|
5
|
+
'http://www.wipo.int/standards/XMLSchema/trademarks',
|
|
6
|
+
'http://www.wipo.int/standards/XMLSchema/wo-trademarks']
|
|
7
|
+
|
|
8
|
+
def get_appdate(appdate, appnum):
|
|
9
|
+
return appnum.split('/')[-2].zfill(4)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def translate_type(header):
|
|
13
|
+
code = header.TransactionCode
|
|
14
|
+
|
|
15
|
+
if code == 'Madrid Trademark': return 'TRADEMARK'
|
|
16
|
+
|
|
17
|
+
raise Exception('Type "%s" is not mapped.' % code)
|
|
18
|
+
|
|
19
|
+
def translate_kind(trademark, header):
|
|
20
|
+
subcode = header.TransactionSubCode
|
|
21
|
+
if subcode == 'Madrid Protocol': return ['Individual']
|
|
22
|
+
|
|
23
|
+
raise Exception('Kind "%s" not mapped.' % subcode)
|
|
24
|
+
|
|
25
|
+
def translate_status(trademark):
|
|
26
|
+
status = trademark.MarkCurrentStatusCode
|
|
27
|
+
|
|
28
|
+
return ipas.translate_status(status)
|
|
29
|
+
|
|
30
|
+
def translate_feature(trademark):
|
|
31
|
+
feature = trademark.MarkFeature
|
|
32
|
+
|
|
33
|
+
return ipas.translate_feature(feature)
|
|
34
|
+
|
|
35
|
+
def translate_event(event):
|
|
36
|
+
return ipas.translate_event(event)
|
|
37
|
+
|
|
38
|
+
# ---------------------------------------
|
|
39
|
+
def verbal_lang_map(markVerbalElements, applang=None):
|
|
40
|
+
# print( ipas.verbal_lang_map(markVerbalElements, applang=applang))
|
|
41
|
+
return ipas.verbal_lang_map(markVerbalElements, applang=applang)
|
|
42
|
+
|
|
43
|
+
def get_registration_nb(trademark, tmstatus):
|
|
44
|
+
if trademark.RegistrationNumber:
|
|
45
|
+
return trademark.RegistrationNumber
|
|
46
|
+
|
|
47
|
+
if not tmstatus in ['Expired', 'Registered']:
|
|
48
|
+
return None
|
|
49
|
+
|
|
50
|
+
# a way to deduce the registration number
|
|
51
|
+
appnum_parts = trademark.ApplicationNumber.split('/')
|
|
52
|
+
regnum = '%s/%s' % (appnum_parts[-2], appnum_parts[-1])
|
|
53
|
+
return regnum
|
|
54
|
+
|
|
55
|
+
def get_expiry_date(trademark, tmstatus):
|
|
56
|
+
return ipas.get_expiry_date(trademark, tmstatus)
|
|
57
|
+
|
|
58
|
+
def get_registration_date(trademark, tmstatus):
|
|
59
|
+
return ipas.get_registration_date(trademark, tmstatus)
|
|
60
|
+
|
|
61
|
+
def is_international(header):
|
|
62
|
+
code = header.TransactionCode
|
|
63
|
+
return code == 'Marque Madrid'
|
|
64
|
+
|
|
65
|
+
# TN/M/100/673426
|
|
66
|
+
def get_ir_refnum(appnum):
|
|
67
|
+
return appnum.split('/')[-1]
|
|
68
|
+
|
|
69
|
+
def get_goods_services(goods_services):
|
|
70
|
+
return ipas.get_goods_services(goods_services)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/Transaction
|
|
2
|
+
__/TradeMarkTransactionBody
|
|
3
|
+
____/TransactionContentDetails
|
|
4
|
+
______/TransactionCode
|
|
5
|
+
______/TransactionData
|
|
6
|
+
________/TradeMarkApplication
|
|
7
|
+
__________/TradeMarkDetails
|
|
8
|
+
____________/TradeMark
|
|
9
|
+
______________/ApplicantDetails
|
|
10
|
+
________________/Applicant
|
|
11
|
+
__________________/ApplicantAddressBook
|
|
12
|
+
____________________/FormattedNameAddress
|
|
13
|
+
______________________/Address
|
|
14
|
+
________________________/AddressCountryCode
|
|
15
|
+
________________________/FreeFormatAddress
|
|
16
|
+
__________________________/FreeFormatAddressLine
|
|
17
|
+
______________________/Name
|
|
18
|
+
________________________/FreeFormatName
|
|
19
|
+
__________________________/FreeFormatNameDetails
|
|
20
|
+
____________________________/FreeFormatNameLine
|
|
21
|
+
____________________________/FreeFormatNameLine[@languageCode=en]
|
|
22
|
+
______________/ApplicationDate
|
|
23
|
+
______________/ApplicationLanguageCode
|
|
24
|
+
______________/ApplicationNumber
|
|
25
|
+
______________/ExpiryDate
|
|
26
|
+
______________/GoodsServicesDetails
|
|
27
|
+
________________/GoodsServices
|
|
28
|
+
__________________/ClassDescriptionDetails
|
|
29
|
+
____________________/ClassDescription
|
|
30
|
+
______________________/ClassNumber
|
|
31
|
+
______________________/GoodsServicesDescription
|
|
32
|
+
______________________/GoodsServicesDescription[@languageCode=en]
|
|
33
|
+
______________/MarkCurrentStatusCode
|
|
34
|
+
______________/MarkCurrentStatusDate
|
|
35
|
+
______________/MarkEventDetails
|
|
36
|
+
________________/MarkEvent
|
|
37
|
+
__________________/MarkEventCode
|
|
38
|
+
__________________/MarkEventDate
|
|
39
|
+
__________________/OfficeSpecificMarkEventCode
|
|
40
|
+
__________________/OfficeSpecificMarkEventDescription
|
|
41
|
+
__________________/OfficeSpecificMarkEventDescription[@languageCode=en]
|
|
42
|
+
__________________/OfficeSpecificMarkEventName
|
|
43
|
+
______________/MarkFeature
|
|
44
|
+
______________/MarkImageDetails
|
|
45
|
+
________________/MarkImage
|
|
46
|
+
__________________/MarkImageCategory
|
|
47
|
+
____________________/CategoryCodeDetails
|
|
48
|
+
______________________/CategoryCode
|
|
49
|
+
____________________/CategoryKind
|
|
50
|
+
____________________/CategoryVersion
|
|
51
|
+
__________________/MarkImageFileFormat
|
|
52
|
+
__________________/MarkImageFilename
|
|
53
|
+
______________/PriorityDetails
|
|
54
|
+
________________/Priority
|
|
55
|
+
__________________/PriorityCountryCode
|
|
56
|
+
__________________/PriorityDate
|
|
57
|
+
__________________/PriorityNumber
|
|
58
|
+
______________/PublicationDetails
|
|
59
|
+
________________/Publication
|
|
60
|
+
__________________/PublicationDate
|
|
61
|
+
__________________/PublicationIdentifier
|
|
62
|
+
______________/RegistrationDate
|
|
63
|
+
______________/RegistrationNumber
|
|
64
|
+
______________/RegistrationOfficeCode
|
|
65
|
+
______________/RepresentativeDetails
|
|
66
|
+
________________/Representative
|
|
67
|
+
__________________/RepresentativeAddressBook
|
|
68
|
+
____________________/FormattedNameAddress
|
|
69
|
+
______________________/Address
|
|
70
|
+
________________________/AddressCountryCode
|
|
71
|
+
________________________/FreeFormatAddress
|
|
72
|
+
__________________________/FreeFormatAddressLine
|
|
73
|
+
______________________/Name
|
|
74
|
+
________________________/FreeFormatName
|
|
75
|
+
__________________________/FreeFormatNameDetails
|
|
76
|
+
____________________________/FreeFormatNameLine
|
|
77
|
+
____________________________/FreeFormatNameLine[@languageCode=en]
|
|
78
|
+
______________/WordMarkSpecification
|
|
79
|
+
________________/MarkVerbalElementText
|
|
80
|
+
________________/MarkVerbalElementText[@languageCode=en]
|
|
81
|
+
______/TransactionIdentifier
|
|
82
|
+
______/TransactionSubCode
|
|
83
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% include "ipas/template.yml" %}
|
|
File without changes
|
|
@@ -147,7 +147,6 @@ def get_applicants(owners, status):
|
|
|
147
147
|
|
|
148
148
|
if not isinstance(owners, list):
|
|
149
149
|
owners = [owners]
|
|
150
|
-
|
|
151
150
|
# look for owners
|
|
152
151
|
if status in ['Registered', 'Expired']:
|
|
153
152
|
cdl = 20 # code low
|
|
@@ -160,8 +159,7 @@ def get_applicants(owners, status):
|
|
|
160
159
|
applicants = []
|
|
161
160
|
for owner in owners:
|
|
162
161
|
code = owner.partyType
|
|
163
|
-
|
|
164
|
-
if cdl < int(code) <= cdh:
|
|
162
|
+
if cdl <= int(code) <= cdh:
|
|
165
163
|
# get the address
|
|
166
164
|
adrlines = []
|
|
167
165
|
for i in range(1, 10):
|
|
@@ -5,7 +5,7 @@ ignore_namespace = [
|
|
|
5
5
|
'http://www.wipo.int/standards/XMLSchema/wo-trademarks']
|
|
6
6
|
|
|
7
7
|
def get_appdate(appdate, appnum):
|
|
8
|
-
return appnum[
|
|
8
|
+
return appnum[2:6]
|
|
9
9
|
|
|
10
10
|
def translate_type(header):
|
|
11
11
|
code = header.TransactionCode
|
|
@@ -20,13 +20,20 @@ def translate_type(header):
|
|
|
20
20
|
|
|
21
21
|
def translate_kind(trademark, header):
|
|
22
22
|
kind = trademark.KindMark
|
|
23
|
-
|
|
23
|
+
if not kind:
|
|
24
|
+
return 'Individual'
|
|
24
25
|
return ipas.translate_kind(kind)
|
|
25
26
|
|
|
26
27
|
def translate_status(trademark):
|
|
27
|
-
|
|
28
|
+
value = trademark.MarkCurrentStatusCode
|
|
29
|
+
if value in ['Cấp bằng','Đang giải quyết', 'Từ chối']:
|
|
30
|
+
return ipas.translate_status('Pending')
|
|
31
|
+
elif value in ['Công bố']:
|
|
32
|
+
return ipas.translate_status('Active')
|
|
33
|
+
elif value in ['Hết hạn', 'Rút đơn']:
|
|
34
|
+
return ipas.translate_status("Expired")
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
raise Exception('Status "%s" is not mapped.' % value)
|
|
30
37
|
|
|
31
38
|
def translate_feature(trademark):
|
|
32
39
|
feature = trademark.MarkFeature
|
|
@@ -35,14 +42,15 @@ def translate_feature(trademark):
|
|
|
35
42
|
|
|
36
43
|
def translate_event(event):
|
|
37
44
|
if event == 'Notificationd': return 'Notification'
|
|
38
|
-
|
|
45
|
+
if not event:
|
|
46
|
+
return None
|
|
39
47
|
return ipas.translate_event(event)
|
|
40
48
|
|
|
41
49
|
# ---------------------------------------
|
|
42
50
|
|
|
43
51
|
# TODO: all set to vi but some are english really
|
|
44
52
|
# TODO: {'vi': ['NITRASA, hình']} (remove the hih)
|
|
45
|
-
def verbal_lang_map(markVerbalElements, applang=
|
|
53
|
+
def verbal_lang_map(markVerbalElements, applang='vi'):
|
|
46
54
|
# print( ipas.verbal_lang_map(markVerbalElements, applang=applang))
|
|
47
55
|
return ipas.verbal_lang_map(markVerbalElements, applang=applang)
|
|
48
56
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# standard gbd definitions
|
|
2
|
+
from gbdtransformation.brands import kinds as std_kinds
|
|
3
|
+
from gbdtransformation.brands import status as std_status
|
|
4
|
+
from gbdtransformation.brands import features as std_features
|
|
5
|
+
from gbdtransformation.brands import events as std_events
|
|
6
|
+
|
|
7
|
+
# namespaces defined in XML and to be ignored in procecssing
|
|
8
|
+
ignore_namespace = []
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# -------------------------------------------------------------
|
|
12
|
+
# data translation helpers:
|
|
13
|
+
# translate values from office interpretation to gbd equivalent
|
|
14
|
+
# -------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
def translate_kind(kind):
|
|
17
|
+
"""translation of the kind of trademark to a
|
|
18
|
+
multivalue gbd interpretation"""
|
|
19
|
+
|
|
20
|
+
# out-of-the-box match
|
|
21
|
+
if kind.capitalize() in std_kinds:
|
|
22
|
+
return [kind.capitalize()]
|
|
23
|
+
|
|
24
|
+
# __insert here__ : translation logic
|
|
25
|
+
|
|
26
|
+
# raise Exception to recognize unmapped values
|
|
27
|
+
raise Exception('kind "%s" is not mapped.' % kind)
|
|
28
|
+
|
|
29
|
+
def translate_status(status):
|
|
30
|
+
"""translation of mark status"""
|
|
31
|
+
# a required data from office. if not present and no way to guess,
|
|
32
|
+
# return Unknown
|
|
33
|
+
if not status: return 'Unknown'
|
|
34
|
+
|
|
35
|
+
# out-of-the-box match
|
|
36
|
+
if status.capitalize() in std_status:
|
|
37
|
+
return status.capitalize()
|
|
38
|
+
|
|
39
|
+
# __insert here__ : translation logic
|
|
40
|
+
|
|
41
|
+
# raise Exception to recognize unmapped values
|
|
42
|
+
raise Exception('Status "%s" unmapped' % status)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def translate_feature(feature):
|
|
46
|
+
"""translation of mark feature"""
|
|
47
|
+
|
|
48
|
+
# needed information from office
|
|
49
|
+
# if office cannot provide information, then agree on a way to guess (uatm)
|
|
50
|
+
if not feature: return 'Undefined'
|
|
51
|
+
|
|
52
|
+
# out-of-the-box match
|
|
53
|
+
if feature.capitalize() in std_features:
|
|
54
|
+
return feature.capitalize()
|
|
55
|
+
|
|
56
|
+
# __insert here__ : translation logic
|
|
57
|
+
|
|
58
|
+
# raise Exception to recognize unmapped values
|
|
59
|
+
raise Exception('Feature "%s" unmapped' % feature)
|
|
60
|
+
|