|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MetadataResource
Generic metadata extraction API.
Method Summary | |
---|---|
java.lang.Iterable<java.lang.String> |
getParsedKeys()
Get an Iterable of all successfully parsed metadata keys. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getParseErrors()
Get a Map of errors that occured while parsing the metadata resource. |
java.lang.Object |
getValue(java.lang.String key,
java.util.Locale locale)
Get a single metadata value based on an arbitrary key. |
java.lang.Iterable<?> |
getValues(java.lang.String key,
java.util.Locale locale)
Get all available metadata values based on an arbitrary key. |
Method Detail |
---|
java.lang.Object getValue(java.lang.String key, java.util.Locale locale)
Keys are implementation specific. If more than one metadata of the specified key is available, this will return the first available one.
An optional Locale parameter may be provided. Some metadata values might have Locale-specific variations. The Locale parameter may be null in which case the platform's default Locale will be used.
key
- the keylocale
- a Locale
java.lang.Iterable<?> getValues(java.lang.String key, java.util.Locale locale)
Keys are implementation specific.
An optional Locale parameter may be provided. Some metadata values might have Locale-specific variations. The Locale parameter may be null in which case the platform's default Locale will be used.
key
- the keylocale
- a Locale
java.lang.Iterable<java.lang.String> getParsedKeys()
No sorting should be implied by the returned Iterator, but implementations are free to order the results in any way they see fit.
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParseErrors()
The Map has keys based on the metadata names, and the List associated with each key holds the error message(s) that occurred while processing the metadata values for that key.
If no errors occurred while processing, this will return an empty Map (never null).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |