Examples of PageInfo


Examples of org.geoserver.rest.PageInfo

            writer.setValue( href( link, format ) );
        }
    }
   
    String href( String link, DataFormat format ) {
        PageInfo pg = getPageInfo();
       
        //try to figure out extension
        String ext = null;
        if ( format != null ) {
            ext = MediaTypes.getExtensionForMediaType( format.getMediaType() );
        }
       
        if ( ext == null ) {
            ext = pg.getExtension();
        }
       
        if(ext != null && ext.length() > 0)
            link = link+ "." + ext;
       
        // encode as relative or absolute depending on the link type
        if ( link.startsWith( "/") ) {
            // absolute, encode from "root"
            return pg.rootURI(link);
        } else {
            //encode as relative
            return pg.pageURI(link);
        }
    }
View Full Code Here

Examples of org.geoserver.rest.PageInfo

            public TemplateModel wrap(Object obj) throws TemplateModelException {
                TemplateModel model = wrapper.wrap(obj);
                if ( model instanceof SimpleHash ) {
                    SimpleHash hash = (SimpleHash) model;
                    if ( hash.get( "page" ) == null ) {
                        PageInfo pageInfo = (PageInfo) request.getAttributes().get( PageInfo.KEY );
                        if ( pageInfo != null ) {
                            hash.put( "page", pageInfo );   
                        }
                    }
                }
View Full Code Here

Examples of org.jrest4guice.rest.annotations.PageInfo

      // 获取模板路径
      PageFlow annotation = method.getAnnotation(PageFlow.class);
      if (annotation == null) {
        writeTextPlain(out, httpResult);
      } else {
        PageInfo pageInfo = null;
        if (result instanceof Exception) {
          pageInfo = annotation.error();
          if (result instanceof ValidatorException) {
            httpResult
                .setInvalidValues(((ValidatorException) result)
View Full Code Here

Examples of org.meshcms.core.PageInfo

          if (!langCode.equalsIgnoreCase(pagePath.getElementAt(0))) {
            Path path = siteMap.getServedPath(pagePath.replace(0, langCode));

            if (!webSite.getFile(path).isFile()) {
              if (userInfo != null && userInfo.canWrite(webSite, path)) {
                PageInfo ppi = siteMap.getParentPageInfo(pagePath);

                if (ppi != null && ppi.getLevel() > 0) {
                  Path pPath = ppi.getPath().replace(0, langCode);

                  if (siteMap.getPageInfo(pPath) != null) {
                    ResourceBundle bundle =
                        ResourceBundle.getBundle("org/meshcms/webui/Locales",
                        WebUtils.getPageLocale(pageContext));
View Full Code Here

Examples of org.meshcms.core.PageInfo

      if (webSite != null) {
        SiteMap siteMap = webSite.getSiteMap();
        List pagesList = siteMap.getPagesList();

        for (Iterator iter = pagesList.iterator(); iter.hasNext();) {
          PageInfo pageInfo = (PageInfo) iter.next();

          if (pageInfo.getPath().isRoot() &&
              webSite.getConfiguration().isRedirectRoot() &&
              HitFilter.getPreferredLanguage(request) != null) {
            continue;
          }

          Element url = doc.createElement("url");
          urlset.appendChild(url);

          Element loc = doc.createElement("loc");
          url.appendChild(loc);
          loc.appendChild(doc.createTextNode(baseURL +
              siteMap.getServedPath(pageInfo.getPath())));

          Element lastmod = doc.createElement("lastmod");
          url.appendChild(lastmod);
          lastmod.appendChild(doc.createTextNode(ISO_8601_FORMAT.format(new Date(pageInfo.getLastModified()))));

          Element priority = doc.createElement("priority");
          url.appendChild(priority);

          float value = PRIORITY_WEIGHT / (PRIORITY_WEIGHT +
              pageInfo.getPath().getElementCount());
          priority.appendChild(doc.createTextNode(DECIMAL_FORMAT.format(value)));
        }
      }

      DOMSource domSource = new DOMSource(doc);
View Full Code Here

Examples of org.meshcms.core.PageInfo

    SiteMapIterator iter = new SiteMapIterator(webSite, rootPath);
    iter.setSkipHiddenSubPages(allowHiding);
    Writer outWriter = getOut();

    while (iter.hasNext()) {
      PageInfo current = (PageInfo) iter.next();
      Path currentPath = current.getPath();
      Path parentPath = currentPath.getParent();

      if (parentPath.isRelative() || pathInMenu.isContainedIn(parentPath)) {
        if (Utils.isTrue(expand) ||
            pathInMenu.isContainedIn(currentPath) ||
            currentPath.getElementCount() == baseLevel ||
            currentPath.getElementCount() >= pathInMenu.getElementCount()) {
          outWriter.write("<div style=\"padding-left: " +
            (spc * Math.max(current.getLevel() - baseLevel, 0)) + "px;\">");

          if (style != null) {
            outWriter.write("<div class=\"" + style + "\">");
          }

          outWriter.write(bullet + "&nbsp;");

          if (!isEdit && current.getPath().equals(pathInMenu)) {
            outWriter.write(siteInfo.getPageTitle(current));
          } else {
            outWriter.write("<a href=\"" + webSite.getLink(current, pageDirPath) +
              "\">" + siteInfo.getPageTitle(current) + "</a>");
          }
View Full Code Here

Examples of org.meshcms.core.PageInfo

      list.add(0, webSite.getSiteMap().getPageInfo(pagePath));
    }*/
   
    if (list != null) {
      if (!Utils.isTrue(current)) {
        PageInfo pageInfo = webSite.getSiteMap().getPageInfo(pagePath);
       
        for (int i = 0; i < list.size(); i++) {
          PageInfo pi = (PageInfo) list.get(i);
         
          if (pi.equals(pageInfo)) {
            list.remove(i--);
          }
        }
      }
     
View Full Code Here

Examples of org.meshcms.core.PageInfo

      iter.setSkipHiddenSubPages(Utils.isTrue(allowHiding));
      boolean liUsed = false;
      boolean firstUl = true;

      while (iter.hasNext()) {
        PageInfo currentPageInfo = (PageInfo) iter.next();
        Path currentPath = currentPageInfo.getPath();
        int level = Math.max(baseLevel, currentPageInfo.getLevel());

        for (int i = lastLevel; i < level; i++) {
          if (firstUl) {
            writeIndented(outWriter, "<ul class=\"" +
                (horizontal ? "hmenu" : "vmenu") + "\">", i);
            firstUl = false;
          } else {
            writeIndented(outWriter, "<ul>", i);
          }

          writeIndented(outWriter, "<li>", i + 1);
          liUsed = false;
        }

        for (int i = lastLevel - 1; i >= level; i--) {
          if (liUsed) {
            outWriter.write("</li>");
            liUsed = false;
          } else {
            writeIndented(outWriter, "</li>", i + 1);
          }

          writeIndented(outWriter, "</ul>", i);
        }

        if (liUsed) {
          outWriter.write("</li>");
          writeIndented(outWriter, "<li>", level);
        }

        for ( int i = lastLevel - 1; i >= level; i--) {
            writeIndented(outWriter, "</li>", i);
            writeIndented(outWriter, "<li>", i);
        }

        if ( ! Utils.isNullOrEmpty(currentPathStyle)
                        && ( currentPageInfo.getLevel() >= baseLevel
                               && pathInMenu.isContainedIn(currentPath)
                     || currentPageInfo.getPath().equals(pathInMenu)
                   ) ) {
          outWriter.write("<a href=\"" + webSite.getLink(currentPageInfo, pageDirPath) +
            "\" class='" + currentPathStyle + "'>" +
            siteInfo.getPageTitle(currentPageInfo) + "</a>");
        } else {
View Full Code Here

Examples of org.meshcms.core.PageInfo

        String[] temp = new String[last + 1];
        System.arraycopy(outs, 0, temp, 0, last);
        outs = temp;
      }

      PageInfo pageInfo = webSite.getSiteMap().getPageInfo(pagePath);
      outs[last] = (pageInfo == null) ? getPage().getTitle() :
          webSite.getSiteInfo().getPageTitle(pageInfo);
    }

    Writer w = getOut();
View Full Code Here

Examples of org.xhtmlrenderer.css.newmatch.PageInfo

        // this method to use LayoutContext is tricky
        if (c instanceof LayoutContext) {
            pageName = ((LayoutContext)c).getPageName();
        }
       
        PageInfo pageInfo = c.getCss().getPageStyle(pageName, pseudoPage);
        result.setPageInfo(pageInfo);
       
        CalculatedStyle cs = new EmptyStyle().deriveStyle(pageInfo.getPageStyle());
        result.setStyle(cs);
        result.setOuterPageWidth(result.getWidth(c));
       
        return result;
    }
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.