| org.apache.hivemind.Resource
All known Subclasses: org.apache.hivemind.util.AbstractResource,
Method Summary | |
public Locale | getLocale() Returns the locale for which this resource has been localized
or null if the resource has not been localized. | public Resource | getLocalization(Locale locale) Returns a localized version of this resource (or this resource, if no
appropriate localization is found). | public String | getName() Returns the file name portion of the resource location. | public String | getPath() Returns the path that represents the resource. | public Resource | getRelativeResource(String name) Returns at a relative location to this resource. | public URL | getResourceURL() Returns a URL for the resource. |
getLocale | public Locale getLocale()(Code) | | Returns the locale for which this resource has been localized
or null if the resource has not been localized. This should
only be used when the type of resource is known.
This locale is the same or more general than the locale for which localization
was requested. For example, if the requested locale was en_US, but only the file
Home_en was found, this locale returned would be en.
|
getLocalization | public Resource getLocalization(Locale locale)(Code) | | Returns a localized version of this resource (or this resource, if no
appropriate localization is found). Should only be invoked
on a base resource.
Parameters: locale - to localize for, or null for no localization. a localized version of this resource, of null if the resourceitself does not exist. |
getName | public String getName()(Code) | | Returns the file name portion of the resource location.
|
getPath | public String getPath()(Code) | | Returns the path that represents the resource. This should
only be used when the type of resource is known.
|
getRelativeResource | public Resource getRelativeResource(String name)(Code) | | Returns at a relative location to this resource.
The new resource may or may not exist; this can be determined
via
Resource.getResourceURL() .
Parameters: name - name of new resource, possibly as a relative path, oras an absolute path (starting with a slash). |
getResourceURL | public URL getResourceURL()(Code) | | Returns a URL for the resource.
the URL for the resource if it exists, or null if it does not |
|
|