Package org.exist.xquery

Examples of org.exist.xquery.XPathException


            case Type.STRING :
                return new StringValue(getStringValue());
            case Type.UNTYPED_ATOMIC :
                return new UntypedAtomicValue(getStringValue());
            default :
                throw new XPathException(
                    "Type error: cannot cast xs:time to "
                        + Type.getTypeName(requiredType));
        }
    }
View Full Code Here


    protected QName getXMLSchemaType() {
        return DatatypeConstants.GYEAR;
    }

    public ComputableValue minus(ComputableValue other) throws XPathException {
        throw new XPathException("Subtraction is not supported on values of type " +
                Type.getTypeName(getType()));
    }
View Full Code Here

            baos.close();
            return BinaryValueFromInputStream.getInstance(context, new Base64BinaryValueType(), new ByteArrayInputStream(baos.toByteArray()));
        }
        catch(IOException ioe)
        {
            throw new XPathException(this, ioe.getMessage());
        }
    }
View Full Code Here

            return results;
        }
        catch(IOException ioe)
        {
            LOG.error(ioe.getMessage(), ioe);
            throw new XPathException(this, ioe.getMessage(), ioe);
        }
        finally
        {
            if(zis != null)
            {
View Full Code Here

                case Constants.LT:
                    return value < 0;
                case Constants.LTEQ:
                    return value <= 0;
                default:
                    throw new XPathException("Type error: cannot apply operator to numeric value");
            }
        } else {
            throw new XPathException("Cannot compare value of type xs:hexBinary with " + Type.getTypeName(other.getType()));
        }
    }
View Full Code Here

    @Override
    public int compareTo(Collator collator, AtomicValue other) throws XPathException {
        if (other.getType() == Type.HEX_BINARY || other.getType() == Type.BASE64_BINARY) {
            return compareTo((BinaryValue)other);
        } else {
            throw new XPathException("Cannot compare value of type xs:hexBinary with " + Type.getTypeName(other.getType()));
        }
    }
View Full Code Here

                LOG.error("Unable to Stream BinaryValue to byte[]: " + ioe.getMessage(), ioe);
            }

        }

        throw new XPathException("Cannot convert value of type " + Type.getTypeName(getType()) + " to Java object of type " + target.getName());
    }
View Full Code Here

      return (T)toJavaObject(byte[].class);
    }

    @Override
    public AtomicValue max(Collator collator, AtomicValue other) throws XPathException {
        throw new XPathException("Cannot compare values of type " + Type.getTypeName(getType()));
    }
View Full Code Here

        throw new XPathException("Cannot compare values of type " + Type.getTypeName(getType()));
    }

    @Override
    public AtomicValue min(Collator collator, AtomicValue other) throws XPathException {
        throw new XPathException("Cannot compare values of type " + Type.getTypeName(getType()));
    }
View Full Code Here

                case Type.STRING:
                    //TODO still needed? Added trim() since it looks like a new line character is added
                    result = new StringValue(getStringValue());
                    break;
                default:
                    throw new XPathException("cannot convert " + Type.getTypeName(getType()) + " to " + Type.getTypeName(requiredType));
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.exist.xquery.XPathException

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.