// <xs:element name="name2" personType="xs:string"/>
// </xs:sequence>
// </xs:complexType>
XSDTypeDefinition personType = _xsd4YAWLBuilder.getTypeDefinition("PersonType");
XSDComplexTypeDefinition complexPersonType = (XSDComplexTypeDefinition) personType;
EList attributes = complexPersonType.getAttributeContents();
for (int i = 0; i < attributes.size(); i++) {
XSDAttributeUse attribute = (XSDAttributeUse) attributes.get(i);
XSDAttributeDeclaration attDecl = attribute.getAttributeDeclaration();
String attName = attDecl.getName();
assertTrue(attName.equals("maritalStatus") || attName.equals("isParent"));
XSDSimpleTypeDefinition attType = attDecl.getTypeDefinition();
assertTrue("Attname(): " + attType.getName(),
attType.getName().equals("MaritalStatusType") ||
attType.getName().equals("boolean"));
}
XSDComplexTypeContent content = complexPersonType.getContent();
XSDParticleImpl particle1 = (XSDParticleImpl) content;
EList contents = particle1.eContents();
XSDParticleContent particleContent = particle1.getContent();
assertNotNull(particleContent);
for (int i = 0; i < contents.size(); i++) {
XSDModelGroupImpl modelGroup = (XSDModelGroupImpl) contents.get(i);
EList elements = modelGroup.getContents();
XSDCompositor compositor = modelGroup.getCompositor();
assertNotNull(compositor);
for (int j = 0; j < elements.size(); j++) {
XSDParticle particle = (XSDParticle) elements.get(j);
EList contents2 = particle.eContents();
for (int k = 0; k < contents2.size(); k++) {
Object o = contents2.get(k);
assertNotNull(o);
}
XSDParticleContent pContent = particle.getContent();
if (pContent instanceof XSDElementDeclaration) {
XSDElementDeclaration elementDecl = (XSDElementDeclaration) pContent;