Package org.apache.jackrabbit.core.id

Examples of org.apache.jackrabbit.core.id.NodeId


                case QueryConstants.OPERATION_NULL:
                    query = new NotQuery(Util.createMatchAllQuery(field, indexFormatVersion, cache));
                    break;
                case QueryConstants.OPERATION_SIMILAR:
                    try {
                        NodeId id = hmgr.resolveNodePath(session.getQPath(node.getStringValue()));
                        if (id != null) {
                            query = new SimilarityQuery(id.toString(), analyzer);
                        } else {
                            query = new BooleanQuery();
                        }
                    } catch (Exception e) {
                        exceptions.add(e);
View Full Code Here


    private long createIndex(NodeState node,
                             Path path,
                             ItemStateManager stateMgr,
                             long count)
            throws IOException, ItemStateException, RepositoryException {
        NodeId id = node.getNodeId();
        if (excludedIDs.contains(id)) {
            return count;
        }
        executeAndLog(new AddNode(getTransactionId(), id));
        if (++count % 100 == 0) {
View Full Code Here

     *                           the indexing queue to the index.
     */
    private void checkIndexingQueue(boolean transactionPresent) {
        Map<NodeId, Document> finished = new HashMap<NodeId, Document>();
        for (Document document : indexingQueue.getFinishedDocuments()) {
            NodeId id = new NodeId(document.get(FieldNames.UUID));
            finished.put(id, document);
        }

        // now update index with the remaining ones if there are any
        if (!finished.isEmpty()) {
            log.debug("updating index with {} nodes from indexing queue.",
                    finished.size());

            // Only useful for testing
            synchronized (getIndexingQueue()) {
                indexingQueueCommitPending = true;
            }

            try {
                // remove documents from the queue
                for (NodeId id : finished.keySet()) {
                    indexingQueue.removeDocument(id.toString());
                }

                try {
                    if (transactionPresent) {
                        synchronized (this) {
View Full Code Here

         *
         * @param transactionId the id of the transaction that executes this action.
         * @param doc the document to add.
         */
        AddNode(long transactionId, Document doc) {
            this(transactionId, new NodeId(doc.get(FieldNames.UUID)));
            this.doc = doc;
        }
View Full Code Here

         * @throws IllegalArgumentException if the arguments are malformed. Not a
         *                                  UUID.
         */
        static AddNode fromString(long transactionId, String arguments)
                throws IllegalArgumentException {
            return new AddNode(transactionId, new NodeId(arguments));
        }
View Full Code Here

         * @return the DeleteNode action.
         * @throws IllegalArgumentException if the arguments are malformed. Not a
         *                                  UUID.
         */
        static DeleteNode fromString(long transactionId, String arguments) {
            return new DeleteNode(transactionId, new NodeId(arguments));
        }
View Full Code Here

            log.debug(msg);
            throw new RepositoryException(msg);
        }

        // 4. detect share cycle
        NodeId srcId = srcState.getNodeId();
        NodeId destParentId = destParentState.getNodeId();
        if (destParentId.equals(srcId) || hierMgr.isAncestor(srcId, destParentId)) {
            String msg =
                "Cloning Node with id " + srcId
                + " to parent with id " + destParentId
                + " would create a share cycle.";
            log.debug(msg);
View Full Code Here

            }
            boolean modified = false;
            InternalValue[] values = prop.getValues();
            InternalValue[] newVals = new InternalValue[values.length];
            for (int i = 0; i < values.length; i++) {
                NodeId adjusted = refTracker.getMappedId(values[i].getNodeId());
                if (adjusted != null) {
                    newVals[i] = InternalValue.create(adjusted);
                    modified = true;
                } else {
                    // reference doesn't need adjusting, just copy old value
View Full Code Here

                    + ") because manager is not in edit mode");
        }

        // 1. retrieve affected state
        NodeState target = getNodeState(nodePath);
        NodeId parentId = target.getParentId();

        // 2. check if target state can be removed from parent
        checkRemoveNode(target, parentId,
                CHECK_ACCESS | CHECK_LOCK | CHECK_CHECKED_OUT
                | CHECK_CONSTRAINTS | CHECK_REFERENCES | CHECK_HOLD | CHECK_RETENTION);
View Full Code Here

                // there's already a node with that name...

                // get definition of existing conflicting node
                ChildNodeEntry entry = parentState.getChildNodeEntry(nodeName, 1);
                NodeState conflictingState;
                NodeId conflictingId = entry.getId();
                try {
                    conflictingState = (NodeState) stateMgr.getItemState(conflictingId);
                } catch (ItemStateException ise) {
                    String msg =
                        "internal error: failed to retrieve state of "
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.id.NodeId

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.