Exemplo n.º 1
0
 public boolean subtype(final PrimeType rhs) {
   PreCondition.assertArgumentNotNull(rhs, "type");
   switch (rhs.getKind()) {
     case CHOICE:
       {
         final PrimeChoiceType choiceType = (PrimeChoiceType) rhs;
         return subtype(choiceType.getLHS()) || subtype(choiceType.getRHS());
       }
       // case ANY_TYPE:
       // case COMPLEX:
       // {
       // final ComplexType complexType = (ComplexType)rhs;
       // return SchemaSupport.subtype(this, complexType);
       // }
     case ELEMENT:
       {
         @SuppressWarnings("unused")
         final ElementNodeType element = (ElementNodeType) rhs;
         return false;
       }
     default:
       {
         return false;
       }
   }
 }
Exemplo n.º 2
0
 public boolean subtype(final PrimeType rhs) {
   switch (rhs.getKind()) {
     case CHOICE:
       {
         final PrimeChoiceType choiceType = (PrimeChoiceType) rhs;
         return subtype(choiceType.getLHS()) || subtype(choiceType.getRHS());
       }
     case ANY_ATOMIC_TYPE:
     case ANY_SIMPLE_TYPE:
     case ANY_TYPE:
       {
         return true;
       }
     default:
       {
         return false;
       }
   }
 }