def parse_ontology(self):
start = time.clock()<EOL>log.info("<STR_LIT>" % self.__class__.__name__)<EOL>for subj, pred, obj in self._schema_nodes():<EOL><INDENT>if subj not in self.attributes_by_class:<EOL><INDENT>if obj == rt.URIRef(self.lexicon['<STR_LIT:class>']) andpred == rt.URIRef(self.lexicon['<STR_LIT:type>']):<EOL><INDENT>self.attributes_by_class[subj] = []<EOL><DEDENT><DEDENT>leaves = [(subj, pred, obj)]<EOL>if type(obj) == rt.BNode:<EOL><INDENT>leaves = deepest_node((subj, pred, obj), self.graph)<EOL><DEDENT>for s, p, o in leaves:<EOL><INDENT>if o not in self.attributes_by_class:<EOL><INDENT>self.attributes_by_class[o] = []<EOL><DEDENT>if pred == rt.URIRef(self.lexicon['<STR_LIT>']):<EOL><INDENT>self.attributes_by_class[o].append(subj)<EOL><DEDENT><DEDENT><DEDENT>if not self.attributes_by_class:<EOL><INDENT>log.info("<STR_LIT>")<EOL><DEDENT>log.info("<STR_LIT>".format(<EOL>(time.clock() - start) * <NUM_LIT:1000>))<EOL>
place the ontology graph into a set of custom data structures
        for use by the validator