Package net.sf.saxon.value

Examples of net.sf.saxon.value.ObjectValue


         } else if (source instanceof BigDecimal) {
             result = new DecimalValue((BigDecimal)source);
         } else if (source instanceof String) {
             result = new StringValue(((String)source));
         } else {
             result = new ObjectValue(source);
         }

        return result;
    }
View Full Code Here


    public Value transform(Object source, TransformationContext context) {
        // WORKAROUND for ClassCastException in ObjectValue.toJavaObject(float)
        if (source instanceof Float) {
            return new FloatValue(((Float)source).floatValue());
        }
        return new ObjectValue(source);
    }
View Full Code Here

         } else if (source instanceof BigDecimal) {
             result = new DecimalValue((BigDecimal)source);
         } else if (source instanceof String) {
             result = new StringValue(((String)source));
         } else {
             result = new ObjectValue(source);
         }

        return result;
    }
View Full Code Here

    public Value transform(Object source, TransformationContext context) {
        // WORKAROUND for ClassCastException in ObjectValue.toJavaObject(float)
        if (source instanceof Float) {
            return new FloatValue(((Float)source).floatValue());
        }
        return new ObjectValue(source);
    }
View Full Code Here

    public Value transform(Object source, TransformationContext context) {
        // WORKAROUND for ClassCastException in ObjectValue.toJavaObject(float)
        if (source instanceof Float) {
            return new FloatValue(((Float)source).floatValue());
        }
        return new ObjectValue(source);
    }
View Full Code Here

        } else if (source instanceof BigDecimal) {
            result = new DecimalValue((BigDecimal)source);
        } else if (source instanceof String) {
            result = new StringValue(((String)source));
        } else {
            result = new ObjectValue(source);
        }

        return result;
    }
View Full Code Here

        public static TupleUnwrapper getInstance() {
            return THE_INSTANCE;
        }

        public SequenceIterator map(Item item) throws XPathException {
            ObjectValue tuple = (ObjectValue)item;
            Object o = tuple.getObject();
            if (o == null) {
                return null;
            }
            if (o instanceof Item) {
                return SingletonIterator.makeIterator((Item)o);
View Full Code Here

                connection = DriverManager.getConnection(dbString, userString, pwdString);
            } catch (Exception ex) {
                dynamicError("JDBC Connection Failure: " + ex.getMessage(), SaxonErrorCode.SXSQ0003, context);
            }

            return new ObjectValue(connection);

        }
View Full Code Here

            files = directory.listFiles(filter);
        }

        ObjectValue[] fileValues = new ObjectValue[files.length];
        for (int f=0; f<files.length; f++) {
            fileValues[f] = new ObjectValue(files[f]);
        }

        // If the URI requested suppression of errors, or that errors should be treated
        // as warnings, we set up a special ErrorListener to achieve this
View Full Code Here

    public Item evaluateItem(XPathContext context) throws XPathException {
        Value[] tuple = new Value[components.length];
        for (int i=0; i<components.length; i++) {
            tuple[i] = Value.asValue(ExpressionTool.evaluate(components[i], evaluationModes[i], context, 10));
        }
        return new ObjectValue(tuple);
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.value.ObjectValue

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.