/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
XSComplexType lastType = getLastRestrictedType(baseType);
XSComplexType lastType = getLastRestrictedType(baseType);
XSComplexType lastType = getLastRestrictedType(baseType);
XSComplexType lastType = getLastRestrictedType(baseType);
XSComplexType lastType = getLastRestrictedType(baseType);