Examples of Sitemap


Examples of com.jada.sitemap.SiteMap

        response.setHeader("Expires", "0");
        response.setHeader("Pragma", "no-cache");
        try {
          String domainName = request.getServerName();
          int port = request.getServerPort();
          SiteMap siteMap = new SiteMap(domainName, String.valueOf(port));
          String result = siteMap.generate();
         
          response.setContentType("text/xml; charset=UTF-8");
            response.setContentLength(result.getBytes(Constants.SYSTEM_ENCODING).length);
            OutputStream outputStream = response.getOutputStream();
            outputStream.write(result.getBytes(Constants.SYSTEM_ENCODING));
View Full Code Here

Examples of crawlercommons.sitemaps.SiteMap

        // push all url with depth = 0
        level = 0;
        Collection<AbstractSiteMap> sm = ((SiteMapIndex)asm).getSitemaps();
        Iterator<AbstractSiteMap> i=sm.iterator();
        while(i.hasNext()) {
          SiteMap s = (SiteMap) i.next();
          URL url = s.getUrl();
          links.add(url.toExternalForm());
        }
      }
      else {
        // push all url with depth = 1
        level = 1;
        Collection<SiteMapURL> u = ((SiteMap)asm).getSiteMapUrls();
        Iterator<SiteMapURL> i = u.iterator()
        while(i.hasNext()) {
          SiteMapURL s = (SiteMapURL) i.next();
          URL url = s.getUrl();         
          if (!src.isFirstCrawlCompleted() || src.isReset() || s.getLastModified() == null || src.getCrawlLastTimeStart().before(s.getLastModified())) {
            links.add(url.toExternalForm())
          }         
        }
      }
      for (String strLink : links) {
View Full Code Here

Examples of models.memory.Sitemap

     */
    public static List<Sitemap> generateSitemap(Http.Request request){
        List<Sitemap> list = new ArrayList<Sitemap>();

        // home
        list.add(new Sitemap(routes.Application.index().absoluteURL(request)));

        // modules lists
        list.add(new Sitemap(routes.Modules.getModulesByPlayVersion("1").absoluteURL(request), "daily", "0.8" ));
        list.add(new Sitemap(routes.Modules.getModulesByPlayVersion("2").absoluteURL(request), "daily", "0.8" ));

        // modules details
        List<Module> modules = Module.all();
        for(Module mod: modules) {
            list.add(new Sitemap(routes.Modules.details(mod.key).absoluteURL(request), "daily", "1" ));
        }

        return list;
    }
View Full Code Here

Examples of org.b3log.solo.model.sitemap.Sitemap

    public void sitemap(final HTTPRequestContext context) {
        final TextXMLRenderer renderer = new TextXMLRenderer();

        context.setRenderer(renderer);

        final Sitemap sitemap = new Sitemap();

        try {
            addArticles(sitemap);
            addNavigations(sitemap);
            addTags(sitemap);
            addArchives(sitemap);

            LOGGER.log(Level.INFO, "Generating sitemap....");
            final String content = sitemap.toString();

            LOGGER.log(Level.INFO, "Generated sitemap");
            renderer.setContent(content);
        } catch (final Exception e) {
            LOGGER.log(Level.ERROR, "Get blog article feed error", e);
View Full Code Here

Examples of org.b3log.solo.model.sitemap.Sitemap

    @RequestProcessing(value = {"/sitemap.xml"}, method = HTTPRequestMethod.GET)
    public void sitemap(final HTTPRequestContext context) {
        final TextXMLRenderer renderer = new TextXMLRenderer();
        context.setRenderer(renderer);

        final Sitemap sitemap = new Sitemap();

        try {
            final JSONObject preference = preferenceQueryService.getPreference();

            addArticles(sitemap, preference);
            addPages(sitemap, preference);
            addTags(sitemap, preference);
            addArchives(sitemap, preference);

            LOGGER.log(Level.INFO, "Generating sitemap....");
            final String content = sitemap.toString();
            LOGGER.log(Level.INFO, "Generated sitemap");
            renderer.setContent(content);
        } catch (final Exception e) {
            LOGGER.log(Level.SEVERE, "Get blog article feed error", e);
View Full Code Here

Examples of org.jboss.elasticsearch.river.remote.sitemap.SiteMap

    if (asm.isIndex()) {
      throw new Exception("Sitemap index format is not supported by this river!");
    }

    SiteMap sm = (SiteMap) asm;

    List<Map<String, Object>> documents = new ArrayList<Map<String, Object>>();
    for (SiteMapURL smurl : sm.getSiteMapUrls()) {

      String durl = smurl.getUrl().toExternalForm();
      String ext = Utils.getFileExtensionLowercase(durl);
      if (ext == null || !IGNORED_EXTENSIONS.contains(ext)) {
        Map<String, Object> document = new HashMap<String, Object>();
View Full Code Here

Examples of org.jboss.elasticsearch.river.remote.sitemap.SiteMap

    if (asm.isIndex()) {
      throw new Exception("Sitemap index format is not supported by this river!");
    }

    SiteMap sm = (SiteMap) asm;

    List<Map<String, Object>> documents = new ArrayList<Map<String, Object>>();
    for (SiteMapURL smurl : sm.getSiteMapUrls()) {

      String durl = smurl.getUrl().toExternalForm();
      String ext = Utils.getFileExtensionLowercase(durl);
      if (ext == null || !IGNORED_EXTENSIONS.contains(ext)) {
        Map<String, Object> document = new HashMap<String, Object>();
View Full Code Here

Examples of org.meshcms.core.SiteMap

  public String getSeparator() {
    return separator;
  }
 
  public void writeTag() throws IOException, JspException {
    SiteMap siteMap = webSite.getSiteMap();
   
    boolean notTranslatable =
        pagePath.isRoot() || siteMap.getPageInfo(pagePath) == null;
   
    List langList = siteMap.getLangList();
   
    if (langList.size() > 1) {
      Iterator iter = langList.iterator();
      boolean putSeparator = false;
      Writer w = getOut();
     
      if (pre != null) {
        w.write(pre);
      }
     
      Path baseIconPath = Utils.isTrue(flags) ? webSite.getAdminPath().add("flags") : null;
     
      while (iter.hasNext()) {
        if (putSeparator) {
          w.write(separator);
        }
       
        putSeparator = true;
        SiteMap.CodeLocalePair lang = (SiteMap.CodeLocalePair) iter.next();
        String langCode = lang.getCode();
        String localeName = Utils.encodeHTML(lang.getName());
        Path link = null;
        String onClick = null;
       
        if (notTranslatable) {
          link = webSite.getLink(new Path(langCode), pageDirPath);
        } else {
          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));
                    String msg = Utils.replace(bundle.getString("confirmTranslation"),
                        '\'', "\\'");
View Full Code Here

Examples of org.meshcms.core.SiteMap

      WebSite webSite =
          (WebSite) request.getAttribute(HitFilter.WEBSITE_ATTRIBUTE);

      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()))));
View Full Code Here

Examples of org.meshcms.core.SiteMap

  public void setStyle(String style) {
    this.style = style;
  }

  public void writeTag() throws IOException {
    SiteMap siteMap = webSite.getSiteMap();
    SiteInfo siteInfo = webSite.getSiteInfo();
    Path rootPath = (path == null) ? siteInfo.getThemeRoot(pagePath) : new Path(path);
    Path pathInMenu = webSite.getSiteMap().getPathInMenu(pagePath);
    int baseLevel = rootPath.getElementCount() + 1;
    int spc = Utils.parseInt(space, 8);
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.