/** * Create the root element of the graph */ public void createRoot(String dtdName, String beanName, int option, Class type) throws Schema2BeansRuntimeException { BeanProp prop = new BeanProp(this, dtdName, beanName, option, type, true); try { this.graphManager.createRootBinding(this, prop, null); } catch (Schema2BeansException e) { throw new Schema2BeansRuntimeException(e); } this.isRoot = true; }
public class IterateChoiceProperties implements java.util.Iterator { private ArrayList groups; private int index; public IterateChoiceProperties() { this.groups = new ArrayList(); this.index = 0; } void add(BeanProp prop) { if (prop.group != null && !this.groups.contains(prop.group)) this.groups.add(prop.group); } public boolean hasNext() { return (this.index < this.groups.size()); } public Object next() throws NoSuchElementException { if (hasNext()) { BeanProp.GroupProp gp = (BeanProp.GroupProp)this.groups.get(this.index++); return (BaseProperty[])gp.list(); } else throw new NoSuchElementException(); } public void remove() throws UnsupportedOperationException, IllegalStateException { throw new UnsupportedOperationException();