Example #1
0
    @Override
    protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
      Particle c = kind.write(parent);
      writeOccurs(c, isOptional, repeated);

      for (Tree child : children) {
        child.write(c, false, false);
      }
    }
Example #2
0
 @Override
 boolean isNullable() {
   if (kind == GroupKind.CHOICE) {
     for (Tree t : children) {
       if (t.isNullable()) return true;
     }
     return false;
   } else {
     for (Tree t : children) {
       if (!t.isNullable()) return false;
     }
     return true;
   }
 }
Example #3
0
 @Override
 protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
   body.write(parent, isOptional, true);
 }
Example #4
0
 @Override
 boolean isNullable() {
   return body.isNullable();
 }