Package com.dbxml.db.admin

Examples of com.dbxml.db.admin.DocWrapper


      int result = fc.showDialog(this, "Select");
      if ( result == JFileChooser.APPROVE_OPTION ) {
         try {
            File f = fc.getSelectedFile();
            Document doc = DOMHelper.parse(f);
            setStylesheet(f.getAbsolutePath(), new DocWrapper(doc, null, f.getParentFile(), f.getName(), false));
         }
         catch ( Exception ex ) {
         }
      }
   }
View Full Code Here


            case 2:
               if ( info instanceof HasDocWrapper ) {
                  e.consume();
                  setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                  Stopwatch sw = new Stopwatch("Document Retrieval", true);
                  DocWrapper dw = ((HasDocWrapper)info).getDocWrapper();
                  sw.stop();
                  admin.setStatus(sw.toString());
                  admin.editDocument(dw);
                  setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
               }
View Full Code Here

         BufferedInputStream bis = new BufferedInputStream(fis, 4096);
         InputStreamReader isr = new InputStreamReader(bis, "UTF8");
         char[] c = new char[(int)file.length()];
         int size = isr.read(c);
         isr.close();
         return new DocWrapper(new String(c, 0, size), null, file.getParentFile(), file.getName(), true, true);
      }
      catch ( Exception e ) {
         return null;
      }
   }
View Full Code Here

            break;

         case ACTION_EDIT:
            admin.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            Stopwatch sw = new Stopwatch("Document Retrieval", true);
            DocWrapper dw = getDocWrapper();
            sw.stop();
            admin.setStatus(sw.toString());
            admin.editDocument(dw);
            admin.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
            break;
View Full Code Here

   }

   public DocWrapper getDocWrapper() {
      try {
         if ( col.getCollectionType() == CollectionClient.TYPE_DOCUMENTS )
            return new DocWrapper(col.getDocumentAsText(id), col, null, id, true);
         else {
            return new DocWrapper(new String(col.getValue(id)), col, null, id, true, true);
         }
      }
      catch ( Exception e ) {
         Admin.getInstance().addMessage(e.toString());
         return null;
View Full Code Here

            break;

         case ACTION_EDIT:
            admin.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            Stopwatch sw = new Stopwatch("Document Retrieval", true);
            DocWrapper dw = getDocWrapper();
            sw.stop();
            admin.setStatus(sw.toString());
            admin.editDocument(dw);
            admin.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
            break;
View Full Code Here

TOP

Related Classes of com.dbxml.db.admin.DocWrapper

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.