Examples of AtomicComparer


Examples of client.net.sf.saxon.ce.expr.sort.AtomicComparer

     * @return the AtomicComparer already allocated if one has been allocated at compile time; otherwise
     * allocate one from knowledge of the collation at run-time
     */

    public AtomicComparer makeAtomicComparer(XPathContext context) throws XPathException {
        AtomicComparer comp = atomicComparer;
        if (comp == null) {
            int type = argument[0].getItemType(context.getConfiguration().getTypeHierarchy()).getPrimitiveType();
            comp = makeAtomicSortComparer(type, context);
        } else {
            comp = comp.provideContext(context);
        }
        return comp;
    }
View Full Code Here

Examples of client.net.sf.saxon.ce.expr.sort.AtomicComparer

    /**
    * Evaluate the function to return an iteration of selected values or nodes.
    */

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        AtomicComparer comp = makeAtomicComparer(context);
        SequenceIterator iter = argument[0].iterate(context);
        return new DistinctIterator(iter, comp);
    }
View Full Code Here

Examples of client.net.sf.saxon.ce.expr.sort.AtomicComparer

    /**
    * Evaluate the function
    */

    public Item evaluateItem(XPathContext context) throws XPathException {
        AtomicComparer comparer = getAtomicComparer(context);
        SequenceIterator iter = argument[0].iterate(context);
        try {
            return minimax(iter, operation, comparer, ignoreNaN, context);
        } catch (XPathException err) {
            err.maybeSetLocation(getSourceLocator());
View Full Code Here

Examples of client.net.sf.saxon.ce.expr.sort.AtomicComparer

        StringCollator collator = getCollator(1, context);
        BuiltInAtomicType type = argumentType;
        if (type == BuiltInAtomicType.UNTYPED_ATOMIC) {
            type = BuiltInAtomicType.DOUBLE;
        }
        AtomicComparer comparer =
                GenericAtomicComparer.makeAtomicComparer(type, type, collator, context);
        return comparer;
    }
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer

    /**
    * Evaluate the function to return an iteration of selected values or nodes.
    */

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        AtomicComparer comp = atomicComparer;
        if (comp == null) {
            int type = argument[0].getItemType(context.getConfiguration().getTypeHierarchy()).getPrimitiveType();
            comp = makeAtomicSortComparer(type, context);
        } else {
            comp = comp.provideContext(context);
        }
        SequenceIterator iter = argument[0].iterate(context);
        return new DistinctIterator(iter, comp);
    }
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer

        //AtomicComparer comparer = getAtomicComparer(1, context);
        BuiltInAtomicType type = argumentType;
        if (type == BuiltInAtomicType.UNTYPED_ATOMIC) {
            type = BuiltInAtomicType.DOUBLE;
        }
        AtomicComparer comparer =
                GenericAtomicComparer.makeAtomicComparer(type, type, collator, context);
        SequenceIterator iter = argument[0].iterate(context);
        try {
            return minimax(iter, operation, comparer, ignoreNaN, context);
        } catch (XPathException err) {
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer

                sortKey.expression = new Atomizer(key);
            }

            SortKeyDefinition sk = new SortKeyDefinition();
            sk.setSortKey(sortKey.expression);
            AtomicComparer comp = sk.makeComparator(context);
            AtomicComparer[] comps = {comp};

            iterator = new SortedIterator(context, iterator, this, comps);
            ((SortedIterator)iterator).setHostLanguage(Configuration.XPATH);
        }
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer

            throw new IllegalArgumentException("Other Node must be a Saxon NodeInfo");
        }
        return DeepEqual.deepEquals(
                SingletonIterator.makeIterator(this),
                SingletonIterator.makeIterator((NodeInfo)arg),
                new AtomicComparer(CodepointCollator.getInstance()),
                getDocumentRoot().getConfiguration());
    }
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer

    /**
    * Evaluate the function to return an iteration of selected nodes.
    */

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        AtomicComparer comparer = getAtomicComparer(2, context);
        SequenceIterator seq = argument[0].iterate(context);
        AtomicValue val = (AtomicValue)argument[1].evaluateItem(context);
        return new IndexIterator(seq, val, comparer);
    }
View Full Code Here

Examples of net.sf.saxon.sort.AtomicComparer

    * If this argument was not supplied, the default collation is used
    * @param context The dynamic evaluation context.
    */

    protected AtomicComparer getAtomicComparer(int arg, XPathContext context) throws XPathException {
        return new AtomicComparer(getCollator(arg, context, true));
    }
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.