Package org.apache.poi

Examples of org.apache.poi.POIXMLProperties


    assertEquals(" ", xml.getProperties().getCoreProperties().getUnderlyingProperties().getSubjectProperty().getValue());
  }

  public void testWorkbookProperties() {
    XWPFDocument doc = new XWPFDocument();
    POIXMLProperties props = doc.getProperties();
    assertNotNull(props);
    assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());
  }
View Full Code Here


    assertEquals(" ", xml.getProperties().getCoreProperties().getUnderlyingProperties().getSubjectProperty().getValue());
  }

  public void testWorkbookProperties() {
    XWPFDocument doc = new XWPFDocument();
    POIXMLProperties props = doc.getProperties();
    assertNotNull(props);
    assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());
  }
View Full Code Here

    assertEquals(" ", xml.getProperties().getCoreProperties().getUnderlyingProperties().getSubjectProperty().getValue());
  }

  public void testWorkbookProperties() {
    XWPFDocument doc = new XWPFDocument();
    POIXMLProperties props = doc.getProperties();
    assertNotNull(props);
    assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());
  }
View Full Code Here

    }
    public XSSFEventBasedExcelExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException {
        super(null);
        this.container = container;

        properties = new POIXMLProperties(container);
    }
View Full Code Here

  /**
   *  Test setting of core properties such as Title and Author
   */
  public void testWorkbookProperties() {
    XSSFWorkbook workbook = new XSSFWorkbook();
    POIXMLProperties props = workbook.getProperties();
    assertNotNull(props);
    //the Application property must be set for new workbooks, see Bugzilla #47559
    assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());

    PackagePropertiesPart opcProps = props.getCoreProperties().getUnderlyingProperties();
    assertNotNull(opcProps);

    opcProps.setTitleProperty("Testing Bugzilla #47460");
    assertEquals("Apache POI", opcProps.getCreatorProperty().getValue());
    opcProps.setCreatorProperty("poi-dev@poi.apache.org");
View Full Code Here

    assertEquals(" ", xml.getProperties().getCoreProperties().getUnderlyingProperties().getSubjectProperty().getValue());
  }

  public void testWorkbookProperties() {
    XWPFDocument doc = new XWPFDocument();
    POIXMLProperties props = doc.getProperties();
    assertNotNull(props);
    assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());
  }
View Full Code Here

    public void bug54764() throws Exception {
        OPCPackage pkg = XSSFTestDataSamples.openSamplePackage("54764.xlsx");
       
        // Check the core properties - will be found but empty, due
        //  to the expansion being too much to be considered valid
        POIXMLProperties props = new POIXMLProperties(pkg);
        assertEquals(null, props.getCoreProperties().getTitle());
        assertEquals(null, props.getCoreProperties().getSubject());
        assertEquals(null, props.getCoreProperties().getDescription());
       
        // Now check the spreadsheet itself
        try {
            new XSSFWorkbook(pkg);
            fail("Should fail as too much expansion occurs");
View Full Code Here

  }
  public XSSFEventBasedExcelExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException {
    super(null);
    this.container = container;
   
    properties = new POIXMLProperties(container);
  }
View Full Code Here

  /**
   *  Test setting of core properties such as Title and Author
   */
  public void testWorkbookProperties() {
    XSSFWorkbook workbook = new XSSFWorkbook();
    POIXMLProperties props = workbook.getProperties();
    assertNotNull(props);
    //the Application property must be set for new workbooks, see Bugzilla #47559
    assertEquals("Apache POI", props.getExtendedProperties().getUnderlyingProperties().getApplication());

    PackagePropertiesPart opcProps = props.getCoreProperties().getUnderlyingProperties();
    assertNotNull(opcProps);

    opcProps.setTitleProperty("Testing Bugzilla #47460");
    assertEquals("Apache POI", opcProps.getCreatorProperty().getValue());
    opcProps.setCreatorProperty("poi-dev@poi.apache.org");
View Full Code Here

  }
  public XSSFEventBasedExcelExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException {
    super(null);
    this.container = container;
   
    properties = new POIXMLProperties(container);
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.POIXMLProperties

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.