Package org.exist.xmldb

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


                    } else {
                        log( msg, Project.MSG_ERR );
                    }

                } else {
                    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 ) );
View Full Code Here


        assertNotNull(f);
      Resource res = test2.createResource("test3.xml", "XMLResource");
      res.setContent(f);
      test2.storeResource(res);

      mgr.moveResource(XmldbURI.create(XmldbURI.ROOT_COLLECTION +  "/test2/test3.xml"),
                TestConstants.TEST_COLLECTION_URI, XmldbURI.create("new_test3.xml"));
  }

  private void doXmldbRead() throws XMLDBException {
    BrokerPool.FORCE_CORRUPTION = false;
View Full Code Here

                if (resource == null) {
                    logger.error( "Resource " + doc + " not found");
                    throw new XPathException(this, "Resource " + doc + " not found");
                }
                final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl) collection.getService("CollectionManagementService", "1.0");
                service.moveResource(doc, destination, null);
            } catch (final XMLDBException e) {
                logger.error(e.getMessage());
                throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
            }
        } else {
View Full Code Here

          throw new XPathException(this, "Resource " + doc + " not found");
                }
               final String newName = args[2].itemAt(0).getStringValue();
         final CollectionManagementServiceImpl service = (CollectionManagementServiceImpl)
          collection.getService("CollectionManagementService", "1.0");
        service.moveResource(doc, (XmldbURI) null,
                        XmldbURI.xmldbUriFor(newName));
      } catch (final XMLDBException e) {
                logger.error(e.getMessage());

        throw new XPathException(this, "XMLDB exception caught: " + e.getMessage(), e);
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.