1 22 23 28 29 package org.xquark.schema; 30 31 32 public class SerializingIterationVisitor extends IterationVisitor { 33 private static final String RCSRevision = "$Revision: 1.1 $"; 34 private static final String RCSName = "$Name: $"; 35 36 SerializingIterationVisitor(SchemaVisitor pre, SchemaVisitor post) { 37 super(pre, post); 38 } 39 40 SerializingIterationVisitor(SchemaVisitor visitor) { 41 super(visitor, null); 42 } 43 44 public void visit(ContentModel model) throws SchemaException { 45 if (pre != null) model.accept(pre); 46 47 if ( model.getModel() != null && !(model.getModel() instanceof SimpleType) ) 49 ((SchemaVisitable)model.getModel()).accept(this); 50 51 if (post != null) model.accept(post); 52 } 53 } 54 | Popular Tags |