s.addAll(xs.getAssociatedTypes(name));
s.addAll(gml.getAssociatedTypes(type));
s.addAll(gml.getAssociatedTypes(name));
Iterator i = s.iterator();
while(i.hasNext()){
NameSpaceElement element = (NameSpaceElement)i.next();
if(name.equals(element.getTypeDefName()))
if(!result.contains(element)){
result.add(element);
}
else
if(name.equals(element.getTypeRefName()))
if(!result.contains(element)){
result.add(element);
}
else
if(name.equals(element.getQualifiedTypeDefName()))
if(!result.contains(element)){
result.add(element);
}
else
if(name.equals(element.getQualifiedTypeRefName()))
if(!result.contains(element)){
result.add(element);
}
}
if(!Object.class.equals(type)){
Class cls = type;
while(!Object.class.equals(cls)){
i = s.iterator();
while(i.hasNext()){
NameSpaceElement element = (NameSpaceElement)i.next();
// add the rest afterwards
if(element.getJavaClass().equals(cls) && !result.contains(element)){
result.add(element);
}
}
cls = cls.getSuperclass();
}
}
i = s.iterator();
while(i.hasNext()){
NameSpaceElement element = (NameSpaceElement)i.next();
// add the rest afterwards
if(!result.contains(element)){
result.add(element);
}
}
NameSpaceElement element = xs.getElement("string");
if(!result.contains(element)) result.add(element);
return result;
}