Examples of ISource


Examples of org.rssowl.core.persist.ISource

      news3cat3.setName("slashdot");

      INews news4 = createNews(feed, null, "http://www.news.com/news4.html", State.UPDATED);
      IPerson author4 = fFactory.createPerson(null, news4);
      author4.setName("Pasero");
      ISource source4 = fFactory.createSource(news4);
      source4.setLink(new URI("http://www.source.com"));

      INews news5 = createNews(feed, null, "http://www.news.com/news5.html", State.NEW);
      news5.setFlagged(true);
      IPerson author5 = fFactory.createPerson(null, news5);
      author5.setEmail(new URI("test@rssowl.org"));
      ISource source5 = fFactory.createSource(news5);
      source5.setName("Source for News 5");
      ICategory news5cat1 = fFactory.createCategory(null, news5);
      news5cat1.setName("Apache Lucene");
      ICategory news5cat2 = fFactory.createCategory(null, news5);
      news5cat2.setName("Java");
View Full Code Here

Examples of org.rssowl.core.persist.ISource

      news3cat3.setName("slashdot");

      INews news4 = createNews(feed, null, "http://www.news.com/news4.html", State.UPDATED);
      IPerson author4 = fFactory.createPerson(null, news4);
      author4.setName("Pasero");
      ISource source4 = fFactory.createSource(news4);
      source4.setLink(new URI("http://www.source.com"));

      INews news5 = createNews(feed, null, "http://www.news.com/news5.html", State.NEW);
      news5.setFlagged(true);
      IPerson author5 = fFactory.createPerson(null, news5);
      author5.setEmail(new URI("test@rssowl.org"));
      ISource source5 = fFactory.createSource(news5);
      source5.setName("Source for News 5");
      ICategory news5cat1 = fFactory.createCategory(null, news5);
      news5cat1.setName("Apache Lucene");
      ICategory news5cat2 = fFactory.createCategory(null, news5);
      news5cat2.setName("Java");
View Full Code Here

Examples of org.rssowl.core.persist.ISource

      INews news4 = createNews(feed, null, "http://www.news.com/news4.html", State.UPDATED);
      Date news4Date = new Date(1000000);
      news4.setPublishDate(news4Date);
      IPerson author4 = fFactory.createPerson(null, news4);
      author4.setName("Pasero");
      ISource source4 = fFactory.createSource(news4);
      source4.setLink(new URI("http://www.source.com"));

      INews news5 = createNews(feed, null, "http://www.news.com/news5.html", State.NEW);
      news5.setFlagged(true);
      IPerson author5 = fFactory.createPerson(null, news5);
      author5.setEmail(new URI("test@rssowl.org"));
      ISource source5 = fFactory.createSource(news5);
      source5.setName("Source for News 5");

      DynamicDAO.save(feed);

      /* Wait for Indexer */
      waitForIndexer();
View Full Code Here

Examples of org.rssowl.core.persist.ISource

      INews news4 = createNews(feed, null, "http://www.news.com/news4.html", State.UPDATED);
      Date news4Date = new Date(1000000);
      news4.setPublishDate(news4Date);
      IPerson author4 = fFactory.createPerson(null, news4);
      author4.setName("Pasero");
      ISource source4 = fFactory.createSource(news4);
      source4.setLink(new URI("http://www.source.com"));

      INews news5 = createNews(feed, null, "http://www.news.com/news5.html", State.NEW);
      news5.setFlagged(true);
      IPerson author5 = fFactory.createPerson(null, news5);
      author5.setEmail(new URI("test@rssowl.org"));
      ISource source5 = fFactory.createSource(news5);
      source5.setName("Source for News 5");

      DynamicDAO.save(feed);

      /* Wait for Indexer */
      waitForIndexer();
View Full Code Here

