grp = grpDef.getModelGroup();
grp = grpDef.getModelGroup();
public XSDModelGroup getModelGroup(XSDModelGroupDefinition modelGroupDef) { return modelGroupDef.getModelGroup(); }
public void visitModelGroupDefinition(XSDModelGroupDefinition modelGroupDef) { if (!modelGroupDef.isModelGroupDefinitionReference()) { if (modelGroupDef.getModelGroup() != null) { visitModelGroup(modelGroupDef.getModelGroup()); } } }
@Override public Object caseXSDModelGroupDefinition(XSDModelGroupDefinition xsdModelGroupDefinition) { return xsdModelGroupDefinition.getResolvedModelGroupDefinition().getModelGroup(); } @Override
@Override public Object caseXSDModelGroupDefinition(XSDModelGroupDefinition xsdModelGroupDefinition) { return xsdModelGroupDefinition.getResolvedModelGroupDefinition().getModelGroup(); } @Override
public static List getChildElements(XSDModelGroupDefinition xsdModelGroupDefinition) { return getChildElements(xsdModelGroupDefinition.getModelGroup()); }
public ITreeElement[] getChildren() { List list = new ArrayList(); XSDModelGroup xsdModelGroup = ((XSDModelGroupDefinition) target).getResolvedModelGroupDefinition().getModelGroup(); if (xsdModelGroup != null) list.add(xsdModelGroup); List adapterList = new ArrayList(); populateAdapterList(list, adapterList); return (ITreeElement[]) adapterList.toArray(new ITreeElement[0]); }
public void visitModelGroupDefinition(XSDModelGroupDefinition modelGroupDef) { if (!modelGroupDef.isModelGroupDefinitionReference()) { if (modelGroupDef.getModelGroup() != null) { visitModelGroup(modelGroupDef.getModelGroup()); } } else { XSDModelGroup modelGroup = modelGroupDef.getResolvedModelGroupDefinition().getModelGroup(); if (modelGroup != null) { visitModelGroup(modelGroup); } } }
public void visitXSDModelGroupDefinition(XSDModelGroupDefinition xsdModelGroupDefinition) { indent += 2; visitXSDObject(xsdModelGroupDefinition.getResolvedModelGroupDefinition().getModelGroup()); indent -= 2; }
protected List getModelChildren() { List list = new ArrayList(); XSDModelGroupDefinitionAdapter adapter = (XSDModelGroupDefinitionAdapter)getModel(); XSDModelGroup xsdModelGroup = ((XSDModelGroupDefinition) adapter.getTarget()).getResolvedModelGroupDefinition().getModelGroup(); if (xsdModelGroup != null) list.add(XSDAdapterFactory.getInstance().adapt(xsdModelGroup)); return list; }
group = ((XSDModelGroupDefinition) particleContent).getResolvedModelGroupDefinition().getModelGroup();
grp = grpDef.getModelGroup();
protected void patchHelper() { XSDParticleContent theContent = getContent(); XSDTerm newTerm = null; if (theContent instanceof XSDModelGroupDefinition) { XSDModelGroupDefinition xsdModelGroupDefinition = (XSDModelGroupDefinition)theContent; newTerm = xsdModelGroupDefinition.getResolvedModelGroupDefinition().getModelGroup(); } else if (theContent instanceof XSDElementDeclaration) { XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)theContent; newTerm = xsdElementDeclaration.getResolvedElementDeclaration(); } else { newTerm = (XSDTerm)theContent; } if (getTerm() != newTerm) { setTerm(newTerm); } }
protected void patchHelper() { XSDParticleContent theContent = getContent(); XSDTerm newTerm = null; if (theContent instanceof XSDModelGroupDefinition) { XSDModelGroupDefinition xsdModelGroupDefinition = (XSDModelGroupDefinition)theContent; newTerm = xsdModelGroupDefinition.getResolvedModelGroupDefinition().getModelGroup(); } else if (theContent instanceof XSDElementDeclaration) { XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)theContent; newTerm = xsdElementDeclaration.getResolvedElementDeclaration(); } else { newTerm = (XSDTerm)theContent; } if (getTerm() != newTerm) { setTerm(newTerm); } }
public static XSDModelGroup getModelGroup(XSDComplexTypeDefinition cType) { XSDParticle particle = cType.getComplexType(); if (particle == null || particle.eContainer() != cType) return null; Object particleContent = particle.getContent(); XSDModelGroup group = null; if (particleContent instanceof XSDModelGroupDefinition) group = ((XSDModelGroupDefinition) particleContent).getResolvedModelGroupDefinition().getModelGroup(); else if (particleContent instanceof XSDModelGroup) group = (XSDModelGroup) particleContent; if (group == null) return null; if (group.getContents().isEmpty() || group.eResource() != cType.eResource()) { XSDComplexTypeContent content = cType.getContent(); if (content instanceof XSDParticle) group = (XSDModelGroup) ((XSDParticle) content).getContent(); } return group; }
if (getContainer() instanceof XSDParticle) ((XSDParticle)getContainer()).setTerm(newResolvedModelGroupDefinition.getModelGroup());
@Override protected void changeReference(EReference eReference) { super.changeReference(eReference); Element theElement = getElement(); if (theElement != null) { if (eReference == null || eReference == XSDPackage.Literals.XSD_MODEL_GROUP_DEFINITION__RESOLVED_MODEL_GROUP_DEFINITION) { XSDModelGroupDefinition theResolvedModelGroupDefinition = getResolvedModelGroupDefinition(); if (theResolvedModelGroupDefinition != this) { niceSetAttributeURIValue(theElement, XSDConstants.REF_ATTRIBUTE, theResolvedModelGroupDefinition.getURI()); if (eReference != null && getContainer() instanceof XSDParticle) { ((XSDParticle)getContainer()).setTerm(theResolvedModelGroupDefinition.getModelGroup()); } } } } }
protected void handleNewResolvedModelGroupDefinition(XSDModelGroupDefinition newResolvedModelGroupDefinition) { if (newResolvedModelGroupDefinition.getContainer() instanceof XSDRedefine && newResolvedModelGroupDefinition.contains(this)) { XSDSchema redefinedSchema = ((XSDRedefine)newResolvedModelGroupDefinition.getContainer()).getIncorporatedSchema(); if (redefinedSchema != null) { XSDModelGroupDefinition redefinedModelGroupDefinition = (XSDModelGroupDefinition)((XSDSchemaImpl)redefinedSchema).getRedefinitionMap().get(newResolvedModelGroupDefinition); if (redefinedModelGroupDefinition != null) { newResolvedModelGroupDefinition = redefinedModelGroupDefinition; } } } if (newResolvedModelGroupDefinition != getResolvedModelGroupDefinition()) { setResolvedModelGroupDefinition(newResolvedModelGroupDefinition); if (getContainer() instanceof XSDParticle) { ((XSDParticle)getContainer()).setTerm(newResolvedModelGroupDefinition.getModelGroup()); } } }
@Override protected void changeReference(EReference eReference) { super.changeReference(eReference); Element theElement = getElement(); if (theElement != null) { if (eReference == null || eReference == XSDPackage.Literals.XSD_MODEL_GROUP_DEFINITION__RESOLVED_MODEL_GROUP_DEFINITION) { XSDModelGroupDefinition theResolvedModelGroupDefinition = getResolvedModelGroupDefinition(); if (theResolvedModelGroupDefinition != this) { niceSetAttributeURIValue(theElement, XSDConstants.REF_ATTRIBUTE, theResolvedModelGroupDefinition.getURI()); if (eReference != null && getContainer() instanceof XSDParticle) { ((XSDParticle)getContainer()).setTerm(theResolvedModelGroupDefinition.getModelGroup()); } } } } }