Package org.exist.dom

Examples of org.exist.dom.MutableDocumentSet


            TransactionManager mgr = pool.getTransactionManager();
            assertNotNull(mgr);
           
            IndexInfo info = init(broker, mgr);
            assertNotNull(info);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
            assertNotNull(proc);
           
            Txn transaction = mgr.beginTransaction();
            assertNotNull(transaction);
View Full Code Here


            TransactionManager mgr = pool.getTransactionManager();
            assertNotNull(mgr);
           
            IndexInfo info = init(broker, mgr);
            assertNotNull(info);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
            assertNotNull(proc);
           
            Txn transaction = mgr.beginTransaction();
            assertNotNull(transaction);
View Full Code Here

            assertNotNull(broker);           
            TransactionManager mgr = pool.getTransactionManager();
            assertNotNull(mgr);           
            IndexInfo info = init(broker, mgr);
            assertNotNull(info);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
            assertNotNull(proc);
            Txn transaction = mgr.beginTransaction();
            assertNotNull(transaction);
            System.out.println("Transaction started ...");
View Full Code Here

            TransactionManager mgr = pool.getTransactionManager();
            assertNotNull(mgr);
           
            IndexInfo info = init(broker, mgr);
            assertNotNull(info);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
            assertNotNull(proc);
           
            Txn transaction = mgr.beginTransaction();
            assertNotNull(transaction);
View Full Code Here

            TransactionManager mgr = pool.getTransactionManager();
            assertNotNull(mgr);
           
            IndexInfo info = init(broker, mgr);
            assertNotNull(info);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
            assertNotNull(proc);
           
            Txn transaction = mgr.beginTransaction();
            assertNotNull(transaction);
View Full Code Here

           
            transaction = transact.beginTransaction();
            assertNotNull(transaction);
            System.out.println("Transaction started ...");
           
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
            assertNotNull(proc);
           
            String xupdate;
            Modification modifications[];
View Full Code Here

            broker = pool.get(pool.getSecurityManager().getSystemSubject());
           
            TransactionManager mgr = pool.getTransactionManager();
           
            IndexInfo info = init(broker, mgr);
            MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(info.getDocument());
            XUpdateProcessor proc = new XUpdateProcessor(broker, docs, AccessContext.TEST);
           
            Txn transaction = mgr.beginTransaction();
           
            String xupdate;
View Full Code Here

                  //TODO : how to enforce this ?
                  //If $node, or the context item if the second argument is omitted,
                  //is a node in a tree whose root is not a document node [err:FODC0001] is raised                    processInMem = true;
                    {processInMem = true;}
                else {
                    MutableDocumentSet ndocs = new DefaultDocumentSet();
                    ndocs.add(((NodeProxy)node).getDocument());
                    docs = ndocs;
                }
                contextSequence = node;
            } else if (contextSequence == null)
                {throw new XPathException(this, ErrorCodes.XPDY0002, "no context item specified");}
View Full Code Here

        if( protectedDocuments != null ) {
            staticDocuments = protectedDocuments.toDocumentSet();
            return( staticDocuments );
        }
        MutableDocumentSet ndocs = new DefaultDocumentSet( 1031 );

        if( staticDocumentPaths == null ) {

            // no path defined: return all documents in the db
            try {
                getBroker().getAllXMLResources( ndocs );
            } catch(final PermissionDeniedException pde) {
                LOG.warn("Permission denied to read resource all resources" + pde.getMessage(), pde);
                throw new XPathException("Permission denied to read resource all resources" + pde.getMessage(), pde);
            }
        } else {
            DocumentImpl doc;
            Collection   collection;

            for( int i = 0; i < staticDocumentPaths.length; i++ ) {

                try {
                    collection = getBroker().getCollection( staticDocumentPaths[i] );

                    if( collection != null ) {
                        collection.allDocs( getBroker(), ndocs, true);
                    } else {
                        doc = getBroker().getXMLResource( staticDocumentPaths[i], Lock.READ_LOCK );

                        if( doc != null ) {

                            if( doc.getPermissions().validate(
                                getBroker().getSubject(), Permission.READ ) ) {
                               
                              ndocs.add( doc );
                            }
                            doc.getUpdateLock().release( Lock.READ_LOCK );
                        }
                    }
                }
View Full Code Here

    throws XMLDBException {
      final Subject preserveSubject = pool.getSubject();
    DBBroker broker = null;
    try {
      broker = pool.get(user);
      final MutableDocumentSet docs = new DefaultDocumentSet();
      parent.getCollection().allDocs(broker, docs, inclusive);
      return broker.getTextEngine().scanIndexTerms(docs, docs.docsToNodeSet(),  start, end);
    } catch (final PermissionDeniedException e) {
      throw new XMLDBException(ErrorCodes.PERMISSION_DENIED,
        "permission denied", e);
    } catch (final EXistException e) {
      throw new XMLDBException(
View Full Code Here

TOP

Related Classes of org.exist.dom.MutableDocumentSet

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.