def _check_triple(self, triple):
subj, pred, obj = triple<EOL>if self._should_ignore_predicate(pred):<EOL><INDENT>log.info("<STR_LIT>"<EOL>.format(self._field_name_from_uri(pred)))<EOL>return<EOL><DEDENT>classes = []<EOL>log.warning("<STR_LIT>" % pred)<EOL>pred = self._expand_qname(pred)<EOL>if self._namespace_from_uri(pred) not in self.allowed_namespaces:<EOL><INDENT>log.info("<STR_LIT>", pred)<EOL>return<EOL><DEDENT>instanceof = self._is_instance((subj, pred, obj))<EOL>if type(instanceof) == rt.URIRef:<EOL><INDENT>instanceof = self._expand_qname(instanceof)<EOL><DEDENT>if hasattr(self.schema_def, "<STR_LIT>") andnot self.schema_def.attributes_by_class:<EOL><INDENT>log.info("<STR_LIT>")<EOL>self.schema_def.parse_ontology()<EOL><DEDENT>class_invalid = self._validate_class(instanceof)<EOL>if class_invalid:<EOL><INDENT>log.warning("<STR_LIT>" % instanceof)<EOL>return class_invalid<EOL><DEDENT>classes = self._superclasses_for_subject(self.graph, instanceof)<EOL>classes.append(instanceof)<EOL>member_invalid = self._validate_member(pred, classes, instanceof)<EOL>if member_invalid:<EOL><INDENT>log.warning("<STR_LIT>")<EOL>return member_invalid<EOL><DEDENT>dupe_invalid = self._validate_duplication((subj, pred), instanceof)<EOL>if dupe_invalid:<EOL><INDENT>log.warning("<STR_LIT>")<EOL>return dupe_invalid<EOL><DEDENT>self.checked_attributes.append((subj, pred))<EOL>log.warning("<STR_LIT>")<EOL>return<EOL>
compare triple to ontology, return error or None