public List getAttributes(XSDElementDeclaration element) { List attributes = (List) element2attributes.get(element); if (attributes == null) { attributes = Schemas.getAttributeDeclarations(element); element2attributes.put(element, attributes); } return Collections.unmodifiableList(attributes); }
public List getAttributes( XSDElementDeclaration element ) { List attributes = (List) element2attributes.get( element ); if ( attributes == null ) { attributes = Schemas.getAttributeDeclarations( element ); element2attributes.put( element, attributes ); } return Collections.unmodifiableList( attributes ); }
public List getAttributes(XSDElementDeclaration element) { List attributes = (List) element2attributes.get(element); if (attributes == null) { attributes = Schemas.getAttributeDeclarations(element); element2attributes.put(element, attributes); } return Collections.unmodifiableList(attributes); }
/** * Returns a list of all attribute declarations declared in the type (or * any base type) of the specified element. * * <p> * This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()} * </p> * * @param element The element. * * @return A list of @link XSDAttributeDeclaration objects, one for each * attribute of the element. */ public static final List getAttributeDeclarations(XSDElementDeclaration element) { return getAttributeDeclarations(element.getType()); }
/** * Returns a list of all attribute declarations declared in the type (or * any base type) of the specified element. * * <p> * This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()} * </p> * * @param element The element. * * @return A list of @link XSDAttributeDeclaration objects, one for each * attribute of the element. */ public static final List getAttributeDeclarations( XSDElementDeclaration element) { return getAttributeDeclarations(element.getType()); }
/** * Returns a list of all attribute declarations declared in the type (or * any base type) of the specified element. * * <p> * This method is just a shortcut for {@link #getAttributeDeclarations(XSDTypeDefinition) getAttributeDeclarations(element.getType()} * </p> * * @param element The element. * * @return A list of @link XSDAttributeDeclaration objects, one for each * attribute of the element. */ public static final List getAttributeDeclarations(XSDElementDeclaration element) { return getAttributeDeclarations(element.getType()); }
/** * Returns an attribute declaration that is contained in the type of another * element declaration. * * @param element The containing element declaration. * @param qName The qualified name of the contained attribute * * @return The contained attribute declaration, or false if containment is * not satisfied. */ public static final XSDAttributeDeclaration getAttributeDeclaration( XSDElementDeclaration element, QName qName) { List atts = getAttributeDeclarations(element); for (Iterator itr = atts.iterator(); itr.hasNext();) { XSDAttributeDeclaration att = (XSDAttributeDeclaration) itr.next(); if (nameMatches(att, qName)) { return att; } } return null; }
/** * Returns an attribute declaration that is contained in the type of another * element declaration. * * @param element The containing element declaration. * @param qName The qualified name of the contained attribute * * @return The contained attribute declaration, or false if containment is * not satisfied. */ public static final XSDAttributeDeclaration getAttributeDeclaration( XSDElementDeclaration element, QName qName) { List atts = getAttributeDeclarations(element); for (Iterator itr = atts.iterator(); itr.hasNext();) { XSDAttributeDeclaration att = (XSDAttributeDeclaration) itr.next(); if (nameMatches(att, qName)) { return att; } } return null; }
/** * Returns an attribute declaration that is contained in the type of another * element declaration. * * @param element The containing element declaration. * @param qName The qualified name of the contained attribute * * @return The contained attribute declaration, or false if containment is * not satisfied. */ public static final XSDAttributeDeclaration getAttributeDeclaration( XSDElementDeclaration element, QName qName) { List atts = getAttributeDeclarations(element); for (Iterator itr = atts.iterator(); itr.hasNext();) { XSDAttributeDeclaration att = (XSDAttributeDeclaration) itr.next(); if (nameMatches(att, qName)) { return att; } } return null; }
public Object getImmediateNode() { XSDElementDeclaration decl = (XSDElementDeclaration) descriptor.getUserData().get(XSDElementDeclaration.class); Iterator it = Schemas.getAttributeDeclarations(decl).iterator(); while (it.hasNext()) { XSDAttributeDeclaration attDecl = ((XSDAttributeDeclaration) it.next()); if ( attDecl.getURI().equals((name.getNamespaceURI()==null?"":name.getNamespaceURI()) + "#" + name.getLocalPart() )) { return name; } } return null; }
public Object getImmediateNode() { // first try regular way PropertyType pt = descriptor.getType(); if (pt instanceof ComplexType) { ComplexType ct = (ComplexType) pt; PropertyDescriptor ad = ct.getDescriptor("@" + name.getLocalPart()); if (ad != null) { return ad; } } XSDElementDeclaration decl = (XSDElementDeclaration) descriptor.getUserData().get(XSDElementDeclaration.class); Iterator it = Schemas.getAttributeDeclarations(decl).iterator(); while (it.hasNext()) { XSDAttributeDeclaration attDecl = ((XSDAttributeDeclaration) it.next()); if (attDecl.getURI() .equals( (name.getNamespaceURI() == null ? "" : name.getNamespaceURI()) + "#" + name.getLocalPart())) { return name; } } return null; }