Java Code Examples for com.redfin.sitemapgenerator.WebSitemapGenerator#writeAsStrings()
The following examples show how to use
com.redfin.sitemapgenerator.WebSitemapGenerator#writeAsStrings() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 6 votes |
private static List<String> genRecommendations() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<String> recommendations = Lists.newArrayList( "java-libraries" , "best-selling-html-css-themes-and-website-templates" ); for (String recommendation : recommendations) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment(recommendation) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 2
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 6 votes |
private static List<String> genRecommendations() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<String> recommendations = Lists.newArrayList( "java-libraries" , "best-selling-html-css-themes-and-website-templates" ); for (String recommendation : recommendations) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment(recommendation) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 3
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genPosts() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<String> slugs = Posts.getAllSlugs(); for (String slug: slugs) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("posts") .addPathSegment(slug) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 4
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genGuides() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<GuideTitle> guides = Guides.findTitles(); for (GuideTitle guide : guides) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("guides") .addPathSegment(guide.getSlug()) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 5
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genTags() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<Tag> tags = Tags.getTags(); for (Tag tag : tags) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("tags") .addPathSegment(tag.getName()) .addEncodedPathSegment("posts") .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 6
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genLibraries() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<JavaLib> libraries = Seq.of(JavaLib.values()).toList(); for (JavaLib lib : libraries) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("java-libraries") .addPathSegment(lib.getName()) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 7
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genPosts() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<String> slugs = Posts.getAllSlugs(); for (String slug: slugs) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("posts") .addPathSegment(slug) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 8
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genGuides() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<GuideTitle> guides = Guides.findTitles(); for (GuideTitle guide : guides) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("guides") .addPathSegment(guide.getSlug()) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 9
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genTags() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<Tag> tags = Tags.getTags(); for (Tag tag : tags) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("tags") .addPathSegment(tag.getName()) .addEncodedPathSegment("posts") .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }
Example 10
Source File: StubbornJavaSitemapGenerator.java From StubbornJava with MIT License | 5 votes |
private static List<String> genLibraries() throws MalformedURLException { WebSitemapGenerator wsg = new WebSitemapGenerator(HOST); List<JavaLib> libraries = Seq.of(JavaLib.values()).toList(); for (JavaLib lib : libraries) { String url = HttpUrl.parse(HOST) .newBuilder() .addPathSegment("java-libraries") .addPathSegment(lib.getName()) .build() .toString(); wsg.addUrl(url); } return wsg.writeAsStrings(); }