Package org.apache.poi.hpsf

Examples of org.apache.poi.hpsf.CustomProperties


    *
    */
  public void testConvAndExistance(){
    
   
      CustomProperties customProperties = dsi.getCustomProperties();
      if (customProperties == null){
          customProperties = new CustomProperties();
      }
     
      /* Insert some custom properties into the container. */
      customProperties.put("int", new Integer(12345));
      customProperties.put("negint", new Integer(-12345));
      customProperties.put("long", new Long(12345));
      customProperties.put("neglong", new Long(-12345));
      customProperties.put("boolean", new Boolean(true));
      customProperties.put("string", "a String");
      //customProperties.put("float", new Float(12345.0));  is not valid
      //customProperties.put("negfloat", new Float(-12345.1)); is not valid
      customProperties.put("double", new Double(12345.2));
      customProperties.put("negdouble", new Double(-12345.3));
      //customProperties.put("char", new Character('a')); is not valid
     
      Date date=new Date();
      customProperties.put("date", date);

      dsi.setCustomProperties(customProperties);


     closeAndReOpen();
   
     assertNotNull(dsi);
     assertNotNull(si);
      /* Change the category to "POI example". Any former category value will
       * be lost. If there has been no category yet, it will be created. */
      assertNull(dsi.getCategory());
      assertNull(dsi.getCompany());
      assertNull(dsi.getManager());
     
      assertNull(si.getAuthor());
      assertNull(si.getTitle());
      assertNull(si.getComments());
      assertNull(si.getKeywords());
      assertNull(si.getSubject());
     
     
      /* Read the custom properties. If there are no custom properties
       * yet, the application has to create a new CustomProperties object.
       * It will serve as a container for custom properties. */
      customProperties = dsi.getCustomProperties();
      if (customProperties == null){
        fail();
          }
     
      /* Insert some custom properties into the container. */

      Integer a3=(Integer) customProperties.get("int");
      assertEquals("int",new Integer(12345),a3);
     
      a3=(Integer) customProperties.get("negint");
      assertEquals("negint",new Integer(-12345),a3);
     
      Long al=(Long) customProperties.get("neglong");
      assertEquals("neglong",new Long(-12345),al);
     
      al=(Long) customProperties.get("long");
      assertEquals("long",new Long(12345),al);
     
      Boolean a4=(Boolean) customProperties.get("boolean");
      assertEquals("boolean",new Boolean(true),a4);
     
      Date a5=(Date) customProperties.get("date");
      assertEquals("Custom Date:",date,a5);
 
      Double d=(Double) customProperties.get("double");
      assertEquals("int",new Double(12345.2),d);
     
      d=(Double) customProperties.get("negdouble");
      assertEquals("string",new Double(-12345.3),d);

      String s=(String) customProperties.get("string");
      assertEquals("sring","a String",s);
     
      Object o=null;
     
      o=customProperties.get("string");
      if (!(o instanceof String)){
        fail();
      }
      o=customProperties.get("boolean");
      if (!(o instanceof Boolean)){
        fail();
      }
     
      o=customProperties.get("int");
      if (!(o instanceof Integer)){
        fail();
      }
      o=customProperties.get("negint");
      if (!(o instanceof Integer)){
        fail();
      }
     
      o=customProperties.get("long");
      if (!(o instanceof Long)){
        fail();
      }
      o=customProperties.get("neglong");
      if (!(o instanceof Long)){
        fail();
      }
     
      o=customProperties.get("double");
      if (!(o instanceof Double)){
        fail();
      }
      o=customProperties.get("negdouble");
      if (!(o instanceof Double)){
        fail();
      }
     
      o=customProperties.get("date");
      if (!(o instanceof Date)){
        fail();
      }
     }
View Full Code Here


    // Normal properties
    text.append( getPropertiesText(dsi) );

    // Now custom ones
    CustomProperties cps = dsi == null ? null : dsi.getCustomProperties();
    if(cps != null) {
      Iterator keys = cps.keySet().iterator();
      while(keys.hasNext()) {
        String key = (String)keys.next();
        String val = getPropertyValueText( cps.get(key) );
        text.append(key + " = " + val + "\n");
      }
    }

    // All done
