oo property descriptor PropertyDescriptor foo = complexType.getProperty( "foo" ); foo.getName().getLocalPart() == "foo"; foo.getMinOccurs() == 2; foo.getMaxOccurs() == 4; foo.isNillable() == true; foo.getType().getName().getLocalPart() == "string"; //the bar property descriptor PropertyDescriptor bar = complexType.getProperty( "bar" ); foo.getName().getLocalPart() == "bar"; foo.getMinOccurs() == 1; foo.getMaxOccurs() == 1; foo.isNillable() == false; foo.getType().getName().getLocalPart() == "int"; Now consider the following xml instance document:
<myComplexElement> <foo>one</foo> <foo>two</foo> <foo>three</foo> <bar>1</bar> </myComplexElement>
The resulting complex attribute would be composed as follows:
ComplexAttribute attribute = ...; attribute.getName().getLocalPart() == "myComplexElement"; attribute.getType().getName().getLocalPart() == "myComplexType"; Collection foo = attribute.getProperties( "foo" ); foo.size() == 3; foo.get(0).getValue() == "one"; foo.get(1).getValue() == "two"; foo.get(2).getValue() == "three"; Property bar = attribute.getProperty( "bar" ); bar.getValue() == 1;
@see ComplexAttribute
@author Jody Garnett (Refractions Research)
@author Justin Deoliveira (The Open Planning Project)
@source $URL$