// particleMap.put(xsdParticle, eStructuralFeature);
}
}
else
{
XSDElementDeclaration xsdElementDeclaration = (XSDElementDeclaration)xsdTerm;
boolean isRedundant = false;
if (isRestriction)
{
isRedundant =
extendedMetaData.getElement
(baseClass, xsdElementDeclaration.getTargetNamespace(), xsdElementDeclaration.getName()) != null;
if (!isRedundant)
{
group =
extendedMetaData.getElementWildcardAffiliation
(baseClass, xsdElementDeclaration.getTargetNamespace(), xsdElementDeclaration.getName());
}
}
if (!isRedundant)
{
if (name == null)
{
name = getEcoreAttribute(xsdElementDeclaration, "name");
if (name == null)
{
name = validName(xsdElementDeclaration.getName(), true);
}
}
String groupName = getEcoreAttribute(xsdParticle, "featureMap");
if (groupName == null)
{
groupName = getEcoreAttribute(xsdElementDeclaration, "featureMap");
}
if (!"".equals(groupName) &&
(groupName != null ||
xsdElementDeclaration.isAbstract() ||
xsdElementDeclaration.getSubstitutionGroup().size() > 1))
{
if (groupName == null)
{
groupName = name + "Group";
}
eStructuralFeature =
createFeature
(eClass,
groupName,
ecorePackage.getEFeatureMapEntry(),
xsdParticle,
effectiveOccurrence.minOccurs,
effectiveOccurrence.maxOccurs);
eStructuralFeature.setChangeable(true);
extendedMetaData.setFeatureKind(eStructuralFeature, ExtendedMetaData.GROUP_FEATURE);
extendedMetaData.setName(eStructuralFeature, xsdElementDeclaration.getName() + ":group");
if (group != null)
{
extendedMetaData.setGroup(eStructuralFeature, group);
eStructuralFeature.setDerived(true);