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

@@ -2,4 +2,4 @@ render = 'JSON'
2
2
  source = 'national'
3
3
 
4
4
  # ME/Z/2014/321890
5
- appnum_mask = 'ME/[a-zA-Z]/\\d{2}(\\d{2})/(.*)'
5
+ appnum_mask = '(\\d{4})-(.*)'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wipo-gbd-transformation
3
- Version: 1.1.40
3
+ Version: 1.1.42
4
4
  Summary: GBD XML ETL package
5
5
  Home-page: https://github.com/GBD-Wipo/xmlE
6
6
  Author: WIPO GDB team
@@ -234,7 +234,7 @@ gbdtransformation/brands/mdtm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib
234
234
  gbdtransformation/brands/mdtm/filters.py,sha256=OCNuSdhTHZ-BROQtR_kME0UMNfAw5rYTCrtKiELDC8E,2100
235
235
  gbdtransformation/brands/mdtm/schema,sha256=tfKmy1EAbBSHBODWEWnmxGQ7shVL1MV_g2JJFaH4buc,3498
236
236
  gbdtransformation/brands/mdtm/template.yml,sha256=51cYNG0PTG_v8rIydL05-i72uHt1k0C6tKJ28PCLm3c,4943
237
- gbdtransformation/brands/metm/__init__.py,sha256=lHNhJ1cJmQvskU87F8Z71pfFrWXGm14Crz-akj8WTVc,104
237
+ gbdtransformation/brands/metm/__init__.py,sha256=0LO2jD7KrOqIqnmVh9gjnFXk2W489ZS5f4JohD0NYrA,86
238
238
  gbdtransformation/brands/metm/filters.py,sha256=wpbuXXsKwq7EJ2Q_UArd1VRTVqZTgnuukf_iivlac6o,2583
239
239
  gbdtransformation/brands/metm/schema,sha256=AP0MxQyD0hY4APRh8nxitlxMqJYJB4AaaTJ8y20-XBA,3283
240
240
  gbdtransformation/brands/metm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
@@ -423,10 +423,6 @@ gbdtransformation/brands/wstm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRF
423
423
  gbdtransformation/brands/wstm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
424
424
  gbdtransformation/brands/wstm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
425
425
  gbdtransformation/brands/wstm/tests/test.xml.gz,sha256=UKm7LTvKaETUtHMKurFGqkqXO1Rh-4x1Jo2wyZOvwJ8,1284
426
- gbdtransformation/brands/xxtm/__init__.py,sha256=Cdy9Ki01mAvufymKb9QSLwfFggaoerOenq6BxhPu500,66
427
- gbdtransformation/brands/xxtm/filters.py,sha256=YCaQ6yH2LINwCQvbPHDhnORQyWglbswLlSOY6ur3KXQ,1874
428
- gbdtransformation/brands/xxtm/schema,sha256=KaFhfG6P5SE787wkAuME6hhpcg7vLnSb9x1rW_0EL3M,163
429
- gbdtransformation/brands/xxtm/template.yml,sha256=Iec6yINK8xiB1o5ZdPcqHpGjrCdeHo1tt7-XT99XFwg,4566
430
426
  gbdtransformation/brands/xxxx/__init__.py,sha256=fricc3VHm4BwGRFKIIqB0t-NtP3tTVRrEYee_gWpiFo,172
431
427
  gbdtransformation/brands/xxxx/filters.py,sha256=YCaQ6yH2LINwCQvbPHDhnORQyWglbswLlSOY6ur3KXQ,1874
432
428
  gbdtransformation/brands/xxxx/schema,sha256=g_oWkd7k2e5fAQR1BdNkPSsIgP3dkTyc7esWo_UOHQA,163
@@ -466,10 +462,6 @@ gbdtransformation/designs/alid/__init__.py,sha256=0kyp4Yt-Kg9aA3BN4CRURi7-5evAVd
466
462
  gbdtransformation/designs/alid/filters.py,sha256=mWXLCYZr5davrmog1VAgtm7tDwwrRx6meOfpU2W0SiQ,1563
467
463
  gbdtransformation/designs/alid/schema,sha256=4W6aAkQ4JFTzOEVGYRWlWpsieoIIWoVqhLLnGzI3MjM,3502
468
464
  gbdtransformation/designs/alid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
