Package javax.xml.xquery

Examples of javax.xml.xquery.XQException


        checkNotClosed();
        if (item instanceof AtomicValue) {
            AtomicValue prim = ((AtomicValue)item);
            return (byte)longValue(prim, Long.MIN_VALUE, Long.MAX_VALUE);
        }
        throw new XQException("Failed in getLong: item is not an atomic value, or is closed");
    }
View Full Code Here


    }

    public Node getNode() throws XQException {
        checkNotClosed();
        if (!(item instanceof NodeInfo)) {
            throw new XQException("Failed in getNode: item is an atomic value, or is closed");
        }
        if (item instanceof VirtualNode) {
            Object n = ((VirtualNode)item).getRealNode();
            if (n instanceof Node) {
                return (Node)n;
View Full Code Here

                if (systemId == null) {
                    return new URI("");
                }
                return new URI(systemId);
            } catch (URISyntaxException e) {
                throw new XQException("System ID of node is not a valid URI");
            }
        }
        throw new XQException("Item is not a node");
    }
View Full Code Here

        checkNotClosed();
        if (item instanceof AtomicValue) {
            AtomicValue prim = ((AtomicValue)item);
            return (byte)longValue(prim, Short.MIN_VALUE, Short.MAX_VALUE);
        }
        throw new XQException("Failed in getShort: item is not an atomic value, or is closed");
    }
View Full Code Here

            TreeReceiver tr = new TreeReceiver(out);
            tr.open();
            tr.append(item, 0, NodeInfo.ALL_NAMESPACES);
            tr.close();
        } catch (XPathException e) {
            XQException xqe = new XQException(e.getMessage());
            xqe.initCause(e);
            throw xqe;
        }
    }
View Full Code Here

        writeItemToResult(new SAXResult(saxHandler));
    }

    private void checkNotNull(Object arg) throws XQException {
        if (arg == null) {
            throw new XQException("Argument is null");
        }
    }
View Full Code Here

    public String getNamespaceURI(String prefix) throws XQException {
        checkNotNull(prefix);
        String uri = (String)namespaces.get(prefix);
        if (uri == null) {
            throw new XQException("Unknown prefix");
        }
        return uri;
    }
View Full Code Here

            case XQConstants.BINDING_MODE_IMMEDIATE:
            case XQConstants.BINDING_MODE_DEFERRED:
                this.bindingMode = bindingMode;
                break;
            default:
                throw new XQException("Invalid value for binding mode - " + bindingMode);
        }
    }
View Full Code Here

                break;
            case XQConstants.BOUNDARY_SPACE_STRIP:
                preserveBoundarySpace = false;
                break;
            default:
                throw new XQException("Invalid value for boundary space policy - " + policy);
        }
    }
View Full Code Here

                break;
            case XQConstants.CONSTRUCTION_MODE_STRIP:
                constructionModeIsPreserve = false;
                break;
            default:
                throw new XQException("Invalid value for construction mode - " + mode);
        }
    }
View Full Code Here

TOP

Related Classes of javax.xml.xquery.XQException

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.