code: def parse_ontology(self):
          
          start = time.clock()
          log.info("Parsing ontology file for %s" % self.__class__.__name__)
          for subj, pred, obj in self._schema_nodes():
              if subj not in self.attributes_by_class:
                  if obj == rt.URIRef(self.lexicon['class']) and \
                          pred == rt.URIRef(self.lexicon['type']):
                      self.attributes_by_class[subj] = []
  
              leaves = [(subj, pred, obj)]
              if type(obj) == rt.BNode:
                  leaves = deepest_node((subj, pred, obj), self.graph)
  
              for s, p, o in leaves:
                  if o not in self.attributes_by_class:
                      self.attributes_by_class[o] = []
                  if pred == rt.URIRef(self.lexicon['domain']):
                      self.attributes_by_class[o].append(subj)
          if not self.attributes_by_class:
              log.info("No nodes found in ontology")
          log.info("Ontology parsing complete in {}".format(
              (time.clock() - start) * 1000))
docs: place the ontology graph into a set of custom data structures
          for use by the validator