Examples of StringTypedValue


Examples of org.exist.extensions.exquery.xdm.type.impl.StringTypedValue

                        //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

Examples of org.exquery.xdm.type.StringTypedValue

                        return pathParameter.getKey();
                    }

                    @Override
                    public Sequence<String> getTypedValue() {
                        return new SequenceImpl<String>(new StringTypedValue(pathParameter.getValue()));
                    }
                });
            }
        }
       
View Full Code Here

Examples of org.exquery.xdm.type.StringTypedValue

                        return literalsToSequence(defaultLiterals);
                    } else {
                        return Sequence.EMPTY_SEQUENCE;
                    }
                } else if(queryParam instanceof String) {
                    return new SequenceImpl<String>(new StringTypedValue((String)queryParam));
                } else if(queryParam instanceof List) {
                    final List<String> queryParamValues = (List<String>)queryParam;
                    return collectionToSequence(queryParamValues);
                }
                return null;
View Full Code Here

Examples of org.exquery.xdm.type.StringTypedValue

                    final Literal defaultLiterals[] = getParameterAnnotationMapping().getDefaultValues();
                    return literalsToSequence(defaultLiterals);
                }
               
                if(formParam instanceof String) {
                    return new SequenceImpl(new StringTypedValue((String)formParam));
                } else if(formParam instanceof List) {
                    final List<String> formFieldValues = (List<String>)formParam;
                    return collectionToSequence(formFieldValues);
                } else if(formParam instanceof InputStream) {
                    /*try {
View Full Code Here

Examples of org.exquery.xdm.type.StringTypedValue

    }
   
    protected Sequence<String> collectionToSequence(final Collection<String> collection) {
        final SequenceImpl<String> sequence = new SequenceImpl<String>();
        for(final String value : collection) {
            sequence.add(new StringTypedValue(value));
        }
        return sequence;
    }
View Full Code Here

Examples of org.exquery.xdm.type.StringTypedValue

                } else if(queryParam instanceof String) {
                    if(queryParam.toString().indexOf(',') > -1) {
                        final List<String> queryParamValues = Arrays.asList(queryParam.toString().split(","));
                        return collectionToSequence(queryParamValues);
                    } else {
                        return new SequenceImpl<String>(new StringTypedValue((String)queryParam));
                    }
                }
                return null;
            }
           
View Full Code Here

Examples of org.exquery.xdm.type.StringTypedValue

    protected Sequence literalsToSequence(final Literal[] literals) {
        //TODO cope with non-string literal types
       
        final SequenceImpl<String> sequence = new SequenceImpl<String>();
        for(final Literal literal : literals) {
            sequence.add(new StringTypedValue(literal.getValue()));
        }
       
        return sequence;
    }
View Full Code Here

Examples of org.exquery.xdm.type.StringTypedValue

                        return literalsToSequence(defaultLiterals);
                    } else {
                        return Sequence.EMPTY_SEQUENCE;
                    }
                } else if(queryParam instanceof String) {
                    return new SequenceImpl<String>(new StringTypedValue((String)queryParam));
                }
                return null;
            }
           
        };
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.