469
- gbdtransformation/designs/bnid/__init__.py,sha256=-vF4B_-fuOTvegI5lTsg81NN_vf-pOkBtC-KaEnGD1A,83
470
- gbdtransformation/designs/bnid/filters.py,sha256=nCY1ANnzl0RiZYfyhL-fl_uUh8rMp2FF5f-O3l-zb7k,1562
471
- gbdtransformation/designs/bnid/schema,sha256=BSzYzhQUcv3cLI-rDSLEEcIAOxMSIgQClvfKDVVTyak,3145
472
- gbdtransformation/designs/bnid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
473
465
  gbdtransformation/designs/ipas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
474
466
  gbdtransformation/designs/ipas/filters.py,sha256=TytwuAxktVKoeq04ffZT_BP6JZOiMe58eO7nkf5Cnzw,3618
475
467
  gbdtransformation/designs/ipas/template.yml,sha256=lPfqFnc5cIkkVHE_4HaMZek31i1bNWBjKRIIc65i5hE,7396
@@ -489,9 +481,9 @@ gbdtransformation/utilities/st66.xsd,sha256=co8aFN3a5TpudllRttWmfLeiZu8ulNipfeXm
489
481
  schemas/ShazamConfig.py,sha256=D67os5B11C41h_WZ7kk54Ss0Kk7tHh8W0d_1c_aX-lY,1191
490
482
  schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
491
483
  schemas/schema_extractor.py,sha256=3-ImtnI777f6b3VA0A_w-NoXdlGz5VZMzK6MnPdQQAY,10294
