Interface SearchMetadata<T>
public interface SearchMetadata<T>
Resource metadata models a piece of metadata that describes one aspect of a
resource, e. g. the title.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocalizedValue(Language language, T v) Addsvalueto the list of language neutral values.booleanReturnstrueif the values should be added to the user facing fulltext search index.voidAddsvalueto the list of language neutral values.voidclear()Removes all values currently in the metadata container.Returns the values for this metadata item, mapped to their respective languages.getName()Returns the name of this metadata item.getValue()Returns the first value of the available values ornullif no value is available.Returns a list of all all non-localized values.booleanReturnstrueif this metadata item has been localized.voidsetAddToText(boolean addToFulltext) Adds the metadata values to the user facing fulltext index.
-
Method Details
-
getName
String getName()Returns the name of this metadata item.- Returns:
- the name
-
addLocalizedValue
Addsvalueto the list of language neutral values.- Parameters:
language- the languagev- the value
-
getLocalizedValues
Returns the values for this metadata item, mapped to their respective languages.- Returns:
- the localized values
-
isLocalized
boolean isLocalized()Returnstrueif this metadata item has been localized.- Returns:
trueif the metadata item is localized
-
addValue
Addsvalueto the list of language neutral values.- Parameters:
v- the value
-
getValues
Returns a list of all all non-localized values. In order to retrieve localized values for this metadata field, usegetLocalizedValues().- Returns:
- the list of language neutral values
-
getValue
T getValue()Returns the first value of the available values ornullif no value is available.- Returns:
- the first value
- See Also:
-
clear
void clear()Removes all values currently in the metadata container. -
setAddToText
void setAddToText(boolean addToFulltext) Adds the metadata values to the user facing fulltext index.- Parameters:
addToFulltext-trueto add the values to the fulltext index
-
addToText
boolean addToText()Returnstrueif the values should be added to the user facing fulltext search index.- Returns:
trueif the metadata values should be added to the fulltext index
-