if (!isPrivate(interfaceClass)) {
// We add a new schema only for interfaces that extends Concept (if we are dealing with a Concept)
// or Predicate (if we are dealing with a Predicate). This is to avoid adding schemas for interfaces
// like Serializable, Cloanable....
if (schema instanceof ConceptSchema && Concept.class.isAssignableFrom(interfaceClass) && interfaceClass != Concept.class && interfaceClass != AgentAction.class) {
ObjectSchema superSchema = doAddHierarchicalSchema(interfaceClass);
((ConceptSchema)schema).addSuperSchema((ConceptSchema)superSchema);
}
else if (schema instanceof PredicateSchema && Predicate.class.isAssignableFrom(interfaceClass) && interfaceClass != Predicate.class) {
ObjectSchema superSchema = doAddHierarchicalSchema(interfaceClass);
((PredicateSchema)schema).addSuperSchema((PredicateSchema)superSchema);
}
}
}
}