492
- wipo_gbd_transformation-1.1.40.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
493
- wipo_gbd_transformation-1.1.40.dist-info/METADATA,sha256=LtDRPzJcOEZlL_tFCfyoT6pS9o-AEqQR3pMmy-eLT1Y,485
494
- wipo_gbd_transformation-1.1.40.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
495
- wipo_gbd_transformation-1.1.40.dist-info/entry_points.txt,sha256=CiiRxivMelcgA7W_4rzY1fG-AGEarhpXQUlKYzKWsOI,165
496
- wipo_gbd_transformation-1.1.40.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
497
- wipo_gbd_transformation-1.1.40.dist-info/RECORD,,
484
+ wipo_gbd_transformation-1.1.42.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
485
+ wipo_gbd_transformation-1.1.42.dist-info/METADATA,sha256=GLVT8s1SkuPDJkjhGnvdxxkrosegBe8H05DX6gi5eCg,485
486
+ wipo_gbd_transformation-1.1.42.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
487
+ wipo_gbd_transformation-1.1.42.dist-info/entry_points.txt,sha256=CiiRxivMelcgA7W_4rzY1fG-AGEarhpXQUlKYzKWsOI,165
488
+ wipo_gbd_transformation-1.1.42.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
489
+ wipo_gbd_transformation-1.1.42.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- # instruction to render the output to JSON format
2
- render = 'JSON'
@@ -1,60 +0,0 @@
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
-
@@ -1,4 +0,0 @@
1
- # generate this file using
2
- $ gbd-transform-xpath /data/brands/collections/xxtm -o gbdtransformation/brands/xxtm/schema
3
-
4
- This process runs with a speed of 1000/sec
@@ -1,183 +0,0 @@
1
- {% from 'navigation.tmpl' import match %}
2
-
3
- # common filter methods accessible in this template
4
- # gbdtransformation.common.filters
5
- # .convertdate
6
- # .contains
7
- # .append
8
- # .guess_language
9
- # . ...
10
- # gbdtransformation.brands.filters
11
- # .st13
12
- # .pad_vienna
13
- # .split_terms (for goods and services)
14
- #
15
- # TESTING:
16
- # developing the template:
17
- # see the transformation output:
18
- # gbd-transform /data/brands/collections/xxtm/ xxtm -t1
19
- # test for transformation errors:
20
- # gbd-transform /data/brands/collections/xxtm/ xxtm -r200 -w4 -q
21
- # validating the template:
22
- # gbd-transform /data/brands/collections/xxtm/ xxtm -r2000 -w40 -q --qc
23
-
24
- brand:
25
- type: # (TRADEMARK|EMBLEM|AOP|INN)
26
- kind: # (Individual|Collective|Certificate|Guarantee|Defensive|Other)
27
- markFeature: # (Word|Stylized characters|Figurative|Combined|Three dimensional|Colour|Sound|Hologram|Olfactory|Motion|Municipal|Chimney|Other|Undefined)
28
-
29
- registrationOfficeCode:
30
- designatedCountries:
31
- - str (CountryCode)
32
-
33
- # rarely passed
34
- filingPlace:
35
-
36
- # some collections indicate that the application
37
- # originates from international filing and provide IR number
38
- # (question to ask in GBD participation questionnaire)
39
- applicationRefNumber:
40
- applicationRefOrigin:
41
-
42
- # can be deduced from appnum given office cc and (optional) appdate
43
- st13: # {{ Trademark.ApplicationNumber | st13('XX', appdate=... }}
44
-
45
- applicationNumber:
46
- # dates can be converted if not matching expected format
47
- applicationDate: # ex: {{ Trademark.ApplicationDate | convertdate('%Y%m%d') }}
48
-
49
- # some collections have registration number
50
- # equals application number when registered
51
- registrationNumber:
52
- # some collections we can guess registration date
53
- # from event list
54
- registrationDate:
55
-
56
- applicationLanguageCode:
57
- # rarely passed
58
- secondLanguageCode:
59
-
60
- expiryDate:
61
- # rarely passed
62
- terminationDate:
63
-
64
- # status as is in the document
65
- officeStatus:
66
- # status as translated to gbdFormat
67
- gbdStatus: # (Ended|Expired|Pending|Registered|Unknown)
68
- # can also be the date of the last event in markevents if given
69
- statusDate:
70
-
71
- markDisclaimerDetails:
72
- - languageCode: # use guess_language to set it if not passed
73
- # ex {{ Trademark.MarkDisclaimerDetails | guess_language(lang='..', default='..') }}
74
- # lang: the language if provided in doc
75
- # default: default language if lang not provided.
76
- # if no lang no default => use langdetect library
77
- text:
78
-
79
- markDescriptionDetails:
80
- - languageCode:
81
- text:
82
-
83
- wordMarkSpecification:
84
- markVerbalElement:
85
- - languageCode:
86
- text:
87
- markSignificantVerbalElement:
88
- - languageCode:
89
- text:
90
- markTranslation:
91
- - languageCode:
92
- text:
93
- markTransliteration:
94
-
95
- markImageDetails:
96
- - name:
97
- colourIndicator:
98
- colourClaimed:
99
- - languageCode:
100
- text:
101
- classification:
102
- kind: Vienna #mostly
103
- version: 7 #mostly
104
- code:
105
- - string
106
-
107
- markSoundDetails:
108
- - filename:
109
- fileformat:
110
-
111
- markVideo:
112
- - filename:
113
- fileformat:
114
-
115
- goodsServices:
116
- - nice:
117
- version: 11 #mostly
118
- terms:
119
- - languageCode:
120
- text:
121
-
122
- # some datasets have goods and services
123
- # terms that are not classified under a
124
- # nice class
125
- goodsServicesceUnclassified:
126
- - languageCode:
127
- text:
128
-
129
- priorities:
130
- - countryCode:
131
- number:
132
- date:
133
- comment:
134
-
135
- publications:
136
- - identifier:
137
- date:
138
- section:
139
-
140
- applicants:
141
- - identifier:
142
- kind:
143
- fullName:
144
- - languageCode:
145
- text:
146
- fullAddress:
147
- - languageCode:
148
- text:
149
- countryCode: # sometimes, country name is provided instead
150
-
151
- representatives:
152
- - identifier:
153
- kind:
154
- fullName:
155
- - languageCode:
156
- text:
157
- fullAddress:
158
- - languageCode:
159
- text:
160
- countryCode:
161
-
162
- correspondence:
163
- fullName:
164
- - languageCode:
165
- text:
166
- fullAddress:
167
- - languageCode:
168
- text:
169
- countryCode:
170
-
171
- events:
172
- - officeKind:
173
- gbdKind: # Filed, Registered, Published, Pending, Inactive,
174
- # Opposed, Withdrawn, Expired, Examined, Invalidated,
175
- # Rejected, Abandoned, Suspended, Surrendered, Appealed,
176
- # Awaiting court action, Converted, Notification, Unknown
177
- date:
178
-
179
- appeals:
180
- - kind:
181
- date:
182
- # here goes extra information that is office specific and that is pertinent for us to retain.
183
- extra:
@@ -1,5 +0,0 @@
1
- render = 'JSON'
2
- source = 'national'
3
-
4
- # BN/2009/0025
5
- appnum_mask = 'BN/\\d*/(\\d*)'
@@ -1,57 +0,0 @@
1
- # standard gbd definitions
2
- import gbdtransformation.designs.ipas.filters as ipas
3
-
4
-
5
- # namespaces defined in XML and to be ignored in procecssing
6
- ignore_namespace = [
7
- 'http://www.wipo.int/standards/XMLSchema/designs',
8
- 'http://www.wipo.int/standards/XMLSchema/wo-designs'
9
- ]
10
- def get_appdate(appdate, appnum):
11
- return appnum.split('/')[-2]
12
-
13
- def get_designs_count(design, header):
14
- return '1'
15
-
16
- def get_designs_pos(design, header):
17
- return '1'
18
-
19
- def translate_kind(desgin, header):
20
- code = header.TransactionCode.lower()
21
- subcode = header.TransactionSubCode.lower()
22
- if code == 'industrial design':
23
- return 'Industrial Design'
24
- raise Exception('Type "%s" "%s" is not mapped.' % (code, subcode))
25
-
26
- def translate_status(design):
27
- status = design.DesignCurrentStatusCode
28
-
29
- if status == '2295': return 'Unknown'
30
- if status == '2353': return 'Unknown'
31
- if status == '2366': return 'Unknown'
32
- if status == '2387': return 'Unknown'
33
- if status == '2389': return 'Unknown'
34
- if status == '2394': return 'Unknown'
35
- if status == 'Reinstated': return 'Pending'
36
-
37
- return ipas.translate_status(status)
38
-
39
-
40
- def get_registration_nb(design, idstatus):
41
- if design.RegistrationNumber:
42
- return design.RegistrationNumber
43
-
44
- return None
45
-
46
-
47
- def get_expiry_date(design, idstatus):
48
- return ipas.get_expiry_date(design, idstatus)
49
-
50
- def get_registration_date(design, idstatus):
51
- return ipas.get_registration_date(design, idstatus)
52
-
53
- def is_international(header):
54
- return False
55
-
56
- def get_ir_refnum(appnum):
57
- return appnum
@@ -1,80 +0,0 @@
1
- /Transaction
2
- __/DesignTransactionBody
3
- ____/TransactionContentDetails
4
- ______/TransactionCode
5
- ______/TransactionData
6
- ________/DesignApplicationDetails
7
- __________/DesignApplication
8
- ____________/ApplicantDetails
9
- ______________/ApplicantKey
10
- ____________/DesignApplicationDate
11
- ____________/DesignApplicationLanguageCode
12
- ____________/DesignApplicationNumber
13
- ____________/DesignDetails
14
- ______________/Design
15
- ________________/ApplicantDetails
16
- __________________/Applicant
17
- ____________________/ApplicantAddressBook
18
- ______________________/FormattedNameAddress
19
- ________________________/Address
20
- __________________________/AddressCountryCode
21
- __________________________/FreeFormatAddress
22
- ____________________________/FreeFormatAddressLine
23
- ________________________/Name
24
- __________________________/FreeFormatName
25
- ____________________________/FreeFormatNameDetails
26
- ______________________________/FreeFormatNameLine
27
- ______________________________/FreeFormatNameLine[@languageCode=en]
28
- ________________/DesignCurrentStatusCode
29
- ________________/DesignCurrentStatusDate
30
- ________________/DesignDescription
31
- ________________/DesignEventDetails
32
- __________________/DesignEvent
33
- ____________________/DesignEventCode
34
- ____________________/DesignEventDate
35
- ____________________/OfficeSpecificDesignEventCode
36
- ____________________/OfficeSpecificDesignEventDescription
37
- ____________________/OfficeSpecificDesignEventDescription[@languageCode=en]
38
- ________________/DesignIdentifier
39
- ________________/DesignRepresentationSheetDetails
40
- __________________/DesignRepresentationSheet
41
- ____________________/RepresentationSheetFilename
42
- ________________/DesignTitle
43
- ________________/DesignTitle[@languageCode=en]
44
- ________________/DesignTitle[@sequenceNumber=1]
45
- ________________/IndicationProductDetails
46
- __________________/IndicationProduct
47
- ____________________/ClassDescriptionDetails
48
- ______________________/ClassDescription
49
- ________________________/ClassNumber
50
- ________________________/ProductDescription
51
- ____________________/ClassificationKindCode
52
- ____________________/ClassificationVersion
53
- ________________/NoveltyStatement
54
- ________________/NoveltyStatement[@languageCode=en]
55
- ________________/PriorityDetails
56
- __________________/Priority
57
- ____________________/PriorityCountryCode
58
- ____________________/PriorityDate
59
- ____________________/PriorityNumber
60
- ________________/PublicationDetails
61
- __________________/Publication
62
- ____________________/PublicationDate
63
- ________________/RegistrationDate
64
- ________________/RegistrationNumber
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
- ____________/RegistrationOfficeCode
79
- ______/TransactionIdentifier
80
- ______/TransactionSubCode
@@ -1 +0,0 @@
1
- {% include "ipas/template.yml" %}