Examples of Article


Examples of net.sourceforge.yagsbook.encyclopedia.articles.Article

       
        MockArticle     mock = new MockArticle();
        mock.setCategory(CATEGORY);
       
        try {
            Article     article = new Article("test", mock.toXML());
            assertEquals("Value of returned category was wrong", CATEGORY,
                         article.getCategory());
        } catch (IOException e) {
            fail("Failed to parse article");
        }
    }
View Full Code Here

Examples of net.sourceforge.yagsbook.encyclopedia.articles.Article

            topics[i] = new Topic(URI+i, NAME+i);
        }
        mock.setTopics(topics);
       
        try {
            Article     article = new Article("test", mock.toXML());
            Iterator    iter = article.getTopics();
           
            int count = 0;
            while (iter.hasNext()) {
                Topic   topic = (Topic) iter.next();
               
View Full Code Here

Examples of net.sourceforge.yagsbook.encyclopedia.articles.Article

        }
        body.append("</sect1>");
        mock.setBody(body.toString());
       
        try {
            Article     article = new Article("test", mock.toXML());
            Iterator    iter = article.getReferences();
           
            if (!iter.hasNext()) {
                fail("Did not find any references");
            }
           
View Full Code Here

Examples of net.sprd.sampleapps.common.dataaccess.model.Article

            httpServletResponse.setDateHeader("Expires", System.currentTimeMillis() + 36000000);
            httpServletRequest.setAttribute("articles", articles);
            httpServletRequest.getRequestDispatcher("/articles.jsp").forward(httpServletRequest, httpServletResponse);
        } else {
            String articleId = uri.substring(uri.lastIndexOf("/") + 1);
            Article article = dataAccess.getArticle(articleId);
            httpServletResponse.setDateHeader("Expires", System.currentTimeMillis() + 36000000);
            httpServletRequest.setAttribute("article", article);
            httpServletRequest.getRequestDispatcher("/articleDetails.jsp").forward(httpServletRequest, httpServletResponse);
        }
    }
View Full Code Here

Examples of org.albertsanso.web20.core.model.Article


   
    em.getTransaction().begin();
   
    Article art = new Article();
    art.setName("article1");
    art.setSummary("Aquest es l'article 1");
    em.persist(art);

   
    art = new Article();
    art.setName("article2");
    art.setSummary("Aquest es l'article 2");
    em.persist(art);
 
   
    art = new Article();
    art.setName("article3");
    art.setSummary("Aquest es l'article 3");
    em.persist(art);

   
    Photo photo = new Photo();
    photo.setComment("vaya fotito...");
View Full Code Here

Examples of org.apache.accumulo.examples.wikisearch.ingest.ArticleExtractor.Article

    extractor = new ArticleExtractor();
  }
 
  @Override
  protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
    Article article = extractor.extract(new InputStreamReader(new ByteArrayInputStream(value.getBytes()), UTF8));
    if (article != null) {
      int groupId = WikipediaMapper.getPartitionId(article, numGroups);
      if(groupId != myGroup)
        return;
      context.write(new Text(language), article);
View Full Code Here

Examples of org.apache.commons.net.nntp.Article

                articles = new Article[count];
                int index = 0;

                while (st.hasMoreTokens()) {
                    StringTokenizer stt = new StringTokenizer(st.nextToken(), "\t");
                    Article article = new Article();
                    article.setArticleNumber(Integer.parseInt(stt.nextToken()));
                    article.setSubject(stt.nextToken());
                    article.setFrom(stt.nextToken());
                    article.setDate(stt.nextToken());
                    article.setArticleId(stt.nextToken());
                    article.addHeaderField("References", stt.nextToken());
                    articles[index++] = article;
                }
            } else {
                return null;
            }
View Full Code Here

Examples of org.apache.commons.net.nntp.Article

        System.out.println("Retrieving articles between [" + lowArticleNumber + "] and [" + highArticleNumber + "]");
        Article[] articles = NNTPUtils.getArticleInfo(client, lowArticleNumber, highArticleNumber);
       
        System.out.println("Building message thread tree...");
        Threader threader = new Threader();
        Article root = (Article)threader.thread(articles);
       
        Article.printThread(root, 0);
       
    }
View Full Code Here

Examples of org.apache.ojb.broker.Article

    public void testSwizzling() throws Throwable
    {
        Transaction tx = null;
        ProductGroup pg;
        Article article;
        Article article2;

        try
        {
            tx = _kit.getTransaction(_conn);
            tx.begin();

            pg = new ProductGroup();
            pg.setId(77777);
            _conn.makePersistent(pg);
            article = Article.createInstance();
            article.setArticleId(77777);
            article.setStock(333);
            pg.add(article);
            article.setProductGroup(pg);
            _conn.makePersistent(article);
            article2 = Article.createInstance();
            article2.setArticleId(article.getArticleId());
            article2.setStock(334);
            article2.setProductGroup(pg);
            _conn.makePersistent(article2);
            article = (Article) pg.getAllArticles().get(0);
            assertEquals("should be equal", 334, article.getStock());
        }
        finally
View Full Code Here

Examples of org.apache.ojb.odmg.shared.Article

        tx.commit();
    }

    private Article createArticle()
    {
        Article example = new Article();
        example.setArticleName(testProductGroup.getName());
        example.setProductGroupId(testProductGroup.getId());
        return example;
    }
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.