XSTypeDefinition type) Object parent = accepted.isEmpty() ? root : peekAccepted();
public void pushFactory(String namespaceURI, String localName, GenericObjectModelFactory factory) { if(curNsSwitchingFactory != null) { if(nsSwitchingFactory == null) { nsSwitchingFactory = new StackImpl(); nameSwitchingFactory = new StackImpl(); } nsSwitchingFactory.push(curNsSwitchingFactory); nameSwitchingFactory.push(curNameSwitchingFactory); } curNsSwitchingFactory = namespaceURI; curNameSwitchingFactory = localName; curFactory = factory; }
public void characters(char[] ch, int start, int length) { if(!accepted.isEmpty()) { String str = String.valueOf(ch, start, length); AllElement allElement = peekAll(); if(allElement.characters == null) { allElement.characters = new StringBuffer(str); } else { allElement.characters.append(str); } } }
public void popFactory() { if(nsSwitchingFactory == null || nsSwitchingFactory.isEmpty()) { curNameSwitchingFactory = null; curNsSwitchingFactory = null; } else { curNameSwitchingFactory = (String)nameSwitchingFactory.pop(); curNsSwitchingFactory = (String)nsSwitchingFactory.pop(); } curFactory = getFactory(curNsSwitchingFactory); }
private AllElement peekAll() { return (AllElement)all.peek(); }
private AllElement popAll() { return (AllElement)all.pop(); }
private Object peekAccepted() { return accepted.peek(); }
private void pushAccepted(Object o) { accepted.push(o); }
private void pushAll(Object o) { all.push(new AllElement(o)); }
public Object getRoot() { if(!all.isEmpty()) { popAll(); popAccepted(); } return root; }
private Object popAccepted() { return accepted.pop(); }