Examples of stringValue()


Examples of xbird.xquery.dm.value.Item.stringValue()

        final int arglen = argv.size();
        Item firstItem = argv.getItem(0);
        // If $input is the empty sequence, it is interpreted as the zero-length string.
        String input = firstItem.isEmpty() ? "" : firstItem.stringValue();
        Item secondItem = argv.getItem(1);
        String pattern = secondItem.stringValue();
        int flags = Pattern.UNIX_LINES;
        if(arglen == 3) {
            Item thirdItem = argv.getItem(2);
            String flagsStr = thirdItem.stringValue();
            flags = convertFlags(flagsStr);
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

        Item secondItem = argv.getItem(1);
        String pattern = secondItem.stringValue();
        int flags = Pattern.UNIX_LINES;
        if(arglen == 3) {
            Item thirdItem = argv.getItem(2);
            String flagsStr = thirdItem.stringValue();
            flags = convertFlags(flagsStr);
        }
        final Pattern compiled;
        try {
            compiled = Pattern.compile(pattern, flags);
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

            // If no argument is supplied and the context item is undefined an error is raised: [err:XPDY0002]
            Item contextItem = dynEnv.contextItem();
            if(contextItem == null) {
                throw new DynamicError("err:XPDY0002", "ContextItem is not set");
            }
            arg = contextItem.stringValue();
        } else {
            // If the value of $arg is the empty sequence, returns the zero-length string.
            Item first = argv.getItem(0);
            arg = first.stringValue();
        }
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

            }
            arg = contextItem.stringValue();
        } else {
            // If the value of $arg is the empty sequence, returns the zero-length string.
            Item first = argv.getItem(0);
            arg = first.stringValue();
        }
        String normed = XMLUtils.normalizeString(arg);
        return XString.valueOf(normed);
    }
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

        if(arg.isEmpty()) {
            // If the value of $arg1 is the empty sequence, the zero-length string is returned.
            return XString.valueOf("");
        }
        final Item sep = argv.getItem(1);
        final String separator = sep.stringValue();
        final StringBuilder buf = new StringBuilder(256);
        boolean first = true;
        for(Item it : arg) {
            if(first) {
                first = false;
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

    public Sequence eval(Sequence<? extends Item> contextSeq, ValueSequence argv, DynamicContext dynEnv) throws XQueryException {
        if(argv == null || argv.size() != 2) {
            throw new IllegalStateException();
        }
        Item arg1 = argv.getItem(0);
        String docPath = arg1.stringValue();
        Item arg2 = argv.getItem(1);
        String colPath = arg2.stringValue();
        File docFile = new File(docPath);
        if(!docFile.exists()) {
            return ValueSequence.EMPTY_SEQUENCE;
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

            throw new IllegalStateException();
        }
        Item arg1 = argv.getItem(0);
        String docPath = arg1.stringValue();
        Item arg2 = argv.getItem(1);
        String colPath = arg2.stringValue();
        File docFile = new File(docPath);
        if(!docFile.exists()) {
            return ValueSequence.EMPTY_SEQUENCE;
        }
        DbCollection col = DbCollection.getCollection(colPath);
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

        Item firstItem = argv.getItem(0);
        if(firstItem.isEmpty()) {
            return XString.valueOf("");
        }
        assert (firstItem instanceof XString);
        String uripart = firstItem.stringValue();
        String escaped = XMLUtils.escapeUri(uripart, true);
        return XString.valueOf(escaped);
    }

}
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

            throw new DynamicError("Invalid XQueryD expression. Endpoint does not found");
        }
        final List<String> endpoints = new ArrayList<String>(4);
        do {
            Item firstItem = epFocus.next();
            String endpointStr = firstItem.stringValue();
            endpoints.add(endpointStr);
        } while(epFocus.hasNext());
        epFocus.closeQuietly();
        return endpoints;
    }
View Full Code Here

Examples of xbird.xquery.dm.value.Item.stringValue()

            throws XQueryException {
        Item docuri = argv.getItem(0);
        if(docuri.isEmpty()) {
            return XQueryDataModel.createDocument();
        } else {
            final String docName = docuri.stringValue();
            URI baseuri = dynEnv.getStaticContext().getBaseURI();
            if(baseuri == null) { // TODO REVIEWME workaround
                baseuri = dynEnv.getStaticContext().getSystemBaseURI();
            }
            final URI resolvedUri = baseuri.resolve(docName);
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.