Examples of org.rssowl.core.persist.ISource

    INews news4 = createNews(feed, null, "http://www.news.com/news4.html", State.HIDDEN);
    Date news4Date = new Date(1000000);
    news4.setPublishDate(news4Date);
    IPerson author4 = fFactory.createPerson(null, news4);
    author4.setName("Benjamin Pasero");
    ISource source4 = fFactory.createSource(news4);
    source4.setLink(new URI("http://www.source.com"));

    INews news5 = createNews(feed, null, "http://www.news.com/news5.html", State.DELETED);
    news5.setFlagged(true);
    IPerson author5 = fFactory.createPerson(null, news5);
    author5.setEmail(new URI("test@rssowl.org"));
    ISource source5 = fFactory.createSource(news5);
    source5.setName("Source for News 5");

    DynamicDAO.save(feed);

    /* Wait for Indexer */
    waitForIndexer();
View Full Code Here

Examples of org.rssowl.core.persist.ISource

      category.getDomain();
      category.getName();
    }

    else if (type instanceof ISource) {
      ISource source = (ISource) type;
      source.getName();
      source.getLink();
    }

    else if (type instanceof IPerson) {
      IPerson person = (IPerson) type;
      person.getEmail();
View Full Code Here

Examples of org.rssowl.core.persist.ISource

      }
    }
  }

  private void processSource(Element element, INews news) {
    ISource source = Owl.getModelFactory().createSource(news);
    source.setName(element.getText());

    /* Check wether the Attributes are to be processed by a Contribution */
    processNamespaceAttributes(element, source);

    /* Interpret Attributes */
    List< ? > attributes = element.getAttributes();
    for (Iterator< ? > iter = attributes.iterator(); iter.hasNext();) {
      Attribute attribute = (Attribute) iter.next();
      String name = attribute.getName().toLowerCase();

      /* Check wether this Attribute is to be processed by a Contribution */
      if (processAttributeExtern(attribute, source))
        continue;

      /* URL */
      else if ("url".equals(name)) { //$NON-NLS-1$
        URI uri = URIUtils.createURI(attribute.getValue());
        if (uri != null)
          source.setLink(uri);
      }
    }
  }
View Full Code Here

Examples of org.rssowl.core.persist.ISource

    /* Return text and html as is */
    return element.getText();
  }

  private void processSource(Element element, INews news) {
    ISource source = Owl.getModelFactory().createSource(news);

    /* Check wether the Attributes are to be processed by a Contribution */
    processNamespaceAttributes(element, source);

    /* Interpret Children */
    List< ? > sourceChilds = element.getChildren();
    for (Iterator< ? > iter = sourceChilds.iterator(); iter.hasNext();) {
      Element child = (Element) iter.next();
      String name = child.getName().toLowerCase();

      /* Check wether this Element is to be processed by a Contribution */
      if (processElementExtern(child, source))
        continue;

      /* Name */
      else if ("title".equals(name)) { //$NON-NLS-1$
        source.setName(child.getText());
        processNamespaceAttributes(child, source);
      }

      /* EMail */
      else if ("link".equals(name)) { //$NON-NLS-1$
        URI uri = URIUtils.createURI(child.getText());
        if (uri != null)
          source.setLink(uri);
        processNamespaceAttributes(child, source);
      }

      /* URI */
      else if ("id".equals(name) && source.getLink() == null) { //$NON-NLS-1$
        URI uri = URIUtils.createURI(child.getText());
        if (uri != null)
          source.setLink(uri);
        processNamespaceAttributes(child, source);
      }
    }
  }
View Full Code Here

Examples of org.rssowl.core.persist.ISource

      Owl.getModelFactory().createGuid((INews) type, element.getText(), null);
    }

    /* Source */
    else if ("source".equals(name) && type instanceof INews) { //$NON-NLS-1$
      ISource source = Owl.getModelFactory().createSource((INews) type);
      source.setLink(URIUtils.createURI(element.getText()));
    }
  }
View Full Code Here

Examples of org.rssowl.core.persist.ISource

            }
          }
        }

        /* Source */
        ISource source = news.getSource();
        if (source != null && source.getLink() != null) {
          link = source.getLink().toASCIIString();
          String name = source.getName();
          if (StringUtils.isSet(link)) {
            builder.append("<td class=\"footerlineseparator\">"); //$NON-NLS-1$
            builder.append("|"); //$NON-NLS-1$
            builder.append("</td>"); //$NON-NLS-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.