/** * Get the static type of the context item as a UType * @return the static context item type */ public UType getContextItemUType() { return itemType.getUType(); }
/** * Get the static type of the context item as a UType * @return the static context item type */ public UType getContextItemUType() { return itemType.getUType(); }
/** * Get the static type of the expression as a UType, following precisely the type * inference rules defined in the XSLT 3.0 specification. * * @return the static item type of the expression according to the XSLT 3.0 defined rules * @param contextItemType The type of the context item (not used) */ @Override public UType getStaticUType(UType contextItemType) { return getItemType().getUType(); }
/** * Get a UType indicating which kinds of items this Pattern can match. * * @return a UType indicating all the primitive types of item that the pattern can match. */ @Override public UType getUType() { return getItemType().getUType(); }
/** * Get the static type of the expression as a UType, following precisely the type * inference rules defined in the XSLT 3.0 specification. * * @return the static item type of the expression according to the XSLT 3.0 defined rules * @param contextItemType The type of the context item (not used) */ @Override public UType getStaticUType(UType contextItemType) { return getItemType().getUType(); }
/** * Get the static type of the expression as a UType, following precisely the type * inference rules defined in the XSLT 3.0 specification. * * @param contextItemType not used * @return the static item type of the expression according to the XSLT 3.0 defined rules */ @Override public UType getStaticUType(UType contextItemType) { return getItemType().getUType(); }
/** * Get the static type of the expression as a UType, following precisely the type * inference rules defined in the XSLT 3.0 specification. * * @param contextItemType not used * @return the static item type of the expression according to the XSLT 3.0 defined rules */ @Override public UType getStaticUType(UType contextItemType) { return getItemType().getUType(); }
/** * Get a UType indicating which kinds of items this Pattern can match. * * @return a UType indicating all the primitive types of item that the pattern can match. */ @Override public UType getUType() { return getItemType().getUType(); }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.ATTRIBUTE; }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.COMMENT; }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.DOCUMENT; }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.PI; }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.TEXT; }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.ELEMENT; }
public boolean subsumes(ItemType other) { return other.getUnderlyingItemType().getUType() == UType.NAMESPACE; }
@Override public boolean conforms(AtomicType keyType, SequenceType valueType, TypeHierarchy th) { if (keyType.getUType() != UType.STRING) { return false; } if (valueType.getPrimaryType().getUType() != UType.ANY_ATOMIC) { return false; } return true; }
private boolean mayReturnStreamedNodes(Expression exp) { // bug 3465: expressions returning streamed nodes cannot be loop-lifted, // because such nodes must not be bound to a variable // TODO: attempt a more rigorous analysis - see bug 3465 return streaming && !exp.getItemType().getUType().intersection(UType.ANY_NODE).equals(UType.VOID); }
/** * Get a UType indicating which kinds of items this Pattern can match. * * @return a UType indicating all the primitive types of item that the pattern can match. */ @Override public UType getUType() { if (getPredicate() instanceof InstanceOfExpression) { return ((InstanceOfExpression) getPredicate()).getRequiredItemType().getUType(); } else { return UType.ANY; } }
private boolean mayReturnStreamedNodes(Expression exp) { // bug 3465: expressions returning streamed nodes cannot be loop-lifted, // because such nodes must not be bound to a variable // TODO: attempt a more rigorous analysis - see bug 3465 return streaming && !exp.getItemType().getUType().intersection(UType.ANY_NODE).equals(UType.VOID); }
/** * Get a UType indicating which kinds of items this Pattern can match. * * @return a UType indicating all the primitive types of item that the pattern can match. */ @Override public UType getUType() { if (getPredicate() instanceof InstanceOfExpression) { return ((InstanceOfExpression) getPredicate()).getRequiredItemType().getUType(); } else { return UType.ANY; } }