View Full Code Here

        System.out.println("Category changed to " + dsi.getCategory() + ".");

        /* Read the custom properties. If there are no custom properties yet,
         * the application has to create a new CustomProperties object. It will
         * serve as a container for custom properties. */
        CustomProperties customProperties = dsi.getCustomProperties();
        if (customProperties == null)
            customProperties = new CustomProperties();
       
        /* Insert some custom properties into the container. */
        customProperties.put("Key 1", "Value 1");
        customProperties.put("Schl�ssel 2", "Wert 2");
        customProperties.put("Sample Number", new Integer(12345));
        customProperties.put("Sample Boolean", new Boolean(true));
        customProperties.put("Sample Date", new Date());

        /* Read a custom property. */
        Object value = customProperties.get("Sample Number");

        /* Write the custom properties back to the document summary
         * information. */
        dsi.setCustomProperties(customProperties);

View Full Code Here

       
        parse(summary.getCustomProperties());
    }

    private String getLanguage(DocumentSummaryInformation summary) {
        CustomProperties customProperties = summary.getCustomProperties();
        if (customProperties != null) {
            Object value = customProperties.get("Language");
            if (value instanceof String) {
                return (String) value;
            }
        }
        return null;
View Full Code Here

    si.setComments("xxxCommentsxxx");
    si.setKeywords("xxxKeyWordsxxx");
    si.setSubject("xxxSubjectxxx");

    // Custom Properties (in DocumentSummaryInformation
    CustomProperties customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      customProperties = new CustomProperties();
    }

    /* Insert some custom properties into the container. */
    customProperties.put("Key1", "Value1");
    customProperties.put("Schl\u00fcssel2", "Wert2");
    customProperties.put("Sample Integer", new Integer(12345));
    customProperties.put("Sample Boolean", Boolean.TRUE);
    Date date = new Date();
    customProperties.put("Sample Date", date);
    customProperties.put("Sample Double", new Double(-1.0001));
    customProperties.put("Sample Negative Integer", new Integer(-100000));

    dsi.setCustomProperties(customProperties);

    // start reading
    closeAndReOpen();

    // testing
    assertNotNull(dsi);
    assertNotNull(si);

    assertEquals("Category", "xxxCategoryxxx", dsi.getCategory());
    assertEquals("Company", "xxxCompanyxxx", dsi.getCompany());
    assertEquals("Manager", "xxxManagerxxx", dsi.getManager());

    assertEquals("", "xxxAuthorxxx", si.getAuthor());
    assertEquals("", "xxxTitlexxx", si.getTitle());
    assertEquals("", "xxxCommentsxxx", si.getComments());
    assertEquals("", "xxxKeyWordsxxx", si.getKeywords());
    assertEquals("", "xxxSubjectxxx", si.getSubject());

    /*
     * Read the custom properties. If there are no custom properties yet,
     * the application has to create a new CustomProperties object. It will
     * serve as a container for custom properties.
     */
    customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      fail();
    }

    /* Insert some custom properties into the container. */
    String a1 = (String) customProperties.get("Key1");
    assertEquals("Key1", "Value1", a1);
    String a2 = (String) customProperties.get("Schl\u00fcssel2");
    assertEquals("Schl\u00fcssel2", "Wert2", a2);
    Integer a3 = (Integer) customProperties.get("Sample Integer");
    assertEquals("Sample Number", new Integer(12345), a3);
    Boolean a4 = (Boolean) customProperties.get("Sample Boolean");
    assertEquals("Sample Boolean", Boolean.TRUE, a4);
    Date a5 = (Date) customProperties.get("Sample Date");
    assertEquals("Custom Date:", date, a5);

    Double a6 = (Double) customProperties.get("Sample Double");
    assertEquals("Custom Float", new Double(-1.0001), a6);

    Integer a7 = (Integer) customProperties.get("Sample Negative Integer");
    assertEquals("Neg", new Integer(-100000), a7);
  }
