|
61 | 61 | global COMMAND_DEFINITIONS |
62 | 62 |
|
63 | 63 | def split_tb_string(input: str)-> [Any]: |
64 | | - """Split the string and trim the items""" |
65 | | - l = [item.strip() for item in re.split(r'[;,\n]+',input)] if input is not None else None |
66 | | - return l |
| 64 | + """Split the string and trim the items, supporting markdown bullets""" |
| 65 | + if input is None: |
| 66 | + return None |
| 67 | + items = re.split(r'[;,\n]+', input) |
| 68 | + results = [] |
| 69 | + for item in items: |
| 70 | + item = item.strip() |
| 71 | + if item: |
| 72 | + # Strip leading markdown bullet if present |
| 73 | + item = re.sub(r'^[\-\*\+]\s*', '', item) |
| 74 | + results.append(item) |
| 75 | + return results |
67 | 76 |
|
68 | 77 | def str_to_bool(value: str) -> bool: |
69 | 78 | """Converts a string to a boolean value.""" |
@@ -371,10 +380,13 @@ def set_element_prop_body(object_type: str, qualified_name: str, attributes: dic |
371 | 380 | "class": prop_name + "Properties", |
372 | 381 | "typeName": prop_name, |
373 | 382 | "displayName": attributes.get('Display Name', {}).get('value', None), |
| 383 | + "name": attributes.get('Display Name', {}).get('value', None) if ("Project" in object_type or "Campaign" in object_type or "Task" in object_type or "StudyProject" in object_type) else None, |
374 | 384 | "qualifiedName" : qualified_name, |
375 | 385 | "description": attributes.get('Description', {}).get('value', None), |
376 | 386 | "category": attributes.get('Category', {}).get('value', None), |
377 | 387 | "identifier": attributes.get('Identifier', {}).get('value', None), |
| 388 | + "url": attributes.get('URL', {}).get('value', None), |
| 389 | + "authors": attributes.get('Authors', {}).get('value', []), |
378 | 390 | "contentStatus": attributes.get('Content Status', {}).get('value', None) or attributes.get('Status', {}).get('value', None), |
379 | 391 | "userDefinedContentStatus": attributes.get('User Defined Content Status', {}).get('value', None), |
380 | 392 | "versionIdentifier": attributes.get('Version Identifier', {}).get('value', None), |
@@ -409,6 +421,9 @@ def set_collection_manager_body(object_type: str, qualified_name: str, attribute |
409 | 421 | prop_bod.update({ |
410 | 422 | "agreementType": attributes.get('Agreement Type', {}).get('value', None), |
411 | 423 | "agreementStatus": attributes.get('Agreement Status', {}).get('value', None), |
| 424 | + "agreementIdentifier": attributes.get('Agreement Identifier', {}).get('value', None), |
| 425 | + "agreementStatusIdentifier": attributes.get('Agreement Status Identifier', {}).get('value', None), |
| 426 | + "agreementVersionIdentifier": attributes.get('Agreement Version Identifier', {}).get('value', None), |
412 | 427 | }) |
413 | 428 | if "Subscription" in object_type: |
414 | 429 | prop_bod.update({ |
@@ -485,9 +500,13 @@ def set_gov_prop_body(object_type: str, qualified_name: str, attributes: dict)-> |
485 | 500 |
|
486 | 501 | prop_bod["scope"] = attributes.get('Scope', {}).get('value', None) |
487 | 502 | prop_bod["importance"] = attributes.get('Importance', {}).get('value', None) |
488 | | - prop_bod["implications"] = attributes.get('Implication', {}).get('value', []) |
| 503 | + prop_bod["implications"] = attributes.get('Implications', {}).get('value', []) |
489 | 504 | prop_bod["outcomes"] = attributes.get('Outcomes', {}).get('value', []) |
490 | 505 | prop_bod["results"] = attributes.get('Results', {}).get('value', []) or [] |
| 506 | + prop_bod["entitlements"] = attributes.get('Entitlements', {}).get('value', []) |
| 507 | + prop_bod["obligations"] = attributes.get('Obligations', {}).get('value', []) |
| 508 | + prop_bod["restrictions"] = attributes.get('Restrictions', {}).get('value', []) |
| 509 | + prop_bod["usage"] = attributes.get('Usage', {}).get('value', None) |
491 | 510 | prop_bod["effectiveFrom"] = attributes.get('Effective From', {}).get('value', None) |
492 | 511 | prop_bod["effectiveTo"] = attributes.get('Effective To', {}).get('value', None) |
493 | 512 | prop_bod["additionalProperties"] = attributes.get('Additional Properties', {}).get('value', None) |
|
0 commit comments