wipo-gbd-transformation 1.1.54__py3-none-any.whl → 1.1.55__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wipo-gbd-transformation might be problematic. Click here for more details.

Files changed (28) hide show
  1. gbdtransformation/brands/chtm/filters.py +153 -181
  2. gbdtransformation/brands/chtm/schema +79 -91
  3. gbdtransformation/brands/chtm/template.yml +98 -107
  4. gbdtransformation/brands/natm/__init__.py +2 -3
  5. gbdtransformation/brands/natm/filters.py +8 -2
  6. gbdtransformation/brands/notm/__init__.py +5 -0
  7. gbdtransformation/brands/notm/filters.py +117 -0
  8. gbdtransformation/brands/notm/template.yml +165 -0
  9. gbdtransformation/brands/phtm/schema +79 -50
  10. gbdtransformation/brands/phtm/schema.classic +50 -0
  11. gbdtransformation/brands/phtm/template.classic.yml +102 -0
  12. gbdtransformation/brands/phtm/template.yml +1 -102
  13. gbdtransformation/brands/xxxx/template.yml +1 -1
  14. gbdtransformation/designs/woid/filters.py +11 -2
  15. gbdtransformation/execs-nico.py +709 -0
  16. gbdtransformation/execs.py +9 -4
  17. gbdtransformation/gbd-transform.exec.tgz +0 -0
  18. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/METADATA +5 -3
  19. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/RECORD +24 -21
  20. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/WHEEL +1 -1
  21. gbdtransformation/designs/bgid/__init__.py +0 -5
  22. gbdtransformation/designs/bgid/filters.py +0 -91
  23. gbdtransformation/designs/bgid/schema +0 -106
  24. gbdtransformation/designs/bgid/template.yml +0 -169
  25. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/LICENSE.md +0 -0
  26. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/SOURCES_Stefans-Mac-Studio.local_Sep-18-063455-2024_Conflict.txt +0 -0
  27. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/entry_points.txt +0 -0
  28. {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/top_level.txt +0 -0
@@ -461,7 +461,7 @@ def organize():
461
461
  buffer = []
462
462
  for root, dirs, files in os.walk(root_path):
463
463
  for f in files:
464
- if f.endswith('.xml'):
464
+ if f.endswith('.xml') or f.endswith('.json'):
465
465
  buffer.append(os.path.join(root_path, root, f))
466
466
  return buffer
467
467
  path = args.path
@@ -546,7 +546,7 @@ def run():
546
546
  buffer = []
547
547
  for root, dirs, files in os.walk(root_path):
548
548
  for f in files:
549
- if f.endswith('.xml.gz') or f.endswith('.xml'):
549
+ if f.endswith('.xml.gz') or f.endswith('.xml') or f.endswith('.json'):
550
550
  buffer.append(os.path.join(root_path, root, f))
551
551
  if len(buffer) == nb:
552
552
  return buffer
@@ -624,8 +624,12 @@ def run():
624
624
  st13s = set()
625
625
  l1 = []
626
626
  l2 = []
627
+ non_skipped_results = []
627
628
  import json
628
629
  for rest in results:
630
+ if rest.get('terror', None) and 'skipping' in str(rest['terror']['message']).lower():
631
+ continue
632
+ non_skipped_results.append(rest)
629
633
  st13 = json.loads(rest['out'])['st13']
630
634
  appnumber = json.loads(rest['out']).get('applicationNumber')
631
635
  registration_number = json.loads(rest['out']).get('registrationNumber')
@@ -635,7 +639,7 @@ def run():
635
639
  l1.append(st13)
636
640
  l2.append(appnumber)
637
641
  st13s.add(st13)
638
- print(len(results), len(st13s))
642
+ print(len(non_skipped_results), len(st13s))
639
643
 
640
644
 
641
645
  def _print_transformation_out(results, args):
@@ -702,7 +706,8 @@ def _print_transformation_err(results, args):
702
706
  for result in results:
703
707
  if not result.get('terror', None):
704
708
  continue
705
-
709
+ if 'skipping' in str(result['terror']['message']).lower():
710
+ continue
706
711
  display_line = {}
707
712
  display_line['Transformation Failed File'] = __format_color(result['src'], bcolors.FAIL)
708
713
  display_line['Error Message'] = result['terror']['message']
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wipo-gbd-transformation
3
- Version: 1.1.54
3
+ Version: 1.1.55
4
4
  Summary: GBD XML ETL package
5
5
  Home-page: https://github.com/GBD-Wipo/xmlE
6
6
  Author: WIPO GDB team
@@ -9,12 +9,14 @@ Keywords: gbdtransformation
9
9
  Classifier: Programming Language :: Python :: 3.6
10
10
  License-File: LICENSE.md
11
11
  Requires-Dist: boto3
12
- Requires-Dist: jinja2 ==2.11.2
12
+ Requires-Dist: jinja2 (==2.11.2)
13
13
  Requires-Dist: xmltodict
14
14
  Requires-Dist: dicttoxml
15
15
  Requires-Dist: PyYAML
16
16
  Requires-Dist: munch
17
17
  Requires-Dist: tabulate
18
- Requires-Dist: markupsafe ==2.0.1
18
+ Requires-Dist: markupsafe (==2.0.1)
19
+ Requires-Dist: langdetect
20
+ Requires-Dist: lxml
19
21
 
20
22
  GBD XML ETL package
@@ -1,6 +1,8 @@
1
1
  gbdtransformation/.DS_Store,sha256=0P5iuLZ7zgY5l38MNfo5m8w3yfR_rIdKFFFjvnF0ws4,6148
2
2
  gbdtransformation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- gbdtransformation/execs.py,sha256=H1TxxWGWzZsEUfqgp0Pg7olmWeFMKDonTRyxEc2Lgb8,25120
3
+ gbdtransformation/execs-nico.py,sha256=UC8E6CPLS5YwhB8AC_Z9_VIxlDGjweOv7NEMMxEVte0,24514
4
+ gbdtransformation/execs.py,sha256=h4BBz3YrEBwPRwt312iNf2tAT_AglqLbssa1faJe1PA,25450
5
+ gbdtransformation/gbd-transform.exec.tgz,sha256=fOcqmzJRIuAhCVtbhju3kaikTDAuQF2K16lt9xllnOE,6262
4
6
  gbdtransformation/parser.py,sha256=m6b1J0kJEaEDc0I8HKxzzN2nsQWKFfLlQqS3nT02kb4,7074
5
7
  gbdtransformation/renders.py,sha256=RmvQgugnG2ErvDxP4I9yovW67gEZNpOd59nrzEYfQPI,4555
6
8
  gbdtransformation/brands/__init__.py,sha256=abDdinNkilR-qYg4dhVxP_e1-ZixCzVuHGxbFt710TE,1605
@@ -68,9 +70,9 @@ gbdtransformation/brands/catm/filters.py,sha256=iZOJFFpmXySl08VWkLDF3cMqFxW3ZGcl
68
70
  gbdtransformation/brands/catm/schema,sha256=Xace88lwiEefhHkk6Zg12dzVF237nMy06HMISEXaTwk,34762
69
71
  gbdtransformation/brands/catm/template.yml,sha256=AwAv3VPRY2VmoyTyPZCwKdRJSmYdVUTRpJj4Zv3uqrM,9861
70
72
  gbdtransformation/brands/chtm/__init__.py,sha256=HPYmDCQ41vkuoXSA94CRtqN_pEKDaUhbpXLOBqlaumQ,130
71
- gbdtransformation/brands/chtm/filters.py,sha256=920M3dD2ag6RmotTQJwrGaxnsuI5VvTwsdZsYwDxcVI,5174
72
- gbdtransformation/brands/chtm/schema,sha256=PWp5xUNXHbOt3U2zQKelVOKIbH0OYqNmwzkcB3QucuE,1385
73
- gbdtransformation/brands/chtm/template.yml,sha256=RUiGJU8gU-pBbOSp1qt8NUEYNbGbDSlMPOfOdtmNEhE,3434
73
+ gbdtransformation/brands/chtm/filters.py,sha256=RpLX9q3BhIlReuK5rchof2GyuQA2xK7WsLqI7cPRiY0,5010
74
+ gbdtransformation/brands/chtm/schema,sha256=f3lVto7Y6O9W7dmhR-4lShQMTVL3tl6bGbw1DZLXuxU,2071
75
+ gbdtransformation/brands/chtm/template.yml,sha256=Desw_6ECzW_tXZCKHCZfyu-DdMeVrCl4vQgXXYBHU-A,4397
74
76
  gbdtransformation/brands/cltm/__init__.py,sha256=yqzC7OagUR0RLui3pHPWo5WxLyksznHcpI-NEEgnlYE,36
75
77
  gbdtransformation/brands/cltm/filters.py,sha256=tmcDE85IAHVuV7GX-EddvNqDktDxYkCCeZIC-RPlbck,2417
76
78
  gbdtransformation/brands/cltm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
@@ -280,11 +282,14 @@ gbdtransformation/brands/mztm/filters.py,sha256=tth_VE7SNWFzXQVeTQaUiuie0_JM_TY1
280
282
  gbdtransformation/brands/mztm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
281
283
  gbdtransformation/brands/mztm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
282
284
  gbdtransformation/brands/mztm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
283
- gbdtransformation/brands/natm/__init__.py,sha256=IU1684C-h4dkjtW82vYxlXM_D3P5nmFd5LvvjWUfxxg,254
284
- gbdtransformation/brands/natm/filters.py,sha256=J2oTUtoJX7BIy_dIvksOWG0MMnL1N3S1_ELs96sArJw,2506
285
+ gbdtransformation/brands/natm/__init__.py,sha256=EjLdRVnlzSTlU2VD_YRTDAR_Zb69iCRRVjsKmIB0RT4,208
286
+ gbdtransformation/brands/natm/filters.py,sha256=xTGTSiymu_UgbTGRrXd7eIydfjSy5aJLPwPE_neuScY,2874
285
287
  gbdtransformation/brands/natm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
286
288
  gbdtransformation/brands/natm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
287
289
  gbdtransformation/brands/natm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
290
+ gbdtransformation/brands/notm/__init__.py,sha256=YRZPymjJv7V5vqjphBN1UOHZ3RL1oeYYqaOI6AKInl0,88
291
+ gbdtransformation/brands/notm/filters.py,sha256=_hOTKGKBpEptiVobk9IfhHojWtU5sXmOxddGToikRSE,3354
292
+ gbdtransformation/brands/notm/template.yml,sha256=71Nk8ViYW8Oa3C9_F2sbugIT6bUytRkRZrEzQ-x6ZnA,5279
288
293
  gbdtransformation/brands/nztm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib-IVMR5kCVMTY,86
289
294
  gbdtransformation/brands/nztm/filters.py,sha256=dAjrg03Yq37H10oAM8rnAMNa71lZHuG1uMwHi25kIvA,4211
290
295
  gbdtransformation/brands/nztm/schema,sha256=tpcyNMtmiBQQ0FsxKKTASRSo4nbrw0j0_b1nhELyAzE,6355
@@ -308,8 +313,10 @@ gbdtransformation/brands/pgtm/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
308
313
  gbdtransformation/brands/pgtm/tests/pgtm.xml,sha256=fAzAz2VtqOFV_2QImDbNxDvuTr-Ue3e5tGx8h-Lnnvg,6533
309
314
  gbdtransformation/brands/phtm/__init__.py,sha256=UHmbQDIPDdApISBKfO9tKOX6LgUQ_Ib-IVMR5kCVMTY,86
310
315
  gbdtransformation/brands/phtm/filters.py,sha256=yNBSktkG4dBGe_E8vxT6N4k6kwkM1A2llNLD4lHVh88,3599
311
- gbdtransformation/brands/phtm/schema,sha256=3JOKHUfK0jSo0NBlDmeGFAKqfYdMJOrIPBIoNUMrVFI,808
312
- gbdtransformation/brands/phtm/template.yml,sha256=U5th90SpXjspWTPuimqftd8vZfJ3tT90mIud5n7Zv8w,2820
316
+ gbdtransformation/brands/phtm/schema,sha256=Nb5tI5MUrzn19c8GpLFuJhpiLn0Fa9XPza10eNHeesI,2877
317
+ gbdtransformation/brands/phtm/schema.classic,sha256=3JOKHUfK0jSo0NBlDmeGFAKqfYdMJOrIPBIoNUMrVFI,808
318
+ gbdtransformation/brands/phtm/template.classic.yml,sha256=U5th90SpXjspWTPuimqftd8vZfJ3tT90mIud5n7Zv8w,2820
319
+ gbdtransformation/brands/phtm/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
313
320
  gbdtransformation/brands/qatm/__init__.py,sha256=NBdOewZ1F_3eErahjyR-up8bjz1FSxwEiPSJfDw6GxY,79
314
321
  gbdtransformation/brands/qatm/filters.py,sha256=lMPVBX2ProdUtg5LcuQAmlInoGCo1-JZemHrvE1lNvw,2330
315
322
  gbdtransformation/brands/qatm/schema,sha256=AP0MxQyD0hY4APRh8nxitlxMqJYJB4AaaTJ8y20-XBA,3283
@@ -441,7 +448,7 @@ gbdtransformation/brands/wstm/tests/test.xml.gz,sha256=UKm7LTvKaETUtHMKurFGqkqXO
441
448
  gbdtransformation/brands/xxxx/__init__.py,sha256=fricc3VHm4BwGRFKIIqB0t-NtP3tTVRrEYee_gWpiFo,172
442
449
  gbdtransformation/brands/xxxx/filters.py,sha256=YCaQ6yH2LINwCQvbPHDhnORQyWglbswLlSOY6ur3KXQ,1874
443
450
  gbdtransformation/brands/xxxx/schema,sha256=g_oWkd7k2e5fAQR1BdNkPSsIgP3dkTyc7esWo_UOHQA,163
444
- gbdtransformation/brands/xxxx/template.yml,sha256=EfJdXmkz0EMc751vZZZPvIu8IPW23GXrqtS-PEROOYY,4664
451
+ gbdtransformation/brands/xxxx/template.yml,sha256=asJd5FHB2g5mfneMMqIkTSR9w3w-AUROnO6YgTyaR00,4665
445
452
  gbdtransformation/brands/zmtm/__init__.py,sha256=Mtsi_-CaLQirHkhnletNhJ4li-pZlzEZMcKjv6mEk50,256
446
453
  gbdtransformation/brands/zmtm/filters.py,sha256=FkGfv3nPiYDUy97O7bDzPp824qoDsqX-oh2Ox01NTpA,2344
447
454
  gbdtransformation/brands/zmtm/schema,sha256=TFrF4FR76cytcbtQkDWxtF74I0tCPRDIvWRFeqaJt6Q,3242
@@ -477,10 +484,6 @@ gbdtransformation/designs/alid/__init__.py,sha256=U1i1Qng034s7l_2No1yJKbHvUSnMWl
477
484
  gbdtransformation/designs/alid/filters.py,sha256=bwE0eg3BCaoUlWT_U1BSvBIbKz1a2n0JTENJW-ZfD5s,1947
478
485
  gbdtransformation/designs/alid/schema,sha256=4W6aAkQ4JFTzOEVGYRWlWpsieoIIWoVqhLLnGzI3MjM,3502
479
486
  gbdtransformation/designs/alid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
480
- gbdtransformation/designs/bgid/__init__.py,sha256=jLrJQ5nccnWItNDV4kmUdq-uo6ms500KnR9qchLry8Q,84
481
- gbdtransformation/designs/bgid/filters.py,sha256=wDLEZ8GAtVl4UBVwtW59siB44tiSmJOCMDS-aKUEd7s,2897
482
- gbdtransformation/designs/bgid/schema,sha256=WOLoyQZCQ_PYjsXODbJSE3vEPppqwm85K7thf5T7lKQ,3667
483
- gbdtransformation/designs/bgid/template.yml,sha256=dAnTluo-554scf_FxYalZ7xHj8RfGfBIhFZurXAenZY,5860
484
487
  gbdtransformation/designs/bnid/__init__.py,sha256=Y_X59eGmIFOkwWF4SkaxTQ3z7QAfIHGoL1VHM8ywbHo,87
485
488
  gbdtransformation/designs/bnid/filters.py,sha256=vx4rZhlOIYzpYfMvm8baxuKfQZWml8dW58oN_I_NT6M,1644
486
489
  gbdtransformation/designs/bnid/schema,sha256=BSzYzhQUcv3cLI-rDSLEEcIAOxMSIgQClvfKDVVTyak,3145
@@ -553,7 +556,7 @@ gbdtransformation/designs/vnid/filters.py,sha256=HlZJp1Zb1zU37tZO-xBe0Kt-TlCT0nl
553
556
  gbdtransformation/designs/vnid/schema,sha256=HxkKmaih8mUTYZst9aIbEgv_uXhqS6PQp3C4S7utz18,3830
554
557
  gbdtransformation/designs/vnid/template.yml,sha256=PO7s1HDQM9ushIJuIX3z_dfWO-f62YDzBG_sYKDlnG8,34
555
558
  gbdtransformation/designs/woid/__init__.py,sha256=Cdy9Ki01mAvufymKb9QSLwfFggaoerOenq6BxhPu500,66
556
- gbdtransformation/designs/woid/filters.py,sha256=0TAuOxP9Gj4Vds7zgRZ8X-lu9dndXDDTjnktbrI14Pg,16986
559
+ gbdtransformation/designs/woid/filters.py,sha256=RVqDYsGL-9BNEpe5VmAXdBwtM8B5HuHDI1ycP65ssmc,17352
557
560
  gbdtransformation/designs/woid/schema,sha256=DoJKgqrbOIPrrSJ7WcJM6aQpDqG34yD0MT7bsxauNpM,19967
558
561
  gbdtransformation/designs/woid/template.yml,sha256=td3Y7vfssL569Anr4Sz1y11ejOZmbRbC_-xw2ON7Vk4,27778
559
562
  gbdtransformation/designs/xxid/__init__.py,sha256=Cdy9Ki01mAvufymKb9QSLwfFggaoerOenq6BxhPu500,66
@@ -572,10 +575,10 @@ gbdtransformation/utilities/st66.xsd,sha256=co8aFN3a5TpudllRttWmfLeiZu8ulNipfeXm
572
575
  schemas/ShazamConfig.py,sha256=D67os5B11C41h_WZ7kk54Ss0Kk7tHh8W0d_1c_aX-lY,1191
573
576
  schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
574
577
  schemas/schema_extractor.py,sha256=3-ImtnI777f6b3VA0A_w-NoXdlGz5VZMzK6MnPdQQAY,10294
575
- wipo_gbd_transformation-1.1.54.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
576
- wipo_gbd_transformation-1.1.54.dist-info/METADATA,sha256=PDsvsGpyapstphx6eWJ2Z32J2_SxtfRMe_IM0ClRg1U,517
577
- wipo_gbd_transformation-1.1.54.dist-info/SOURCES_Stefans-Mac-Studio.local_Sep-18-063455-2024_Conflict.txt,sha256=NeGxpq7lHSg1kaKoQE1hRDhEL5c39TAp008ptbN08NU,29740
578
- wipo_gbd_transformation-1.1.54.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
579
- wipo_gbd_transformation-1.1.54.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
580
- wipo_gbd_transformation-1.1.54.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
581
- wipo_gbd_transformation-1.1.54.dist-info/RECORD,,
578
+ wipo_gbd_transformation-1.1.55.dist-info/LICENSE.md,sha256=6r2dL13EwZqSt2ellLbJRFTA-6ECIDOer4YthCfkac0,35654
579
+ wipo_gbd_transformation-1.1.55.dist-info/METADATA,sha256=-aFWzNc8YO0RxZ-bOyEobspc3gIRWGE0jLhNJTi3fu8,567
580
+ wipo_gbd_transformation-1.1.55.dist-info/SOURCES_Stefans-Mac-Studio.local_Sep-18-063455-2024_Conflict.txt,sha256=NeGxpq7lHSg1kaKoQE1hRDhEL5c39TAp008ptbN08NU,29740
581
+ wipo_gbd_transformation-1.1.55.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
582
+ wipo_gbd_transformation-1.1.55.dist-info/entry_points.txt,sha256=NFLtlP3mPHUi-hEoUcz4CXa7vcpP8bbwd18HS4arbEk,223
583
+ wipo_gbd_transformation-1.1.55.dist-info/top_level.txt,sha256=oU1j-JNLga18Fd-EV6Xl9wM8zxYoNVEzb7P8MDhTPJg,26
584
+ wipo_gbd_transformation-1.1.55.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: bdist_wheel (0.38.4)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,5 +0,0 @@
1
- render = 'JSON'
2
- source = 'national'
3
-
4
- # AID2018000076
5
- appnum_mask = ['(\\d*)-(\\d*)']
@@ -1,91 +0,0 @@
1
- # standard gdd definitions
2
- from gbdtransformation.designs import kinds as std_kinds
3
- from gbdtransformation.designs import status as std_status
4
-
5
- # namespaces defined in XML and to be ignored in procecssing
6
- ignore_namespace = [
7
- "http://www.oami.europa.eu/schemas/design_Transaction",
8
- "http://www.oami.europa.eu/schemas/design_IndicationProduct",
9
- "http://www.oami.europa.eu/schemas/design",
10
- ]
11
-
12
- def get_appdate(appdate, appnum):
13
- return appdate
14
-
15
- def get_designs_count(design, header):
16
- return '1'
17
-
18
- def get_designs_pos(design, header):
19
- return '1'
20
-
21
- # -------------------------------------------------------------
22
- # data translation helpers:
23
- # translate values from office interpretation to gbd equivalent
24
- # -------------------------------------------------------------
25
- def translate_kind(desgin, header):
26
- code = header.TransactionCode.lower()
27
- if code == 'ds-search design list':
28
- return 'Industrial Design'
29
- raise Exception('Type "%s" is not mapped.' % (code))
30
-
31
- def parseForSt13(appnum, des_ref):
32
- if des_ref.get('DesignIdentifier'):
33
- return appnum + '-' + des_ref['DesignIdentifier'].split('-')[1]
34
- else:
35
- return appnum + '-' + des_ref['DesignURI'].split('-')[1]
36
-
37
- def format_address(address):
38
- return '%s, %s %s' % (address.AddressStreet,
39
- address.AddressPostcode,
40
- address.AddressCity)
41
-
42
- def format_name(name):
43
- fname = name.FirstName
44
- lname = name.LastName
45
-
46
- full_name = [name.FirstName, name.LastName]
47
- full_name = [f.strip() for f in full_name if f is not None]
48
-
49
- return ' '.join(full_name)
50
-
51
-
52
- def is_international(header):
53
- return False
54
-
55
- def get_ir_refnum(appnum):
56
- return appnum
57
-
58
- def translate_status(desgin):
59
- if desgin._operationCode == 'Delete':
60
- return 'Delete'
61
-
62
- status = desgin.DesignCurrentStatusCode
63
-
64
- if status in ['Application filed',
65
- 'Application published',
66
- 'Application under examination',
67
- 'Registration pending',
68
- 'Appeal pending',
69
- 'Registration cancellation pending',
70
- 'Filed']:
71
- return 'Pending'
72
-
73
- if status in ['Application refused',
74
- 'Application withdrawn',
75
- 'Application opposed',
76
- 'Registration cancelled',
77
- 'Registration surrendered',
78
- 'Design surrendered',
79
- 'Design declared invalid',
80
- 'Lack of effects',
81
- "Design lapsed",
82
- 'Ended']:
83
- return 'Ended'
84
-
85
- if status in ['Registered',
86
- 'Registered and subject to deferment',
87
- 'Registered and fully published']:
88
- return 'Registered'
89
- if status in ['Registration expired', 'Expired']: return 'Expired'
90
-
91
- raise Exception('Status "%s" not mapped.' % status)
@@ -1,106 +0,0 @@
1
- /Transaction
2
- __/DesignTransactionBody
3
- ____/TransactionContentDetails
4
- ______/TransactionCode
5
- ______/TransactionData
6
- ________/DesignDetails
7
- __________/Design
8
- ____________/ApplicantDetails
9
- ______________/Applicant
10
- ________________/ApplicantAddressBook
11
- __________________/ContactInformationDetails
12
- ____________________/Email
13
- ____________________/Phone
14
- ____________________/Phone[@phoneKind=Undefined]
15
- __________________/FormattedNameAddress
16
- ____________________/Address
17
- ______________________/AddressCountryCode
18
- ______________________/FormattedAddress
19
- ________________________/AddressCity
20
- ________________________/AddressCounty
21
- ________________________/AddressPostcode
22
- ________________________/AddressStreet
23
- ____________________/Name
24
- ______________________/FormattedName
25
- ________________________/FirstName
26
- ________________________/LastName
27
- ________________________/MiddleName
28
- ________________________/OrganizationName
29
- ________________/ApplicantIdentifier
30
- ________________/ApplicantNationalityCode
31
- ____________/ApplicationDate
32
- ____________/ApplicationNumber
33
- ____________/ClassDescriptionDetails
34
- ______________/ClassDescription
35
- ________________/ClassNumber
36
- ____________/DefermentExpirationDate
37
- ____________/DesignCurrentStatusCode
38
- ____________/DesignCurrentStatusDate
39
- ____________/DesignIdentifier
40
- ____________/DesignPreferedRepresentation
41
- ______________/ViewURI
42
- ____________/DesignRepresentationSheetDetails
43
- ______________/DesignRepresentationSheet
44
- ________________/ViewDetails
45
- __________________/View
46
- ____________________/ViewURI
47
- ____________/DesignURI
48
- ____________/DesignerDetails
49
- ______________/Designer
50
- ________________/DesignerAddressBook
51
- __________________/FormattedNameAddress
52
- ____________________/Name
53
- ______________________/FreeFormatName
54
- ________________________/FreeFormatNameDetails
55
- __________________________/FreeFormatNameLine
56
- ________________/DesignerIdentifier
57
- ____________/EffectiveDate
58
- ____________/ExpiryDate
59
- ____________/IndicationProductDetails
60
- ______________/IndicationProduct
61
- ______________/IndicationProduct[@languageCode=BG]
62
- ____________/PriorityDetails
63
- ______________/Priority
64
- ________________/PriorityCountryCode
65
- ________________/PriorityDate
66
- ________________/PriorityNumber
67
- ____________/PublicationDate
68
- ____________/RegistrationDate
69
- ____________/RegistrationNumber
70
- ____________/RegistrationOfficeCode
71
- ____________/RepresentativeDetails
72
- ______________/Representative
73
- ________________/RepresentativeAddressBook
74
- __________________/ContactInformationDetails
75
- ____________________/Email
76
- ____________________/Phone
77
- ____________________/Phone[@phoneKind=Undefined]
78
- __________________/FormattedNameAddress
79
- ____________________/Address
80
- ______________________/AddressCountryCode
81
- ______________________/FormattedAddress
82
- ________________________/AddressCity
83
- ________________________/AddressCounty
84
- ________________________/AddressPostcode
85
- ________________________/AddressStreet
86
- ____________________/Name
87
- ______________________/FormattedName
88
- ________________________/FirstName
89
- ________________________/LastName
90
- ________________________/MiddleName
91
- ________________________/OrganizationName
92
- ______________________/FreeFormatName
93
- ________________________/FreeFormatNameDetails
94
- __________________________/FreeFormatNameLine
95
- ________________/RepresentativeIdentifier
96
- ________________/RepresentativeKindCode
97
- ________________/RepresentativeLegalEntity
98
- ________________/RepresentativeNationalityCode
99
- ________________/RepresentativeURI
100
- __________/Design[@operationCode=Delete]
101
- __________/Design[@operationCode=Insert]
102
- ______/TransactionIdentifier
103
- __/TransactionHeader
104
- ____/SenderDetails
105
- ______/RequestProducerDateTime
106
- ________/design EM-DS-Search-DesignList-V1-0.xsd]
@@ -1,169 +0,0 @@
1
- {% from 'navigation.tmpl' import match %}
2
-
3
- {% call(header) match('DesignTransactionBody.TransactionContentDetails', Transaction) %}
4
-
5
- {% call(design) match('TransactionData.DesignDetails.Design', header) %}
6
- {% set design_count = design | get_designs_count(header) %}
7
- {% set design_pos = design | get_designs_pos(header) %}
8
- {% set kind = design | translate_kind(header) %}
9
- type: 'DESIGN'
10
- subtype: 'OPEN'
11
- designGrouping: 'MULTIPLE'
12
- designsCount: {{ design_count }}
13
-
14
- kind:
15
- - {{kind}}
16
- {{ design }}
17
- registrationOfficeCode: {{ design.RegistrationOfficeCode}}
18
- designatedCountries:
19
- - BG
20
- reference:
21
- {% if header | is_international %}
22
- registration:
23
- - number: {{ design.ApplicationNumber | get_ir_refnum }}
24
- office: WO
25
- {% endif %}
26
- {% if not kind == 'Industrial Design' %}
27
- registration:
28
- - number: {{ design.RegistrationNumber }}
29
- {% endif %}
30
-
31
- {% set idstatus = design | translate_status %}
32
- {% set appdate = design.ApplicationDate | get_appdate(design.ApplicationNumber) %}
33
-
34
- st13: {{ design.ApplicationNumber | parseForSt13(design) | st13(design.RegistrationOfficeCode, design_pos, appdate=appdate) }}
35
-
36
- applicationNumber: {{ design.ApplicationNumber }}
37
- applicationDate: {{ design.ApplicationDate }}
38
- registrationNumber: {{ design.RegistrationNumber }}
39
- registrationDate: {{ design.RegistrationDate }}
40
- publicationDate: {{ design.PublicationDate }}
41
- expiryDate: {{ design.ExpiryDate }}
42
-
43
- applicationLanguageCode: BG
44
-
45
-
46
- applicants:
47
- {% call(applicant) match('ApplicantDetails.Applicant', design) %}
48
- - identifier: {{ applicant.ApplicantIdentifier }}
49
- {% call(details) match('ApplicantAddressBook.FormattedNameAddress.Name.FormattedName', applicant) %}
50
- {% if details.OrganizationName %}
51
- kind: 'organization'
52
- fullName:
53
- - languageCode: BG
54
- text: {{ details.OrganizationName }}
55
- {% else %}
56
- kind: 'person'
57
- fullName:
58
- - languageCode: BG
59
- text: {{ details | format_name }}
60
- firstName:
61
- - languageCode: BG
62
- text: {{ details.FirstName}}
63
- lastName:
64
- - languageCode: BG
65
- text: {{ details.LastName}}
66
- middleName:
67
- - languageCode: BG
68
- text: {{ details.MiddleName}}
69
- {% endif %}
70
- {% endcall %}
71
- {% call(address) match('ApplicantAddressBook.FormattedNameAddress.Address', applicant) %}
72
- fullAddress:
73
- - languageCode: BG
74
- text: {{ address.FormattedAddress | format_address }}
75
- addressLines: {{ address.FormattedAddress.AddressStreet }}
76
- cityName: {{ address.FormattedAddress.AddressCity }}
77
- geographicRegionName: {{ address.FormattedAddress.AddressCounty }}
78
- postalCode: {{ address.FormattedAddress.AddressPostcode }}
79
- countryCode: {{ address.AddressCountryCode }}
80
- {% endcall %}
81
- {% endcall %}
82
-
83
- representatives:
84
- {% call(rep) match('RepresentativeDetails.Representative', design) %}
85
- - identifier: {{ rep.RepresentativeIdentifier }}
86
- {% call(details) match('RepresentativeAddressBook.FormattedNameAddress.Name.FormattedName', rep) %}
87
- kind: {{ rep.RepresentativeLegalEntity}}
88
- {% if details.OrganizationName %}
89
- fullName:
90
- - languageCode: BG
91
- text: {{ details.OrganizationName }}
92
- {% else %}
93
- fullName:
94
- - languageCode: BG
95
- text: {{ details | format_name }}
96
- firstName:
97
- - languageCode: BG
98
- text: {{ details.FirstName}}
99
- lastName:
100
- - languageCode: BG
101
- text: {{ details.LastName}}
102
- middleName:
103
- - languageCode: BG
104
- text: {{ details.MiddleName}}
105
- {% endif %}
106
- {% endcall %}
107
- {% call(address) match('RepresentativeAddressBook.FormattedNameAddress.Address', rep) %}
108
- fullAddress:
109
- - languageCode: BG
110
- text: {{ address.FormattedAddress | format_address }}
111
- addressLines: {{ address.FormattedAddress.AddressStreet }}
112
- cityName: {{ address.FormattedAddress.AddressCity }}
113
- geographicRegionName: {{ address.FormattedAddress.AddressCounty }}
114
- postalCode: {{ address.FormattedAddress.AddressPostcode }}
115
- countryCode: {{ address.AddressCountryCode }}
116
- {% endcall %}
117
- {% endcall %}
118
-
119
- designs:
120
- - designPos: {{ design_pos }}
121
- officeStatus: {{ design.DesignCurrentStatusCode | parseStatus }}
122
- gbdStatus: {{ idstatus }}
123
- statusDate: {{ design.DesignCurrentStatusDate }}
124
- productIndication:
125
- {% call(indic) match('IndicationProduct', design.IndicationProductDetails) %}
126
- - languageCode: {{ indic | guess_language(indic._languageCode, BG) }}
127
- text: {{ indic }}
128
- {% endcall %}
129
-
130
- designImageDetails:
131
- {% call(sheet) match('DesignRepresentationSheet', design.DesignRepresentationSheetDetails) %}
132
- {% call(img) match('ViewDetails.View',sheet) %}
133
- - name: {{ img.ViewURI }}
134
- {% endcall %}
135
- {% endcall %}
136
-
137
- designer:
138
- {% call(designer) match('DesignerDetails.Designer', design) %}
139
- {% call(details) match('DesignerAddressBook.FormattedNameAddress.Name.FreeFormatName', designer) %}
140
- - identifier: {{ designer.DesignerIdentifier }}
141
- fullName:
142
- {% call(nameline) match('FreeFormatNameDetails.FreeFormatNameLine', details) %}
143
- - text: {{ nameline }}
144
- languageCode: BG
145
- {% endcall %}
146
- {% endcall %}
147
- {% endcall %}
148
-
149
- productIndicationClasses:
150
- {% call(indicationProducts) match('ClassDescriptionDetails', design) %}
151
- - kind: "Locarno"
152
- classes:
153
- {% call(code) match('ClassDescription', indicationProducts) %}
154
- - code: {{ code.ClassNumber }}
155
- {% endcall %}
156
- {% endcall %}
157
-
158
- priorities:
159
- {% call(priority) match('PriorityDetails.Priority', design) %}
160
- - countryCode: {{ priority.PriorityCountryCode }}
161
- number: {{ priority.PriorityNumber }}
162
- date: {{ priority.PriorityDate }}
163
- {% endcall %}
164
-
165
-
166
-
167
-
168
- {% endcall %}
169
- {% endcall %}