Examples of DocumentImpl


Examples of org.apache.xindice.xml.dom.DocumentImpl

           if (colName.equals("")) {
              System.out.println("Cannot create a NULL collection");
              return false;
           }
    
           Document doc = new DocumentImpl();
    
           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) ) {
              filEle.setAttribute("pagesize", (String)table.get(XMLTools.PAGE_SIZE));
           }
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

        this.custom = null;

        Document doc = meta.getCustomDocument();
        if( null != doc )
        {
            this.custom = new DocumentImpl();
            this.custom.appendChild(
                this.custom.importNode(doc.getDocumentElement(), true));
        }
        this.dirty = false;
    }
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

                }
            }
            else
            if( customElemName.equals(elementName) )
            {
                this.custom = new DocumentImpl();
        Node custdoc = this.custom.importNode(element,true);
       
        /* if you want really verbose debugging try this */
        if(log.isTraceEnabled())
        {
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

         parser.parse(source);
      return parser.getDocument();
   }

   public Document newDocument() {
      return new DocumentImpl();
   }
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

      meta.streamFromXML(doc.getDocumentElement());
      col.setDocumentMeta(docname,meta);

    MetaData ret_meta = col.getDocumentMeta(docname);
      Document ret_doc = new DocumentImpl();
      ret_meta.streamToXML(ret_doc, true);
       
      result.put( RESULT, TextWriter.toString( ret_doc ) );
      return result;
   }
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

      {
         // meta information is not enabled !
         throw new Exception(MISSING_META_CONFIGURATION);
      }
      MetaData meta = col.getCollectionMeta();
      Document doc = new DocumentImpl();
      meta.streamToXML(doc, true);

      result.put( RESULT, TextWriter.toString( doc ) );
      return result;
   }
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

      if(!message.containsKey(NAME)) {
         throw new Exception(MISSING_NAME_PARAM);
      }
      String docname = (String)message.get(NAME);
      MetaData meta = col.getDocumentMeta(docname);
      Document doc = new DocumentImpl();
      meta.streamToXML(doc, true);

      result.put( RESULT, TextWriter.toString( doc ) );
      return result;
   }
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

    * @return the result set as an XML document
    * @exception Exception
    */
   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 ) {
            n = ( ( Document ) n ).getDocumentElement();
         }

         if ( n instanceof DBNode ) {
            ( ( DBNode ) n ).expandSource();
         }

         root.appendChild( doc.importNode( n, true ) );
         count++;
      }

      root.setAttribute( "count", Integer.toString( count ) );

View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

         String name = doc.getDocumentElement().getAttribute("name");
         message.put(NAME, name);
      }
      // Otherwise we need to build the configuration from the name and pattern.
      else {
         doc = new DocumentImpl();

         // Create the index element to hold attributes
         Element index = doc.createElement("index");

         index.setAttribute("class", "org.apache.xindice.core.indexer.ValueIndexer");
View Full Code Here

Examples of org.apache.xindice.xml.dom.DocumentImpl

            Indexer idx = context.getIndexManager().getBestIndexer(Indexer.STYLE_NODEVALUE, pattern);
            if ( idx != null )
               return new NamedKeys(nk.name, nk.attribute, QueryEngine.getUniqueKeys(idx.queryMatches(iq)));
            else if ( autoIndex ) {
               // TODO: This has to *not* be hardcoded
               Element e = new DocumentImpl().createElement("index");
               e.setAttribute("class", "org.apache.xindice.core.indexer.ValueIndexer");
               e.setAttribute("name", "xp_"+ps);
               e.setAttribute("pattern", ps);

               // Set the type for the index
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.