Examples of properties()


Examples of javax.sound.midi.MidiFileFormat.properties()

        Map<String, Object> table = new Hashtable<String, Object>();
        table.put("first", "one");
        table.put("second", "two");
        MidiFileFormat format = new MidiFileFormat(1, 2.0f, 3, 4, 5L, table);
       
        table = format.properties();
        assertEquals("one", table.get("first"));
       
        try {
            table.put("first", "not one");
            fail("UnsupportedOperationException expected");
View Full Code Here

Examples of javax.sound.sampled.AudioFileFormat.properties()

            String file_name = file.getName() + "\n";
            String file_type = audio_file_format.getType().toString() + "\n";
            String file_size = (audio_file_format.getByteLength() / 1024) + " kilobytes\n";
            String length_of_audio_data = audio_file_format.getFrameLength() + " sample frames\n";
            String time_duration = audio_file_format.getFrameLength() / audio_file_format.getFormat().getFrameRate() + " seconds\n";
            String additional_properties = audio_file_format.properties() + "\n";

            StringBuilder data = new StringBuilder();
            data.append("FILE NAME: ").append(file_name);
            data.append("FILE TYPE: ").append(file_type);
            data.append("FILE SIZE: ").append(file_size);
View Full Code Here

Examples of javax.sound.sampled.AudioFormat.properties()

            // "title" String title of this file
            // "copyright" String copyright message
            // "date" Date date of the recording or release
            // "comment" String an arbitrary text

            for (Entry<String, Object> entry : format.properties().entrySet()) {
                metadata.set(entry.getKey(), entry.getValue().toString());
            }
        } catch (UnsupportedAudioFileException e) {
            // There is no way to know whether this exception was
            // caused by the document being corrupted or by the format
View Full Code Here

Examples of org.apache.commons.configuration2.builder.fluent.Parameters.properties()

    public void testCreateConfigurationNonExistingFileAndThenSave()
            throws ConfigurationException {
        File outFile = ConfigurationAssert.getOutFile("save.properties");
        Parameters parameters = new Parameters();
        FileBasedConfigurationBuilder<PropertiesConfiguration> builder = new FileBasedConfigurationBuilder<PropertiesConfiguration>(
                PropertiesConfiguration.class, null, true).configure(parameters
                .properties().setFile(outFile));
        Configuration config = builder.getConfiguration();
        config.setProperty(PROP, 1);
        builder.save();
        checkSavedConfig(outFile, 1);
View Full Code Here

Examples of org.apache.sling.event.jobs.JobBuilder.properties()

    @SuppressWarnings("unchecked")
    @Test
    public void testPackageAddition() throws Exception {
        JobManager jobManager = mock(JobManager.class);
        JobBuilder builder = mock(JobBuilder.class);
        when(builder.properties(any(Map.class))).thenReturn(builder);
        Job job = mock(Job.class);
        when(job.getId()).thenReturn("id-123");
        when(builder.add()).thenReturn(job);
        String topic = JobHandlingReplicationQueue.REPLICATION_QUEUE_TOPIC + "/aname";
        when(jobManager.createJob(topic)).thenReturn(builder);
View Full Code Here

Examples of org.apache.sling.event.jobs.JobBuilder.properties()

        when(job.getId()).thenReturn("id-123");
        when(builder.add()).thenReturn(job);
        String topic = JobHandlingReplicationQueue.REPLICATION_QUEUE_TOPIC + "/aname";
        when(jobManager.createJob(topic)).thenReturn(builder);
        when(jobManager.findJobs(JobManager.QueryType.ALL, topic, -1)).thenReturn(Collections.<Job>emptySet());
        when(builder.properties(any(Map.class))).thenReturn(builder);
        ReplicationQueue queue = new JobHandlingReplicationQueue("aname", topic, jobManager);
        ReplicationQueueItem pkg = mock(ReplicationQueueItem.class);
        assertTrue(queue.add(pkg));
    }
View Full Code Here

Examples of org.apache.sling.event.jobs.JobBuilder.properties()

    @SuppressWarnings("unchecked")
    @Test
    public void testPackageAdditionAndStatusCheck() throws Exception {
        JobManager jobManager = mock(JobManager.class);
        JobBuilder builder = mock(JobBuilder.class);
        when(builder.properties(any(Map.class))).thenReturn(builder);
        Job job = mock(Job.class);
        when(job.getId()).thenReturn("id-123");
        when(builder.add()).thenReturn(job);
        String topic = JobHandlingReplicationQueue.REPLICATION_QUEUE_TOPIC + "/aname";
        when(jobManager.createJob(topic)).thenReturn(builder);
View Full Code Here

Examples of org.apache.sling.event.jobs.JobBuilder.properties()

        when(job.getId()).thenReturn("id-123");
        when(builder.add()).thenReturn(job);
        String topic = JobHandlingReplicationQueue.REPLICATION_QUEUE_TOPIC + "/aname";
        when(jobManager.createJob(topic)).thenReturn(builder);
        when(jobManager.findJobs(JobManager.QueryType.ALL, topic, -1)).thenReturn(Collections.<Job>emptySet());
        when(builder.properties(any(Map.class))).thenReturn(builder);
        ReplicationQueue queue = new JobHandlingReplicationQueue("aname", topic, jobManager);
        ReplicationQueueItem pkg = mock(ReplicationQueueItem.class);
        assertTrue(queue.add(pkg));
        ReplicationQueueItemState status = queue.getStatus(pkg);
        assertNotNull(status);
View Full Code Here

Examples of org.apache.struts.action.ActionMessages.properties()

    StringBuffer results = new StringBuffer();
    boolean headerDone = false;
    String message = null;

    for (Iterator i = errors.properties(); i.hasNext();)
    {
      String errorProperty = (String) i.next();

      if (! displayEllErrors && ! errorProperty.startsWith("GLOBAL_"))
      {
View Full Code Here

Examples of org.atmosphere.config.service.AtmosphereHandlerService.properties()

            }

            framework.sessionSupport(a.supportSession());

            AtmosphereHandler handler = framework.newClassInstance(AtmosphereHandler.class, annotatedClass);
            for (String s : a.properties()) {
                String[] nv = s.split("=");
                IntrospectionUtils.setProperty(handler, nv[0], nv[1]);
                IntrospectionUtils.addProperty(handler, nv[0], nv[1]);
            }
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.