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
@@ -1,50 +1,79 @@
1
- /RECORD
2
- __/AGENT
3
- ____/ADDR_STREET
4
- ____/AGENT_CODE
5
- ____/CITY_NAME
6
- ____/PERSON_NAME
7
- ____/PROVINCE_NAME
8
- __/APPL_SUBTYP
9
- __/APPL_TYP
10
- __/APPNO
11
- __/EXPIRATION_DATE
12
- __/FILE_NBR
13
- __/FILE_SEQ
14
- __/FILE_SER
15
- __/FILE_TYP
16
- __/FILING_DATE
17
- __/LAW_CODE
18
- __/LOGO
19
- ____/LOGO
20
- __/NICE_CLASS
21
- ____/NICE_CLASS_CODE
22
- ____/NICE_CLASS_DESCRIPTION
23
- __/OWNER
24
- ____/ADDR_STREET
25
- ____/CITY_NAME
26
- ____/NATIONALITY_COUNTRY_CODE
27
- ____/PERSON_NAME
28
- ____/PROVINCE_NAME
29
- ____/RESIDENCE_COUNTRY_CODE
30
- ____/STATE_CODE
31
- ____/STATE_NAME
32
- __/PRIORITIES
33
- ____/COUNTRY_CODE
34
- ____/PRIORITY_APPL_ID
35
- ____/PRIORITY_DATE
36
- __/PUBLICATION_DATE
37
- __/REGISTRATION_DATE
38
- __/REGISTRATION_NBR
39
- __/SIGN_TYPE
40
- __/STATUS_CATEGORY
41
- __/STATUS_DATE
42
- __/STATUS_NAME
43
- __/TITLE
44
- __/VIENNA
45
- ____/VIENNA_CLASS_CODE
46
- ____/VIENNA_ELEM_CODE
47
- ____/VIENNA_GROUP_CODE
48
- ____/VIENNA_NAME
49
- ____/VIENNA_TEXT
50
- __/sign_type
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
+ ______________________/Name
16
+ ________________________/FreeFormatName
17
+ __________________________/FreeFormatNameDetails
18
+ ____________________________/FreeFormatNameLine
19
+ ____________________________/FreeFormatNameLine[@languageCode=en]
20
+ ______________/ApplicationDate
21
+ ______________/ApplicationLanguageCode
22
+ ______________/ApplicationNumber
23
+ ______________/ExpiryDate
24
+ ______________/GoodsServicesDetails
25
+ ________________/GoodsServices
26
+ __________________/ClassDescriptionDetails
27
+ ____________________/ClassDescription
28
+ ______________________/ClassNumber
29
+ ______________________/GoodsServicesDescription
30
+ ______________________/GoodsServicesDescription[@languageCode=en]
31
+ ______________/MarkCurrentStatusCode
32
+ ______________/MarkCurrentStatusDate
33
+ ______________/MarkDisclaimerDetails
34
+ ________________/MarkDisclaimer
35
+ ________________/MarkDisclaimer[@languageCode=en]
36
+ ______________/MarkEventDetails
37
+ ________________/MarkEvent
38
+ __________________/MarkEventCode
39
+ __________________/MarkEventDate
40
+ __________________/OfficeSpecificMarkEventName
41
+ ______________/MarkFeature
42
+ ______________/MarkImageDetails
43
+ ________________/MarkImage
44
+ __________________/MarkImageCategory
45
+ ____________________/CategoryCodeDetails
46
+ ______________________/CategoryCode
47
+ ____________________/CategoryKind
48
+ ____________________/CategoryVersion
49
+ __________________/MarkImageFileFormat
50
+ __________________/MarkImageFilename
51
+ ______________/PriorityDetails
52
+ ________________/Priority
53
+ __________________/PriorityCountryCode
54
+ __________________/PriorityDate
55
+ __________________/PriorityNumber
56
+ ______________/PublicationDetails
57
+ ________________/Publication
58
+ __________________/PublicationDate
59
+ __________________/PublicationIdentifier
60
+ __________________/PublicationSection
61
+ ______________/RegistrationDate
62
+ ______________/RegistrationNumber
63
+ ______________/RegistrationOfficeCode
64
+ ______________/RepresentativeDetails
65
+ ________________/Representative
66
+ __________________/RepresentativeAddressBook
67
+ ____________________/FormattedNameAddress
68
+ ______________________/Address
69
+ ________________________/AddressCountryCode
70
+ ______________________/Name
71
+ ________________________/FreeFormatName
72
+ __________________________/FreeFormatNameDetails
73
+ ____________________________/FreeFormatNameLine
74
+ ____________________________/FreeFormatNameLine[@languageCode=en]
75
+ ______________/WordMarkSpecification
76
+ ________________/MarkVerbalElementText
77
+ ________________/MarkVerbalElementText[@languageCode=en]
78
+ ______/TransactionIdentifier
79
+ ______/TransactionSubCode
@@ -0,0 +1,50 @@
1
+ /RECORD
2
+ __/AGENT
3
+ ____/ADDR_STREET
4
+ ____/AGENT_CODE
5
+ ____/CITY_NAME
6
+ ____/PERSON_NAME
7
+ ____/PROVINCE_NAME
8
+ __/APPL_SUBTYP
9
+ __/APPL_TYP
10
+ __/APPNO
11
+ __/EXPIRATION_DATE
12
+ __/FILE_NBR
13
+ __/FILE_SEQ
14
+ __/FILE_SER
15
+ __/FILE_TYP
16
+ __/FILING_DATE
17
+ __/LAW_CODE
18
+ __/LOGO
19
+ ____/LOGO
20
+ __/NICE_CLASS
21
+ ____/NICE_CLASS_CODE
22
+ ____/NICE_CLASS_DESCRIPTION
23
+ __/OWNER
24
+ ____/ADDR_STREET
25
+ ____/CITY_NAME
26
+ ____/NATIONALITY_COUNTRY_CODE
27
+ ____/PERSON_NAME
28
+ ____/PROVINCE_NAME
29
+ ____/RESIDENCE_COUNTRY_CODE
30
+ ____/STATE_CODE
31
+ ____/STATE_NAME
32
+ __/PRIORITIES
33
+ ____/COUNTRY_CODE
34
+ ____/PRIORITY_APPL_ID
35
+ ____/PRIORITY_DATE
36
+ __/PUBLICATION_DATE
37
+ __/REGISTRATION_DATE
38
+ __/REGISTRATION_NBR
39
+ __/SIGN_TYPE
40
+ __/STATUS_CATEGORY
41
+ __/STATUS_DATE
42
+ __/STATUS_NAME
43
+ __/TITLE
44
+ __/VIENNA
45
+ ____/VIENNA_CLASS_CODE
46
+ ____/VIENNA_ELEM_CODE
47
+ ____/VIENNA_GROUP_CODE
48
+ ____/VIENNA_NAME
49
+ ____/VIENNA_TEXT
50
+ __/sign_type
@@ -0,0 +1,102 @@
1
+ {% from 'navigation.tmpl' import match %}
2
+ {% set status = RECORD | translate_status %}
3
+
4
+ type: TRADEMARK
5
+ kind:
6
+ - Individual
7
+
8
+ st13: {{ RECORD.APPNO | st13('PH') }}
9
+
10
+ markFeature: {{ RECORD.SIGN_TYPE | translate_feature}}
11
+ registrationOfficeCode: PH
12
+ designatedCountries:
13
+ - PH
14
+
15
+ applicationNumber: {{ RECORD.APPNO }}
16
+ applicationDate: {{ RECORD.FILING_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
17
+ registrationNumber: {{ RECORD.REGISTRATION_NBR }}
18
+ registrationDate: {{ RECORD.REGISTRATION_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
19
+
20
+ reference:
21
+ {% if RECORD.APPL_TYP == 'M' %}
22
+ office: WO
23
+ registration:
24
+ - number: {{ RECORD.FILE_NBR }}
25
+ {% endif %}
26
+
27
+ applicationLanguageCode: en
28
+ expiryDate: {{ RECORD.EXPIRATION_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
29
+ {% if status == 'Ended' %}
30
+ terminationDate: {{ RECORD.EXPIRATION_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
31
+ {% endif %}
32
+
33
+ officeStatus: {{ RECORD.STATUS_NAME }}
34
+ gbdStatus: {{ status }}
35
+ statusDate: {{ RECORD.STATUS_DATE | convertdate2('%m/%d/%Y;%b\t%d\t%Y')}}
36
+
37
+ {% if RECORD.TITLE %}
38
+ wordMarkSpecification:
39
+ markVerbalElement:
40
+ - languageCode: en
41
+ text: {{ RECORD.TITLE}}
42
+ {% endif %}
43
+
44
+ {% if RECORD.SIGN_TYPE == 'B' or RECORD.SIGN_TYPE == 'L' %}
45
+ markImageDetails:
46
+ - name: {{ RECORD.LOGO.LOGO }}
47
+ {% if RECORD.VIENNA %}
48
+ classification:
49
+ kind: Vienna
50
+ code:
51
+ {% call(vienna) match('VIENNA', RECORD) %}
52
+ - {{ vienna.VIENNA_TEXT | pad_vienna }}
53
+ {% endcall %}
54
+ {% endif %}
55
+ {% endif %}
56
+
57
+ {% if RECORD.NICE_CLASS %}
58
+ goodsServicesClassification:
59
+ kind: Nice
60
+ version: {{ ASK_THE_OFFICE }}
61
+ class:
62
+ {% call(nice) match('NICE_CLASS', RECORD) %}
63
+ - code: {{ nice.NICE_CLASS_CODE | int }}
64
+ terms:
65
+ en:
66
+ {% for gsline in nice.NICE_CLASS_DESCRIPTION | split_terms %}
67
+ - {{ gsline | remove_trailing('.') | lower }}
68
+ {% endfor %}
69
+ {% endcall %}
70
+ {% endif %}
71
+
72
+ priorities:
73
+ {% call(priority) match('PRIORITIES', RECORD) %}
74
+ - countryCode: {{ priority.COUNTRY_CODE }}
75
+ number: {{ priority.PRIORITY_APPL_ID | remove_trailing('-') }}
76
+ date: {{ priority.PRIORITY_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
77
+ {% endcall %}
78
+
79
+ applicants:
80
+ {% call(applicant) match('OWNER', RECORD) %}
81
+ - fullName:
82
+ - text: {{ applicant.PERSON_NAME }}
83
+ languageCode: en
84
+ countryCode: {{ applicant.RESIDENCE_COUNTRY_CODE | remove_trailing('-', '.') }}
85
+ fullAddress:
86
+ - text: {{ applicant | get_address }}
87
+ languageCode: en
88
+ {% endcall %}
89
+
90
+ representatives:
91
+ {% call(rep) match('AGENT', RECORD) %}
92
+ {% if rep.PERSON_NAME %}
93
+ - identifier: {{ rep.AGENT_CODE }}
94
+ fullName:
95
+ - text: {{ rep.PERSON_NAME }}
96
+ languageCode: en
97
+ countryCode: PH
98
+ fullAddress:
99
+ - text: {{ rep | get_address }}
100
+ languageCode: en
101
+ {% endif %}
102
+ {% endcall %}
@@ -1,102 +1 @@
1
- {% from 'navigation.tmpl' import match %}
2
- {% set status = RECORD | translate_status %}
3
-
4
- type: TRADEMARK
5
- kind:
6
- - Individual
7
-
8
- st13: {{ RECORD.APPNO | st13('PH') }}
9
-
10
- markFeature: {{ RECORD.SIGN_TYPE | translate_feature}}
11
- registrationOfficeCode: PH
12
- designatedCountries:
13
- - PH
14
-
15
- applicationNumber: {{ RECORD.APPNO }}
16
- applicationDate: {{ RECORD.FILING_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
17
- registrationNumber: {{ RECORD.REGISTRATION_NBR }}
18
- registrationDate: {{ RECORD.REGISTRATION_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
19
-
20
- reference:
21
- {% if RECORD.APPL_TYP == 'M' %}
22
- office: WO
23
- registration:
24
- - number: {{ RECORD.FILE_NBR }}
25
- {% endif %}
26
-
27
- applicationLanguageCode: en
28
- expiryDate: {{ RECORD.EXPIRATION_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
29
- {% if status == 'Ended' %}
30
- terminationDate: {{ RECORD.EXPIRATION_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
31
- {% endif %}
32
-
33
- officeStatus: {{ RECORD.STATUS_NAME }}
34
- gbdStatus: {{ status }}
35
- statusDate: {{ RECORD.STATUS_DATE | convertdate2('%m/%d/%Y;%b\t%d\t%Y')}}
36
-
37
- {% if RECORD.TITLE %}
38
- wordMarkSpecification:
39
- markVerbalElement:
40
- - languageCode: en
41
- text: {{ RECORD.TITLE}}
42
- {% endif %}
43
-
44
- {% if RECORD.SIGN_TYPE == 'B' or RECORD.SIGN_TYPE == 'L' %}
45
- markImageDetails:
46
- - name: {{ RECORD.LOGO.LOGO }}
47
- {% if RECORD.VIENNA %}
48
- classification:
49
- kind: Vienna
50
- code:
51
- {% call(vienna) match('VIENNA', RECORD) %}
52
- - {{ vienna.VIENNA_TEXT | pad_vienna }}
53
- {% endcall %}
54
- {% endif %}
55
- {% endif %}
56
-
57
- {% if RECORD.NICE_CLASS %}
58
- goodsServicesClassification:
59
- kind: Nice
60
- version: {{ ASK_THE_OFFICE }}
61
- class:
62
- {% call(nice) match('NICE_CLASS', RECORD) %}
63
- - code: {{ nice.NICE_CLASS_CODE | int }}
64
- terms:
65
- en:
66
- {% for gsline in nice.NICE_CLASS_DESCRIPTION | split_terms %}
67
- - {{ gsline | remove_trailing('.') | lower }}
68
- {% endfor %}
69
- {% endcall %}
70
- {% endif %}
71
-
72
- priorities:
73
- {% call(priority) match('PRIORITIES', RECORD) %}
74
- - countryCode: {{ priority.COUNTRY_CODE }}
75
- number: {{ priority.PRIORITY_APPL_ID | remove_trailing('-') }}
76
- date: {{ priority.PRIORITY_DATE | convertdate('%Y-%m-%dT%H:%M:%S')}}
77
- {% endcall %}
78
-
79
- applicants:
80
- {% call(applicant) match('OWNER', RECORD) %}
81
- - fullName:
82
- - text: {{ applicant.PERSON_NAME }}
83
- languageCode: en
84
- countryCode: {{ applicant.RESIDENCE_COUNTRY_CODE | remove_trailing('-', '.') }}
85
- fullAddress:
86
- - text: {{ applicant | get_address }}
87
- languageCode: en
88
- {% endcall %}
89
-
90
- representatives:
91
- {% call(rep) match('AGENT', RECORD) %}
92
- {% if rep.PERSON_NAME %}
93
- - identifier: {{ rep.AGENT_CODE }}
94
- fullName:
95
- - text: {{ rep.PERSON_NAME }}
96
- languageCode: en
97
- countryCode: PH
98
- fullAddress:
99
- - text: {{ rep | get_address }}
100
- languageCode: en
101
- {% endif %}
102
- {% endcall %}
1
+ {% include "ipas/template.yml" %}
@@ -36,7 +36,7 @@ filingPlace:
36
36
  # some collections indicate that the application
37
37
  # originates from international filing and provide IR number
38
38
  # (question to ask in GBD participation questionnaire)
39
- referece:
39
+ reference:
40
40
  application:
41
41
  - number:
42
42
  date:
@@ -146,7 +146,7 @@ def format_address(address_lines):
146
146
  if not isinstance(address_lines, list):
147
147
  address_lines = [address_lines]
148
148
  for address_line in address_lines:
149
- if "__value" in address_line:
149
+ if address_line is not None and "__value" in address_line:
150
150
  address += address_line.__value + ' \n'
151
151
  if len(address) > 0:
152
152
  return address.strip()
@@ -154,6 +154,8 @@ def format_address(address_lines):
154
154
  return None
155
155
 
156
156
  def format_complete_address(PostalStructuredAddress):
157
+ if PostalStructuredAddress == None:
158
+ return None
157
159
  adr_lines = format_address(PostalStructuredAddress.AddressLineText)
158
160
  address = []
159
161
  if adr_lines:
@@ -360,4 +362,11 @@ def get_event_type(history):
360
362
  return None
361
363
 
362
364
  def serialize(history):
363
- return json.loads(history.toJSON())
365
+ #print(history)
366
+ jsonString = history.toJSON()
367
+ # keeping single quote in the JSON (even escaped) will fail when going back to yaml (yaml parsing error)
368
+ # so we need to use an alternative unicode for single quote.
369
+ jsonString = jsonString.replace("\'", "\u201A")
370
+ return json.loads(jsonString)
371
+
372
+