View Full Code Here

    si.setTitle(title);
    si.setAuthor(author);
    si.setComments(comments);
    si.setKeywords(keywords);
    si.setSubject(subject);
    CustomProperties customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      customProperties = new CustomProperties();
    }

    /* Insert some custom properties into the container. */
    customProperties.put(k1, p1);
    customProperties.put(k2, p2);
    customProperties.put("Sample Number", new Integer(12345));
    customProperties.put("Sample Boolean", Boolean.TRUE);
    Date date = new Date();
    customProperties.put("Sample Date", date);

    dsi.setCustomProperties(customProperties);

    closeAndReOpen();

    assertNotNull(dsi);
    assertNotNull(si);
    /*
     * Change the category to "POI example". Any former category value will
     * be lost. If there has been no category yet, it will be created.
     */
    assertEquals("Category", category, dsi.getCategory());
    assertEquals("Company", company, dsi.getCompany());
    assertEquals("Manager", manager, dsi.getManager());

    assertEquals("", author, si.getAuthor());
    assertEquals("", title, si.getTitle());
    assertEquals("", comments, si.getComments());
    assertEquals("", keywords, si.getKeywords());
    assertEquals("", subject, si.getSubject());

    /*
     * Read the custom properties. If there are no custom properties yet,
     * the application has to create a new CustomProperties object. It will
     * serve as a container for custom properties.
     */
    customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      fail();
    }

    /* Insert some custom properties into the container. */
    String a1 = (String) customProperties.get(k1);
    assertEquals("Key1", p1, a1);
    String a2 = (String) customProperties.get(k2);
    assertEquals("Schl\u00fcssel2", p2, a2);
    Integer a3 = (Integer) customProperties.get("Sample Number");
    assertEquals("Sample Number", new Integer(12345), a3);
    Boolean a4 = (Boolean) customProperties.get("Sample Boolean");
    assertEquals("Sample Boolean", Boolean.TRUE, a4);
    Date a5 = (Date) customProperties.get("Sample Date");
    assertEquals("Custom Date:", date, a5);

  }
View Full Code Here

    si.setTitle(title);
    si.setAuthor(author);
    si.setComments(comments);
    si.setKeywords(keywords);
    si.setSubject(subject);
    CustomProperties customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      customProperties = new CustomProperties();
    }

    /* Insert some custom properties into the container. */
    customProperties.put(k1, p1);
    customProperties.put(k2, p2);
    customProperties.put("Sample Number", new Integer(12345));
    customProperties.put("Sample Boolean", Boolean.FALSE);
    Date date = new Date(0);
    customProperties.put("Sample Date", date);

    dsi.setCustomProperties(customProperties);

    closeAndReOpen();

    assertNotNull(dsi);
    assertNotNull(si);
    /*
     * Change the category to "POI example". Any former category value will
     * be lost. If there has been no category yet, it will be created.
     */
    assertEquals("Category", category, dsi.getCategory());
    assertEquals("Company", company, dsi.getCompany());
    assertEquals("Manager", manager, dsi.getManager());

    assertEquals("", author, si.getAuthor());
    assertEquals("", title, si.getTitle());
    assertEquals("", comments, si.getComments());
    assertEquals("", keywords, si.getKeywords());
    assertEquals("", subject, si.getSubject());

    /*
     * Read the custom properties. If there are no custom properties yet,
     * the application has to create a new CustomProperties object. It will
     * serve as a container for custom properties.
     */
    customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      fail();
    }

    /* Insert some custom properties into the container. */
    // System.out.println(k1);
    String a1 = (String) customProperties.get(k1);
    assertEquals("Key1", p1, a1);
    String a2 = (String) customProperties.get(k2);
    assertEquals("Schl\u00fcssel2", p2, a2);
    Integer a3 = (Integer) customProperties.get("Sample Number");
    assertEquals("Sample Number", new Integer(12345), a3);
    Boolean a4 = (Boolean) customProperties.get("Sample Boolean");
    assertEquals("Sample Boolean", Boolean.FALSE, a4);
    Date a5 = (Date) customProperties.get("Sample Date");
    assertEquals("Custom Date:", date, a5);

  }
