Package org.exist.xmldb

Examples of org.exist.xmldb.CollectionManagementServiceImpl


                    logger.error("Resource " + doc + " not found");

          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);
               
      } catch (final URISyntaxException e) {
                logger.error(e.getMessage());

                throw new XPathException(this, "URI exception: " + e.getMessage(), e);
            }

    } 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

Related Classes of org.exist.xmldb.CollectionManagementServiceImpl

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.