wipo-gbd-transformation 1.1.47__py3-none-any.whl → 1.1.48__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/designs/__init__.py +9 -0
- gbdtransformation/designs/alid/__init__.py +1 -1
- gbdtransformation/designs/alid/filters.py +1 -0
- gbdtransformation/designs/filters.py +54 -0
- gbdtransformation/designs/ipas/filters.py +0 -1
- gbdtransformation/designs/ipas/template.yml +2 -1
- gbdtransformation/designs/vnid/__init__.py +5 -0
- gbdtransformation/designs/vnid/filters.py +50 -0
- gbdtransformation/designs/vnid/schema +97 -0
- gbdtransformation/designs/vnid/template.yml +1 -0
- gbdtransformation/designs/xxid/template.yml +2 -1
- gbdtransformation/execs.py +8 -1
- {wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/METADATA +1 -1
- {wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/RECORD +18 -14
- {wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/LICENSE.md +0 -0
- {wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/WHEEL +0 -0
- {wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/entry_points.txt +0 -0
- {wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import re
|
|
2
|
+
from gbdtransformation.designs import st13_identifier
|
|
3
|
+
from gbdtransformation.common.filters import *
|
|
4
|
+
|
|
5
|
+
def parseStatus(status):
|
|
6
|
+
""" Function is here to be overriden in child elements( e.g BRTM)"""
|
|
7
|
+
return status
|
|
8
|
+
|
|
9
|
+
def st13(appnum, office, pos, type='Design', appdate=None, roffice=None, sanitize=True):
|
|
10
|
+
if not appnum:
|
|
11
|
+
return None
|
|
12
|
+
# collections are usually office code followed with tm: xxtm
|
|
13
|
+
collection = '%sid' % office.lower()
|
|
14
|
+
|
|
15
|
+
module_pckg = load_collection_package('designs', collection)
|
|
16
|
+
try:
|
|
17
|
+
masks = getattr(module_pckg, 'appnum_mask')
|
|
18
|
+
if not isinstance(masks, list): masks = [masks]
|
|
19
|
+
except:
|
|
20
|
+
masks = ['(.*)']
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
source = getattr(module_pckg, 'source')
|
|
24
|
+
except:
|
|
25
|
+
source = 'national'
|
|
26
|
+
matches = None
|
|
27
|
+
for mask in masks:
|
|
28
|
+
regex = re.compile('^%s$' % mask)
|
|
29
|
+
matches = regex.search(appnum)
|
|
30
|
+
if matches:
|
|
31
|
+
break
|
|
32
|
+
|
|
33
|
+
if not matches:
|
|
34
|
+
raise Exception('could not apply appnum mask %s on %s' % (mask, appnum))
|
|
35
|
+
|
|
36
|
+
#print(appnum, ''.join(matches.groups()))
|
|
37
|
+
appnum = ''.join(matches.groups())
|
|
38
|
+
|
|
39
|
+
prefix = st13_identifier[source.lower()][type.lower()]
|
|
40
|
+
if sanitize:
|
|
41
|
+
# remove special characters
|
|
42
|
+
special_chars = re.compile(r'\W')
|
|
43
|
+
appnum = special_chars.sub('', appnum)
|
|
44
|
+
|
|
45
|
+
# reference office (only relevant for inerantional)
|
|
46
|
+
if roffice:
|
|
47
|
+
appnum = '%s%s' % (roffice.upper(), appnum)
|
|
48
|
+
|
|
49
|
+
st13 = '%s%s' % (office.upper(), prefix)
|
|
50
|
+
if appdate:
|
|
51
|
+
st13 = '%s%s' % (st13, appdate[:4])
|
|
52
|
+
|
|
53
|
+
# add application number and zfill till 17
|
|
54
|
+
return '%s%s.%s' % (st13, appnum.zfill(17 - len(st13)), pos)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# standard gbd definitions
|
|
2
2
|
from gbdtransformation.designs import kinds as std_kinds
|
|
3
3
|
from gbdtransformation.designs import status as std_status
|
|
4
|
-
from gbdtransformation.brands import events as std_events
|
|
5
4
|
|
|
6
5
|
# namespaces defined in XML and to be ignored in procecssing
|
|
7
6
|
ignore_namespace = []
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
{% set design_count = design | get_designs_count(header) %}
|
|
7
7
|
{% set design_pos = design | get_designs_pos(header) %}
|
|
8
8
|
{% set kind = design | translate_kind(header) %}
|
|
9
|
-
type: '
|
|
9
|
+
type: 'DESIGN'
|
|
10
|
+
subtype: 'Open'
|
|
10
11
|
designGrouping: 'Multiple'
|
|
11
12
|
designsCount: {{ design_count }}
|
|
12
13
|
designPos: {{ design_pos }}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
if status in ['181', '486']:
|
|
29
|
+
return 'Unknown'
|
|
30
|
+
return ipas.translate_status(status)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def get_registration_nb(design, idstatus):
|
|
34
|
+
if design.RegistrationNumber:
|
|
35
|
+
return design.RegistrationNumber
|
|
36
|
+
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def get_expiry_date(design, idstatus):
|
|
41
|
+
return ipas.get_expiry_date(design, idstatus)
|
|
42
|
+
|
|
43
|
+
def get_registration_date(design, idstatus):
|
|
44
|
+
return ipas.get_registration_date(design, idstatus)
|
|
45
|
+
|
|
46
|
+
def is_international(header):
|
|
47
|
+
return False
|
|
48
|
+
|
|
49
|
+
def get_ir_refnum(appnum):
|
|
50
|
+
return appnum
|
|
@@ -0,0 +1,97 @@
|
|
|
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=vi]
|
|
28
|
+
________________/DesignCurrentStatusCode
|
|
29
|
+
________________/DesignCurrentStatusDate
|
|
30
|
+
________________/DesignDescription
|
|
31
|
+
________________/DesignEventDetails
|
|
32
|
+
__________________/DesignEvent
|
|
33
|
+
____________________/DesignEventCode
|
|
34
|
+
____________________/DesignEventDate
|
|
35
|
+
____________________/OfficeSpecificDesignEventName
|
|
36
|
+
________________/DesignIdentifier
|
|
37
|
+
________________/DesignRepresentationSheetDetails
|
|
38
|
+
__________________/DesignRepresentationSheet
|
|
39
|
+
____________________/RepresentationSheetFilename
|
|
40
|
+
________________/DesignSpecimenDetails
|
|
41
|
+
__________________/DesignSpecimen
|
|
42
|
+
____________________/SpecimenDescription
|
|
43
|
+
____________________/SpecimenDescription[@languageCode=vi]
|
|
44
|
+
____________________/SpecimenDescription[@languageCode=vn]
|
|
45
|
+
____________________/SpecimenIdentifier
|
|
46
|
+
________________/DesignTitle
|
|
47
|
+
________________/DesignTitle[@languageCode=vi]
|
|
48
|
+
________________/DesignTitle[@sequenceNumber=1]
|
|
49
|
+
________________/DesignerDetails
|
|
50
|
+
__________________/Designer
|
|
51
|
+
____________________/DesignerAddressBook
|
|
52
|
+
______________________/FormattedNameAddress
|
|
53
|
+
________________________/Address
|
|
54
|
+
__________________________/AddressCountryCode
|
|
55
|
+
__________________________/FreeFormatAddress
|
|
56
|
+
____________________________/FreeFormatAddressLine
|
|
57
|
+
________________________/Name
|
|
58
|
+
__________________________/FreeFormatName
|
|
59
|
+
____________________________/FreeFormatNameDetails
|
|
60
|
+
______________________________/FreeFormatNameLine
|
|
61
|
+
______________________________/FreeFormatNameLine[@languageCode=vi]
|
|
62
|
+
________________/ExpiryDate
|
|
63
|
+
________________/IndicationProductDetails
|
|
64
|
+
__________________/IndicationProduct
|
|
65
|
+
____________________/ClassDescriptionDetails
|
|
66
|
+
______________________/ClassDescription
|
|
67
|
+
________________________/ClassNumber
|
|
68
|
+
________________________/ProductDescription
|
|
69
|
+
____________________/ClassificationKindCode
|
|
70
|
+
____________________/ClassificationVersion
|
|
71
|
+
________________/PriorityDetails
|
|
72
|
+
__________________/Priority
|
|
73
|
+
____________________/PriorityCountryCode
|
|
74
|
+
____________________/PriorityDate
|
|
75
|
+
____________________/PriorityNumber
|
|
76
|
+
________________/PublicationDetails
|
|
77
|
+
__________________/Publication
|
|
78
|
+
____________________/PublicationDate
|
|
79
|
+
____________________/PublicationIdentifier
|
|
80
|
+
________________/RegistrationDate
|
|
81
|
+
________________/RegistrationNumber
|
|
82
|
+
________________/RepresentativeDetails
|
|
83
|
+
__________________/Representative
|
|
84
|
+
____________________/RepresentativeAddressBook
|
|
85
|
+
______________________/FormattedNameAddress
|
|
86
|
+
________________________/Address
|
|
87
|
+
__________________________/AddressCountryCode
|
|
88
|
+
__________________________/FreeFormatAddress
|
|
89
|
+
____________________________/FreeFormatAddressLine
|
|
90
|
+
________________________/Name
|
|
91
|
+
__________________________/FreeFormatName
|
|
92
|
+
____________________________/FreeFormatNameDetails
|
|
93
|
+
______________________________/FreeFormatNameLine
|
|
94
|
+
______________________________/FreeFormatNameLine[@languageCode=vi]
|
|
95
|
+
____________/RegistrationOfficeCode
|
|
96
|
+
______/TransactionIdentifier
|
|
97
|
+
______/TransactionSubCode
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{% include "ipas/template.yml" %}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{% from 'navigation.tmpl' import match %}
|
|
2
2
|
|
|
3
3
|
design:
|
|
4
|
-
type: #
|
|
4
|
+
type: # DESIGN
|
|
5
|
+
subtype: # (OPEN|SEALED) -INID 27 - SealedDepositIndicator
|
|
5
6
|
designGrouping: # SINGLE|MULTIPLE
|
|
6
7
|
kind: # DESIGN|DESING PATENT(US)
|
|
7
8
|
registrationOfficeCode:
|
gbdtransformation/execs.py
CHANGED
|
@@ -589,7 +589,14 @@ def run():
|
|
|
589
589
|
_print_transformation_out(results, args)
|
|
590
590
|
_print_transformation_err(results, args)
|
|
591
591
|
_print_validation_err(results, args)
|
|
592
|
-
|
|
592
|
+
st13s = set()
|
|
593
|
+
import json
|
|
594
|
+
for rest in results:
|
|
595
|
+
st13 = json.loads(rest['out'])['st13']
|
|
596
|
+
if st13 in st13s:
|
|
597
|
+
print(st13)
|
|
598
|
+
st13s.add(st13)
|
|
599
|
+
print(len(results), len(st13s))
|
|
593
600
|
|
|
594
601
|
|
|
595
602
|
def _print_transformation_out(results, args):
|
{wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
gbdtransformation/.DS_Store,sha256=0P5iuLZ7zgY5l38MNfo5m8w3yfR_rIdKFFFjvnF0ws4,6148
|
|
2
2
|
gbdtransformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
gbdtransformation/execs.py,sha256=
|
|
3
|
+
gbdtransformation/execs.py,sha256=3MpUqt84s_e7P5MMPstkWcdmpNx3QnuVTDCcoK790yg,23725
|
|
4
4
|
gbdtransformation/parser.py,sha256=m6b1J0kJEaEDc0I8HKxzzN2nsQWKFfLlQqS3nT02kb4,7074
|
|
5
5
|
gbdtransformation/renders.py,sha256=RmvQgugnG2ErvDxP4I9yovW67gEZNpOd59nrzEYfQPI,4555
|
|
6
6
|
gbdtransformation/brands/__init__.py,sha256=abDdinNkilR-qYg4dhVxP_e1-ZixCzVuHGxbFt710TE,1605
|
|
@@ -456,19 +456,23 @@ gbdtransformation/commons/emap/template.yml,sha256=acb3nyjhNFSZa89KjIwrAhcc7Em2M
|
|
|
456
456
|
gbdtransformation/commons/emrp/__init__.py,sha256=LPq1qlU4nPGFyKPsgKWZG9K2mV4vWR1OAZ1OGWH-NjU,16
|
|
457
457
|
gbdtransformation/commons/emrp/filters.py,sha256=CA7FRKxuhP1QVlB7hh6uIf7EVBXr1MkJ_NKAaP7nqBo,68
|
|
458
458
|
gbdtransformation/commons/emrp/template.yml,sha256=Zor0npqNLZfY9oFs7Ts-bwbsLlUJGmZMHi1cb35MQmI,1402
|
|
459
|
-
gbdtransformation/designs/__init__.py,sha256=
|
|
460
|
-
gbdtransformation/designs/filters.py,sha256=
|
|
461
|
-
gbdtransformation/designs/alid/__init__.py,sha256=
|
|
462
|
-
gbdtransformation/designs/alid/filters.py,sha256=
|
|
459
|
+
gbdtransformation/designs/__init__.py,sha256=SYLLZNohaLhYEAI_cdMhA_2mkgONtyJQrQkSLmSWTt0,233
|
|
460
|
+
gbdtransformation/designs/filters.py,sha256=GZhd-l-CT1Cncsu4DM8txOXKMKnMgU8Ei5Tx0bCcAE0,1676
|
|
461
|
+
gbdtransformation/designs/alid/__init__.py,sha256=U1i1Qng034s7l_2No1yJKbHvUSnMWl66ZLSinKMMS7Y,95
|
|
462
|
+
gbdtransformation/designs/alid/filters.py,sha256=qWMvr2maPSrIpL9GwfcvgCRTNqq_9TuAEygEAyJDapg,1564
|
|
463
463
|
gbdtransformation/designs/alid/schema,sha256=4W6aAkQ4JFTzOEVGYRWlWpsieoIIWoVqhLLnGzI3MjM,3502
|
|
464
464
|
gbdtransformation/designs/alid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
|
|
465
465
|
gbdtransformation/designs/ipas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
466
|
-
gbdtransformation/designs/ipas/filters.py,sha256=
|
|
467
|
-
gbdtransformation/designs/ipas/template.yml,sha256=
|
|
466
|
+
gbdtransformation/designs/ipas/filters.py,sha256=QJqnhujygIEwqBBouXtBdzwcxJUqdgqF5dBb8dEDnCk,3560
|
|
467
|
+
gbdtransformation/designs/ipas/template.yml,sha256=QUvmVjIGDVgnF5Y2xeYNpSiNBelyp3IwG-eWHOQ9pIA,7414
|
|
468
|
+
gbdtransformation/designs/vnid/__init__.py,sha256=JaV6-HeRUl11JwL9V7_uc8gBmSRj0pnKyAXftATfS4c,86
|
|
469
|
+
gbdtransformation/designs/vnid/filters.py,sha256=P_wDBcRMjhWQOJERO3Wpe1xBm1VIm0EYX-_2IwwNKBk,1318
|
|
470
|
+
gbdtransformation/designs/vnid/schema,sha256=HxkKmaih8mUTYZst9aIbEgv_uXhqS6PQp3C4S7utz18,3830
|
|
471
|
+
gbdtransformation/designs/vnid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
|
|
468
472
|
gbdtransformation/designs/xxid/__init__.py,sha256=Cdy9Ki01mAvufymKb9QSLwfFggaoerOenq6BxhPu500,66
|
|
469
473
|
gbdtransformation/designs/xxid/filters.py,sha256=YCaQ6yH2LINwCQvbPHDhnORQyWglbswLlSOY6ur3KXQ,1874
|
|
470
474
|
gbdtransformation/designs/xxid/schema,sha256=KaFhfG6P5SE787wkAuME6hhpcg7vLnSb9x1rW_0EL3M,163
|
|
471
|
-
gbdtransformation/designs/xxid/template.yml,sha256=
|
|
475
|
+
gbdtransformation/designs/xxid/template.yml,sha256=BXxlpD-HSkd4rLHUHYgKPcncHlOBW-Eiqf4ZJzzfQoE,2910
|
|
472
476
|
gbdtransformation/utilities/ISOCountryCodeType-V2006.xsd,sha256=T-QCdih6hFG7Tj_YlL7R0OyEmdAh1_NUDK_sMhVy4CI,41465
|
|
473
477
|
gbdtransformation/utilities/ISOCurrencyCodeType-V2001.xsd,sha256=FC0I3EPmeLfXeRGV25i7t5G8KXLHnX5m-pKHOYWNmSw,28868
|
|
474
478
|
gbdtransformation/utilities/ISOLanguageCodeType-V2002.xsd,sha256=ouRSwAnkVtjGLwZ50LXOW3V21lIWVlPw3yr9CcsVPRU,22147
|
|
@@ -481,9 +485,9 @@ gbdtransformation/utilities/st66.xsd,sha256=co8aFN3a5TpudllRttWmfLeiZu8ulNipfeXm
|
|
|
481
485
|
schemas/ShazamConfig.py,sha256=D67os5B11C41h_WZ7kk54Ss0Kk7tHh8W0d_1c_aX-lY,1191
|
|
482
486
|
schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
483
487
|
schemas/schema_extractor.py,sha256=3-ImtnI777f6b3VA0A_w-NoXdlGz5VZMzK6MnPdQQAY,10294
|
|
484
|
-
wipo_gbd_transformation-1.1.
|
|
485
|
-
wipo_gbd_transformation-1.1.
|
|
486
|
-
wipo_gbd_transformation-1.1.
|
|
487
|
-
wipo_gbd_transformation-1.1.
|
|
488
|
-
wipo_gbd_transformation-1.1.
|
|
489
|
-
wipo_gbd_transformation-1.1.
|
|
488
|
+
wipo_gbd_transformation-1.1.48.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
|
|
489
|
+
wipo_gbd_transformation-1.1.48.dist-info/METADATA,sha256=gYvKAb2WldIInfFwuirjfsB-WYnTKryahOfGRYkmm_w,485
|
|
490
|
+
wipo_gbd_transformation-1.1.48.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
491
|
+
wipo_gbd_transformation-1.1.48.dist-info/entry_points.txt,sha256=CiiRxivMelcgA7W_4rzY1fG-AGEarhpXQUlKYzKWsOI,165
|
|
492
|
+
wipo_gbd_transformation-1.1.48.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
|
|
493
|
+
wipo_gbd_transformation-1.1.48.dist-info/RECORD,,
|
{wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/LICENSE.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wipo_gbd_transformation-1.1.47.dist-info → wipo_gbd_transformation-1.1.48.dist-info}/top_level.txt
RENAMED
|
File without changes
|