Examples of Page


Examples of com.dtrules.samples.bookpreview.datamodel.Page

                if(this_page > pages_read)break;
                if(this_page <= c.getEnd_page()){
                    if(!ob.getChapters_viewed().contains(c)){
                        ob.getChapters_viewed().add(c);
                    }
                    Page page = new Page();
                    page.setNumber(this_page);
                    this_page += 1;
                    ob.getPages().add(page);
                }
                if(this_page > c.getEnd_page()){
                    for(Chapter n : b.getChapters()){
View Full Code Here

Examples of com.eclipsesource.tabris.ui.Page

  @Test
  public void testGetsPageConfigurationFromController() {
    Controller controller = mock( Controller.class );
    UIImpl ui = new UIImpl( display, controller, mock( UIConfiguration.class ) );
    Page page = mock( Page.class );

    ui.getPageConfiguration( page );

    verify( controller ).getPageConfiguration( page );
  }
View Full Code Here

Examples of com.extjs.gxt.samples.explorer.client.pages.Page

    center.add(tabPanel);
    center.layout();
  }

  public void onShowPage(Entry entry) {
    Page page = entry.get("page");
    if (page == null) {
      page = new Page(entry);
      entry.set("page", page);
    }

    TabItem item = tabPanel.findItem("page__"+page.getId(), false);
    if (item == null) {
      item = new TabItem();
      item.setData("entry", entry);
      item.setClosable(entry.isClosable());
      item.setId("page__"+page.getId());
      item.setText(entry.getName());
      item.setLayout(new FitLayout());
      item.add(page);
      tabPanel.add(item);
    }
View Full Code Here

Examples of com.facebook.presto.operator.Page

        public void addInput(Page page)
        {
            Block[] blocks = Arrays.copyOf(page.getBlocks(), page.getChannelCount());
            for (int i = 0; i < accumulators.size(); i++) {
                blocks[sampleWeightChannel] = resampleWeightBlock(page.getBlock(sampleWeightChannel));
                accumulators.get(i).addInput(new Page(blocks));
            }
        }
View Full Code Here

Examples of com.facebook.presto.spi.Page

        checkType(split, TestingSplit.class, "split");

        // TODO: check for !columns.isEmpty() -- currently, it breaks TestSqlTaskManager
        // and fixing it requires allowing TableScan nodes with no assignments

        return new FixedPageSource(ImmutableList.of(new Page(1)));
    }
View Full Code Here

Examples of com.flaptor.hounder.crawler.pagedb.Page

        }
       
        public void run() {
            try {
                boolean wasHotspot = false;
                Page page = doc.getPage();
                String pageurl = page.getUrl();
                if (!"main".equals(Thread.currentThread().getName())) {
                    Thread.currentThread().setName("FetchdataProcessorJob("+pageurl+")");
                }
               
                String text = doc.getText(100);
                String title = doc.getTitle(100);
                Link[] links = doc.getLinks();
                String[] anchors = page.getAnchors();
                boolean success = doc.success()
                        && (   (null != title && title.length() > 0)
                            || (null != text && text.length() > 0)
                            || (null != anchors && anchors.length > 0)
                            || (null != links && links.length > 0)
                           );

                if (!success) { // the page could not be fetched

                    logger.debug("  page " + pageurl + " could not be fetched");
                    boolean keep = false;
                    if (doc.recoverable()) {
                        if (doc.internalError()) { // the recoverable error is our own fault
                            keep = true;
                        } else {
                            page.setRetries(page.getRetries() + 1);
                            if (!PageDBTrimmer.tooManyRetries(page)) {
                                keep = true;
                            }
                        }
                    } else {
                        logger.debug("  discarding page " + pageurl);
                    }

                    if (keep) {
                        // if the page is to be kept, store it
                        newPageDB.addPage(page);
                    } else {
                        // otherwise announce it to the modules so they can take appropiate action
                        CommandWithDoc cmd = new CommandWithDoc("delete", doc);
                        modules.applyCommand(cmd);
                    }

                } else { // the page could be fetched.

                    page.setRetries(0); // the page has been successfully fetched, so no retries.
                    if (page.getLastSuccess() == 0) {
                        page.setLastChange(page.getLastAttempt()); // first fetch is considered a change
                    }
                    page.setLastSuccess(page.getLastAttempt()); // this is the time of the last successful fetch: now

                    if (hotspots.match(pageurl)) {
                        doc.setTag(IS_HOTSPOT);
                        wasHotspot = true;
                    }

                    // send it to modules manager
                    modules.process(doc);

                    // propagate the antiscore back to its parents
                    float antiScore = page.getAntiScore();
                    if ((antiScore > 0f) && recordParents) {
                        int numParents = page.getParents().length;
                        for (String parentUrl : page.getParents()) {
                            Page badParent = new Page(parentUrl, -1.0f);
                            badParent.setAntiScore(PageRank.parentContribution(antiScore, numParents));
                            newPageDB.addPage(badParent);
                        }
                    }
                   
                    if (null != links) {
                        // Now add the page's outlinks to the next pagedb,
                        // so they can be fetched in the next cycle
                        if (links.length == 0) {
                            // We need to avoid dangling nodes.
                            // A simple way is to add a link to itself
                            links = new Link[1];
                            links[0] = new Link(pageurl, "");
                        }
                        for (Link link : links) {
                            try {
                                if (!(page.getDistance() > maxDistance && pageurl.equals(link.getUrl()))) { // dont add self-links in a discovery front page
                                    if (Crawler.urlFilter(link.getUrl()) != null) { // if the url is a valid web page (not an image, etc)
                                        logger.debug("    Adding link to " + link + " to the pagedb");
                                        Page child = new Page(CleanURL(link.getUrl()), 1.0f);
                                        child.setRetries(0);
                                        child.setLastAttempt(0L);
                                        child.setLastSuccess(0L);
                                        if (recordParents) {
                                            child.addParent(pageurl);
                                        }
                                        child.addAnchor(link.getAnchor()); // at this point it can only be one anchor
                                        child.setScore(PageRank.parentContribution(page.getScore(), links.length));
                              
                                        // unless the child is a hotspot, it is removed from the fetched page by 1 level
                                        child.setDistance(page.getDistance() + 1);

                                        if (!hotspots.matchAll() && (maxDistance == 0)) {
                                            // If hotspots is "*", all links are set at distance>0 and the trimmer
                                            // will keep those that make it into the front line.
                                            // If hotspots restricts the crawl and maxDistance is 0, we want to make
                                            // sure the distance is 0 when the child is a hotspot, so it will not be
                                            // dropped by the trimmer.
                                            // TODO: check if this is true, or if the presence of a frontline should
                                            // be checked before setting distances to 0.
                                            if (hotspots.match(link.getUrl())) {
                                                child.setDistance(0);
                                                logger.debug("    child hotspot: " + link);
                                            } else {
                                                logger.debug("    child not hotspot: " + link);
                                            }

                                        }
                                        newPageDB.addPage(child);
                                        if (child.getDistance() > maxDistance) {
                                            newDiscoveryPage();
                                        }
                                    } else {
                                        logger.debug("    Dropping uninteresting url " + link);
                                    }
View Full Code Here

Examples of com.flaptor.wizard.Page

          clusteringWebConfig.installOnThisMachine= selectComponentsMulti.getProperty("installMonitorWeb").equals("0");
         
        oneLocal = false;
        oneRemote = false;
       
        Page next = selectComponentsMulti;
        if (searcherConfig.install) {
          if (!searcherConfig.installOnThisMachine) {
            next.setNextPage(searcherInstallRemote);
            next = next.getNextPage();
            oneRemote = true;
          } else {
            oneLocal = true;
          }
        }
        if (indexerConfig.install) {
          if (! indexerConfig.installOnThisMachine) {
            next.setNextPage(indexerInstallRemote);
            next = next.getNextPage();
            oneRemote = true;
          } else {
            oneLocal = true;
          }
        }
        if (crawlerConfig.install) {
          if ( ! crawlerConfig.installOnThisMachine) {
            next.setNextPage(crawlerInstallRemote);
            next = next.getNextPage();
            oneRemote = true;
          } else {
            oneLocal = true;
          }
        }
        if (cacheServerConfig.install) {
          if (!cacheServerConfig.installOnThisMachine) {
            next.setNextPage(cacheServerInstallRemote);
            oneRemote = true;
          } else {
            next.setNextPage(cacheServerInstall);
            oneLocal = true;
          }
          next = next.getNextPage();
        }
        if (clusteringWebConfig.install) {
          if (!clusteringWebConfig.installOnThisMachine) {
            next.setNextPage(clusteringWebInstallRemote);
            next = next.getNextPage();
            oneRemote = true;
          } else {
            oneLocal = true;
          }
        }
        if (oneRemote) {
          next.setNextPage(copySSH);
          next = next.getNextPage();
        }
        if (oneLocal) {
          next.setNextPage(thisMachinesName);
        } else {//maybe there is no components in this machine, in which case we dont need to ask for the local path
          next.setNextPage(installing);
        }
            }
        });      
      dirPortOptions.setPreNextCallback(new Runnable() {
      public void run() {
View Full Code Here

Examples of com.founder.fix.fixflow.core.impl.Page

        queryMap.put("USERID", queryInfo);
        queryMap.put("USERNAME", queryInfo);
      }
      int firstResult = rowNum*(pageIndex-1)+1;//起始行
      int maxResults = pageIndex*rowNum;//结束行
      Map<String,Object> userListMap = identityService.getUserTos(new Page(firstResult,maxResults), queryMap);
      List<UserTo> userTos = (List<UserTo>)userListMap.get("userList");
      int count = (Integer)userListMap.get("count");
      List<Map<String,Object>> userList = new ArrayList<Map<String,Object>>();
      Pagination page = new Pagination(pageIndex,rowNum);
      page.setTotal(count);
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.Page

         * @param relative
         *      Relative path within Hudson. Starts without '/'.
         *      For example, "job/test/" to go to a job top page.
         */
        public HtmlPage goTo(String relative) throws IOException, SAXException {
            Page p = goTo(relative, "text/html");
            if (p instanceof HtmlPage) {
                return (HtmlPage) p;
            } else {
                throw new AssertionError("Expected text/html but instead the content type was "+p.getWebResponse().getContentType());
            }
        }
View Full Code Here

Examples of com.germinus.mashupbuilder.bean.Page

            }

            if (id != null) {
                Integer intId = Integer.parseInt(id);

                Page pagePattern = new Page();
                pagePattern.setId(intId);

                DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.FactoryType.JDBC);
                PageDAO pageDAO = (PageDAO) daoFactory.getDAO(Page.class);
                Page pageFound = pageDAO.find(pagePattern);
                if (pageFound != null) {
                    StringBuilder sb = new StringBuilder();
                    if (callback != null) {
                        sb.append(callback).append("(");
                    } else if (!JSON.equals(json)) {
                        sb.append("romulus.pageEditor.app.register('");
                        sb.append(pageFound.getId()).append("', ");
                    }
                    sb.append(pageFound.getJson());
                    if (callback != null) {
                        sb.append(");");
                    } else if (!JSON.equals(json)) {
                        sb.append(");");
                    }
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.