Package com.hlcl.rql.util.as

Examples of com.hlcl.rql.util.as.PageArrayList


  /**
   * Returns all children filtered by template content_page of list element content_pages_list.
   */
  public java.util.List<ContentPage> getContentPages() throws RQLException {
    PageArrayList children = getContentPagesList().getChildPagesForTemplate(getParameter("contentPageTmpltName"));
    java.util.List<ContentPage> result = new ArrayList<ContentPage>(children.size());
    for (Iterator iterator = children.iterator(); iterator.hasNext();) {
      Page page = (Page) iterator.next();
      result.add(new ContentPage(page));
    }
    return result;
  }
View Full Code Here


   * Returns the first recycling table block from the blocks_bottom container or null, if it doesn't have a recycling table block
   * page at all.
   */
  public RecyclingTableBlock getBottomRecyclingTableBlock() throws RQLException {
    Container bottomCtr = getBottomBlocksContainer();
    PageArrayList children = bottomCtr.getChildPagesForTemplate(getParameter("recyclingBlockTmpltName"));
    // no one found
    if (children.size() == 0) {
      return null;
    }
    // wrap
    return new RecyclingTableBlock(children.first());
  }
View Full Code Here

  /**
   * Returns the first link table block from the blocks_bottom container or null, if it doesn't have a link table block page at all.
   */
  public LinkTableBlock getBottomLinkTableBlock() throws RQLException {
    Container bottomCtr = getBottomBlocksContainer();
    PageArrayList children = bottomCtr.getChildPagesForTemplate(getParameter("linkTableBlockTmpltName"));
    // no one found
    if (children.size() == 0) {
      return null;
    }
    // wrap
    return new LinkTableBlock(children.first());
  }
View Full Code Here

  /**
   * Returns the number of html view table blocks linked at the blocks_bottom container.
   */
  public int getBottomHtmlViewTableBlocksSize() throws RQLException {
    Container bottomCtr = getBottomBlocksContainer();
    PageArrayList children = bottomCtr.getChildPagesForTemplate(getParameter("htmlViewTableBlockTmpltName"));
    return children.size();
  }
View Full Code Here

  /**
   * Returns the first html view table block from the blocks_bottom container or null, if it doesn't have a html view table block page at all.
   */
  public HtmlViewTableBlock getBottomHtmlViewTableBlock() throws RQLException {
    Container bottomCtr = getBottomBlocksContainer();
    PageArrayList children = bottomCtr.getChildPagesForTemplate(getParameter("htmlViewTableBlockTmpltName"));
    // no one found
    if (children.size() == 0) {
      return null;
    }
    // wrap
    return new HtmlViewTableBlock(children.first());
  }
View Full Code Here

  /**
   * Returns the first link row of this link table block matching the given URL (using equals) or null, if no row page could be
   * found.
   */
  public Page getLinkRowByUrl(String url) throws RQLException {
    PageArrayList linkRows = getRows();
    for (int i = 0; i < linkRows.size(); i++) {
      Page rowPg = linkRows.getPage(i);
      TextAnchor anchor = rowPg.getTextAnchor(getParameter("linkTmpltElemName"));
      if (anchor.isUrlEquals(url)) {
        return rowPg;
      }
    }
View Full Code Here

   * @throws RQLException
   */
  public PageArrayList getPages(int maxPages) throws RQLException {

    RQLNodeList pageNodes = getPagesNodeList(maxPages);
    PageArrayList result = new PageArrayList();

    // nothing found
    if (pageNodes == null) {
      return result;
    }
    // wrap into pages; use only the main data from the search
    for (int i = 0; i < pageNodes.size(); i++) {
      RQLNode pageNode = pageNodes.get(i);
      result.add(new Page(getProject(), pageNode.getAttribute("guid"), pageNode.getAttribute("id"), pageNode.getAttribute("headline")));
    }
    return result;
  }
View Full Code Here

      Connection connection = DriverManager.getConnection("jdbc:hsqldb:mem:cacpat", "sa", "");
      String[] skipSuffixes = {"_fragment"};
      ContentAreaCollectorPageAction action = new ContentAreaCollectorPageAction(connection, "cacpat", skipSuffixes, "company");

      // 1. add all
      PageArrayList children = startPg.getListChildPages("content_pages_list");
      for (Iterator iterator = children.iterator(); iterator.hasNext();) {
        Page child = (Page) iterator.next();
        action.invoke(child);
      }
     
      // 2. add some with different content area
View Full Code Here

   */
  public Set collectContainedText(String findList, String delimiter, boolean caseSensitive) throws RQLException {
    // start page itself
    Set result = getPage().collectContainedText(findList, delimiter, hasVisibleHeadline(), caseSensitive);
    // all block childs too
    PageArrayList childs = getAllNonPhysicalChildPages();
    for (int i = 0; i < childs.size(); i++) {
      Page child = (Page) childs.get(i);
      result.addAll(child.collectContainedText(findList, delimiter, hasVisibleHeadline(child), caseSensitive));
    }
    return result;
  }
View Full Code Here

  /**
   * Collect and classify all childs.
   */
  private void doRecursive(Page page) throws RQLException {

    PageArrayList childs = page.getChildPages();
    // for all childs do
    for (int i = 0; i < childs.size(); i++) {
      Page child = (Page) childs.get(i);
      // classify physical or not
      if (child.contains(isPhysicalPageTmpltElemName)) {
        // add only
        allPhysicalChilds.add(child);
      } else {
View Full Code Here

TOP

Related Classes of com.hlcl.rql.util.as.PageArrayList

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.