XSDParticle part = (XSDParticle) ce.getContainer(); at.setMinOccurs(part.getMinOccurs()); at.setMaxOccurs(part.getMaxOccurs());
public void visit(XSDParticle particle) { XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent(); if (decl.isElementDeclarationReference()) { decl = decl.getResolvedElementDeclaration(); } if (decl == fElement) { if (particle.isSetMaxOccurs()) { maxOccurs.add(Integer.valueOf(particle.getMaxOccurs())); } else if (particle.getContainer() instanceof XSDModelGroup && particle.getContainer().getContainer() instanceof XSDParticle) { particle = (XSDParticle) particle.getContainer().getContainer(); maxOccurs.add(Integer.valueOf(particle.getMaxOccurs())); } else { maxOccurs.add(1); } } } };
maxOccurs = particle.getMaxOccurs(); } else { maxOccurs = cParticle.getMaxOccurs();
particle.setMaxOccurs(reference.getMaxOccurs()); } else {
int max = particle.getMaxOccurs();
int maxOccurs = particle.getMaxOccurs(); if (maxOccurs == -1) { maxOccurs = Integer.MAX_VALUE;
substitutedChildParticle.setMaxOccurs(childParticle.getMaxOccurs()); substitutedChildParticle.setMinOccurs(childParticle.getMinOccurs()); XSDElementDeclaration wrapper =
int maxOccurs = particle.getMaxOccurs(); if (maxOccurs == -1) { maxOccurs = Integer.MAX_VALUE;
public void visit(XSDParticle particle) { XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent(); if (decl.isElementDeclarationReference()) { decl = decl.getResolvedElementDeclaration(); } if (decl == fElement) { maxOccurs.add(new Integer(particle.getMaxOccurs())); } } };
public void visit(XSDParticle particle) { XSDElementDeclaration decl = (XSDElementDeclaration) particle.getContent(); if (decl.isElementDeclarationReference()) { decl = decl.getResolvedElementDeclaration(); } if (decl == fElement) { maxOccurs.add(new Integer(particle.getMaxOccurs())); } } };
@Override public String getText(Object object) { XSDParticle xsdParticle = ((XSDParticle)object); XSDParticleContent xsdParticleContent = getDelegate(xsdParticle); if (xsdParticleContent != null) { return itemDelegator.getText(xsdParticleContent); } else { return xsdParticle.getMinOccurs() + ".." + (xsdParticle.getMaxOccurs() == -1 ? "unbounded" : Integer.toString(xsdParticle.getMaxOccurs())); } }
public static int getMaxOccurs(XSDConcreteComponent component) { int maxOccur = -2; if (component != null) { Object o = component.getContainer(); if (o instanceof XSDParticle) { if (((XSDParticle) o).isSetMaxOccurs()) { try { maxOccur = ((XSDParticle) o).getMaxOccurs(); } catch (Exception e) { } } } } return maxOccur; }
int max = ((XSDParticle) xsdWildcard.getContainer()).getMaxOccurs(); result.append(".."); //$NON-NLS-1$ if (max == XSDParticle.UNBOUNDED) int max = ((XSDParticle) xsdWildcard.getContainer()).getMaxOccurs(); result.append(String.valueOf(max));
@Override protected void patch() { super.patch(); List<XSDParticle> newParticles = new ArrayList<XSDParticle>(getContents()); Collection<XSDParticle> remainingParticles = new ArrayList<XSDParticle>(getParticles()); for (ListIterator<XSDParticle> particles = newParticles.listIterator(); particles.hasNext(); ) { XSDParticle xsdParticle = particles.next(); if (xsdParticle.getMaxOccurs() == 0) { particles.remove(); remainingParticles.add(xsdParticle); } else { remainingParticles.remove(xsdParticle); } } if (!remainingParticles.isEmpty()) { getParticles().removeAll(remainingParticles); } setListContentAndOrder(getParticles(), newParticles); }
@Override protected void patch() { super.patch(); List<XSDParticle> newParticles = new ArrayList<XSDParticle>(getContents()); Collection<XSDParticle> remainingParticles = new ArrayList<XSDParticle>(getParticles()); for (ListIterator<XSDParticle> particles = newParticles.listIterator(); particles.hasNext(); ) { XSDParticle xsdParticle = particles.next(); if (xsdParticle.getMaxOccurs() == 0) { particles.remove(); remainingParticles.add(xsdParticle); } else { remainingParticles.remove(xsdParticle); } } if (!remainingParticles.isEmpty()) { getParticles().removeAll(remainingParticles); } setListContentAndOrder(getParticles(), newParticles); }
public void execute() { try { Element element = particle.getElement(); beginRecording(element); String currentMax = element.getAttribute(XSDConstants.MAXOCCURS_ATTRIBUTE); removeMaxOccursAttribute = (currentMax == null)? true: false; oldMaxOccurs = particle.getMaxOccurs(); particle.setMaxOccurs(newMaxOccurs); } finally { endRecording(); } }
int max = ((XSDParticle) xsdModelGroup.getContainer()).getMaxOccurs(); result.append(".."); //$NON-NLS-1$ if (max == XSDParticle.UNBOUNDED) int max = ((XSDParticle) xsdModelGroup.getContainer()).getMaxOccurs(); result.append(String.valueOf(max));
return getComponentLabel(xsdParticle.getTerm()) + "[" + xsdParticle.getMinOccurs() + "," + xsdParticle.getMaxOccurs() + "]";
return getComponentLabel(xsdParticle.getTerm()) + "[" + xsdParticle.getMinOccurs() + "," + xsdParticle.getMaxOccurs() + "]";
particle.setMaxOccurs(parentParticle.getMaxOccurs()); parentParticle.unsetMaxOccurs();