Package org.apache.poi.hdgf.extractor

Examples of org.apache.poi.hdgf.extractor.VisioTextExtractor


       fs = new POIFSFileSystem(_dgTests.openResourceAsStream("v6-non-utf16le.vsd"));

       HDGFDiagram hdgf = new HDGFDiagram(fs);
       assertNotNull(hdgf);

        VisioTextExtractor textExtractor = new VisioTextExtractor(hdgf);
        String text = textExtractor.getText().replace("\u0000", "").trim();

        assertEquals("Table\n\n\nPropertySheet\n\n\n\nPropertySheetField", text);
     }
View Full Code Here


       fs = new POIFSFileSystem(_dgTests.openResourceAsStream("Test_Visio-Some_Random_Text.vsd"));

       HDGFDiagram hdgf = new HDGFDiagram(fs);
       assertNotNull(hdgf);

        VisioTextExtractor textExtractor = new VisioTextExtractor(hdgf);
        String text = textExtractor.getText().trim();

        assertEquals("text\nView\nTest View\nI am a test view\nSome random text, on a page", text);
     }
View Full Code Here

      }
      if(entry.getName().equals("PowerPoint Document")) {
        return new PowerPointExtractor(poifsDir, fs);
      }
      if(entry.getName().equals("VisioDocument")) {
        return new VisioTextExtractor(poifsDir, fs);
      }
    }
    throw new IllegalArgumentException("No supported documents found in the OLE2 stream");
  }
View Full Code Here

           break;
        case PROJECT:
           // We currently can't do anything beyond the metadata
           break;
        case VISIO:
           VisioTextExtractor visioTextExtractor =
              new VisioTextExtractor(root);
           for (String text : visioTextExtractor.getAllText()) {
              xhtml.element("p", text);
           }
           break;
        case OUTLOOK:
           OutlookExtractor extractor =
View Full Code Here

     
        try {
            String contents = "";
            SummaryInformation summary = null;
            try {
                final VisioTextExtractor extractor = new VisioTextExtractor(source);
              contents = extractor.getText();
                summary = extractor.getSummaryInformation();
            } catch (Exception e) {
              Log.logWarning("vsdParser", e.getMessage());
            }

            String author = null;
View Full Code Here

                case WORKBOOK:
                    Locale locale = context.get(Locale.class, Locale.getDefault());
                    new ExcelExtractor(context).parse(root, xhtml, locale);
                    break;
                case VISIO:
                    VisioTextExtractor visioTextExtractor =
                        new VisioTextExtractor(root);
                    for (String text : visioTextExtractor.getAllText()) {
                        xhtml.element("p", text);
                    }
                    break;
                case OUTLOOK:
                    if (!outlookExtracted) {
View Full Code Here

      }
      if(entry.getName().equals("PowerPoint Document")) {
        return new PowerPointExtractor(poifsDir, fs);
      }
      if(entry.getName().equals("VisioDocument")) {
        return new VisioTextExtractor(poifsDir, fs);
      }
    }
    throw new IllegalArgumentException("No supported documents found in the OLE2 stream");
  }
View Full Code Here

           break;
        case PROJECT:
           // We currently can't do anything beyond the metadata
           break;
        case VISIO:
           VisioTextExtractor visioTextExtractor =
              new VisioTextExtractor(root);
           for (String text : visioTextExtractor.getAllText()) {
              xhtml.element("p", text);
           }
           break;
        case OUTLOOK:
           OutlookExtractor extractor =
View Full Code Here

                case WORKBOOK:
                    Locale locale = context.get(Locale.class, Locale.getDefault());
                    new ExcelExtractor(context).parse(filesystem, xhtml, locale);
                    break;
                case VISIO:
                    VisioTextExtractor visioTextExtractor =
                        new VisioTextExtractor(filesystem);
                    for (String text : visioTextExtractor.getAllText()) {
                        xhtml.element("p", text);
                    }
                    break;
                case OUTLOOK:
                    if (!outlookExtracted) {
View Full Code Here

           break;
        case PROJECT:
           // We currently can't do anything beyond the metadata
           break;
        case VISIO:
           VisioTextExtractor visioTextExtractor =
              new VisioTextExtractor(root);
           for (String text : visioTextExtractor.getAllText()) {
              xhtml.element("p", text);
           }
           break;
        case OUTLOOK:
           OutlookExtractor extractor =
View Full Code Here

TOP

Related Classes of org.apache.poi.hdgf.extractor.VisioTextExtractor

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.