Package org.exist.indexing

Examples of org.exist.indexing.StreamListener


            {return;}
        DBBroker broker = null;
        try {
            broker = ownerDocument.getBrokerPool().get(null);
            final NodePath path = getPath();
            StreamListener listener = null;
            //May help getReindexRoot() to make some useful things
            broker.getIndexController().setDocument(ownerDocument);
            StoredNode reindexRoot = broker.getIndexController().getReindexRoot(this, path, true, true);
            broker.getIndexController().setMode(StreamListener.STORE);
            // only reindex if reindexRoot is an ancestor of the current node
View Full Code Here


            {throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "wrong node type");}
        DBBroker broker = null;
        try {
            broker = ownerDocument.getBrokerPool().get(null);
            final NodePath path = getPath();
            StreamListener listener = null;
            //May help getReindexRoot() to make some useful things
            broker.getIndexController().setDocument(ownerDocument);
            final StoredNode reindexRoot = broker.getIndexController().getReindexRoot(this, path, true, true);
            broker.getIndexController().setMode(StreamListener.STORE);
            if (reindexRoot == null) {
View Full Code Here

            {throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "wrong node type: ");}
        DBBroker broker = null;
        try {
            broker = ownerDocument.getBrokerPool().get(null);
            final NodePath path = getPath();
            StreamListener listener = null;
            //May help getReindexRoot() to make some useful things
            broker.getIndexController().setDocument(ownerDocument);
            final StoredNode reindexRoot = broker.getIndexController().getReindexRoot(this, path, true, true);
            broker.getIndexController().setMode(StreamListener.STORE);
            if (reindexRoot == null) {
View Full Code Here

     */
    public void update(Txn transaction, NodeList newContent) throws DOMException {
        final NodePath path = getPath();
        // remove old child nodes
        final NodeList nodes = getChildNodes();
        StreamListener listener = null;
        DBBroker broker = null;
        //May help getReindexRoot() to make some useful things
        try {
            broker = ownerDocument.getBrokerPool().get(null);
            broker.getIndexController().setDocument(ownerDocument);
View Full Code Here

        final StoredNode oldNode = (StoredNode) oldChild;
        if (!oldNode.nodeId.getParentId().equals(nodeId))
            {throw new DOMException(DOMException.NOT_FOUND_ERR,
                "node is not a child of this element");}
        final NodePath oldPath = oldNode.getPath();
        StreamListener listener = null;
        DBBroker broker = null;
        try {
            //May help getReindexRoot() to make some useful things
            broker = ownerDocument.getBrokerPool().get(null);
            broker.getIndexController().setDocument(ownerDocument);
View Full Code Here

                    broker.endRemove(transaction);
                }
            }
            final NodePath path = getPath();
            broker.getIndexController().setDocument(ownerDocument, StreamListener.STORE);
            final StreamListener listener = broker.getIndexController().getStreamListener();
            if (children == 0) {
                appendChildren(transaction, nodeId.newChild(), null,
                    new NodeImplRef(this), path, appendList, listener);
            } else {
                if (attributes == 0) {
View Full Code Here

        if (previous == null)
            {previous = this;}
        else
            {previous = getLastNode(previous);}
        final NodePath oldPath = oldNode.getPath();
        StreamListener listener = null;
        //May help getReindexRoot() to make some useful things
        Node newNode = null;
        DBBroker broker = null;
        try {
            broker = ownerDocument.getBrokerPool().get(null);
View Full Code Here

    private void copyXMLResource(final Txn transaction, final DocumentImpl oldDoc, final DocumentImpl newDoc) {
        LOG.debug("Copying document " + oldDoc.getFileURI() + " to " +
            newDoc.getURI());
        final long start = System.currentTimeMillis();
        indexController.setDocument(newDoc, StreamListener.STORE);
        final StreamListener listener = indexController.getStreamListener();
        final NodeList nodes = oldDoc.getChildNodes();
        for(int i = 0; i < nodes.getLength(); i++) {
            final StoredNode node = (StoredNode) nodes.item(i);
            final Iterator<StoredNode> iterator = getNodeIterator(node);
            iterator.next();
View Full Code Here

        }
    }

    private void dropIndex(final Txn transaction, final DocumentImpl document) throws ReadOnlyException {
        indexController.setDocument(document, StreamListener.REMOVE_ALL_NODES);
        final StreamListener listener = indexController.getStreamListener();
        final NodeList nodes = document.getChildNodes();
        for(int i = 0; i < nodes.getLength(); i++) {
            final StoredNode node = (StoredNode) nodes.item(i);
            final Iterator<StoredNode> iterator = getNodeIterator(node);
            iterator.next();
View Full Code Here

    private void reindexXMLResource(final Txn transaction, final DocumentImpl doc, final int mode) {
        if(doc.isCollectionConfig()) {
            doc.getCollection().setCollectionConfigEnabled(false);
        }
        indexController.setDocument(doc, StreamListener.STORE);
        final StreamListener listener = indexController.getStreamListener();
        final NodeList nodes = doc.getChildNodes();
        for(int i = 0; i < nodes.getLength(); i++) {
            final StoredNode node = (StoredNode) nodes.item(i);
            final Iterator<StoredNode> iterator = getNodeIterator(node);
            iterator.next();
View Full Code Here

TOP

Related Classes of org.exist.indexing.StreamListener

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.