Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate TBox from files #19

Closed
alex-mitrevski opened this issue Mar 13, 2020 · 8 comments
Closed

Populate TBox from files #19

alex-mitrevski opened this issue Mar 13, 2020 · 8 comments
Assignees

Comments

@alex-mitrevski
Copy link
Member

Just as for assertions, it could be useful to have the possibility to add new classes and object properties to the ontology using a (possibly YAML-based) configuration file.

This is related to #2 and #17

@Sushant-Chavan
Copy link
Contributor

@alex-mitrevski, A few questions regarding the TBox definition removal APIs:

  1. When a class is removed, should we remove all its subclasses as well?
  2. When a class is removed, should we remove all the properties which have their domain/range as the class to be deleted?
  3. When a class/property is removed, should we remove all the assertions associated with the class/property?

@alex-mitrevski
Copy link
Member Author

2 and 3 should definitely be done I think. I'm not sure about 1, but my gut feeling is we shouldn't do it (worst case - if Object is removed, all classes and properties from the ontology will be removed).

@Sushant-Chavan
Copy link
Contributor

But, if we don't remove the sub-classes, the immediate children of the class that was removed will be treated as the top-level classes (i.e. at the same level as Object) right? Is this desired?

@alex-mitrevski
Copy link
Member Author

I think whoever is deleting the classes should simply be aware of this behaviour, but I think it would be desired. I also don't think it would make sense to clear out the ontology just because you want to delete the top-level class, for example.

@Sushant-Chavan
Copy link
Contributor

Ok, So I will proceed with implementing just the points 2 and 3 mentioned above.

@Sushant-Chavan
Copy link
Contributor

@alex-mitrevski, I was thinking we could use the following format for the YAML file with class and property definitions. What do you think?

class_definitions:
    class_name1: [] # Interpreted as top level class
    class_name2: [ParentClass1]
    class_name3: [ParentClass1, ParentClass2] # Multiple parent classes
property_definitions:
    property_name1:
        domain: [domain_ns (or None), domain_name]
        range: [range_ns (or None), range_name]
        type: 'PropertyType' # or None
    property_name2:
        domain: [domain_ns (or None), domain_name]
        range: [range_ns (or None), range_name]
        type: 'PropertyType' # or None

@alex-mitrevski
Copy link
Member Author

Yeah, I think that looks good.

@alex-mitrevski
Copy link
Member Author

Resolved by #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants