|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.artima.place.info.LocalizableInfo | +--com.artima.place.info.Keywords
A bundle of localizable keywords. This information could, for example, be used by search engines spiders when adding this resource to their database.
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. |
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 name for the
specified locale. |
int |
hashCode()
Returns a hash code for this object. |
void |
purge()
Purge away information about undesired locales. |
void |
purge(java.util.Locale preserveLocale)
Purge away information about all locales except the passed desired locale. |
Methods inherited from class com.artima.place.info.LocalizableInfo |
clearCachedLocale, clearResourceBundleLoader, compareObjectsOrNull, getBestFitLocale, getBestFitLocale, getCachedLocale, getResourceBundleLoader, getSupportedLocales, hasCachedLocale, hasResourceBundleLoader, setCachedLocale, stripResourceBundleLoader, useCache |
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
ResourceBundle
s for this Keywords
.keywordsKey
- the String
key with which the
String
resource can be retrieved from a
ResourceBundle
provided by the
ResourceBundleLoader
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
ResourceBundle
s 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
ResourceBundleLoader
cachedLocale
- the Locale
of the description
passed as cachedKeywords
.cachedKeywords
- the description, whose locale is passed as
cachedLocale
that should be cached by this
Keywords
.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
.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 name for the
specified 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 void purge()
purge
in class LocalizableInfo
public void purge(java.util.Locale preserveLocale)
purge
in class LocalizableInfo
preserveLocale
- a locale to preserve in this
Keywords
.public 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 LocalizableInfo
An
- object to compare to this Keywords
true
if this Keywords
is
semantically equal to the passed Keywords
public int hashCode()
hashCode
in class LocalizableInfo
public java.lang.Object clone()
Keywords
.clone
in class LocalizableInfo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |