/** * 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. * </p> * @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; }
/** * 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. * </p> * @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; }
boolean includeParents) { List particles = getChildElementParticles( type, includeParents ); List elements = new ArrayList(); for ( Iterator p = particles.iterator(); p.hasNext(); ) {
/** * 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; }
/** * 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; }
/** * 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; }
children = new ListOrderedMap(); for (Iterator i = Schemas.getChildElementParticles(parent.getType(), true) .iterator(); i.hasNext();) { XSDParticle particle = (XSDParticle) i.next();
List particles = Schemas.getChildElementParticles(type, true); List properties = new ArrayList();
if ( children == null ) { children = new ListOrderedMap(); for ( Iterator i = Schemas.getChildElementParticles( parent.getType(), true ).iterator(); i.hasNext(); ) { XSDParticle particle = (XSDParticle) i.next(); XSDElementDeclaration child = (XSDElementDeclaration) particle.getContent();
children = new ListOrderedMap(); for (Iterator i = Schemas.getChildElementParticles(parent.getType(), true) .iterator(); i.hasNext();) { XSDParticle particle = (XSDParticle) i.next();
for ( Iterator p = Schemas.getChildElementParticles(element.getType(), true).iterator(); p.hasNext(); ) { XSDParticle particle = (XSDParticle) p.next(); XSDElementDeclaration el = (XSDElementDeclaration) particle.getContent();
List children = Schemas.getChildElementParticles(element.getType(), true);
Collection<PropertyDescriptor> children = complexType.getDescriptors(); List<XSDParticle> childParticles = Schemas.getChildElementParticles(typeDef, true);
Schemas.getChildElementParticles(typeDef, true);
for (XSDParticle childParticle : (List<XSDParticle>) Schemas.getChildElementParticles( element.getTypeDefinition(), true)) { XSDElementDeclaration childElement = (XSDElementDeclaration) childParticle .getChildElementParticles(element.getTypeDefinition(), false)); for (Object complex : complexAtts) { if (complex instanceof ComplexAttribute) {