Examples of PropertySet


Examples of org.apache.poi.hpsf.PropertySet

            /* Read back: */
            final POIFile[] psf = Util.readPropertySets(copy);
            Assert.assertEquals(1, psf.length);
            final byte[] bytes = psf[0].getBytes();
            final InputStream in = new ByteArrayInputStream(bytes);
            final PropertySet ps2 = PropertySetFactory.create(in);

            /* Check if the result is a DocumentSummaryInformation stream, as
             * specified. */
            assertTrue(ps2.isDocumentSummaryInformation());

            /* Compare the property set stream with the corresponding one
             * from the origin file and check whether they are equal. */
            assertEquals(ps1, ps2);
        }
View Full Code Here

Examples of org.apache.poi.hpsf.PropertySet

     */
    public void testPropertySetMethods() throws IOException, HPSFException
    {
        POIFile poiFile = Util.readPOIFiles(data, POI_FILES)[0];
        byte[] b = poiFile.getBytes();
        PropertySet ps =
            PropertySetFactory.create(new ByteArrayInputStream(b));
        Assert.assertTrue(ps.isDocumentSummaryInformation());
        Assert.assertEquals(ps.getSectionCount(), 2);
        Section s = (Section) ps.getSections().get(1);
        Assert.assertEquals(s.getProperty(1),
                            new Integer(Constants.CP_UTF16));
        Assert.assertEquals(s.getProperty(2),
                            new Long(4198897018L));
        Assert.assertEquals(s.getProperty(3),
View Full Code Here

Examples of org.apache.poi.hpsf.PropertySet

    {
        /* Loop over the two property sets. */
        for (int i = 0; i < 2; i++)
        {
            byte[] b = poiFiles[i].getBytes();
            PropertySet ps =
                PropertySetFactory.create(new ByteArrayInputStream(b));
            Assert.assertEquals(ps.getByteOrder(), BYTE_ORDER);
            Assert.assertEquals(ps.getFormat(), FORMAT);
            Assert.assertEquals(ps.getOSVersion(), OS_VERSION);
            Assert.assertEquals(new String(ps.getClassID().getBytes()),
                                new String(CLASS_ID));
            Assert.assertEquals(ps.getSectionCount(), SECTION_COUNT[i]);
            Assert.assertEquals(ps.isSummaryInformation(),
                                IS_SUMMARY_INFORMATION[i]);
            Assert.assertEquals(ps.isDocumentSummaryInformation(),
                                IS_DOCUMENT_SUMMARY_INFORMATION[i]);
        }
    }
View Full Code Here

Examples of org.apache.poi.hpsf.PropertySet

     * @exception HPSFException if an HPSF operation fails
     */
    public void testPropertySetMethods() throws IOException, HPSFException
    {
        byte[] b = poiFiles[1].getBytes();
        PropertySet ps =
            PropertySetFactory.create(new ByteArrayInputStream(b));
        SummaryInformation s = (SummaryInformation) ps;
        assertNull(s.getTitle());
        assertNull(s.getSubject());
        assertNotNull(s.getAuthor());
View Full Code Here

Examples of org.apache.poi.hpsf.PropertySet

    return null;
  }

  try {
    // Create the Property Set
    PropertySet set = PropertySetFactory.create(dis);
    return set;
  } catch(IOException ie) {
    // Must be corrupt or something like that
    System.err.println("Error creating property set with name " + setName + "\n" + ie);
  } catch(org.apache.poi.hpsf.HPSFException he) {
View Full Code Here

Examples of org.apache.servicemix.components.mps.PropertySet

                          .append("<existing-property name='property1'/>")
                          .append("</property>")
                          .append("</property-set>").toString();
    Document propertySet = makeDocument(xmlConfig);
    try {
      PropertySet ps = new PropertySet("somename",propertySet.getDocumentElement());
      NormalizedMessage inMessage = makeTestMessage(null);
      NormalizedMessage outMessage = makeTestMessage(null);
      ps.applyProperties(inMessage,outMessage);
     
      assertTrue(TEST_STRING.equals(outMessage.getProperty("testSimpleStaticValue.property")));
    } catch (ConfigNotSupportedException e) {
      fail(e.getLocalizedMessage());
    } catch (JBIException e) {
View Full Code Here

Examples of org.apache.tools.ant.types.PropertySet

            addAlmostAll(getProject().getProperties());
        }

        Enumeration e = propertySets.elements();
        while (e.hasMoreElements()) {
            PropertySet ps = (PropertySet) e.nextElement();
            addAlmostAll(ps.getProperties());
        }
    }
View Full Code Here

Examples of org.flexdock.plaf.PropertySet

            }
        }
    }

    private static IconResource loadIcons(String name) {
        PropertySet properties = Configurator.getProperties(name, ICON_RESOURCE_KEY);
        return createResource(properties);
    }
View Full Code Here

Examples of org.hibernate.test.any.PropertySet

    PropertyValue redValue = new StringPropertyValue( "red" );
    PropertyValue lonliestNumberValue = new IntegerPropertyValue( 1 );

    Long id;
    PropertySet ps = new PropertySet( "my properties" );
    ps.setSomeSpecificProperty( redValue );
    ps.getGeneralProperties().put( "the lonliest number", lonliestNumberValue );
    ps.getGeneralProperties().put( "i like", new StringPropertyValue( "pina coladas" ) );
    ps.getGeneralProperties().put( "i also like", new StringPropertyValue( "getting caught in the rain" ) );
    s.save( ps );

    s.getTransaction().commit();
    id = ps.getId();
    s.clear();
    s.beginTransaction();

    // TODO : setEntity() currently will not work here, but that would be *very* nice
    // does not work because the corresponding EntityType is then used as the "bind type" rather
View Full Code Here

Examples of org.jostraca.util.PropertySet

  public BasicTemplateElementProcessor
    ( TemplateActionHandler pTemplateActionHandler,
      PropertySet           pPropertySet )
  {
    TemplateActionHandler tah = (TemplateActionHandler) Internal.null_arg( pTemplateActionHandler );
    PropertySet           ps  = (PropertySet)           Internal.null_arg( pPropertySet );

    iUnitList                     = new BasicUnitList();
    iTemplateActionHandler        = tah;
    iPropertySet                  = ps;
    iTextualTransformManagerTable = new TextualTransformManagerTable( iPropertySet );
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.