Package edu.uci.ics.hyracks.data.std.util

Examples of edu.uci.ics.hyracks.data.std.util.ArrayBackedValueStorage.reset()


            final FunctionHelper.TypedPointables tp = new FunctionHelper.TypedPointables();
            AbstractCastToOperation aOp = new CastToStringOperation();

            @Override
            protected void evaluate(TaggedValuePointable tvp, IPointable result) throws SystemException {
                abvs.reset();
                int tid = tvp.getTag();
                try {
                    switch (tid) {
                    /**
                     * Primitive Datatypes (Alphabetical)
View Full Code Here


                    abvs.reset();
                    dOut.write(ValueTag.XS_QNAME_TAG);
                    dOut.write(paramURI.getByteArray(), paramURI.getStartOffset(), paramURI.getLength());

                    // Separate the local name and prefix.
                    abvsParamQName.reset();
                    ICharacterIterator charIterator = new UTF8StringCharacterIterator(paramQName);
                    charIterator.reset();
                    int c = 0;
                    int prefixLength = 0;
                    while ((c = charIterator.next()) != ICharacterIterator.EOS_CHAR) {
View Full Code Here

                }
                tvp1.getValue(qnamep);
                qnamep.getLocalName(stringp);

                try {
                    abvs.reset();
                    dOut.write(ValueTag.XS_NCNAME_TAG);
                    dOut.write(stringp.getByteArray(), stringp.getStartOffset(), stringp.getLength());
                    result.set(abvs);
                } catch (Exception e) {
                    throw new SystemException(ErrorCode.SYSE0001, e);
View Full Code Here

                try {
                    // Return empty sequence if no prefix.
                    if (qnamep.getPrefixLength() == 0) {
                        XDMConstants.setEmptySequence(result);
                    } else {
                        abvs.reset();
                        dOut.write(ValueTag.XS_NCNAME_TAG);
                        dOut.write(stringp.getByteArray(), stringp.getStartOffset(), stringp.getLength());
                        result.set(abvs);
                    }
                } catch (Exception e) {
View Full Code Here

                try {
                    if (qnamep.getUriLength() == 0) {
                        XDMConstants.setEmptyString(result);
                    } else {
                        abvs.reset();
                        dOut.write(ValueTag.XS_NCNAME_TAG);
                        dOut.write(stringp.getByteArray(), stringp.getStartOffset(), stringp.getLength());
                        result.set(abvs);
                    }
                } catch (Exception e) {
View Full Code Here

             * @throws IOException
             */
            public long getLongFromArgument(TaggedValuePointable tvp) throws SystemException, IOException {
                if (tvp.getTag() == ValueTag.XS_DOUBLE_TAG) {
                    tvp.getValue(doublep);
                    abvsRound.reset();
                    round.operateDouble(doublep, abvsRound.getDataOutput());
                    doublep.set(abvsRound.getByteArray(), abvsRound.getStartOffset() + 1,
                            DoublePointable.TYPE_TRAITS.getFixedLength());
                    return doublep.longValue();
                } else if (tvp.getTag() == ValueTag.XS_INTEGER_TAG) {
View Full Code Here

        final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
        return new AbstractTaggedValueArgumentScalarEvaluator(args) {
            @Override
            protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {
                try {
                    abvs.reset();
                    sb.reset(abvs);
                    for (int i = 0; i < args.length; ++i) {
                        TaggedValuePointable tvp = args[i];
                        if (tvp.getTag() == ValueTag.SEQUENCE_TAG) {
                            tvp.getValue(seq);
View Full Code Here

                    abvs.reset();
                    sb.reset(abvs);
                    for (int i = 0; i < list.length; ++i) {
                        // Add the document node to the sequence.
                        abvsFileNode.reset();
                        FunctionHelper.readInDocFromString(list[i].getPath(), in, abvsFileNode);
                        nodep.set(abvsFileNode.getByteArray(), abvsFileNode.getStartOffset(), abvsFileNode.getLength());
                        sb.addItem(nodep);
                    }
                    sb.finish();
View Full Code Here

                }
            }

            private void getDecimalPointable(TypedPointables tp, TaggedValuePointable tvp) throws SystemException,
                    IOException {
                abvsInner.reset();
                long value;
                switch (tvp.getTag()) {
                    case ValueTag.XS_DECIMAL_TAG:
                        tvp.getValue(tp.decp);
                        return;
View Full Code Here

                                case ValueTag.XS_UNSIGNED_INT_TAG:
                                case ValueTag.XS_SHORT_TAG:
                                case ValueTag.XS_UNSIGNED_SHORT_TAG:
                                case ValueTag.XS_BYTE_TAG:
                                case ValueTag.XS_UNSIGNED_BYTE_TAG:
                                    abvsInteger.reset();
                                    getIntegerPointable(tp, tvp, dOutInteger);
                                    longp.set(abvsInteger.getByteArray(), abvsInteger.getStartOffset() + 1,
                                            LongPointable.TYPE_TRAITS.getFixedLength());
                            }
                            aOp.operateInteger(longp, dOut);
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.