Examples of PropertySet


Examples of microsoft.exchange.webservices.data.PropertySet

    }
    return newTime;
  }

  private PropertySet createIdOnlyPropertySet() {
    final PropertySet propertySet = new PropertySet(BasePropertySet.IdOnly);
    return propertySet;
  }
View Full Code Here

Examples of oracle.security.idm.PropertySet

            idStore = service.getIdmStore();

            User user = idStore.searchUser(secCntx.getUserName());
            if (user != null) {
                userProfile = user.getUserProfile();
                PropertySet propSet = userProfile.getAllUserProperties();

                Iterator it = propSet.getAll();
                while (it.hasNext()) {
                    Property prop = (Property)it.next();
                    this.attributes =
                            this.attributes + "property: " + prop.getName();
                    Iterator it2 = prop.getValues().iterator();
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.PropertySet

        // these properties, the impl can tell if the PropertySet is unset because
        // this method will return null.
        //
        if (!map.containsPropertySet(propertySet))
        {
            PropertySet psAnnot = propertySet.getAnnotation(PropertySet.class);
            if (psAnnot.optional())
                return null;
        }

        //
        // Construct a new PropertySet proxy instance that derives its values from
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.poi.hpsf.PropertySet

      try
      {
        InputStream is = event.getStream();
        try
        {
          PropertySet ps = PropertySetFactory.create(is);
          if (!(ps instanceof SummaryInformation))
          {
            appName = null;
            return;
          }
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

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            mps.write(out);
            out.close();
            byte[] bytes = out.toByteArray();

            PropertySet psr = new PropertySet(bytes);
            assertTrue(psr.isSummaryInformation());
            Section sr = (Section) psr.getSections().get(0);
            String title = (String) sr.getProperty(PropertyIDMap.PID_TITLE);
            assertEquals(TITLE, title);
        }
        catch (WritingNotSupportedException e)
        {
View Full Code Here

Examples of org.apache.poi.hpsf.PropertySet

            final POIFSFileSystem poiFs = new POIFSFileSystem();
            for (int i = 0; i < psf1.length; i++)
            {
                final InputStream in =
                    new ByteArrayInputStream(psf1[i].getBytes());
                final PropertySet psIn = PropertySetFactory.create(in);
                final MutablePropertySet psOut = new MutablePropertySet(psIn);
                final ByteArrayOutputStream psStream =
                    new ByteArrayOutputStream();
                psOut.write(psStream);
                psStream.close();
                final byte[] streamData = psStream.toByteArray();
                poiFs.createDocument(new ByteArrayInputStream(streamData),
                                     psf1[i].getName());
                poiFs.writeFilesystem(out);
            }
            out.close();


            /* Read the property set streams from the POI filesystem just
             * created. */
            final POIFile[] psf2 = Util.readPropertySets(copy);
            for (int i = 0; i < psf2.length; i++)
            {
                final byte[] bytes1 = psf1[i].getBytes();
                final byte[] bytes2 = psf2[i].getBytes();
                final InputStream in1 = new ByteArrayInputStream(bytes1);
                final InputStream in2 = new ByteArrayInputStream(bytes2);
                final PropertySet ps1 = PropertySetFactory.create(in1);
                final PropertySet ps2 = PropertySetFactory.create(in2);
           
                /* Compare the property set stream with the corresponding one
                 * from the origin file and check whether they are equal. */
                assertEquals("Equality for file " + f.getName(), ps1, ps2);
            }
View Full Code Here

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 Integer(-96070278));
        Assert.assertEquals(s.getProperty(3),
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.