Package org.apache.xindice.client.corba.db

Examples of org.apache.xindice.client.corba.db.Collection.queryDocument()


   public static void updateDocument(Database app) throws Exception {
      String commands = "<xupdate:modifications version=\"1.0\" xmlns:xupdate=\"http://www.xmldb.org/xupdate\"><xupdate:remove select=\"/address/first-name\"/></xupdate:modifications>";

      Collection col = app.getCollection("root");

      col.queryDocument("XUpdate", commands, null, "address4", -1);
      System.out.println("Document Updated");

      col.remove();

   }
View Full Code Here


   public XMLResource updateResourceResult(String id, String commands) throws XMLDBException {
      // Get the Xindice collection object from the XML:DB collection wrapper.
      Collection col = ((CollectionImpl) collection).getServerObject();

      try {
         EncodedBuffer buffer = col.queryDocument("XUpdate", commands, getNamespaces(), id, -1);
         return new XMLResourceImpl("", collection, new String(buffer.buf));
      }
      catch (Exception e) {     
         throw FaultCodes.createXMLDBException(e);
      }
View Full Code Here

      // Get the Xindice collection object from the XML:DB collection wrapper.
      Collection col = ((CollectionImpl) collection).getServerObject();

      ResourceSet result = null;
      try {
         EncodedBuffer buffer = col.queryDocument("XPath", query,
            getNamespaces(), id, syms.getLastModified());

         if ( buffer.stamp != -1 ) {
            SymbolTable s = syms.getSymbols(buffer);
            result = new ResourceSetImpl(collection, s, buffer.buf);
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.