Package de.nava.informa.core

Examples of de.nava.informa.core.ChannelIF.addItem()


    ChannelIF channel = new Channel("Niko's log");
    SimpleChannelObserver observer = new SimpleChannelObserver();
    ((ChannelObservableIF) channel).addObserver(observer);
    assertEquals(0, channel.getItems().size());
    ItemIF item = new Item("Bongo", "Rongoo", null);
    channel.addItem(item);
    assertEquals(1, channel.getItems().size());
    assertTrue(channel.getItems().contains(item));
    assertEquals(item, observer.getMyAddedItem());
   
  }
View Full Code Here


    channel.setDescription(ch_desc);
    channel.setSite(new URL("http://nava.de"));
    ItemIF itemA = new Item("Bugo", "All about it!",
                            new URL("http://nava.de/huhu2002"));
    itemA.setFound(new Date());
    channel.addItem(itemA);
    // TODO: what about markup here ???
    ItemIF itemB = new Item("SoCool",
                            "????**$12 @??? # <strong>should</strong> work",
                            new URL("http://nava.de/very/nested/98"));
    itemB.setFound(new Date());
View Full Code Here

    // TODO: what about markup here ???
    ItemIF itemB = new Item("SoCool",
                            "????**$12 @??? # <strong>should</strong> work",
                            new URL("http://nava.de/very/nested/98"));
    itemB.setFound(new Date());
    channel.addItem(itemB);
    assertEquals(2, channel.getItems().size());
    // export this channel to file (encoding: utf-8)
    String basename = "export-rss091.xml";
    String exp_file = getOutputDir() + FS + basename;
    ChannelExporterIF exporter = new RSS_0_91_Exporter(exp_file);
View Full Code Here

    channel.setSite(new URL("http://nava.de"));
    channel.setLocation(new URL("http://nava.de/news.rdf"));
    ItemIF itemA = new Item("Bugo", "All about it!",
                            new URL("http://nava.de/huhu2002"));
    itemA.setFound(new Date());
    channel.addItem(itemA);
    // TODO: what about markup here ???
    ItemIF itemB = new Item("SoCool",
                            "????**$12 @??? # <strong>should</strong> work",
                            new URL("http://nava.de/very/nested/98"));
    itemB.setFound(new Date());
View Full Code Here

    // TODO: what about markup here ???
    ItemIF itemB = new Item("SoCool",
                            "????**$12 @??? # <strong>should</strong> work",
                            new URL("http://nava.de/very/nested/98"));
    itemB.setFound(new Date());
    channel.addItem(itemB);
    assertEquals(2, channel.getItems().size());
    // export this channel to file (encoding: utf-8)
    String basename = "export-rss10.xml";
    String exp_file = getOutputDir() + FS + basename;
    ChannelExporterIF exporter = new RSS_1_0_Exporter(exp_file);
View Full Code Here

  protected void setUp() throws MalformedURLException {
    ChannelIF channelA = new Channel("example.org");
    channelId = channelA.getId();
    itemA = new Item("Java 1.5 out", "Long awaited...",
                     new URL("http://example.org/1234"));
    channelA.addItem(itemA);
    ItemIF itemB = new Item("XML virus found", "All about it here.",
                            new URL("http://example.org/2345"));
    channelA.addItem(itemB);
    ItemIF itemC = new Item("Quiet Slashdot", "No news today.",
                            new URL("http://example.org/3456"));
View Full Code Here

    itemA = new Item("Java 1.5 out", "Long awaited...",
                     new URL("http://example.org/1234"));
    channelA.addItem(itemA);
    ItemIF itemB = new Item("XML virus found", "All about it here.",
                            new URL("http://example.org/2345"));
    channelA.addItem(itemB);
    ItemIF itemC = new Item("Quiet Slashdot", "No news today.",
                            new URL("http://example.org/3456"));
    channelA.addItem(itemC);
    channels = new ChannelGroup("Default");
    channels.add(channelA);
View Full Code Here

    ItemIF itemB = new Item("XML virus found", "All about it here.",
                            new URL("http://example.org/2345"));
    channelA.addItem(itemB);
    ItemIF itemC = new Item("Quiet Slashdot", "No news today.",
                            new URL("http://example.org/3456"));
    channelA.addItem(itemC);
    channels = new ChannelGroup("Default");
    channels.add(channelA);
  }
 
  public void testIndexItems() throws IOException, QueryParseException {
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.