Ejemplo n.º 1
0
  public String toString() {
    ArrayList<WebPageEntity> childEntities = getChildEntities();
    String str = "";

    for (WebPageEntity webPageEntity : childEntities) {
      str += webPageEntity.toString() + "/n";
    }

    return str + text;
  }
Ejemplo n.º 2
0
  public ArrayList<WebPageEntity> getChildEntities() {
    ArrayList<WebPageEntity> childEntities = new ArrayList<WebPageEntity>();

    for (WebPageEntity webPageEntity : children) {

      if (webPageEntity.terms.size() != 0) {
        childEntities.add(webPageEntity);
      }

      if (webPageEntity.children.size() != 0) {
        childEntities.addAll(webPageEntity.getChildEntities());
      }
    }
    return childEntities;
  }
Ejemplo n.º 3
0
  public ArrayList<String> getNamedEntities() {
    ArrayList<String> _namedEntities = new ArrayList<String>();

    for (WebPageEntity webPageEntity : children) {

      if (webPageEntity.namedEntities != null && webPageEntity.namedEntities.size() != 0) {
        _namedEntities.addAll(webPageEntity.getNamedEntities());
      }
    }

    for (NamedEntity nameEntity : namedEntities) {
      _namedEntities.add(nameEntity.getEntityValue());
    }

    return _namedEntities;
  }