Package xbird.xquery.dm.value.literal

Examples of xbird.xquery.dm.value.literal.XString


                currentToken = jj_consume_token(StringLiteral);
                String s = unescape(unquote(currentToken.image));
                if(s.indexOf('&') != -1) {
                    s = replaceReference(s);
                }
                value = new XString(s);
                break;
            default:
                jj_la1[133] = jj_gen;
                jj_consume_token(-1);
                throw new ParseException();
View Full Code Here


                            persistKeys[0] = fpv;
                        } else {
                            if(counter == 0) {
                                _keyTypes.set(0, StringType.STRING);
                            }
                            persistKeys[0] = new XString(fpv.stringValue());
                        }
                        joinTable.put(persistKeys, it);
                    }
                    pkvItor.closeQuietly();
                } else {// TODO FIXME multiple join keys   
                    for(int i = 0; i < keysize; i++) {
                        final XQExpression key = _pkeyExprs.get(i);
                        final Sequence<? extends Item> pkv = key.eval(it, dynEnv);
                        final Iterator<? extends Item> pkvItor = pkv.iterator();
                        if(!pkvItor.hasNext()) {
                            continue outer;
                        }
                        final Item fpv = pkvItor.next();
                        if(pkvItor.hasNext()) {
                            persistKeys[i] = new SingleCollection(pkv, dynEnv);
                        } else if(_isNodeComp || fpv instanceof AtomicValue) {
                            persistKeys[i] = fpv;
                        } else {
                            if(counter == 0) {
                                _keyTypes.set(i, StringType.STRING);
                            }
                            persistKeys[i] = new XString(fpv.stringValue());
                        }
                    }
                    joinTable.put(persistKeys, it);
                }
                counter++;
View Full Code Here

            if(_isNodeComp) {
                return item;
            }
            final Type t = _keyTypes.get(index);
            if(t == StringType.STRING) {
                return new XString(item.stringValue());
            }
            final AtomicValue it = (item instanceof AtomicValue) ? (AtomicValue) item
                    : new XString(item.stringValue());
            if(t instanceof AtomicType) {
                final AtomicType trgType = (AtomicType) t;
                final AtomicValue converted = it.castAs(trgType, dynEnv);
                return converted;
            }
View Full Code Here

TOP

Related Classes of xbird.xquery.dm.value.literal.XString

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.