def getAllClasses(self, hide_base_schemas=True, hide_implicit_types=True):
        """
        * hide_base_schemas: by default, obscure all RDF/RDFS/OWL/XML stuff
        * hide_implicit_types: don't make any inference based on rdf:type declarations
        """
        query = """SELECT DISTINCT ?x ?c
                 WHERE {
                         {
                             { ?x a owl:Class }
                             union
                             { ?x a rdfs:Class }
                             union
                             { ?x rdfs:subClassOf ?y }
                             union
                             { ?z rdfs:subClassOf ?x }
                             union
                             { ?y rdfs:domain ?x }
                             union
                             { ?y rdfs:range ?x }
                             %s
                         } .

                         OPTIONAL { ?x a ?c } 
                         # get the type too if available

                    %s

                 }
                 ORDER BY  ?x
                 """

        BIT_BASE_SCHEMAS = """FILTER(
                     !STRSTARTS(STR(?x), "http://www.w3.org/2002/07/owl")
                     && !STRSTARTS(STR(?x), "http://www.w3.org/1999/02/22-rdf-syntax-ns")
                     && !STRSTARTS(STR(?x), "http://www.w3.org/2000/01/rdf-schema")
                     && !STRSTARTS(STR(?x), "http://www.w3.org/2001/XMLSchema")
                     && !STRSTARTS(STR(?x), "http://www.w3.org/XML/1998/namespace")
                     && (!isBlank(?x))
                      ) ."""
        BIT_IMPLICIT_TYPES = """union
                             { ?y rdf:type ?x }"""

        if hide_base_schemas == False:  # ..then do not filter out XML stuff
            BIT_BASE_SCHEMAS = ""
        if hide_implicit_types == True:  # .. then do not add extra clause
            BIT_IMPLICIT_TYPES = ""

        query = query % (BIT_IMPLICIT_TYPES, BIT_BASE_SCHEMAS)

        # print(query)

        qres = self.rdflib_graph.query(query)
        return list(qres)
* hide_base_schemas: by default, obscure all RDF/RDFS/OWL/XML stuff
        * hide_implicit_types: don't make any inference based on rdf:type declarations