Package org.exist.xmldb

Examples of org.exist.xmldb.CollectionManagementServiceImpl.move()


                    service.moveResource( XmldbURI.xmldbUriFor( resource ), XmldbURI.xmldbUriFor( destination ), XmldbURI.xmldbUriFor( name ) );
                }

            } else {
                log( "Moving collection: " + collection, Project.MSG_INFO );
                service.move( XmldbURI.xmldbUriFor( collection ), XmldbURI.xmldbUriFor( destination ), XmldbURI.xmldbUriFor( name ) );
            }

        }
        catch( final XMLDBException e ) {
            final String msg = "XMLDB exception during move: " + e.getMessage();
View Full Code Here


        final XmldbURI baseUri = XmldbURI.create(testCollection.getName());
        final XmldbURI srcUri = XmldbURI.create(srcCollection.getName());
        final XmldbURI newDest = XmldbURI.create("moved");

        //perform the move
        colMgmtSrv.move(srcUri, baseUri, newDest);


        //get the trigger and check its count
        CountingCollectionTrigger.CountingCollectionTriggerState triggerState = CountingCollectionTrigger.CountingCollectionTriggerState.getInstance();
View Full Code Here

        assertNotNull(src);

        final Collection dst = service.createCollection("test-dst");
        assertNotNull(dst);

        service.move(srcURI, dstURI, null);

        // remove the trigger for the Collection under test
        idxConf.configureCollection(EMPTY_COLLECTION_CONFIG);

        final XPathQueryService query = (XPathQueryService) root.getService("XPathQueryService", "1.0");
View Full Code Here

          org.xmldb.api.base.Collection dest = root.getChildCollection("destination3");
          if (dest == null)         
              dest = mgr.createCollection("destination3");
          assertNotNull(dest);
         
          mgr.move(TestConstants.TEST_COLLECTION_URI2, TestConstants.DESTINATION_COLLECTION_URI3, XmldbURI.create("test3"));
      } catch (Exception e) {           
          fail(e.getMessage());     
      }
    }
   
View Full Code Here

                throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
            }
        } else {
            try {
                final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService", "1.0");
                service.move(XmldbURI.xmldbUriFor(collection.getName()),
                        destination, null);

            } catch (final XMLDBException e) {
                logger.error(e.getMessage());
                throw new XPathException(this, "Cannot move collection: " + e.getMessage(), e);
View Full Code Here

    } else {
      try {
                final String newName = args[1].itemAt(0).getStringValue();
        final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl)
          collection.getService("CollectionManagementService", "1.0");
        service.move(XmldbURI.xmldbUriFor(collection.getName()), null,
                        XmldbURI.xmldbUriFor(newName));

      } catch (final XMLDBException e) {
                logger.error("Cannot rename collection: " + e.getMessage());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.