Package org.apache.xindice.core.data

Examples of org.apache.xindice.core.data.Value


            HashMap meta = new HashMap(2, 1.5F);
            meta.put(Record.MODIFIED, new Long(file.lastModified()));

            byte[] valueData = cache.getFile(file);
            if (valueData != null) {
                return new Record(key, new Value(valueData), meta);
            }
        } catch (IOException e) {
            throw new FilerException(FaultCodes.DBE_CANNOT_READ,
                                     "Can't read record '" + key + "': " + e.getMessage(), e);
        } finally {
View Full Code Here


        valueData[0] = (byte) headerLength;
        valueData[1] = (byte) version;
        System.arraycopy(metadata, 0, valueData, 2, metadata.length);
        System.arraycopy(data, pos, valueData, 2 + metadata.length, len);
        return new Value(valueData);
    }
View Full Code Here

            // SW and NSW operators are treated as "between" and "not between"
            // where second value is same as first value plus max byte
            byte[] b = new byte[val.getLength() + 1];
            val.copyTo(b, 0);
            b[b.length - 1] = Byte.MAX_VALUE;
            Value val2 = new Value(b);
            this.vals = new Value[]{ val, val2 };
        } else {
            this.vals = new Value[]{ val };
        }
    }
View Full Code Here

    /**
     * Unary operator index query
     */
    public IndexQuery(IndexPattern pattern, int op, String val1) {
        this(pattern, op, new Value(val1));
    }
View Full Code Here

    /**
     * EQ operator index query
     */
    public IndexQuery(IndexPattern pattern, String val1) {
        this(pattern, new Value(val1));
    }
View Full Code Here

        }
        checkOpened();
        try {
            Page startPage = seekRecordPage(key);
            if (startPage != null) {
                Value v = readValue(startPage);
                HashPageHeader sph = (HashPageHeader) startPage.getPageHeader();

                HashMap meta = new HashMap(3);
                meta.put(Record.CREATED, new Long(sph.getCreated()));
                meta.put(Record.MODIFIED, new Long(sph.getModified()));
View Full Code Here

    /**
     * Binary operator index query
     */
    public IndexQuery(IndexPattern pattern, int op, String val1, String val2) {
        this(pattern, op, new Value(val1), new Value(val2));
    }
View Full Code Here

    /**
     * IN operator index query
     */
    public IndexQuery(IndexPattern pattern, String val1, String val2) {
        this(pattern, new Value(val1), new Value(val2));
    }
View Full Code Here

     *
     * @param value The Value to compare
     * @return Whether or not the value matches
     */
    public final boolean testValue(String value) {
        return testValue(new Value(value));
    }
View Full Code Here

                    }

                    IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

                    XObject obj = (XObject) s;
                    Value val1 = new Value(obj.str());

                    IndexQuery iq = new IndexQuerySW(pattern, val1);
                    return queryIndexes(nk, iq, ps, obj.getType());
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.xindice.core.data.Value

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.