Esempio n. 1
0
 /**
  * A variable can be put whereever a term of whatever type is required --> A VariableSchema is
  * compatible with s if s descends from TermSchema.getBaseSchema()
  */
 public boolean isCompatibleWith(ObjectSchema s) {
   if (s != null) {
     return s.descendsFrom(TermSchema.getBaseSchema());
   } else {
     return false;
   }
 }
Esempio n. 2
0
 /**
  * Return true if - s is the base schema for the XXXSchema class this schema is an instance of
  * (e.g. s is ConceptSchema.getBaseSchema() and this schema is an instance of ConceptSchema) - s
  * is the base schema for a super-class of the XXXSchema class this schema is an instance of (e.g.
  * s is TermSchema.getBaseSchema() and this schema is an instance of ConceptSchema)
  */
 protected boolean descendsFrom(ObjectSchema s) {
   if (s != null) {
     if (s.equals(getBaseSchema())) {
       return true;
     }
     return super.descendsFrom(s);
   } else {
     return false;
   }
 }