Package org.apache.xindice.core.data

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


    private void prepareNextNode() throws XMLDBException, TransformerException, DBException {
            node = null;

      while (keyPos < keySet.length) {
                final Key key = keySet[keyPos++];

                Object entry = context.getEntry(key);
                if (!(entry instanceof DBDocument)) {
                    continue;
                }
View Full Code Here


            Stopwatch sw = new Stopwatch("Populated Indexes", true);
            RecordSet rs = collection.getFiler().getRecordSet();
            while (rs.hasMoreRecords()) {
                // Read only key, we don't need filer-level value
                Key key = rs.getNextKey();
                Object value = collection.getEntry(key);
                if (value instanceof Document) {
                    try {
                        new SAXHandler(key, (Document)value, ACTION_CREATE, list);
                    } catch (Exception e) {
View Full Code Here

        public synchronized Key getKey() {
            if (header.keyLen == 0) {
                return null;
            }

            return new Key(this.data, this.keyPos, header.keyLen);
        }
View Full Code Here

        }

        public boolean indexInfo(Value value, long pointer) {
            try {
                Value v = filer.getValue(pointer);
                newFiler.writeRecord(new Key(value), v);
            } catch (Exception e) {
                log.error(e);
            }

            return true;
View Full Code Here

        if (key == null) {
            return createNewOID();
        } else if (key instanceof Key) {
            return (Key) key;
        } else {
            return new Key(key.toString());
        }
    }
View Full Code Here

        StringBuffer sb = new StringBuffer(oidTemplate);
        String document = Long.toString(documentId, 16);
        sb.insert(32 - document.length(), document);
        sb.setLength(32);
        return new Key(sb.toString());
    }
View Full Code Here

     *
     * @param docKey The Document Key
     * @return The Container
     */
    public final Container getContainer(Object docKey) throws DBException {
        Key key = createNewKey(docKey);
        Document doc = getDocument(key);
        return doc != null ? new ColContainer(key, doc) : null;
    }
View Full Code Here

                log.warn("Meta information requested but not enabled in config!");
            }
            return null;
        }

        Key key = getIdentityKey(createNewKey(id));
        synchronized (key) {
            if (null == getEntry(id)) {
                throw new DBException(FaultCodes.COL_DOCUMENT_NOT_FOUND,
                                      "Resource '" + id + "' does not exist in '" + getCanonicalName() + "'");
            }
View Full Code Here

            log.trace(localDebugHeader);
        }

        checkFiler(FaultCodes.COL_NO_FILER);

        Key key = getIdentityKey(createNewKey(docKey));
        synchronized (key) {

            /*
             * If the key has a corresponding value in the cache, return it
             * and save a disk access.
View Full Code Here

            throw new DBException(FaultCodes.COL_CANNOT_STORE,
                                  "Cannot insert a binary resource in '" + getCanonicalName() +
                                  "' (inline-metadata is not enabled)");
        }

        Key key = createNewKey(docKey);
        if (log.isInfoEnabled()) {
            log.info(debugHeader() + "Insert binary: " + key);
        }
        putBinary(key, bytes, true);
View Full Code Here

TOP

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

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.