Package org.apache.vxquery.exceptions

Examples of org.apache.vxquery.exceptions.SystemException


                                XDMConstants.setEmptyString(result);
                                return;
                            }
                            // Pass through if not empty sequence.
                        default:
                            throw new SystemException(ErrorCode.XPDY0002);
                    }

                    result.set(abvs);
                } catch (IOException e) {
                    throw new SystemException(ErrorCode.SYSE0001, e);
                }
            }

        };
    }
View Full Code Here


                    try {
                        abvsSum.reset();
                        dOutSum.write(tvp.getByteArray(), tvp.getStartOffset(), tvp.getLength());
                        tvpSum.set(abvsSum);
                    } catch (IOException e) {
                        throw new SystemException(ErrorCode.SYSE0001, e.toString());
                    }
                } else {
                    FunctionHelper.arithmeticOperation(aOp, dCtx, tvp, tvpSum, tvpSum);
                }
                count++;
View Full Code Here

                    dCtx.getCurrentDateTime(datetimep);
                    abvsInner.reset();
                    castToDateTime.convertDatetime(datetimep, dOutInner);
                    result.set(abvsInner);
                } catch (IOException e) {
                    throw new SystemException(ErrorCode.SYSE0001, e);
                }
            }
        };
    }
View Full Code Here

                    tvp1.getValue(seqp);
                    if (seqp.getEntryCount() == 0) {
                        XDMConstants.setEmptySequence(result);
                        return;
                    } else {
                        throw new SystemException(ErrorCode.FORG0006);
                    }
                } else {
                    if (!FunctionHelper.isDerivedFromString(tvp1.getTag())) {
                        throw new SystemException(ErrorCode.FORG0006);
                    }
                    tvp1.getValue(stringp);
                    if (stringp.getLength() == 2) {
                        XDMConstants.setEmptySequence(result);
                        return;
                    }
                }

                // Return sequence of character values.
                try {
                    charIterator.reset();
                    abvs.reset();
                    sb.reset(abvs);
                    int c;
                    while ((c = charIterator.next()) != ICharacterIterator.EOS_CHAR) {
                        abvsInner.reset();
                        dOutInner.write(ValueTag.XS_INTEGER_TAG);
                        dOutInner.writeLong(c);
                        sb.addItem(abvsInner);
                    }

                    sb.finish();
                    result.set(abvs);
                } catch (IOException e) {
                    throw new SystemException(ErrorCode.SYSE0001);
                }
            }
        };
    }
View Full Code Here

                // Set the timezone to UTC.
                date[3] = 0;
                date[4] = 0;
            } else {
                // Invalid date format.
                throw new SystemException(ErrorCode.FORG0001);
            }
        }
        // Final touches on seconds and timezone.
        date[2] = (long) (date[2] * Math.pow(10, decimalPlace));
        if (!positiveTimezone && date[3] != DateTime.TIMEZONE_HOUR_NULL) {
            date[3] *= -1;
        }
        if (!positiveTimezone && date[4] != DateTime.TIMEZONE_MINUTE_NULL) {
            date[4] *= -1;
        }
        if (date[0] == 24) {
            date[0] = 0;
        }

        // Double check for a valid time
        if (!DateTime.valid(1972, 12, 31, date[0], date[1], date[2], date[3], date[4])) {
            throw new SystemException(ErrorCode.FORG0001);
        }

        dOut.write(ValueTag.XS_TIME_TAG);
        dOut.write((byte) date[0]);
        dOut.write((byte) date[1]);
View Full Code Here

            abvs.getByteArray()[1] = (byte) (((abvs.getLength() - 3) >>> 8) & 0xFF);
            abvs.getByteArray()[2] = (byte) (((abvs.getLength() - 3) >>> 0) & 0xFF);

            result.set(abvs.getByteArray(), abvs.getStartOffset(), abvs.getLength());
        } catch (IOException e) {
            throw new SystemException(ErrorCode.SYSE0001, e);
        }
    }
View Full Code Here

    private XSDecimalPointable decp2 = (XSDecimalPointable) XSDecimalPointable.FACTORY.createPointable();

    @Override
    public void operateDateDate(XSDatePointable datep, XSDatePointable datep2, DynamicContext dCtx, DataOutput dOut)
            throws SystemException, IOException {
        throw new SystemException(ErrorCode.XPTY0004);
    }
View Full Code Here

    }

    @Override
    public void operateDateDTDuration(XSDatePointable datep, LongPointable longp, DataOutput dOut)
            throws SystemException, IOException {
        throw new SystemException(ErrorCode.XPTY0004);
    }
View Full Code Here

    }

    @Override
    public void operateDatetimeDatetime(XSDateTimePointable datetimep, XSDateTimePointable datetimep2,
            DynamicContext dCtx, DataOutput dOut) throws SystemException, IOException {
        throw new SystemException(ErrorCode.XPTY0004);
    }
View Full Code Here

    }

    @Override
    public void operateDatetimeDTDuration(XSDateTimePointable datetimep, LongPointable longp, DataOutput dOut)
            throws SystemException, IOException {
        throw new SystemException(ErrorCode.XPTY0004);
    }
View Full Code Here

TOP

Related Classes of org.apache.vxquery.exceptions.SystemException

Copyright © 2018 www.massapicom. 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.