Class ExtensionMetadata
- java.lang.Object
-
- crawlercommons.sitemaps.extension.ExtensionMetadata
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ImageAttributes
,LinkAttributes
,MobileAttributes
,NewsAttributes
,PageMap
,PageMapDataObject
,VideoAttributes
public abstract class ExtensionMetadata extends Object implements Serializable
Container for attributes of aSiteMapURL
defined by a sitemap extension.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExtensionMetadata()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Map<String,String[]>
asMap()
abstract boolean
equals(Object other)
boolean
isValid()
Validate extension metadata.protected static boolean
urlEquals(URL a, URL b)
Compare URLs by their string representation because callingURL.equals(Object)
may trigger an unwanted and potentially slow DNS lookup to resolve the host part
-
-
-
Method Detail
-
isValid
public boolean isValid()
Validate extension metadata. Extensions should override this method in order to validate the extension-specific set of metadata attributes.- Returns:
- true if all required extension attributes are present and attributes are valid.
-
urlEquals
protected static boolean urlEquals(URL a, URL b)
Compare URLs by their string representation because callingURL.equals(Object)
may trigger an unwanted and potentially slow DNS lookup to resolve the host part
-
-