Examples of TypeHierarchy


Examples of client.net.sf.saxon.ce.type.TypeHierarchy

        RoleLocator role = new RoleLocator(RoleLocator.VARIABLE, getVariableQName(), 0);
        //role.setSourceLocator(this);
        sequence = TypeChecker.strictTypeCheck(
                sequence, requiredType, role, visitor.getStaticContext());
        final TypeHierarchy th = visitor.getConfiguration().getTypeHierarchy();
        final ItemType actualItemType = sequence.getItemType(th);

        refineTypeInformation(actualItemType,
                sequence.getCardinality(),
                (sequence instanceof Literal ? ((Literal) sequence).getValue() : null),
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * @return the type hierarchy cache
     */

    public final TypeHierarchy getTypeHierarchy() {
        if (typeHierarchy == null) {
            typeHierarchy = new TypeHierarchy(this);
        }
        return typeHierarchy;
    }
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * Arithmetic: anyAtomicType + AnyAtomicType
     */

    private static class AnyPlusAny extends Calculator {
        public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException {
            TypeHierarchy th = c.getConfiguration().getTypeHierarchy();
            Calculator calc = getCalculator(
                    a.getItemType(th).getPrimitiveType(), b.getItemType(th).getPrimitiveType(), PLUS, true);
            if (calc == null) {
                throw new XPathException("Unsuitable types for + operation (" +
                        Type.displayTypeName(a) + ", " + Type.displayTypeName(b) + ")", "XPTY0004", c);
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * Arithmetic: anyAtomicType - AnyAtomicType
     */

    private static class AnyMinusAny extends Calculator {
        public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException {
            TypeHierarchy th = c.getConfiguration().getTypeHierarchy();
            Calculator calc = getCalculator(
                    a.getItemType(th).getPrimitiveType(), b.getItemType(th).getPrimitiveType(), MINUS, true);
            if (calc == null) {
                throw new XPathException("Unsuitable types for - operation (" +
                        Type.displayTypeName(a) + ", " + Type.displayTypeName(b) + ")", "XPTY0004", c);
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * Arithmetic: anyAtomicType * AnyAtomicType
     */

    private static class AnyTimesAny extends Calculator {
        public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException {
            TypeHierarchy th = c.getConfiguration().getTypeHierarchy();
            Calculator calc = getCalculator(
                    a.getItemType(th).getPrimitiveType(), b.getItemType(th).getPrimitiveType(), TIMES, true);
            if (calc == null) {
                throw new XPathException("Unsuitable types for * operation (" +
                        Type.displayTypeName(a) + ", " + Type.displayTypeName(b) + ")", "XPTY0004", c);
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * Arithmetic: anyAtomicType div AnyAtomicType
     */

    private static class AnyDivAny extends Calculator {
        public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException {
            TypeHierarchy th = c.getConfiguration().getTypeHierarchy();
            Calculator calc = getCalculator(
                    a.getItemType(th).getPrimitiveType(), b.getItemType(th).getPrimitiveType(), DIV, true);
            if (calc == null) {
                throw new XPathException("Unsuitable types for div operation (" +
                        Type.displayTypeName(a) + ", " + Type.displayTypeName(b) + ")", "XPTY0004", c);
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * Arithmetic: anyAtomicType mod AnyAtomicType
     */

    private static class AnyModAny extends Calculator {
        public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException {
            TypeHierarchy th = c.getConfiguration().getTypeHierarchy();
            Calculator calc = getCalculator(
                    a.getItemType(th).getPrimitiveType(), b.getItemType(th).getPrimitiveType(), MOD, true);
            if (calc == null) {
                throw new XPathException("Unsuitable types for mod operation (" +
                        Type.displayTypeName(a) + ", " + Type.displayTypeName(b) + ")", "XPTY0004", c);
View Full Code Here

Examples of client.net.sf.saxon.ce.type.TypeHierarchy

     * Arithmetic: anyAtomicType idiv AnyAtomicType
     */

    private static class AnyIdivAny extends Calculator {
        public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException {
            TypeHierarchy th = c.getConfiguration().getTypeHierarchy();
            Calculator calc = getCalculator(
                    a.getItemType(th).getPrimitiveType(), b.getItemType(th).getPrimitiveType(), IDIV, true);
            if (calc == null) {
                throw new XPathException("Unsuitable types for idiv operation (" +
                        Type.displayTypeName(a) + ", " + Type.displayTypeName(b) + ")", "XPTY0004", c);
View Full Code Here

Examples of edu.cmu.cs.crystal.util.TypeHierarchy

    aliases.addAlias(vars[1], labels[1]);
  }
 
  public TestFullBoundEffects() {
    super(null, null, Variant.PRAGMATIC_VARIANT, null);
    types = new TypeHierarchy() {
      public boolean existsCommonSubtype(String t1, String t2, boolean skipCheck1, boolean skipCheck2) {
        if (!skipCheck1 && isSubtypeCompatible(t1, t2) || !skipCheck2 && isSubtypeCompatible(t2, t1))
          return true;
        else if (t1.equals("Bar"))
          return t2.equals("Baz");
View Full Code Here

Examples of net.sf.saxon.type.TypeHierarchy

    }
   
    if (saxon86Method != null) { // saxon < 8.7.1 && >= 8.6
      try {
        // value.getItemType(config.getNamePool().getTypeHierarchy()).toString();
        TypeHierarchy h = (TypeHierarchy) saxon86Method.invoke(config.getNamePool(), null);
        return value.getItemType(h).toString();
      } catch (Throwable t) {
        throw new RuntimeException(t);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.