Package org.exist.xquery.value

Examples of org.exist.xquery.value.StringValue


                result = defaultValues;
            } else {
                result = Sequence.EMPTY_SEQUENCE;
            }
        } else {
            result = new StringValue(headerValue);
        }
       
        return result;
    }
View Full Code Here


      super(context);
  }
 
  public ElementConstructor(XQueryContext context, String qname) {
    super(context);
    this.qnameExpr = new LiteralValue(context, new StringValue(qname));
  }
View Full Code Here

  public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {

    try {
      Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
     
      return new StringValue( dbgr.start(args[0].getStringValue()) );
     
    } catch (Throwable e) {
      throw new XPathException(this, Module.DEBUG001, e);
    }
  }
View Full Code Here

            "OPTIMIZATION", "Rewritten contains() as a general comparison with no truncations");
        op.setLocation(ast.getLine(), ast.getColumn());
        if (params.size() == 3) {
            op.setCollation((Expression) params.get(2));
        } else {
            op.setCollation(new StringValue("?strength=identical"));
        }
        return op;
    }
View Full Code Here

                    matcher = pat.matcher(string);
                } else {
                    matcher.reset(string);
                }
                final String r = matcher.replaceAll(replace);
          result = new StringValue(r);
        } catch (final PatternSyntaxException e) {
          throw new XPathException(this, ErrorCodes.FORX0001, "Invalid regular expression: " + e.getMessage(), patternSeq, e);
        } catch (final IndexOutOfBoundsException e) {
            throw new XPathException(this, ErrorCodes.FORX0001, e.getMessage(), patternSeq, e);
           //Some JVMs seem to raise this one
View Full Code Here

    for (final String prefix : prefixes.keySet()) {
      //The predefined namespaces (e.g. "exist" for temporary nodes) could have been removed from the static context
      if (!(context.getURIForPrefix(prefix) == null &&
          ("exist".equals(prefix) || "xs".equals(prefix) || "xsi".equals(prefix) ||
            "wdt".equals(prefix) || "fn".equals(prefix) || "local".equals(prefix))))
        {result.add(new StringValue(prefix));}
    }
   
        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
       
View Full Code Here

                pat = Pattern.compile(pattern, flags);
                    }
                    final String[] tokens = pat.split(string, -1);
                    result = new ValueSequence();
              for (int i = 0; i < tokens.length; i++)
                        result.add(new StringValue(tokens[i]));             
            } catch (final PatternSyntaxException e) {
              throw new XPathException(this, ErrorCodes.FORX0001, "Invalid regular expression: " + e.getMessage(), new StringValue(pattern), e);
            }
            }
        }

        if (context.getProfiler().isEnabled())
View Full Code Here

        return result;

  }

  private void getId(NodeSet result, DocumentSet docs, String id) throws XPathException {
    final NodeSet attribs = context.getBroker().getValueIndex().find(context.getWatchDog(), Constants.EQ, docs, null, -1, null, new StringValue(id, Type.ID));
    NodeProxy p;
    for (final NodeProxy n : attribs) {
      p = new NodeProxy(n.getDocument(), n.getNodeId().getParentId(), Node.ELEMENT_NODE);
      result.add(p);
    }
View Full Code Here

            if (!Type.subTypeOf(item.getType(), Type.NODE))
              {throw new XPathException(this, ErrorCodes.XPTY0004, "item is not a node; got '" + Type.getTypeName(item.getType()) + "'");}
            //TODO : how to improve performance ?
            final Node n = ((NodeValue)item).getNode()
            if (n instanceof QNameable)
              {result = new StringValue(((QNameable)n).getQName().getStringValue());}
            else
              {result = StringValue.EMPTY_STRING;}
        }
       
        if (context.getProfiler().isEnabled())
View Full Code Here

                } else { // output a surrogate pair
                    buf.append(XMLChar.highSurrogate((int)next));
                    buf.append(XMLChar.lowSurrogate((int)next));
                }
            }
            result = new StringValue(buf.toString());
        }
        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
        return result;
    }
View Full Code Here

TOP

Related Classes of org.exist.xquery.value.StringValue

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.