/** * Ask whether values of this type are atomizable * * @return true if some or all instances of this type can be successfully atomized; false * * if no instances of this type can be atomized * @param th The type hierarchy cache */ @Override public boolean isAtomizable(TypeHierarchy th) { // An instance of a specific function type can be atomized only if it is an array, which // means there must be a single argument and it must be of type xs:integer or a supertype. if (getArity() != 1) { return false; } ItemType argType = getArgumentTypes()[0].getPrimaryType(); return th.isSubType(BuiltInAtomicType.INTEGER, argType); }
/** * Ask whether values of this type are atomizable * * @return true if some or all instances of this type can be successfully atomized; false * * if no instances of this type can be atomized * @param th The type hierarchy cache */ @Override public boolean isAtomizable(TypeHierarchy th) { // An instance of a specific function type can be atomized only if it is an array, which // means there must be a single argument and it must be of type xs:integer or a supertype. if (getArity() != 1) { return false; } ItemType argType = getArgumentTypes()[0].getPrimaryType(); return th.isSubType(BuiltInAtomicType.INTEGER, argType); }
if (getArity() == 1) { if (argTypes[0].getCardinality() == StaticProperty.EXACTLY_ONE && argTypes[0].getPrimaryType().isPlainType()) { String s = "The function arity is " + getArity() + "; a map can only be supplied for a function type with arity 1"; return Optional.of(s); if (getArity() == 1) { if (argTypes[0].getCardinality() == StaticProperty.EXACTLY_ONE && argTypes[0].getPrimaryType().isPlainType()) { String s = "The function arity is " + getArity() + "; an array can only be supplied for a function type with arity 1"; return Optional.of(s); if (getArity() != ((Function) item).getArity()) { String s = "The required function arity is " + getArity() + "; the supplied function has arity " + ((Function) item).getArity(); return Optional.of(s); return Optional.of(s); for (int j=0; j<getArity(); j++) { rel = th.sequenceTypeRelationship(argTypes[j], other.getArgumentTypes()[j]); if (rel != TypeHierarchy.SAME_TYPE && rel != TypeHierarchy.SUBSUMED_BY) {
if (getArity() == 1) { if (argTypes[0].getCardinality() == StaticProperty.EXACTLY_ONE && argTypes[0].getPrimaryType().isPlainType()) { String s = "The function arity is " + getArity() + "; a map can only be supplied for a function type with arity 1"; return Optional.of(s); if (getArity() == 1) { if (argTypes[0].getCardinality() == StaticProperty.EXACTLY_ONE && argTypes[0].getPrimaryType().isPlainType()) { String s = "The function arity is " + getArity() + "; an array can only be supplied for a function type with arity 1"; return Optional.of(s); if (getArity() != ((Function) item).getArity()) { String s = "The required function arity is " + getArity() + "; the supplied function has arity " + ((Function) item).getArity(); return Optional.of(s); return Optional.of(s); for (int j=0; j<getArity(); j++) { rel = th.sequenceTypeRelationship(argTypes[j], other.getArgumentTypes()[j]); if (rel != TypeHierarchy.SAME_TYPE && rel != TypeHierarchy.SUBSUMED_BY) {