/** * Returns a list of all child element declarations of the specified type, no order is * guaranteed. * * <p>The <code>includeParents</code> flag controls if this method should returns those elements * defined on parent types. * * @param type The type * @param includeParents flag indicating if parent types should be processed * @return A list of @link XSDElementDeclaration objects, one for each child element. */ public static final List getChildElementDeclarations( XSDTypeDefinition type, boolean includeParents) { List particles = getChildElementParticles(type, includeParents); List elements = new ArrayList(); for (Iterator p = particles.iterator(); p.hasNext(); ) { XSDParticle particle = (XSDParticle) p.next(); XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent(); if (decl.isElementDeclarationReference()) { decl = decl.getResolvedElementDeclaration(); } elements.add(decl); } return elements; }
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent(); if (child.isElementDeclarationReference()) { child = child.getResolvedElementDeclaration(); if (child.isElementDeclarationReference()) { child = child.getResolvedElementDeclaration();
/** Returns the name of the element represented by the particle as a QName. */ public static QName getParticleName(XSDParticle particle) { XSDElementDeclaration content = (XSDElementDeclaration) particle.getContent(); if (content.isElementDeclarationReference()) { content = content.getResolvedElementDeclaration(); } return new QName(content.getTargetNamespace(), content.getName()); }
/** * Returns the particle for an element declaration that is part of a type. * * @param type The type definition. * @param name The naem of the child element declaration. * @param includeParents Flag to control wether parent types are included. * @return The particle representing the element declaration, or <code>null</code> if it could * not be found. */ public static final XSDParticle getChildElementParticle( XSDTypeDefinition type, String name, boolean includeParents) { List particles = getChildElementParticles(type, includeParents); for (Iterator p = particles.iterator(); p.hasNext(); ) { XSDParticle particle = (XSDParticle) p.next(); XSDElementDeclaration element = (XSDElementDeclaration) particle.getContent(); if (element.isElementDeclarationReference()) { element.getResolvedElementDeclaration(); } if (name.equals(element.getName())) { return particle; } } return null; }
public void visit(XSDParticle particle) { XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent(); if (decl.isElementDeclarationReference()) { decl = decl.getResolvedElementDeclaration(); } if (decl == fElement) { if (particle.isSetMinOccurs()) { minOccurs.add(Integer.valueOf(particle.getMinOccurs())); } else if (particle.getContainer() instanceof XSDModelGroup && particle.getContainer().getContainer() instanceof XSDParticle) { particle = (XSDParticle) particle.getContainer().getContainer(); minOccurs.add(Integer.valueOf(particle.getMinOccurs())); } else { minOccurs.add(1); } } } };
public void visit(XSDParticle particle) { XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent(); if (decl.isElementDeclarationReference()) { decl = decl.getResolvedElementDeclaration(); } if (decl == fElement) { if (particle.isSetMaxOccurs()) { maxOccurs.add(Integer.valueOf(particle.getMaxOccurs())); } else if (particle.getContainer() instanceof XSDModelGroup && particle.getContainer().getContainer() instanceof XSDParticle) { particle = (XSDParticle) particle.getContainer().getContainer(); maxOccurs.add(Integer.valueOf(particle.getMaxOccurs())); } else { maxOccurs.add(1); } } } };
if ( element.isElementDeclarationReference() ) continue;
@Override public Object apply(Object particle) { XSDElementDeclaration attr = (XSDElementDeclaration) ((XSDParticle) particle) .getContent(); if (attr .isElementDeclarationReference()) { attr = attr .getResolvedElementDeclaration(); } return new NameImpl( attr.getTargetNamespace(), attr.getName()); } })
XSDElementDeclaration attribute = (XSDElementDeclaration) particle.getContent(); if (attribute.isElementDeclarationReference()) { attribute = attribute.getResolvedElementDeclaration();
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent(); if (child.isElementDeclarationReference()) { child = child.getResolvedElementDeclaration(); XSDParticle particle = (XSDParticle) p.next(); XSDElementDeclaration el = (XSDElementDeclaration) particle.getContent(); if (el.isElementDeclarationReference()) { el = el.getResolvedElementDeclaration();
XSDParticle particle = (XSDParticle) o[0]; XSDElementDeclaration content = (XSDElementDeclaration) particle.getContent(); if (content.isElementDeclarationReference()) { content = content.getResolvedElementDeclaration();
XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent(); if (child.isElementDeclarationReference()) { child = child.getResolvedElementDeclaration();
XSDElementDeclaration property = (XSDElementDeclaration) particle.getContent(); if (property.isElementDeclarationReference()) { property = property.getResolvedElementDeclaration();
if (elemDecl.isElementDeclarationReference()) { elemDecl = elemDecl.getResolvedElementDeclaration();
Schemas.getChildElementParticles(element.getTypeDefinition(), true)) { XSDElementDeclaration childElement = (XSDElementDeclaration) childParticle.getContent(); if (childElement.isElementDeclarationReference()) { childElement = childElement.getResolvedElementDeclaration(); if (childElement
XSDParticle particle = (XSDParticle) itr.next(); XSDElementDeclaration element = (XSDElementDeclaration) particle.getContent(); if (element.isElementDeclarationReference()) { element = element.getResolvedElementDeclaration();
(XSDElementDeclaration) particle.getContent(); if (element.isElementDeclarationReference()) { element = element.getResolvedElementDeclaration();
XSDElementDeclaration attribute = (XSDElementDeclaration) particle.getContent(); if (attribute.isElementDeclarationReference()) { attribute = attribute.getResolvedElementDeclaration(); XSDElementDeclaration attribute2 = (XSDElementDeclaration) particle2.getContent(); if (attribute2.isElementDeclarationReference()) { attribute2 = attribute2.getResolvedElementDeclaration();
if (elemDecl.isElementDeclarationReference()) { elemDecl = elemDecl.getResolvedElementDeclaration(); if (elemDecl.isElementDeclarationReference()) { elemDecl = elemDecl.getResolvedElementDeclaration();
XSDElementDeclaration element = (XSDElementDeclaration) particle .getContent(); if (element.isElementDeclarationReference()) { element = element.getResolvedElementDeclaration();