parts = grp.getContents();
parts = grp.getContents();
dom.createElementNS(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001, "element")); group.getContents().add(particle);
particle.setMaxOccurs(attributeDescriptor.getMaxOccurs()); particle.setContent(attribute); attributes.getContents().add(particle);
public void visitModelGroup(XSDModelGroup modelGroup) { if (modelGroup.getContents() != null) { for (Iterator iterator = modelGroup.getContents().iterator(); iterator.hasNext();) { XSDParticle particle = (XSDParticle) iterator.next(); visitParticle(particle); } } }
public void visitModelGroup(XSDModelGroup modelGroup) { if (modelGroup.getContents() != null) { for (Iterator iterator = modelGroup.getContents().iterator(); iterator.hasNext();) { XSDParticle particle = (XSDParticle) iterator.next(); visitParticle(particle); } } }
public void visitModelGroup(XSDModelGroup modelGroup) { int numOfChildren = modelGroup.getContents().size(); if (numOfChildren == 0) { concreteComponentList.add(new SpaceFiller("element")); //$NON-NLS-1$ } super.visitModelGroup(modelGroup); } }
public void visitXSDModelGroup(XSDModelGroup xsdModelGroup) { indent += 2; for (Iterator iterator = xsdModelGroup.getContents().iterator(); iterator.hasNext(); ) { visitXSDObject(iterator.next()); } indent -= 2; }
protected void addElementDeclaration(XSDSchema schema, XSDModelGroup modelGroup, String name, String type, boolean schemaType) { XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); particle.setContent(createElementDeclaration(schema, name, type, schemaType)); modelGroup.getContents().add(particle); }
protected void addElementDeclaration(XSDSchema schema, XSDModelGroup modelGroup, String name, String type, boolean schemaType) { XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); particle.setContent(createElementDeclaration(schema, name, type, schemaType)); modelGroup.getContents().add(particle); }
public void undo() { super.undo(); if (parent instanceof XSDModelGroup) { XSDModelGroup model = (XSDModelGroup) parent; model.getContents().remove(newModelGroup.getContainer()); } }
protected XSDModelGroup createAnyModelGroup(String processContents) { XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup(); modelGroup.setCompositor(XSDCompositor.CHOICE_LITERAL); XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); particle.setContent(createAny(processContents)); modelGroup.getContents().add(particle); return modelGroup; }
protected void addElementDeclarationReference(XSDSchema schema, XSDModelGroup modelGroup, String reference) { XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); XSDElementDeclaration elementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration(); elementDeclaration.setResolvedElementDeclaration(schema.resolveElementDeclaration(reference)); particle.setContent(elementDeclaration); modelGroup.getContents().add(particle); }
protected XSDModelGroup createAnyModelGroup(String processContents) { XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup(); modelGroup.setCompositor(XSDCompositor.CHOICE_LITERAL); XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); particle.setContent(createAny(processContents)); modelGroup.getContents().add(particle); return modelGroup; }
protected void addElementDeclarationReference(XSDSchema schema, XSDModelGroup modelGroup, String reference) { XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); XSDElementDeclaration elementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration(); elementDeclaration.setResolvedElementDeclaration(schema.resolveElementDeclaration(reference)); particle.setContent(elementDeclaration); modelGroup.getContents().add(particle); }
protected void addXMIExtension(XSDModelGroup modelGroup) { if (!minimizedXMI) { importXMI(); XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); XSDElementDeclaration xsdElementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration(); xsdElementDeclaration.setResolvedElementDeclaration(xsdElementDeclaration.resolveElementDeclaration(XMI_URI, "Extension")); particle.setContent(xsdElementDeclaration); modelGroup.getContents().add(particle); } }
protected void addXMIExtension(XSDModelGroup modelGroup) { if (!minimizedXMI) { importXMI(); XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); XSDElementDeclaration xsdElementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration(); xsdElementDeclaration.setResolvedElementDeclaration(xsdElementDeclaration.resolveElementDeclaration(XMI_URI, "Extension")); particle.setContent(xsdElementDeclaration); modelGroup.getContents().add(particle); } }
protected void makeReferenceElement(EReference reference, XSDComplexTypeDefinition xsdComplexTypeDefinition) { XSDModelGroup modelGroup = getModelGroup(xsdComplexTypeDefinition); XSDElementDeclaration xsdElementDeclaration = XSDFactory.eINSTANCE.createXSDElementDeclaration(); xsdElementDeclaration.setName(getName(reference)); if (reference.isUnsettable() && !reference.isMany()) { xsdElementDeclaration.setNillable(true); } setReferenceElementType(reference, xsdElementDeclaration); XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle(); particle.setContent(xsdElementDeclaration); setReferenceElementMultiplicity(reference, particle); modelGroup.getContents().add(particle); map(particle, reference); }
protected XSDParticle buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature) { XSDModelGroup xsdModelGroup = findOrCreateModelGroup(xsdComplexTypeDefinition); XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup(); modelGroup.setCompositor(XSDCompositor.CHOICE_LITERAL); XSDParticle xsdParticle = XSDFactory.eINSTANCE.createXSDParticle(); xsdParticle.setContent(modelGroup); if (eStructuralFeature.getUpperBound() != 1) { xsdParticle.setMaxOccurs(eStructuralFeature.getUpperBound()); } xsdModelGroup.getContents().add(xsdParticle); map(xsdParticle, eStructuralFeature); createEcoreAnnotation(xsdParticle, "featureMap", eStructuralFeature.getName()); buildAnnotations(xsdModelGroup, eStructuralFeature); return xsdParticle; }
protected XSDParticle buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature) { XSDModelGroup xsdModelGroup = findOrCreateModelGroup(xsdComplexTypeDefinition); XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup(); modelGroup.setCompositor(XSDCompositor.CHOICE_LITERAL); XSDParticle xsdParticle = XSDFactory.eINSTANCE.createXSDParticle(); xsdParticle.setContent(modelGroup); if (eStructuralFeature.getUpperBound() != 1) { xsdParticle.setMaxOccurs(eStructuralFeature.getUpperBound()); } xsdModelGroup.getContents().add(xsdParticle); map(xsdParticle, eStructuralFeature); createEcoreAnnotation(xsdParticle, "featureMap", eStructuralFeature.getName()); buildAnnotations(xsdModelGroup, eStructuralFeature); return xsdParticle; }