Package org.apache.xindice.xml.dom

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


    * @param buffer The Hashtable
    * @return The Document
    */
   public Document convertToDocument(Hashtable buffer) {
      SymbolTable s = getSymbols(buffer);
      return new DocumentImpl((byte []) buffer.get("document"), s, null);
   }
View Full Code Here


    */
   public SymbolTable getSymbols(Hashtable buffer) {
      //if ( ((Long) buffer.get("timestamp")).longValue() != lastMod ) {
        // lastMod = ((Long) buffer.get("timestamp")).longValue();

         Document doc = new DocumentImpl((byte []) buffer.get("symbols"), hcSyms, null);

         if ( syms == null ) {
            syms = new SymbolTable();
         }

         synchronized(syms) {
            syms.streamFromXML(doc.getDocumentElement());
         }
     // }
      return syms;
   }
View Full Code Here

   }

   public SAXEventGenerator(Document doc) {
      try {
         if ( doc instanceof CompressedDocument ) {
            doc = new DocumentImpl(doc);
            CompressedDocument cDoc = (CompressedDocument)doc;
            symbols = cDoc.getSymbols();
            data = cDoc.getDataBytes();
            pos = cDoc.getDataPos();
            len = cDoc.getDataLen();
View Full Code Here

    public org.xmldb.api.base.Collection createCollection(String name)
            throws XMLDBException {

        checkOpen();
        try {
           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);          

           return createCollection(name, doc);
        } catch (Exception e) {           
View Full Code Here

           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

        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

                }
            }
            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

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

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

      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

      {
         // 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

TOP

Related Classes of org.apache.xindice.xml.dom.DocumentImpl

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.