コード例 #1
0
ファイル: VariableSchema.java プロジェクト: LeviPorto/Jamder
 /**
  * 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;
   }
 }
コード例 #2
0
ファイル: VariableSchema.java プロジェクト: LeviPorto/Jamder
 /**
  * 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;
   }
 }