/** * Determine whether the definition contains xsd:any (directly or indirectly) */ private boolean isAny(XSTerm term) { if (term.isWildcard()) { return true; } if (term.isModelGroup()) { XSParticle[] children = term.asModelGroup().getChildren(); if (children != null) { for (XSParticle childParticle : children) { XSTerm childTerm = childParticle.getTerm(); if (childTerm != null) { if (isAny(childTerm)) { return true; } } } } } return false; }
public boolean isApplicable(XSComplexType ct) { if (!bgmBuilder.model.options.contentForWildcard) { return false; } XSType bt = ct.getBaseType(); if (bt ==schemas.getAnyType() && ct.getContentType() != null) { XSParticle part = ct.getContentType().asParticle(); if ((part != null) && (part.getTerm().isModelGroup())) { XSParticle[] parts = part.getTerm().asModelGroup().getChildren(); int wildcardCount = 0; int i = 0; while ((i < parts.length) && (wildcardCount <= 1)) { if (parts[i].getTerm().isWildcard()) { wildcardCount += 1; } i++; } return (wildcardCount > 1); } } return false; }
public boolean isApplicable(XSComplexType ct) { if (!bgmBuilder.model.options.contentForWildcard) { return false; } XSType bt = ct.getBaseType(); if (bt ==schemas.getAnyType() && ct.getContentType() != null) { XSParticle part = ct.getContentType().asParticle(); if ((part != null) && (part.getTerm().isModelGroup())) { XSParticle[] parts = part.getTerm().asModelGroup().getChildren(); int wildcardCount = 0; int i = 0; while ((i < parts.length) && (wildcardCount <= 1)) { if (parts[i].getTerm().isWildcard()) { wildcardCount += 1; } i++; } return (wildcardCount > 1); } } return false; }
public boolean isApplicable(XSComplexType ct) { if (!bgmBuilder.model.options.contentForWildcard) { return false; } XSType bt = ct.getBaseType(); if (bt ==schemas.getAnyType() && ct.getContentType() != null) { XSParticle part = ct.getContentType().asParticle(); if ((part != null) && (part.getTerm().isModelGroup())) { XSParticle[] parts = part.getTerm().asModelGroup().getChildren(); int wildcardCount = 0; int i = 0; while ((i < parts.length) && (wildcardCount <= 1)) { if (parts[i].getTerm().isWildcard()) { wildcardCount += 1; } i++; } return (wildcardCount > 1); } } return false; }