View Full Code Here

    si.setTitle(title);
    si.setAuthor(author);
    si.setComments(comments);
    si.setKeywords(keywords);
    si.setSubject(subject);
    CustomProperties customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      customProperties = new CustomProperties();
    }

    /* Insert some custom properties into the container. */
    customProperties.put(k1, p1);
    customProperties.put(k2, p2);
    customProperties.put("Sample Number", new Integer(12345));
    customProperties.put("Sample Boolean", Boolean.TRUE);
    Date date = new Date();
    customProperties.put("Sample Date", date);

    dsi.setCustomProperties(customProperties);

    closeAndReOpen();

    assertNotNull(dsi);
    assertNotNull(si);
    /*
     * Change the category to "POI example". Any former category value will
     * be lost. If there has been no category yet, it will be created.
     */
    assertEquals("Category", category, dsi.getCategory());
    assertEquals("Company", company, dsi.getCompany());
    assertEquals("Manager", manager, dsi.getManager());

    assertEquals("", author, si.getAuthor());
    assertEquals("", title, si.getTitle());
    assertEquals("", comments, si.getComments());
    assertEquals("", keywords, si.getKeywords());
    assertEquals("", subject, si.getSubject());

    /*
     * Read the custom properties. If there are no custom properties yet,
     * the application has to create a new CustomProperties object. It will
     * serve as a container for custom properties.
     */
    customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      fail();
    }

    /* Insert some custom properties into the container. */
    // System.out.println(k1);
    String a1 = (String) customProperties.get(k1);
    assertEquals("Key1", p1, a1);
    String a2 = (String) customProperties.get(k2);
    assertEquals("Schl\u00fcssel2", p2, a2);
    Integer a3 = (Integer) customProperties.get("Sample Number");
    assertEquals("Sample Number", new Integer(12345), a3);
    Boolean a4 = (Boolean) customProperties.get("Sample Boolean");
    assertEquals("Sample Boolean", Boolean.TRUE, a4);
    Date a5 = (Date) customProperties.get("Sample Date");
    assertEquals("Custom Date:", date, a5);
  }
View Full Code Here

  /**
   * Tests conversion in custom fields and errors
   */
  public void testConvAndExistence() {

    CustomProperties customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      customProperties = new CustomProperties();
    }

    /* Insert some custom properties into the container. */
    customProperties.put("int", new Integer(12345));
    customProperties.put("negint", new Integer(-12345));
    customProperties.put("long", new Long(12345));
    customProperties.put("neglong", new Long(-12345));
    customProperties.put("boolean", Boolean.TRUE);
    customProperties.put("string", "a String");
    // customProperties.put("float", new Float(12345.0)); is not valid
    // customProperties.put("negfloat", new Float(-12345.1)); is not valid
    customProperties.put("double", new Double(12345.2));
    customProperties.put("negdouble", new Double(-12345.3));
    // customProperties.put("char", new Character('a')); is not valid

    Date date = new Date();
    customProperties.put("date", date);

    dsi.setCustomProperties(customProperties);

    closeAndReOpen();

    assertNotNull(dsi);
    assertNotNull(si);
    /*
     * Change the category to "POI example". Any former category value will
     * be lost. If there has been no category yet, it will be created.
     */
    assertNull(dsi.getCategory());
    assertNull(dsi.getCompany());
    assertNull(dsi.getManager());

    assertNull(si.getAuthor());
    assertNull(si.getTitle());
    assertNull(si.getComments());
    assertNull(si.getKeywords());
    assertNull(si.getSubject());

    /*
     * Read the custom properties. If there are no custom properties yet,
     * the application has to create a new CustomProperties object. It will
     * serve as a container for custom properties.
     */
    customProperties = dsi.getCustomProperties();
    if (customProperties == null) {
      fail();
    }

    /* Insert some custom properties into the container. */

    Integer a3 = (Integer) customProperties.get("int");
    assertEquals("int", new Integer(12345), a3);

    a3 = (Integer) customProperties.get("negint");
    assertEquals("negint", new Integer(-12345), a3);

    Long al = (Long) customProperties.get("neglong");
    assertEquals("neglong", new Long(-12345), al);

    al = (Long) customProperties.get("long");
    assertEquals("long", new Long(12345), al);

    Boolean a4 = (Boolean) customProperties.get("boolean");
    assertEquals("boolean", Boolean.TRUE, a4);

    Date a5 = (Date) customProperties.get("date");
    assertEquals("Custom Date:", date, a5);

    Double d = (Double) customProperties.get("double");
    assertEquals("int", new Double(12345.2), d);

    d = (Double) customProperties.get("negdouble");
    assertEquals("string", new Double(-12345.3), d);

    String s = (String) customProperties.get("string");
    assertEquals("sring", "a String", s);


    assertTrue(customProperties.get("string") instanceof String);
    assertTrue(customProperties.get("boolean") instanceof Boolean);
    assertTrue(customProperties.get("int") instanceof Integer);
    assertTrue(customProperties.get("negint") instanceof Integer);
    assertTrue(customProperties.get("long") instanceof Long);
    assertTrue(customProperties.get("neglong") instanceof Long);
    assertTrue(customProperties.get("double") instanceof Double);
    assertTrue(customProperties.get("negdouble") instanceof Double);
    assertTrue(customProperties.get("date") instanceof Date);
  }
