public class SiteMapURL extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SiteMapURL.ChangeFrequency
Allowed change frequencies
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_PRIORITY |
Constructor and Description |
---|
SiteMapURL(String url,
boolean valid) |
SiteMapURL(String url,
String lastModified,
String changeFreq,
String priority,
boolean valid) |
SiteMapURL(URL url,
boolean valid) |
SiteMapURL(URL url,
Date lastModified,
SiteMapURL.ChangeFrequency changeFreq,
double priority,
boolean valid) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
SiteMapURL.ChangeFrequency |
getChangeFrequency()
Return the URL's change frequency
|
Date |
getLastModified()
Return when this URL was last modified.
|
double |
getPriority()
Return this URL's priority (a value between [0.0 - 1.0]).
|
URL |
getUrl()
Return the URL.
|
int |
hashCode() |
boolean |
isValid()
Is the siteMapURL under the base url ?
|
void |
setChangeFrequency(SiteMapURL.ChangeFrequency changeFreq)
Set the URL's change frequency
|
void |
setChangeFrequency(String changeFreq)
Set the URL's change frequency In case of a bad ChangeFrequency, the
current frequency in this instance will be set to NULL
|
void |
setLastModified(Date lastModified)
Set when this URL was last modified.
|
void |
setLastModified(String lastModified)
Set when this URL was last modified.
|
void |
setPriority(double priority)
Set the URL's priority to a value between [0.0 - 1.0] (Default Priority
is used if the given priority is out of range).
|
void |
setPriority(String priorityStr)
Set the URL's priority to a value between [0.0 - 1.0] (Default Priority
is used if the given priority missing or is out of range).
|
void |
setUrl(String url)
Set the URL.
|
void |
setUrl(URL url)
Set the URL.
|
void |
setValid(boolean valid)
Valid means that it follows the official guidelines that the siteMapURL
must be under the base url
|
String |
toString() |
public static final double DEFAULT_PRIORITY
public SiteMapURL(String url, boolean valid)
public SiteMapURL(URL url, boolean valid)
public SiteMapURL(String url, String lastModified, String changeFreq, String priority, boolean valid)
public SiteMapURL(URL url, Date lastModified, SiteMapURL.ChangeFrequency changeFreq, double priority, boolean valid)
public URL getUrl()
public void setUrl(URL url)
url
- of the sitemappublic void setUrl(String url)
url
- In case of Malformed URL, the current url in this instance
will be set to NULLpublic Date getLastModified()
public void setLastModified(String lastModified)
lastModified
- the last time the sitemap was modifiedpublic void setLastModified(Date lastModified)
lastModified
- the last time the sitemap was modifiedpublic double getPriority()
public void setPriority(double priority)
priority
- a value between [0.0 - 1.0]public void setPriority(String priorityStr)
priorityStr
- a value between [0.0 - 1.0]public SiteMapURL.ChangeFrequency getChangeFrequency()
public void setChangeFrequency(SiteMapURL.ChangeFrequency changeFreq)
changeFreq
- a SiteMapURL.ChangeFrequency
for this sitemappublic void setChangeFrequency(String changeFreq)
changeFreq
- a string representing a
SiteMapURL.ChangeFrequency
for
this sitemappublic void setValid(boolean valid)
valid
- whether the Sitemap is valid syntax or notpublic boolean isValid()
Copyright © 2009–2016 Crawler-Commons. All rights reserved.