Examples of XQItemType


Examples of javax.xml.xquery.XQItemType

    List<Boolean> results = new ArrayList<Boolean>();
    try {
      //check for boolean or string type and convert it accordingly, if a node then get it's text
      //content and convert to boolean
      while(result.next()) {
        XQItemType type = result.getItemType();
        Boolean value = convertToBoolean(type, result);
        if(value == null && isNodeType(type)) {
          Node n = result.getNode();
          value = Boolean.valueOf(transformNodeToString(n));
        }
View Full Code Here

Examples of javax.xml.xquery.XQItemType

  public List<Number> mapResults(XQResultSequence result) {
    List<Number> results = new ArrayList<Number>();
    try {
      while(result.next()) {

        XQItemType type = result.getItemType();
        Number value = convertToNumber(type, result);
        if(value == null && isNodeType(type)) {
          Node n = result.getNode();
          String strValue = transformNodeToString(n);
          if(StringUtils.hasText(strValue)) {
View Full Code Here

Examples of javax.xml.xquery.XQItemType

  public List<Node> mapResults(XQResultSequence result) {
    List<Node> results = new ArrayList<Node>();
    try {
      while(result.next()) {
        XQItemType type = result.getItemType();
        if(isNodeType(type)) {
          Node n = result.getNode();
          results.add(n);
        }
      }
View Full Code Here

Examples of javax.xml.xquery.XQItemType

     * @return type
     *
     * @throws XQException XQException
     */
    private Object getItemValue(XQItem item) throws XQException {
        XQItemType itemType = item.getItemType();
        Object itemValue = null;

        switch (itemType.getBaseType()) {
        case XQItemType.XQBASETYPE_BOOLEAN:
            itemValue = item.getBoolean();

            break;

View Full Code Here

Examples of javax.xml.xquery.XQItemType

        } else if (value instanceof String) {
            xqType = xqconn.createAtomicType(XQItemType.XQBASETYPE_STRING);
        } else if (value instanceof Node) {
          xqType = xqconn.createNodeType();
        } else if (value instanceof NodeList || value instanceof XQSequence) {
            XQItemType xqItemType = xqconn.createNodeType();
            xqType = xqconn.createSequenceType(xqItemType, XQSequenceType.OCC_ZERO_OR_MORE);
        }
        return xqType;
    }
View Full Code Here

Examples of javax.xml.xquery.XQItemType

     * @return type
     *
     * @throws XQException XQException
     */
    private Object getItemValue(XQItem item) throws XQException {
        XQItemType itemType = item.getItemType();
        Object itemValue = null;

        switch (itemType.getBaseType()) {
        case XQItemType.XQBASETYPE_BOOLEAN:
            itemValue = item.getBoolean();

            break;

View Full Code Here

Examples of javax.xml.xquery.XQItemType

        } else if (value instanceof Byte) {
          xqType = xqconn.createAtomicType(XQItemType.XQBASETYPE_BYTE);
        } else if (value instanceof Node) {
          xqType = xqconn.createNodeType();
        } else if (value instanceof NodeList || value instanceof XQSequence) {
            XQItemType xqItemType = xqconn.createNodeType();
            xqType = xqconn.createSequenceType(xqItemType, XQSequenceType.OCC_ZERO_OR_MORE);
        }
        return xqType;
    }
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.