Package org.apache.xindice.xml.dom

Examples of org.apache.xindice.xml.dom.DocumentImpl.appendChild()


           Document doc = new DocumentImpl();

           Element colEle = doc.createElement("collection");
           colEle.setAttribute("compressed", "true");
           colEle.setAttribute("name", name);
           doc.appendChild(colEle);

           Element filEle = doc.createElement("filer");
           filEle.setAttribute("class", "org.apache.xindice.core.filer.BTreeFiler");
           colEle.appendChild(filEle);          
View Full Code Here


    
           Element colEle = doc.createElement("collection");
           colEle.setAttribute("compressed", "true");
           colEle.setAttribute("name", colName);
    
           doc.appendChild(colEle);
    
           Element filEle = doc.createElement("filer");
           filEle.setAttribute("class", "org.apache.xindice.core.filer.BTreeFiler");
           //filEle.setAttribute("gzip", "true");
           if ( table.containsKey(XMLTools.PAGE_SIZE) ) {
View Full Code Here

   private String queryWrapper( NodeSet ns ) throws Exception {
      // Turn the NodeSet into a document.
      DocumentImpl doc = new DocumentImpl();

      Element root = doc.createElement( "result" );
      doc.appendChild( root );
      int count = 0;
      while ( ns != null && ns.hasMoreNodes() ) {
         Node n = ns.getNextNode();

         if ( n.getNodeType() == Node.DOCUMENT_NODE ) {
View Full Code Here

                    if (table.containsKey(XMLTools.MAX_KEY_SIZE) ) {
                        idxEle.setAttribute("maxkeysize", (String)table.get(XMLTools.MAX_KEY_SIZE) );
                    }

                    // Add Element to the document
                    doc.appendChild(idxEle);
                       
                    //If in verbose mode, show....
                    if ( (String)table.get(XMLTools.VERBOSE) == "true" ) {
                        String indexstr = TextWriter.toString(doc);
                        System.out.println("Index node element = ");
View Full Code Here

            if ( bytes != null ) {
               DocumentImpl doc = new DocumentImpl();
               doc.setSymbols(symbols);
               doc.importNode(n, true);
               doc.appendChild(n);
               byte[] b = DOMCompressor.Compress(doc, symbols);
               resource = new XMLResourceImpl(null, documentId, collection,
                  symbols, b);
            }
            else {
View Full Code Here

      Element set = doc.createElementNS(RESOURCE_SET_NS, "xapi:resourceSet");
      set.setAttributeNS(RESOURCE_SET_NS, "xapi:collectionURI",
         "xmldb:xindice://" + ((XindiceCollection) collection).getCanonicalName());
      set.setAttribute("xmlns:xapi", RESOURCE_SET_NS);
      doc.appendChild(set);

      int i = 0;
      while ( i < resources.size() ) {
         XMLResource res = (XMLResource) resources.get(i);
         Element resource = doc.createElementNS(RESOURCE_SET_NS,
View Full Code Here

            }

            DocumentImpl doc = new DocumentImpl();
            Element elem = doc.createElementNS(NodeSource.SOURCE_NS, "src:"+NodeSource.SOURCE_MODIFIED);
            elem.setAttribute(NodeImpl.XMLNS_PREFIX+":src", NodeSource.SOURCE_NS);
            doc.appendChild(elem);
            Text count = doc.createTextNode(Integer.toString(xu.getModifiedCount()));
            elem.appendChild(count);
           
            return new NodeListSet(doc.getChildNodes());
         }
View Full Code Here

   }

   private void putObject(Key key, XMLSerializable obj /*, boolean create */) throws DBException {
      Document doc = new DocumentImpl();
      ProcessingInstruction pi = doc.createProcessingInstruction(CLASSNAME, obj.getClass().getName());
      doc.appendChild(pi);
      Element elem = obj.streamToXML(doc);
      doc.appendChild(elem);
      putDocument(key, doc /*, create */);
   }

View Full Code Here

   private void putObject(Key key, XMLSerializable obj /*, boolean create */) throws DBException {
      Document doc = new DocumentImpl();
      ProcessingInstruction pi = doc.createProcessingInstruction(CLASSNAME, obj.getClass().getName());
      doc.appendChild(pi);
      Element elem = obj.streamToXML(doc);
      doc.appendChild(elem);
      putDocument(key, doc /*, create */);
   }

   /**
    * setObject sets an XMLSerializable object in the Collection based on the
View Full Code Here

   public Node getContextNode() {
      if ( elem == null ) {
         Document d = new DocumentImpl();
         elem = d.createElement("nsmap");
         d.appendChild(elem);
         Iterator i = keySet().iterator();
         while ( i.hasNext() ) {
            String pfx = (String)i.next();
            if ( pfx.equals("") )
               elem.setAttribute("xmlns", (String)get(pfx));
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.