public class SiteMapURL extends Object implements Serializable
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) |
SiteMapURL(URL url,
java.time.ZonedDateTime lastModified,
SiteMapURL.ChangeFrequency changeFreq,
double priority,
boolean valid) |
Modifier and Type | Method and Description |
---|---|
void |
addAttributesForExtension(Extension extension,
ExtensionMetadata[] attributes)
Add attributes of a specific sitemap extension
|
boolean |
equals(Object o) |
Map<Extension,ExtensionMetadata[]> |
getAttributes()
Get attributes of sitemap extensions (news, images, videos, etc.)
|
ExtensionMetadata[] |
getAttributesForExtension(Extension extension)
Get attributes of a specific sitemap extension
|
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 |
setLastModified(java.time.ZonedDateTime 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 SiteMapURL(URL url, java.time.ZonedDateTime 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
- lastmod specified for the URLpublic void setLastModified(Date lastModified)
lastModified
- lastmod specified for the URLpublic void setLastModified(java.time.ZonedDateTime lastModified)
lastModified
- lastmod specified for the URLpublic 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()
public void addAttributesForExtension(Extension extension, ExtensionMetadata[] attributes)
extension
- sitemap extension (news, images, videos, etc.)attributes
- array of attributespublic Map<Extension,ExtensionMetadata[]> getAttributes()
public ExtensionMetadata[] getAttributesForExtension(Extension extension)
extension
- sitemap extension (news, images, videos, etc.)Copyright © 2009–2021 Crawler-Commons. All rights reserved.