particle.setMaxOccurs(attribute.getMaxOccurs()); particle.setContent(element); particle.setElement( dom.createElementNS(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "element")); particle.setElement( dom.createElementNS(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "sequence")); type.setContent(particle);
public static XSDParticle createParticle(Node node) { XSDParticleContent xsdParticleContent = XSDParticleContentImpl.createParticleContent(node); if (xsdParticleContent != null) { XSDParticle xsdParticle = XSDFactory.eINSTANCE.createXSDParticle(); xsdParticle.setElement((Element)node); xsdParticle.setContent(xsdParticleContent); return xsdParticle; } return null; }
public static XSDParticle createParticle(Node node) { XSDParticleContent xsdParticleContent = XSDParticleContentImpl.createParticleContent(node); if (xsdParticleContent != null) { XSDParticle xsdParticle = XSDFactory.eINSTANCE.createXSDParticle(); xsdParticle.setElement((Element)node); xsdParticle.setContent(xsdParticleContent); return xsdParticle; } return null; }
@Override protected void changeAttribute(EAttribute eAttribute) { super.changeAttribute(eAttribute); Element theElement = getElement(); if (eAttribute == null || eAttribute == XSDPackage.Literals.XSD_MODEL_GROUP__COMPOSITOR) { if (theElement != null && eAttribute != null && !isReconciling) { XSDCompositor theCompositor = getCompositor(); Element newElement = createElement (XSDCompositor.ALL_LITERAL == theCompositor ? XSDConstants.ALL_ELEMENT : XSDCompositor.CHOICE_LITERAL == theCompositor ? XSDConstants.CHOICE_ELEMENT : XSDConstants.SEQUENCE_ELEMENT); forceReplace(newElement, theElement); setElement(newElement); XSDConcreteComponentImpl container = (XSDConcreteComponentImpl)getContainer(); if (container instanceof XSDParticle) { ((XSDParticle)container).setElement(newElement); container.changeAttribute(null); } } } }
@Override protected void changeAttribute(EAttribute eAttribute) { super.changeAttribute(eAttribute); Element theElement = getElement(); if (eAttribute == null || eAttribute == XSDPackage.Literals.XSD_MODEL_GROUP__COMPOSITOR) { if (theElement != null && eAttribute != null && !isReconciling) { XSDCompositor theCompositor = getCompositor(); Element newElement = createElement (XSDCompositor.ALL_LITERAL == theCompositor ? XSDConstants.ALL_ELEMENT : XSDCompositor.CHOICE_LITERAL == theCompositor ? XSDConstants.CHOICE_ELEMENT : XSDConstants.SEQUENCE_ELEMENT); forceReplace(newElement, theElement); setElement(newElement); XSDConcreteComponentImpl container = (XSDConcreteComponentImpl)getContainer(); if (container instanceof XSDParticle) { ((XSDParticle)container).setElement(newElement); container.changeAttribute(null); } } } }