KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > applications > media > urlcomposers > omroep > SimpleRealURLComposer


1 /*
2   
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5   
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8   
9 */

10
11 package org.mmbase.applications.media.urlcomposers.omroep;
12 import org.mmbase.applications.media.urlcomposers.RealURLComposer;
13
14
15 /**
16  * An example. URL's from these kind of URLComposers can contain 'start' and 'end' arguments and so on.
17  *
18  * @author Michiel Meeuwissen
19  * @version $Id: SimpleRealURLComposer.java,v 1.2 2005/01/30 16:46:36 nico Exp $
20  * @since MMBase-1.7
21  */

22 public class SimpleRealURLComposer extends RealURLComposer {
23
24     public boolean canCompose() {
25         return provider.getStringValue("host").equals("cgi.omroep.nl") && provider.getStringValue("rootpath").charAt(0) != '%';
26     }
27     
28     protected StringBuffer JavaDoc getURLBuffer() {
29         StringBuffer JavaDoc buff = new StringBuffer JavaDoc("rtsp://streams.omroep.nl" + source.getStringValue("url"));
30         RealURLComposer.getRMArgs(buff, fragment, info); // append time, title, als
31
return buff;
32     }
33 }
34
35
36
Popular Tags