Class DublinCoreMetadataProvider
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.plugins.explorer.dublincore.DublinCoreMetadataProvider
- All Implemented Interfaces:
Initializable
,Component
,Contextualizable
,LogEnabled
,ThreadSafe
public class DublinCoreMetadataProvider
extends AbstractLogEnabled
implements Component, Contextualizable, ThreadSafe, Initializable
This class handle the enumerated values for DublinCore metadata
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,
I18nizableText> _parseEnumerator
(Configuration configuration) Parses the enumerator.protected void
_parseFile
(String metadataName) Parses the enumerator.protected I18nizableText
_parseI18nizableText
(Configuration config, String name) Parses an i18n text.void
contextualize
(Context context) getEntries
(String metadataName) Provides the enumerated valuesRetrieves a single label from a value.Get the enumerated metadata namesvoid
boolean
isEnumerated
(String metadataName) Determines if the DublinCore metadata is enumeratedMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
Avalon Role
-
-
Constructor Details
-
DublinCoreMetadataProvider
public DublinCoreMetadataProvider()
-
-
Method Details
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
getEnumeratedMetadataNames
Get the enumerated metadata names- Returns:
- the enumerated metadata names
-
isEnumerated
Determines if the DublinCore metadata is enumerated- Parameters:
metadataName
- the metadata name- Returns:
- true if the DublinCore metadata is enumerated
-
getEntries
Provides the enumerated values- Parameters:
metadataName
- the metadata name- Returns:
- the enumerated values. Can be null.
-
getEntry
Retrieves a single label from a value.- Parameters:
metadataName
- the metadata nalevalue
- the value.- Returns:
- the label or
null
if not found.
-
_parseFile
Parses the enumerator.- Parameters:
metadataName
- the metadata name- Throws:
ConfigurationException
- if the configuration is not valid.
-
_parseEnumerator
protected Map<String,I18nizableText> _parseEnumerator(Configuration configuration) throws ConfigurationException Parses the enumerator.- Parameters:
configuration
- the configuration to use- Returns:
- the enumerator values
- Throws:
ConfigurationException
- if the configuration is not valid.
-
_parseI18nizableText
protected I18nizableText _parseI18nizableText(Configuration config, String name) throws ConfigurationException Parses an i18n text.- Parameters:
config
- the configuration to use.name
- the child name.- Returns:
- the i18n text.
- Throws:
ConfigurationException
- if the configuration is not valid.
-