Many Classes are defined that cannot be implemented as they are not referenced by any properties.
How is one to use these classes and implement them?
Classes such as Context, ExchangedDocument, LineTradeSettlement, etc.
Context
In conversations on Slack, I had asked about creating a payload and offered an example of:
This is incorrect, as the Classes themselves cannot be used as a property. Instead, it should be a property that rangeIncludes the class.
Extra
Quick script to pull out all the classes which aren't referenced:
import json
with open('unece.jsonld') as file:
file_contents = file.read()
parsed = json.loads(file_contents)
classes_list = []
for class_object in parsed['@graph']:
if class_object['@type'] == 'rdfs:Class':
classes_list.append(class_object['@id'])
for class_object in parsed['@graph']:
try:
if class_object['schema:rangeIncludes']['@id'] in classes_list:
classes_list.remove(class_object['schema:rangeIncludes']['@id'])
except:
pass
print(classes_list)
Unreferenced Classes
Issue
Many Classes are defined that cannot be implemented as they are not referenced by any properties. How is one to use these classes and implement them? Classes such as Context, ExchangedDocument, LineTradeSettlement, etc.
Context
In conversations on Slack, I had asked about creating a payload and offered an example of:
This is incorrect, as the Classes themselves cannot be used as a property. Instead, it should be a property that
rangeIncludes
the class.Extra
Quick script to pull out all the classes which aren't referenced:
Which returns :