|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bssp.javasitemapper.SitemapURL
public class SitemapURL
Class SitemapOutputURL allows the creation, retrieval, and initialization of URL-related attributes.
Each sitemap URL has 1 required attribute (location) and 3 optional attributes (lastModified, changeFrequency, and priority): Location, or XML <loc>: the URL itself (must begin with a protocol like "http", end with a trailing slash if required by your web server, and must be less than 2,048 characters).Note: limited validation implemented to ensure URL syntax and character limitations (a maximum of 2,048 characters).LastModified, or XML <lastmod>: the date of latest modification of the file residing at this URL. The date should be in W3C Datetime format: yyyy-MM-dd (ex: 2008-07-29) or yyyy-MM-ddTHH:mm:ssTMZ (ex: 2008-07-29T17:01:49-07:00, where T is a date/time separator and TMZ represents the RFC882 time zone). If time is used, be aware that it should be represented in military format.
Note: limited validation implemented to ensure that developer-defined datetimes meet W3C Datetime format standards.ChangeFrequency, or XML <changefreq>: defines how frequently this particular page is likely to change. This attribute gives search engines insight into how often they should crawl this page for changes. Only values "always, hourly, daily, weekly, monthly, yearly, never" are allowed. In general, "always" should be used to describe documents that change whenever accessed, while "never" should be used for archived pages.
Note: limited validation implemented to ensure that proper frequency terms are entered (also lowercases all developer-defined terms by default).Priority, or XML <priority>: defines the importance of this URL relative to other URLs on your site. This attribute is especially useful in pointing out the important sections of your site, such as your index or home page. Only values from 0.0 to 1.0 are allowed, with default priority of pages set at 0.5 (if a value is not specified). Priority is relative only to your website and in no way compares your site's priority to other websites. Thus, setting a high priority (like 1.0) to all URLs on your page is in no way beneficial, and is the same as doing nothing and leaving all pages at default priority value 0.5.
Note: limited validation implemented to ensure that proper priority values are entered.To view an example of how to use this class and the other classes of this sitemap API, please go to
Sitemap
.
Note: In it's current version, the API only allows for the creation of 1 index file (which implies only 1000 sitemap files, or based on its current build, only 40,000,000 URLs). We hope to improve functionality in the next version.
Sitemap
,
SitemapURL
,
SitemapOutput
Field Summary | |
---|---|
static java.lang.String |
CHANGE_FREQUENCY_ALWAYS
Constant value "always" determines how frequently the URL is checked |
static java.lang.String |
CHANGE_FREQUENCY_DAILY
Constant value "daily" determines how frequently the URL is checked |
static java.lang.String |
CHANGE_FREQUENCY_HOURLY
Constant value "hourly" determines how frequently the URL is checked |
static java.lang.String |
CHANGE_FREQUENCY_MONTHLY
Constant value "monthly" determines how frequently the URL is checked |
static java.lang.String |
CHANGE_FREQUENCY_NEVER
Constant value "never" determines how frequently the URL is checked |
static java.lang.String |
CHANGE_FREQUENCY_WEEKLY
Constant value "weekly" determines how frequently the URL is checked |
static java.lang.String |
CHANGE_FREQUENCY_YEARLY
Constant value "yearly" determines how frequently the URL is checked |
static java.lang.String |
PRIORITY_ONE_POINT_ZERO
Constant value "1.0" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_EIGHT
Constant value "0.8" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_FIVE
Constant value "0.5" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_FOUR
Constant value "0.4" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_NINE
Constant value "0.9" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_ONE
Constant value "0.1" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_SEVEN
Constant value "0.7" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_SIX
Constant value "0.6" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_THREE
Constant value "0.3" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_TWO
Constant value "0.2" used to rate URL's priority. |
static java.lang.String |
PRIORITY_ZERO_POINT_ZERO
Constant value "0.0" used to rate URL's priority. |
Constructor Summary | |
---|---|
SitemapURL(java.lang.String loc)
This overloaded constructor creates a new SitemapURL object with a user-specified location attribute. |
|
SitemapURL(java.lang.String loc,
java.lang.String mod,
java.lang.String freq,
java.lang.String prior)
This overloaded constructor creates a new SitemapURL object with user-specified location, lastModified, changeFrequency, and priority attributes. |
Method Summary | |
---|---|
java.lang.String |
getChangeFrequency()
This returns the attribute describing the frequency in which the link is updated. |
java.lang.String |
getLastModified()
This returns the attribute describing the date the URL was last modified. |
java.lang.String |
getLocation()
This returns the attribute describing the URL's location. |
java.lang.String |
getPriority()
This returns the attribute describing the URL's priority with respect to all other URLs on the webpage. |
void |
setChangeFrequency(java.lang.String changeFrequency)
This sets the attribute describing the frequency in which the link is updated. |
void |
setLastModified(java.lang.String lastModified)
This sets the attribute describing the date the URL was last modified. |
void |
setLocation(java.lang.String location)
This sets the attribute describing the URL's location. |
void |
setPriority(java.lang.String priority)
This sets the the attribute describing the URL's priority with respect to all other URLs on the webpage. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PRIORITY_ZERO_POINT_ZERO
public static final java.lang.String PRIORITY_ZERO_POINT_ONE
public static final java.lang.String PRIORITY_ZERO_POINT_TWO
public static final java.lang.String PRIORITY_ZERO_POINT_THREE
public static final java.lang.String PRIORITY_ZERO_POINT_FOUR
public static final java.lang.String PRIORITY_ZERO_POINT_FIVE
public static final java.lang.String PRIORITY_ZERO_POINT_SIX
public static final java.lang.String PRIORITY_ZERO_POINT_SEVEN
public static final java.lang.String PRIORITY_ZERO_POINT_EIGHT
public static final java.lang.String PRIORITY_ZERO_POINT_NINE
public static final java.lang.String PRIORITY_ONE_POINT_ZERO
public static final java.lang.String CHANGE_FREQUENCY_ALWAYS
public static final java.lang.String CHANGE_FREQUENCY_HOURLY
public static final java.lang.String CHANGE_FREQUENCY_DAILY
public static final java.lang.String CHANGE_FREQUENCY_WEEKLY
public static final java.lang.String CHANGE_FREQUENCY_MONTHLY
public static final java.lang.String CHANGE_FREQUENCY_YEARLY
public static final java.lang.String CHANGE_FREQUENCY_NEVER
Constructor Detail |
---|
public SitemapURL(java.lang.String loc)
loc
- a String describing the URL's location.public SitemapURL(java.lang.String loc, java.lang.String mod, java.lang.String freq, java.lang.String prior)
loc
- a String describing the URL's location.mod
- a String describing the date the URL was last modified.freq
- a String describing the frequency in which the link is
updated.prior
- a String describing the URL's priority with respect to all
other URLs on the webpage.Method Detail |
---|
public java.lang.String getChangeFrequency()
public void setChangeFrequency(java.lang.String changeFrequency)
changeFrequency
- a String describing the frequency in which the
link is updated.public java.lang.String getPriority()
public void setPriority(java.lang.String priority)
priority
- a String describing the URL's priority with respect to
all other URLs on the webpage.public java.lang.String getLastModified()
public void setLastModified(java.lang.String lastModified)
lastModified
- a String describing the date the URL was last
modified.public java.lang.String getLocation()
public void setLocation(java.lang.String location)
location
- a String describing the URL's location.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |