Skip to content

return classes with proper ontological hierarchy #853

Description

@adhamhashibon

the superclasses attribute returns the classes in random (alphabetical?) order, but should be in proper hierarchical order as it will convey more added value in applications.

e.g., superclasses of a citizen is now:

frozenset({<OntologyClass: City [https://www.simphony-osp.eu/city#City>,](https://www.simphony-osp.eu/city#City%3E,)
           <OntologyClass: Geographical Place [https://www.simphony-osp.eu/city#GeographicalPlace>,](https://www.simphony-osp.eu/city#GeographicalPlace%3E,)
           <OntologyClass: Populated Place [https://www.simphony-osp.eu/city#PopulatedPlace>,](https://www.simphony-osp.eu/city#PopulatedPlace%3E,)
           <OntologyClass: [http://www.w3.org/2002/07/owl#Thing>})](http://www.w3.org/2002/07/owl#Thing%3E}))

probably we need to add a way to traverse iteratively from one level to the other, as in the original pretty_print function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions