Exemplo n.º 1
0
 public static List getInheritedXSDElementsAndAttributes(XSDComplexTypeDefinition complexType) {
   List result = new ArrayList();
   XSDTypeDefinition parent = complexType.getBaseTypeDefinition();
   if (parent instanceof XSDComplexTypeDefinition && complexType.isSetDerivationMethod()) {
     // order switched, from the XSDUtils version
     result.addAll(getInheritedXSDElementsAndAttributes((XSDComplexTypeDefinition) parent));
     result.addAll(XSDUtils.getXSDElementsAndAttributes((XSDComplexTypeDefinition) parent));
   }
   return result;
 }
Exemplo n.º 2
0
 protected void addComplexTypeContent(XSDComplexTypeDefinition complexType, Vector<TreeNode> v) {
   List attrs = getInheritedXSDElementsAndAttributes(complexType);
   attrs.addAll(XSDUtils.getXSDElementsAndAttributes(complexType));
   for (Iterator it = attrs.iterator(); it.hasNext(); ) {
     Object attr = it.next();
     if (attr instanceof XSDAttributeDeclaration) {
       v.add(new XSDAttributeDeclarationTreeNode((XSDAttributeDeclaration) attr, isCondensed));
     } else if (attr instanceof XSDElementDeclaration) {
       v.add(new XSDElementDeclarationTreeNode((XSDElementDeclaration) attr, isCondensed));
     } else if (attr instanceof XSDComplexTypeDefinition) {
       v.add(new XSDTypeDefinitionTreeNode((XSDComplexTypeDefinition) attr, isCondensed));
     }
   }
 }
Exemplo n.º 3
0
 protected boolean complexTypeHasChildren(XSDComplexTypeDefinition complexType) {
   if (!XSDUtils.getXSDElementsAndAttributes(complexType).isEmpty()) return true;
   if (!getInheritedXSDElementsAndAttributes(complexType).isEmpty()) return true;
   return false;
 }