Package org.exist.xquery.value

Examples of org.exist.xquery.value.StringValue


       }
       final StringBuilder concat = new StringBuilder();
       for (int i = 0; i < getArgumentCount(); i++) {
            concat.append(getArgument(i).eval(contextSequence, contextItem).getStringValue());
       }
       final Sequence result = new StringValue(concat.toString());
        if (context.getProfiler().isEnabled())
            {context.getProfiler().end(this, "", result);}
        return result;
    }
View Full Code Here


                    try {
                        //reset the stream, as we need to reuse for string parsing
                        is.reset();

                        final StringValue str = parseAsString(is, encoding);
                        if(str != null) {
                            result = new SequenceImpl<StringValue>(new StringTypedValue(str));
                        }
                    } catch(final IOException ioe) {
                        throw new RestXqServiceException(RestXqErrorCodes.RQDY0014, ioe);
View Full Code Here

        int read = -1;
        while ((read = is.read(buf)) > -1) {
            bos.write(buf, 0, read);
        }
        final String s = new String(bos.toByteArray(), encoding);
        return new StringValue(s);
    }
View Full Code Here

    try {
      sysProperties.load(GetVersion.class.getClassLoader().getResourceAsStream("org/exist/system.properties"));
    } catch (IOException e) {
      LOG.debug("Unable to load system.properties from class loader");
    }
    return new StringValue(sysProperties.getProperty(name.getStringValue(), ""));

    /*
    if (name.equals("xsl:version")) {
    } else if (name.equals("xsl:vendor")) {
    } else if (name.equals("xsl:vendor-url")) {
View Full Code Here

                Locale locale = (country == null) ? new Locale(language) : new Locale(language, country);
                format = new SimpleDateFormat(picture, locale);
            } else {
                format = new SimpleDateFormat(picture);
            }
            return new StringValue(format.format(value.toJavaObject(java.util.Date.class)));
        } catch (java.lang.IllegalArgumentException e) {
            throw new XPathException(e.getMessage());
        }
  }
View Full Code Here

        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);

        GregorianCalendar cal = d.calendar.toGregorianCalendar();
        String formattedDate = sdf.format(cal.getTime());

        return new StringValue(formattedDate);
    }
View Full Code Here

        SimpleDateFormat sdf = new SimpleDateFormat(dateTimeFormat);

        GregorianCalendar cal = dt.calendar.toGregorianCalendar();
        String formattedDate = sdf.format(cal.getTime());

        return new StringValue(formattedDate);
    }
View Full Code Here

                builder.append(buf, 0, read);
            }
        } finally {
            reader.close();
        }
        return new StringValue(builder.toString());
    }
View Full Code Here

      throw new XPathException(this, e)
    }
   
    //TODO : return an *Item* built with sw.toString()
   
    return( new StringValue( sw.toString() ) );
  }
View Full Code Here

        SimpleDateFormat sdf = new SimpleDateFormat(timeFormat);

        GregorianCalendar cal = t.calendar.toGregorianCalendar();
        String formattedDate = sdf.format(cal.getTime());

        return new StringValue(formattedDate);
    }
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.