/** * Determine whether one atomic type is a subtype of another (without access to the TypeHierarchy object) * @param one the first atomic type * @param two the second atomic type * @return true if the first atomic type is equal to, or derived by restriction from, the second atomic * type */ public static boolean isSubType(AtomicType one, AtomicType two) { while (true) { if (one.getFingerprint() == two.getFingerprint()) { return true; } SchemaType s = one.getBaseType(); if (s instanceof AtomicType) { one = (AtomicType)s; } else { return false; } } }
/** * Determine whether one atomic type is a subtype of another (without access to the TypeHierarchy object) * @param one the first atomic type * @param two the second atomic type * @return true if the first atomic type is equal to, or derived by restriction from, the second atomic * type */ public static boolean isSubType(AtomicType one, AtomicType two) { while (true) { if (one.getFingerprint() == two.getFingerprint()) { return true; } SchemaType s = one.getBaseType(); if (s instanceof AtomicType) { one = (AtomicType)s; } else { return false; } } }
return value; } else { t = t.getBaseType() instanceof AtomicType ? (AtomicType) t.getBaseType() : null;
return value; } else { t = t.getBaseType() instanceof AtomicType ? (AtomicType) t.getBaseType() : null;
return value; } else { t = t.getBaseType() instanceof AtomicType ? (AtomicType) t.getBaseType() : null;
return value; } else { t = t.getBaseType() instanceof AtomicType ? (AtomicType) t.getBaseType() : null;
return SUBSUMES; SchemaType st = t.getBaseType(); if (st instanceof AtomicType) { t = (AtomicType)st; return SUBSUMED_BY; SchemaType st = t.getBaseType(); if (st instanceof AtomicType) { t = (AtomicType)st;
return SUBSUMES; SchemaType st = t.getBaseType(); if (st instanceof AtomicType) { t = (AtomicType)st; return SUBSUMED_BY; SchemaType st = t.getBaseType(); if (st instanceof AtomicType) { t = (AtomicType)st;