/** * Determine the data type of the items returned by the expression, if possible * @return a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER. For this class, the * result is always an atomic type, but it might be more specific. * @param th the type hierarchy cache */ public ItemType getItemType(TypeHierarchy th) { return getAtomizedItemType(operand, untyped, th); }
/** * Determine the data type of the items returned by the expression, if possible * @return a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER. For this class, the * result is always an atomic type, but it might be more specific. * @param th the type hierarchy cache */ public ItemType getItemType(TypeHierarchy th) { return getAtomizedItemType(operand, untyped, th); }
/** * Determine the data type of the items returned by the expression, if possible * @return a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER. For this class, the * result is always an atomic type, but it might be more specific. * @param th the type hierarchy cache */ public ItemType getItemType(TypeHierarchy th) { return getAtomizedItemType(operand, untyped, th); }
/** * Determine the item type of the value returned by the function * * @param th the type hierarchy cache * @return the statically inferred type of the expression */ public ItemType getItemType(TypeHierarchy th) { ItemType t = Atomizer.getAtomizedItemType(argument[0], false, th); if (t.getPrimitiveType() == StandardNames.XS_UNTYPED_ATOMIC) { return BuiltInAtomicType.DOUBLE; } else { return t; } }
/** * Determine the item type of the value returned by the function * * @param th the type hierarchy cache * @return the statically inferred type of the expression */ public ItemType getItemType(TypeHierarchy th) { ItemType t = Atomizer.getAtomizedItemType(argument[0], false, th); if (t.getPrimitiveType() == StandardNames.XS_UNTYPED_ATOMIC) { return BuiltInAtomicType.DOUBLE; } else { return t; } }
/** * Determine the item type of the value returned by the function * * @param th the type hierarchy cache * @return the statically inferred type of the expression */ public ItemType getItemType(TypeHierarchy th) { ItemType t = Atomizer.getAtomizedItemType(argument[0], false, th); if (t.getPrimitiveType() == StandardNames.XS_UNTYPED_ATOMIC) { return BuiltInAtomicType.DOUBLE; } else { return t; } }
public ItemType getResultItemType(Expression[] args) { TypeHierarchy th = getRetainedStaticContext().getConfiguration().getTypeHierarchy(); ItemType base = Atomizer.getAtomizedItemType(args[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; } return base.getPrimitiveItemType(); }
public ItemType getResultItemType(Expression[] args) { TypeHierarchy th = getRetainedStaticContext().getConfiguration().getTypeHierarchy(); ItemType base = Atomizer.getAtomizedItemType(args[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; } return base.getPrimitiveItemType(); }
case SUM: { ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { return BuiltInAtomicType.DOUBLE;
case SUM: { ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { return BuiltInAtomicType.DOUBLE;
case SUM: { ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; ItemType base = Atomizer.getAtomizedItemType(argument[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { return BuiltInAtomicType.DOUBLE;
/** * Determine the data type of the items returned by the expression, if possible * * @return a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER. For this class, the * result is always an atomic type, but it might be more specific. */ /*@NotNull*/ public ItemType getItemType() { operandItemType = getBaseExpression().getItemType(); TypeHierarchy th = getConfiguration().getTypeHierarchy(); return getAtomizedItemType(getBaseExpression(), untyped, th); }
/** * Determine the data type of the items returned by the expression, if possible * * @return a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER. For this class, the * result is always an atomic type, but it might be more specific. */ /*@NotNull*/ public ItemType getItemType() { operandItemType = getBaseExpression().getItemType(); TypeHierarchy th = getConfiguration().getTypeHierarchy(); return getAtomizedItemType(getBaseExpression(), untyped, th); }
public ItemType getResultItemType(Expression[] args) { TypeHierarchy th = getRetainedStaticContext().getConfiguration().getTypeHierarchy(); ItemType base = Atomizer.getAtomizedItemType(args[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; } if (Cardinality.allowsZero(args[0].getCardinality())) { if (getArity() == 1) { return Type.getCommonSuperType(base, BuiltInAtomicType.INTEGER, th); } else { return Type.getCommonSuperType(base, args[1].getItemType(), th); } } else { return base.getPrimitiveItemType(); } }
public ItemType getResultItemType(Expression[] args) { TypeHierarchy th = getRetainedStaticContext().getConfiguration().getTypeHierarchy(); ItemType base = Atomizer.getAtomizedItemType(args[0], false, th); if (base.equals(BuiltInAtomicType.UNTYPED_ATOMIC)) { base = BuiltInAtomicType.DOUBLE; } if (Cardinality.allowsZero(args[0].getCardinality())) { if (getArity() == 1) { return Type.getCommonSuperType(base, BuiltInAtomicType.INTEGER, th); } else { return Type.getCommonSuperType(base, args[1].getItemType(), th); } } else { return base.getPrimitiveItemType(); } }