@Override public AttributeType buildSuper() { XSDTypeDefinition baseType = xsdType.getBaseType(); if (baseType != null && baseType.getName() != null && !baseType.equals(xsdType)) { return createType(baseType, DUMMY_DEPTH); } else { return null; } }
private static void visitElements( XSDComplexTypeDefinition cType, ElementVisitor visitor, boolean includeParents) { if (includeParents) { LinkedList baseTypes = new LinkedList(); XSDTypeDefinition baseType = cType.getBaseType(); while ((baseType != null) && (baseType != baseType.getBaseType())) { if (baseType instanceof XSDComplexTypeDefinition) { baseTypes.addLast(baseType); } baseType = baseType.getBaseType(); } for (Iterator it = baseTypes.iterator(); it.hasNext(); ) { baseType = (XSDTypeDefinition) it.next(); visitElements((XSDComplexTypeDefinition) baseType, visitor); } } visitElements(cType, visitor); }
XSDTypeDefinition baseType = xsdType.getBaseType(); if (baseType != null && !baseType.equals(xsdType)) { if (baseType.getName() != null) {
private static void visitElements(XSDComplexTypeDefinition cType, ElementVisitor visitor, boolean includeParents) { if(includeParents){ LinkedList baseTypes = new LinkedList(); XSDTypeDefinition baseType = cType.getBaseType(); while(baseType != null && baseType != baseType.getBaseType()){ if(baseType instanceof XSDComplexTypeDefinition){ baseTypes.addLast(baseType); } baseType = baseType.getBaseType(); } for(Iterator it = baseTypes.iterator(); it.hasNext();){ baseType = (XSDTypeDefinition) it.next(); visitElements((XSDComplexTypeDefinition) baseType, visitor); } } visitElements(cType, visitor); }
private static void visitElements(XSDComplexTypeDefinition cType, ElementVisitor visitor, boolean includeParents) { if (includeParents) { LinkedList baseTypes = new LinkedList(); XSDTypeDefinition baseType = cType.getBaseType(); while ((baseType != null) && (baseType != baseType.getBaseType())) { if (baseType instanceof XSDComplexTypeDefinition) { baseTypes.addLast(baseType); } baseType = baseType.getBaseType(); } for (Iterator it = baseTypes.iterator(); it.hasNext();) { baseType = (XSDTypeDefinition) it.next(); visitElements((XSDComplexTypeDefinition) baseType, visitor); } } visitElements(cType, visitor); }
private static void visitElements(XSDComplexTypeDefinition cType, ElementVisitor visitor, boolean includeParents) { if (includeParents) { LinkedList baseTypes = new LinkedList(); XSDTypeDefinition baseType = cType.getBaseType(); while ((baseType != null) && (baseType != baseType.getBaseType())) { if (baseType instanceof XSDComplexTypeDefinition) { baseTypes.addLast(baseType); } baseType = baseType.getBaseType(); } for (Iterator it = baseTypes.iterator(); it.hasNext();) { baseType = (XSDTypeDefinition) it.next(); visitElements((XSDComplexTypeDefinition) baseType, visitor); } } visitElements(cType, visitor); }
private void fillTypesCombo() { baseTypeCombo.removeAll(); baseTypeCombo.add(Messages._UI_ACTION_BROWSE); baseTypeCombo.add(Messages._UI_ACTION_NEW); // Add the current Type of this attribute if needed XSDComplexTypeDefinition complexType = (XSDComplexTypeDefinition) input; XSDTypeDefinition baseType = complexType.getBaseType(); if (baseType != null && baseType.getQName() != null) { String currentTypeName = baseType.getQName(xsdSchema); //no prefix if (currentTypeName != null && !currentTypeName.equals("anyType")) baseTypeCombo.add(currentTypeName); } }