Package org.exquery.xquery

Examples of org.exquery.xquery.Type


                 * because we will need it later for serialization
                 */
                boolean isBinaryType = false;
                if(result != null) {
                    try {
                        final Type type = result.head().getType();
                        isBinaryType = (type == Type.BASE64_BINARY || type == Type.HEX_BINARY);
                    } catch(final IndexOutOfBoundsException ioe) {
                        LOG.warn("Called head on an empty HTTP Request body sequence", ioe);
                    }
                }
View Full Code Here


        //check the cardinality and existence of the parameter
        final ParameterAnnotationMapping mapping = super.parseAnnotationLiterals(parameterName, functionArgumentName, requiredCardinality);
       
        //check the type of the parameter, if default values are present
        if(defaultValueLiterals.length > 0) {
            final Type requiredType;
            if(haveConsistentType(defaultValueLiterals)) {
                requiredType = defaultValueLiterals[0].getType();
            } else {
                requiredType = Type.ANY_SIMPLE_TYPE;
            }
View Full Code Here

    private boolean haveConsistentType(final Literal[] literals) {
        if(literals == null || literals.length == 0) {
            return true;
        }
       
        final Type type = literals[0].getType();
        for(final Literal literal : literals) {
            if(!literal.getType().equals(type)) {
                return false;
            }
        }
View Full Code Here

TOP

Related Classes of org.exquery.xquery.Type

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.