View Full Code Here

        dsi.setParCount(P_PAR_COUNT);
        dsi.setPresentationFormat(P_PRESENTATION_FORMAT);
        dsi.setScale(P_SCALE);
        dsi.setSlideCount(P_SLIDE_COUNT);

        CustomProperties customProperties = dsi.getCustomProperties();
        if (customProperties == null)
            customProperties = new CustomProperties();
        customProperties.put("Schl\u00fcssel \u00e4",    "Wert \u00e4");
        customProperties.put("Schl\u00fcssel \u00e4\u00f6",   "Wert \u00e4\u00f6");
        customProperties.put("Schl\u00fcssel \u00e4\u00f6\u00fc""Wert \u00e4\u00f6\u00fc");
        customProperties.put("Schl\u00fcssel \u00e4\u00f6\u00fc\u00d6", "Wert \u00e4\u00f6\u00fc\u00d6");
        customProperties.put("positive_Integer", POSITIVE_INTEGER);
        customProperties.put("positive_Long", POSITIVE_LONG);
        customProperties.put("positive_Double", POSITIVE_DOUBLE);
        customProperties.put("negative_Integer", NEGATIVE_INTEGER);
        customProperties.put("negative_Long", NEGATIVE_LONG);
        customProperties.put("negative_Double", NEGATIVE_DOUBLE);
        customProperties.put("Boolean", Boolean.TRUE);
        customProperties.put("Date", now);
        customProperties.put("max_Integer", MAX_INTEGER);
        customProperties.put("min_Integer", MIN_INTEGER);
        customProperties.put("max_Long", MAX_LONG);
        customProperties.put("min_Long", MIN_LONG);
        customProperties.put("max_Double", MAX_DOUBLE);
        customProperties.put("min_Double", MIN_DOUBLE);
       
        // Check the keys went in
        assertTrue(customProperties.containsKey("Schl\u00fcssel \u00e4"));
        assertTrue(customProperties.containsKey("Boolean"));
       
        // Check the values went in
        assertEquals("Wert \u00e4", customProperties.get("Schl\u00fcssel \u00e4"));
        assertEquals(Boolean.TRUE, customProperties.get("Boolean"));
        assertTrue(customProperties.containsValue(Boolean.TRUE));
        assertTrue(customProperties.containsValue("Wert \u00e4"));
       
        // Check that things that aren't in aren't in
        assertFalse(customProperties.containsKey("False Boolean"));
        assertFalse(customProperties.containsValue(Boolean.FALSE));

        // Save as our custom properties
        dsi.setCustomProperties(customProperties);

       
        /* Write the summary information stream and the document summary
         * information stream to the POI filesystem. */
        si.write(dir, siEntry.getName());
        dsi.write(dir, dsiEntry.getName());

        /* Write the POI filesystem to a (temporary) file <em>doc2</em>
         * and close the latter. */
        final File doc2 = TempFile.createTempFile("POI_HPSF_Test.", ".tmp");
        doc2.deleteOnExit();
        OutputStream out = new FileOutputStream(doc2);
        poifs.writeFilesystem(out);
        out.close();

        /*
         * Open <em>doc2</em> for reading and check summary information and
         * document summary information. All properties written before must be
         * found in the property streams of <em>doc2</em> and have the correct
         * values.
         */
        poifs = new POIFSFileSystem(new FileInputStream(doc2));
        dir = poifs.getRoot();
        siEntry = (DocumentEntry) dir.getEntry(SummaryInformation.DEFAULT_STREAM_NAME);
        dsiEntry = (DocumentEntry) dir.getEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME);

        dis = new DocumentInputStream(siEntry);
        ps = new PropertySet(dis);
        si = new SummaryInformation(ps);
        dis = new DocumentInputStream(dsiEntry);
        ps = new PropertySet(dis);
        dsi = new DocumentSummaryInformation(ps);

        assertEquals(P_APPLICATION_NAME, si.getApplicationName());
        assertEquals(P_AUTHOR, si.getAuthor());
        assertEquals(P_CHAR_COUNT, si.getCharCount());
        assertEquals(P_COMMENTS, si.getComments());
        assertEquals(P_CREATE_DATE_TIME, si.getCreateDateTime());
        assertEquals(P_EDIT_TIME, si.getEditTime());
        assertEquals(P_KEYWORDS, si.getKeywords());
        assertEquals(P_LAST_AUTHOR, si.getLastAuthor());
        assertEquals(P_LAST_PRINTED, si.getLastPrinted());
        assertEquals(P_LAST_SAVE_DATE_TIME, si.getLastSaveDateTime());
        assertEquals(P_PAGE_COUNT, si.getPageCount());
        assertEquals(P_REV_NUMBER, si.getRevNumber());
        assertEquals(P_SECURITY, si.getSecurity());
        assertEquals(P_SUBJECT, si.getSubject());
        assertEquals(P_TEMPLATE, si.getTemplate());
        // FIXME (byte array properties not yet implemented): assertEquals(P_THUMBNAIL, si.getThumbnail());
        assertEquals(P_TITLE, si.getTitle());
        assertEquals(P_WORD_COUNT, si.getWordCount());

        assertEquals(P_BYTE_COUNT, dsi.getByteCount());
        assertEquals(P_CATEGORY, dsi.getCategory());
        assertEquals(P_COMPANY, dsi.getCompany());
        // FIXME (byte array properties not yet implemented): assertEquals(P_, dsi.getDocparts());
        // FIXME (byte array properties not yet implemented): assertEquals(P_, dsi.getHeadingPair());
        assertEquals(P_HIDDEN_COUNT, dsi.getHiddenCount());
        assertEquals(P_LINE_COUNT, dsi.getLineCount());
        assertEquals(P_LINKS_DIRTY, dsi.getLinksDirty());
        assertEquals(P_MANAGER, dsi.getManager());
        assertEquals(P_MM_CLIP_COUNT, dsi.getMMClipCount());
        assertEquals(P_NOTE_COUNT, dsi.getNoteCount());
        assertEquals(P_PAR_COUNT, dsi.getParCount());
        assertEquals(P_PRESENTATION_FORMAT, dsi.getPresentationFormat());
        assertEquals(P_SCALE, dsi.getScale());
        assertEquals(P_SLIDE_COUNT, dsi.getSlideCount());

        final CustomProperties cps = dsi.getCustomProperties();
        assertEquals(customProperties, cps);
        assertNull(cps.get("No value available"));
        assertEquals("Wert \u00e4", cps.get("Schl\u00fcssel \u00e4"));
        assertEquals("Wert \u00e4\u00f6", cps.get("Schl\u00fcssel \u00e4\u00f6"));
        assertEquals("Wert \u00e4\u00f6\u00fc", cps.get("Schl\u00fcssel \u00e4\u00f6\u00fc"));
        assertEquals("Wert \u00e4\u00f6\u00fc\u00d6", cps.get("Schl\u00fcssel \u00e4\u00f6\u00fc\u00d6"));
        assertEquals(POSITIVE_INTEGER, cps.get("positive_Integer"));
        assertEquals(POSITIVE_LONG, cps.get("positive_Long"));
        assertEquals(POSITIVE_DOUBLE, cps.get("positive_Double"));
        assertEquals(NEGATIVE_INTEGER, cps.get("negative_Integer"));
        assertEquals(NEGATIVE_LONG, cps.get("negative_Long"));
        assertEquals(NEGATIVE_DOUBLE, cps.get("negative_Double"));
        assertEquals(Boolean.TRUE, cps.get("Boolean"));
        assertEquals(now, cps.get("Date"));
        assertEquals(MAX_INTEGER, cps.get("max_Integer"));
        assertEquals(MIN_INTEGER, cps.get("min_Integer"));
        assertEquals(MAX_LONG, cps.get("max_Long"));
        assertEquals(MIN_LONG, cps.get("min_Long"));
        assertEquals(MAX_DOUBLE, cps.get("max_Double"));
        assertEquals(MIN_DOUBLE, cps.get("min_Double"));

        /* Remove all properties supported by HPSF from the summary
         * information (e.g. author, edit date, application name) and from the
         * document summary information (e.g. company, manager). */
        si.removeApplicationName();
View Full Code Here

TOP

Related Classes of org.apache.poi.hpsf.CustomProperties

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.