|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.artima.place.attribute.Keywords
A bundle of localizable keywords. This information could, for example, be used by search engines spiders when adding this resource to their database.
| Inner Class Summary | |
static class |
Keywords.Cache
Contains a set of cached keywords Set and its Locale, the cache
for a Keywords object. |
| Constructor Summary | |
Keywords(java.util.Locale cachedLocale,
java.util.Set cachedKeywords)
Constructs a new Keywords with passed cached keywords for
the passed locale, and no keywords key and resource bundle loader. |
|
Keywords(ResourceBundleLoader loader,
java.lang.String keywordsKey)
Constructs a new Keywords with passed resource bundle
loader, keywords key, and no cached keywords. |
|
Keywords(ResourceBundleLoader loader,
java.lang.String keywordsKey,
java.util.Locale cachedLocale,
java.util.Set cachedKeywords)
Constructs a new Keywords with passed resource bundle
loader, keywords key, and cached keywords (for the passed locale). |
|
| Method Summary | |
java.lang.Object |
clone()
Clones this Keywords. |
boolean |
equals(java.lang.Object o)
Compares this Keywords to the passed object for equality. |
Keywords.Cache |
getCache()
Returns this Keywords's Cache, or null if none exists. |
java.util.SortedSet |
getKeywords()
Returns a SortedSet of keywords, suitable for
presentation to users, appropriate to the default locale. |
java.util.SortedSet |
getKeywords(java.util.Locale desiredLocale)
Returns a SortedSet of keywords, suitable for
presentation to users, which represents the best-fit keywords for the
specified locale. |
java.lang.String |
getKeywordsKey()
Returns the String keywords key contained in this Keywords, or
null if none exists. |
ResourceBundleLoader |
getResourceBundleLoader()
Returns the ResourceBundleLoader contained in this Keywords, or
null if none exists. |
boolean |
hasCache()
Indicates whether this Keywords object has a String cached keywords and their Locale. |
int |
hashCode()
Returns a hash code for this object. |
boolean |
hasResources()
Indicates whether this Keywords object has a ResourceBundleLoader and String keywords key. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Keywords(ResourceBundleLoader loader,
java.lang.String keywordsKey)
Keywords with passed resource bundle
loader, keywords key, and no cached keywords.loader - the ResourceBundleLoader which can load
ResourceBundles for this Keywords.keywordsKey - the String key with which the
String resource can be retrieved from a
ResourceBundle provided by the
ResourceBundleLoaderNullPointerException - if either of the passed
loader or keywordsKey references are
null
public Keywords(ResourceBundleLoader loader,
java.lang.String keywordsKey,
java.util.Locale cachedLocale,
java.util.Set cachedKeywords)
Keywords with passed resource bundle
loader, keywords key, and cached keywords (for the passed locale).
The passed Set will not be used as part of the state of
this newly constructed object. Rather its contents will be used to
initialize an unmodifiable Set which will be returned
by getKeywords when the locale passed in
cachedLocale is requested.
loader - the ResourceBundleLoader which can load
ResourceBundles for this Keywords.cachedKeywords - a set of keywords that will be stored as part of
the state of this object, representing the root locale.keywordsKey - the String key with which the
String resource can be retrieved from a
ResourceBundle provided by the
ResourceBundleLoadercachedLocale - the Locale of the description
passed as cachedKeywords.cachedKeywords - the description, whose locale is passed as
cachedLocale that should be cached by this
Keywords.NullPointerException - if any of passed loader,
keywordsKey, cachedLocale, or
cachedKeywords references are null
public Keywords(java.util.Locale cachedLocale,
java.util.Set cachedKeywords)
Keywords with passed cached keywords for
the passed locale, and no keywords key and resource bundle loader.
(Because this Keywords info object contains no resource
bundle loader, it also requires no key with which to look up a
keywords resource in a resource bundle.
The passed Set will not be used as part of the state of
this newly constructed object. Rather its contents will be used to
initialize an unmodifiable Set which will be returned
by getKeywords when the locale passed in
cachedLocale is requested.
cachedLocale - the Locale of the description
passed as cachedKeywords.cachedKeywords - the keywords, whose locale is passed as
cachedLocale that should be cached by this
Keywords.NullPointerException - if any of passed
cachedLocale, or cachedKeywords
references are null| Method Detail |
public java.util.SortedSet getKeywords()
SortedSet of keywords, suitable for
presentation to users, appropriate to the default locale. These
keywords can be used by search engines to index the resource.MissingResourceException - if a codebase URL is found to be
unusable. (Because URLString enforces well-formedness
of all URLs used by this method, this exception probably indicates
the protocol was unknown.), or if a ResourceBundle is
not found at the expected codebasepublic java.util.SortedSet getKeywords(java.util.Locale desiredLocale)
SortedSet of keywords, suitable for
presentation to users, which represents the best-fit keywords for the
specified locale. These keywords can be used by search engines to
index the resource.NullPointerException - if passed desiredLocale is
nullMissingResourceException - if a codebase URL is found to be
unusable. (Because URLString enforces well-formedness
of all URLs used by this method, this exception probably indicates
the protocol was unknown.), or if a ResourceBundle is
not found at the expected codebasepublic boolean equals(java.lang.Object o)
Keywords to the passed object for equality.
To be semantically equal, the class of the passed object must be
Keywords, the passed object's cached keywords must be
semantically equal to this object's cached keywords, the passed
object's keywords key must be semantically to this object's keywords
key, and the equals method of Keywords'
superclass must return true.equals in class java.lang.ObjectAn - object to compare to this Keywordstrue if this Keywords is
semantically equal to the passed Keywordspublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
Keywords.clone in class java.lang.Objectpublic Keywords.Cache getCache()
Cache, or null if none exists.
This method will return null only if this Keywords object contains
no cached String keywords. Otherwise, this method will return a Keywords.Cache
object containing this object's cached String keywords and the Locale of that cached
keywords (the "cached locale").Keywords.Cache, which contains this object's
cached keywords and locale, or null if this object contains
no cachepublic boolean hasResources()
Keywords object has a ResourceBundleLoader and String keywords key.Keywords object has a ResourceBundleLoader and String keywords key.public boolean hasCache()
Keywords object has a String cached keywords and their Locale.Keywords object has a String cached keywords and their Locale.public ResourceBundleLoader getResourceBundleLoader()
ResourceBundleLoader contained in this Keywords, or
null if none exists.ResourceBundleLoader, or null if this object contains no
ResourceBundleLoader.public java.lang.String getKeywordsKey()
String keywords key contained in this Keywords, or
null if none exists.String keywords key, or null if this object contains no
keywords key.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||