Package org.apache.jackrabbit.value

Examples of org.apache.jackrabbit.value.LongValue


                    } else {
                        // property not set or jcr:path / jcr:score / jcr:highlight
                        if (QName.JCR_PATH.equals(properties[i])) {
                            tmp[i] = PathValue.valueOf(node.getPath());
                        } else if (QName.JCR_SCORE.equals(properties[i])) {
                            tmp[i] = new LongValue(Math.round(score * 1000f));
                        } else if (isExcerptFunction(properties[i])) {
                            tmp[i] = getExcerpt();
                        } else {
                            tmp[i] = null;
                        }
View Full Code Here


                } else {
                    // either jcr:score, jcr:path or not set
                    if (QName.JCR_PATH.equals(prop)) {
                        return PathValue.valueOf(node.getPath());
                    } else if (QName.JCR_SCORE.equals(prop)) {
                        return new LongValue(Math.round(score * 1000f));
                    } else if (isExcerptFunction(prop)) {
                        return getExcerpt();
                    } else {
                        return null;
                    }
View Full Code Here

            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
                return ReferenceValue.valueOf(val.toString());
            case PropertyType.PATH:
                return PathValue.valueOf(resolver.getJCRPath((Path) val));
            case PropertyType.NAME:
View Full Code Here

            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
                return ReferenceValue.valueOf(val.toString());
            case PropertyType.PATH:
                return PathValue.valueOf(resolver.getJCRPath((Path) val));
            case PropertyType.NAME:
View Full Code Here

            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
                return ReferenceValue.valueOf(val.toString());
            case PropertyType.PATH:
                return PathValue.valueOf(resolver.getJCRPath((Path) val));
            case PropertyType.NAME:
View Full Code Here

                    } else {
                        // property not set or jcr:path / jcr:score
                        if (QName.JCR_PATH.equals(properties[i])) {
                            tmp[i] = PathValue.valueOf(node.getPath());
                        } else if (QName.JCR_SCORE.equals(properties[i])) {
                            tmp[i] = new LongValue((int) (score * 1000f));
                        } else {
                            tmp[i] = null;
                        }
                    }
                }
View Full Code Here

                } else {
                    // either jcr:score, jcr:path or not set
                    if (QName.JCR_PATH.equals(prop)) {
                        return PathValue.valueOf(node.getPath());
                    } else if (QName.JCR_SCORE.equals(prop)) {
                        return new LongValue((int) (score * 1000f));
                    } else {
                        return null;
                    }
                }
            } catch (IllegalNameException e) {
View Full Code Here

        }

        InternalValue value;
        if (reqType != PropertyType.LONG) {
            // type conversion required
            value = InternalValue.create(new LongValue(number), reqType, session.getNamespaceResolver());
        } else {
            // no type conversion required
            value = InternalValue.create(number);
        }
View Full Code Here

            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
                return ReferenceValue.valueOf(((UUID) val).toString());
            case PropertyType.PATH:
                try {
                    return PathValue.valueOf(((Path) val).toJCRPath(nsResolver));
View Full Code Here

            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
                return ReferenceValue.valueOf(((UUID) val).toString());
            case PropertyType.PATH:
                try {
                    return PathValue.valueOf(((Path) val).toJCRPath(nsResolver));
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.value.LongValue

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.