for (int i = 0; i < particles.getLength(); i++) {
XSObject item = particles.item(i);
if (item instanceof XSParticle) {
XSParticle particle = (XSParticle) item;
if (particle.getTerm() instanceof XSModelGroup) {
XSModelGroup nestedModelGroup = (XSModelGroup) particle.getTerm();
String indent = " ";
if (nestedHierarchy != 0) {
for (int j = 0; j < nestedHierarchy; j++) {
indent += indent;
}
}
if (nestedHierarchy == 0)
outFile.println("nested model group: ");
else {
outFile.println(indent + "nested nested model group: ");
}
outFile.println(indent + "element: " + getElementStack().peek().getName());
outFile.println(indent + "outer compositor: " + getCompositorString(modelGroup));
outFile.println(indent + "inner compositor: " + getCompositorString(nestedModelGroup));
outFile.println(indent + "inner min/max Occ: " + particle.getMinOccurs() + ", "
+ particle.getMaxOccurs());
if (nestedModelGroup.getParticles() != null) {
for (int j = 0; j < nestedModelGroup.getParticles().getLength(); j++) {
XSParticle nestedChildParticle = (XSParticle) nestedModelGroup.getParticles().item(j);
if (nestedChildParticle.getMinOccurs() != 1 && nestedChildParticle.getMaxOccurs() != 1)
outFile.println(indent + "inner child " + j + " min/max Occ: "
+ nestedChildParticle.getMinOccurs() + ", "
+ nestedChildParticle.getMaxOccurs());
}