com.redfin.sitemapgenerator
Class GoogleCodeSitemapUrl.Options

java.lang.Object
  extended by com.redfin.sitemapgenerator.GoogleCodeSitemapUrl.Options
Enclosing class:
GoogleCodeSitemapUrl

public static class GoogleCodeSitemapUrl.Options
extends java.lang.Object

Options to configure Google Code Search URLs


Constructor Summary
GoogleCodeSitemapUrl.Options(java.lang.String url, GoogleCodeSitemapUrl.FileType fileType)
          Specifies an url and a filetype (both mandatory in Google Code Search)
GoogleCodeSitemapUrl.Options(java.lang.String url, java.lang.String fileType)
          Specifies an url and a filetype (both mandatory in Google Code Search)
GoogleCodeSitemapUrl.Options(java.net.URL url, GoogleCodeSitemapUrl.FileType fileType)
          Specifies an url and a filetype (both mandatory in Google Code Search)
GoogleCodeSitemapUrl.Options(java.net.URL url, java.lang.String fileType)
          Specifies an url and a filetype (both mandatory in Google Code Search)
 
Method Summary
 U build()
          Return an URL based on these settings
 THIS changeFreq(ChangeFreq changeFreq)
          How frequently the page is likely to change.
 GoogleCodeSitemapUrl.Options fileName(java.lang.String fileName)
          The name of the actual file; this is useful if the URL ends in something like download.php?id=1234 instead of the actual filename.
 THIS lastMod(java.util.Date lastMod)
          The date of last modification of the file.
 THIS lastMod(java.lang.String lastMod)
          The date of last modification of the file.
 GoogleCodeSitemapUrl.Options license(GoogleCodeSitemapUrl.License license)
          Specifies code license
 GoogleCodeSitemapUrl.Options license(java.lang.String license)
          Specifies code license; when the value is not one of the recognized licenses, this will cause Google to index the item as "unknown license".
 GoogleCodeSitemapUrl.Options packageMap(java.lang.String packageMap)
          The name of the packagemap file inside an GoogleCodeSitemapUrl.FileType.ARCHIVE; just like a Sitemap is a list of files on a web site, a packagemap is a list of files in a package.
 GoogleCodeSitemapUrl.Options packageUrl(java.lang.String packageUrl)
          The URL truncated at the top-level directory for the package; this tells Google which files belong together.
 GoogleCodeSitemapUrl.Options packageUrl(java.net.URL packageUrl)
          The URL truncated at the top-level directory for the package; this tells Google which files belong together.
 THIS priority(java.lang.Double priority)
          The priority of this URL relative to other URLs on your site.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoogleCodeSitemapUrl.Options

public GoogleCodeSitemapUrl.Options(java.lang.String url,
                                    GoogleCodeSitemapUrl.FileType fileType)
                             throws java.net.MalformedURLException
Specifies an url and a filetype (both mandatory in Google Code Search)

Throws:
java.net.MalformedURLException

GoogleCodeSitemapUrl.Options

public GoogleCodeSitemapUrl.Options(java.net.URL url,
                                    GoogleCodeSitemapUrl.FileType fileType)
Specifies an url and a filetype (both mandatory in Google Code Search)


GoogleCodeSitemapUrl.Options

public GoogleCodeSitemapUrl.Options(java.lang.String url,
                                    java.lang.String fileType)
                             throws java.net.MalformedURLException
Specifies an url and a filetype (both mandatory in Google Code Search)

Throws:
java.net.MalformedURLException

GoogleCodeSitemapUrl.Options

public GoogleCodeSitemapUrl.Options(java.net.URL url,
                                    java.lang.String fileType)
Specifies an url and a filetype (both mandatory in Google Code Search)

Method Detail

license

public GoogleCodeSitemapUrl.Options license(GoogleCodeSitemapUrl.License license)
Specifies code license


license

public GoogleCodeSitemapUrl.Options license(java.lang.String license)
Specifies code license; when the value is not one of the recognized licenses, this will cause Google to index the item as "unknown license".


fileName

public GoogleCodeSitemapUrl.Options fileName(java.lang.String fileName)
The name of the actual file; this is useful if the URL ends in something like download.php?id=1234 instead of the actual filename. The name can contain any character except "/". If the file is an GoogleCodeSitemapUrl.FileType.ARCHIVE file, it will be indexed only if it has one of the supported archive suffixes.

See Also:
Supported archive suffixes

packageUrl

public GoogleCodeSitemapUrl.Options packageUrl(java.net.URL packageUrl)
The URL truncated at the top-level directory for the package; this tells Google which files belong together. For use only when the filetype is not GoogleCodeSitemapUrl.FileType.ARCHIVE. For example, the file http://path/Foo/1.23/bar/file.c could have the package URL http://path/Foo/1.23. All files in a package should have the same packageurl.


packageUrl

public GoogleCodeSitemapUrl.Options packageUrl(java.lang.String packageUrl)
                                        throws java.net.MalformedURLException
The URL truncated at the top-level directory for the package; this tells Google which files belong together. For use only when the filetype is not GoogleCodeSitemapUrl.FileType.ARCHIVE. For example, the file http://path/Foo/1.23/bar/file.c could have the package URL http://path/Foo/1.23. All files in a package should have the same packageurl.

Throws:
java.net.MalformedURLException

packageMap

public GoogleCodeSitemapUrl.Options packageMap(java.lang.String packageMap)
The name of the packagemap file inside an GoogleCodeSitemapUrl.FileType.ARCHIVE; just like a Sitemap is a list of files on a web site, a packagemap is a list of files in a package. Case-sensitive. For use only when filetype is GoogleCodeSitemapUrl.FileType.ARCHIVE.


lastMod

public THIS lastMod(java.util.Date lastMod)
The date of last modification of the file. Note that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.


lastMod

public THIS lastMod(java.lang.String lastMod)
                                                                                   throws java.text.ParseException
The date of last modification of the file. Note that this tag is separate from the If-Modified-Since (304) header the server can return, and search engines may use the information from both sources differently.

Throws:
java.text.ParseException - if the string isn't a valid W3C date time
See Also:
W3CDateFormat

changeFreq

public THIS changeFreq(ChangeFreq changeFreq)
How frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. The value ChangeFreq.ALWAYS should be used to describe documents that change each time they are accessed. The value ChangeFreq.NEVER should be used to describe archived URLs.

Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers may consider this information when making decisions, they may crawl pages marked ChangeFreq.HOURLY less frequently than that, and they may crawl pages marked ChangeFreq.YEARLY more frequently than that. Crawlers may periodically crawl pages marked ChangeFreq.NEVER so that they can handle unexpected changes to those pages.


priority

public THIS priority(java.lang.Double priority)

The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.

The default priority of a page is 0.5.

Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine's result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index.

Also, please note that assigning a high priority to all of the URLs on your site is not likely to help you. Since the priority is relative, it is only used to select between URLs on your site.


build

public U build()
Return an URL based on these settings



Copyright © 2009. All Rights Reserved.