Package it.cnr.isti.hpc.wikipedia.article

Examples of it.cnr.isti.hpc.wikipedia.article.Link


    List<Link> elinks = new ArrayList<Link>(10);

    for (de.tudarmstadt.ukp.wikipedia.parser.Link t : page.getLinks()) {
      if (t.getType() == de.tudarmstadt.ukp.wikipedia.parser.Link.type.INTERNAL) {

        links.add(new Link(t.getTarget(), t.getText()));

      }
      if (t.getType() == de.tudarmstadt.ukp.wikipedia.parser.Link.type.EXTERNAL) {

        elinks.add(new Link(t.getTarget(), t.getText()));

      }
    }
    article.setLinks(links);
    article.setExternalLinks(elinks);
View Full Code Here


  private void setCategories(Article article, ParsedPage page) {
    ArrayList<Link> categories = new ArrayList<Link>(10);

    for (de.tudarmstadt.ukp.wikipedia.parser.Link c : page.getCategories()) {

      categories.add(new Link(c.getTarget(), c.getText()));
    }
    article.setCategories(categories);

  }
View Full Code Here

TOP

Related Classes of it.cnr.isti.hpc.wikipedia.article.Link

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.