Examples of DirectoryNode


Examples of com.zaranux.os.client.filesystem.ui.DirectoryNode

  private RemoteFilesystemTreeData(File[] files)
  {
    setModelType(TreeModelType.CHILDREN);
    TreeNode hiddenRoot = new TreeNode();
    setRoot(hiddenRoot);
    DirectoryNode fsRemoteRoot = new DirectoryNode(new File("/"));

    add(fsRemoteRoot, hiddenRoot);

    if(files != null)
    {
      for(File file:files)
      {

        String path = file.getAbsolutePath();
       
        if(path.startsWith("/"))
          path = path.substring(1);
        if(path.startsWith("@"))
        {
          path = "@/" + path.substring(1);
        }
       
        String[] segments = path.split("/");
        DirectoryNode parent = fsRemoteRoot;
        if(segments != null)
        {
          String pathName = "";
          for(int i =0; i< segments.length; i++) // String segment:segments)
          {
            if(!segments[i].equals(""))
            {
              if(!(i == 1 && segments[0].equals("@")))
                pathName += "/";
              pathName += segments[i];
              DirectoryNode child = new DirectoryNode(new File(pathName));
              add(child,parent);
              this.openFolder(parent);
              parent = child;
            }
          }
View Full Code Here

Examples of com.zaranux.os.client.filesystem.ui.DirectoryNode

  private LocalFilesystemTreeData()
  {
    setModelType(TreeModelType.CHILDREN);
    TreeNode hiddenRoot = new TreeNode();
    setRoot(hiddenRoot);
    DirectoryNode fsLocalRoot = new DirectoryNode(new File("file:///"));
    add(fsLocalRoot, hiddenRoot);
  }
View Full Code Here

Examples of fuse.staticfs.DirectoryNode

public class MultiZipFilesystem extends StaticFilesystem
{
   public MultiZipFilesystem(String args[], int offset) throws IOException
   {
      super(new DirectoryNode("$ROOT"));

      DirectoryNode rootNode = getRootNode();
      for (int i = offset; i < args.length; i++)
      {
         File zipFile = new File(args[i]);
         rootNode.addChild(new MountpointNode(zipFile.getName(), new ZipFilesystem(zipFile)));
      }
   }
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

            Metadata metadata, ParseContext context)
            throws IOException, SAXException, TikaException {
        XHTMLContentHandler xhtml = new XHTMLContentHandler(handler, metadata);
        xhtml.startDocument();

        final DirectoryNode root;
        TikaInputStream tstream = TikaInputStream.cast(stream);
        if (tstream == null) {
            root = new NPOIFSFileSystem(new CloseShieldInputStream(stream)).getRoot();
        } else {
            final Object container = tstream.getOpenContainer();
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

      POIFSFileSystem fs = new POIFSFileSystem(
          new FileInputStream(filename3)
      );
      HSLFSlideShow ss;
     
      DirectoryNode dirA = (DirectoryNode)
        fs.getRoot().getEntry("MBD0000A3B6");
    DirectoryNode dirB = (DirectoryNode)
      fs.getRoot().getEntry("MBD0000A3B3");
   
    assertNotNull(dirA.getEntry("PowerPoint Document"));
    assertNotNull(dirB.getEntry("PowerPoint Document"));
     
    // Check the first file
      ss = new HSLFSlideShow(dirA, fs);
    ppe = new PowerPointExtractor(ss);
    assertEquals("Sample PowerPoint file\nThis is the 1st file\nNot much too it\n",
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

      POIFSFileSystem fs = new POIFSFileSystem(
          new FileInputStream(filename3)
      );
      HSLFSlideShow ss;
     
      DirectoryNode dirA = (DirectoryNode)
        fs.getRoot().getEntry("MBD0000A3B6");
    DirectoryNode dirB = (DirectoryNode)
      fs.getRoot().getEntry("MBD0000A3B3");
   
    assertNotNull(dirA.getEntry("PowerPoint Document"));
    assertNotNull(dirB.getEntry("PowerPoint Document"));
     
    // Check the first file
      ss = new HSLFSlideShow(dirA, fs);
    ppe = new PowerPointExtractor(ss);
    assertEquals("Sample PowerPoint file\nThis is the 1st file\nNot much too it\n",
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

    public void testExtractFromEmbeded() throws Exception {
      POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filename3));
      HWPFDocument doc;
      WordExtractor extractor3;

      DirectoryNode dirA = (DirectoryNode)
      fs.getRoot().getEntry("MBD0000A3B7");
      DirectoryNode dirB = (DirectoryNode)
        fs.getRoot().getEntry("MBD0000A3B2");

      // Should have WordDocument and 1Table
      assertNotNull(dirA.getEntry("1Table"));
      assertNotNull(dirA.getEntry("WordDocument"));

      assertNotNull(dirB.getEntry("1Table"));
      assertNotNull(dirB.getEntry("WordDocument"));

      // Check each in turn
      doc = new HWPFDocument(dirA, fs);
      extractor3 = new WordExtractor(doc);
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

    String filename = pdirname + "/word_with_embeded.doc";
    POIFSFileSystem fs = new POIFSFileSystem(
        new FileInputStream(filename)
    );
   
    DirectoryNode objPool = (DirectoryNode) fs.getRoot().getEntry("ObjectPool");
    DirectoryNode dirA = (DirectoryNode) objPool.getEntry("_1269427460");
    DirectoryNode dirB = (DirectoryNode) objPool.getEntry("_1269427461");

    HSSFWorkbook wbA = new HSSFWorkbook(dirA, fs, true);
    HSSFWorkbook wbB = new HSSFWorkbook(dirB, fs, true);
   
    ExcelExtractor exA = new ExcelExtractor(wbA);
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

    String filename = pdirname + "/excel_with_embeded.xls";
    POIFSFileSystem fs = new POIFSFileSystem(
        new FileInputStream(filename)
    );
   
    DirectoryNode dirA = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B5");
    DirectoryNode dirB = (DirectoryNode) fs.getRoot().getEntry("MBD0000A3B4");
   
    HSSFWorkbook wbA = new HSSFWorkbook(dirA, fs, true);
    HSSFWorkbook wbB = new HSSFWorkbook(dirB, fs, true);
   
    ExcelExtractor exA = new ExcelExtractor(wbA);
View Full Code Here

Examples of org.apache.poi.poifs.filesystem.DirectoryNode

         POIFSFileSystem fs = new POIFSFileSystem(
             POIDataSamples.getSpreadSheetInstance().openResourceAsStream("excel_with_embeded.xls")
         );
         HSLFSlideShow ss;

         DirectoryNode dirA = (DirectoryNode)
             fs.getRoot().getEntry("MBD0000A3B6");
         DirectoryNode dirB = (DirectoryNode)
             fs.getRoot().getEntry("MBD0000A3B3");

         assertNotNull(dirA.getEntry("PowerPoint Document"));
         assertNotNull(dirB.getEntry("PowerPoint Document"));

         // Check the first file
         ss = new HSLFSlideShow(dirA);
         ppe = new PowerPointExtractor(ss);
         assertEquals("Sample PowerPoint file\nThis is the 1st file\nNot much too it\n",
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.