Package org.timedex.beans

Examples of org.timedex.beans.PageText


    pageTextDAO = new PageTextDAOImpl();
  }
 
  public void testFindByPageFound() {
    Page page = pageDAO.findById(3123636);
    PageText text = pageTextDAO.findByPage(page);
   
    assertNotNull(text);
    assertNotNull(text.getText());
  }
View Full Code Here


import org.timedex.dao.interfaces.PageTextDAO;

public class PageTextDAOImpl extends AbstractDAOImpl<PageText> implements PageTextDAO {

  public PageText findByPageTextId(long textPageId) {
    PageText result = (PageText)getCurrentSession()
      .createCriteria(PageText.class)
      .add(Restrictions.eq("id", textPageId))
      .list();
    return result;
  }
View Full Code Here

      try {
        sessionStrategy.beginTransaction();


        for(Page p: result) {
          PageText pt = ptDAO.findByPage(p);
          int linksIn = pageLinkDAO.findLinkCountInByPage(p);
          //System.out.println(++count + ": Extracting dates from page " + p.getId());
          if(pt != null) {
            Heading root = PageToHeadingTree.getHierarchyFromPageText(pt, p);
            //printHeading(root, "");
View Full Code Here

  //test
  public static void main(String[] args) {
    PageDAO pageDAO = new PageDAOImpl();
    PageTextDAO pageTextDAO = new PageTextDAOImpl();
    Page page = pageDAO.findById(927);
    PageText ptext = pageTextDAO.findByPage(page);
    String text = ptext.getTextAsString();
    WikitextStripper stripper = new WikitextStripper();
    //stripper.setLeaveHeadings(true);
    System.out.println(text);
    text = stripper.strip(text);
    System.out.println("\n\n~~~~~~~~\n\n");
View Full Code Here

TOP

Related Classes of org.timedex.beans.PageText

Copyright © 2018 www.massapicom. 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.