Class SearchMetadataImpl<T>
java.lang.Object
org.opencastproject.elasticsearch.impl.SearchMetadataImpl<T>
- All Implemented Interfaces:
SearchMetadata<T>
Default implementation for the
SearchMetadata.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSearchMetadataImpl(String name) Creates a new metadata item with the given name. -
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.booleanReturns 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.inthashCode()booleanReturnstrueif this metadata item has been localized.voidsetAddToText(boolean addToText) Adds the metadata values to the user facing fulltext index.toString()
-
Field Details
-
name
The name of this metadata item -
values
Values -
localizedValues
Localized values -
addToText
protected boolean addToTextTrue to add the values to the fulltext index
-
-
Constructor Details
-
SearchMetadataImpl
Creates a new metadata item with the given name.- Parameters:
name- the name
-
-
Method Details
-
getName
Returns the name of this metadata item.- Specified by:
getNamein interfaceSearchMetadata<T>- Returns:
- the name
- See Also:
-
isLocalized
public boolean isLocalized()Returnstrueif this metadata item has been localized.- Specified by:
isLocalizedin interfaceSearchMetadata<T>- Returns:
trueif the metadata item is localized- See Also:
-
addLocalizedValue
Addsvalueto the list of language neutral values.- Specified by:
addLocalizedValuein interfaceSearchMetadata<T>- Parameters:
language- the languagev- the value
-
getLocalizedValues
Returns the values for this metadata item, mapped to their respective languages.- Specified by:
getLocalizedValuesin interfaceSearchMetadata<T>- Returns:
- the localized values
- See Also:
-
addValue
Addsvalueto the list of language neutral values.- Specified by:
addValuein interfaceSearchMetadata<T>- Parameters:
v- the value- See Also:
-
getValues
Returns a list of all all non-localized values. In order to retrieve localized values for this metadata field, useSearchMetadata.getLocalizedValues().- Specified by:
getValuesin interfaceSearchMetadata<T>- Returns:
- the list of language neutral values
- See Also:
-
getValue
Returns the first value of the available values ornullif no value is available.- Specified by:
getValuein interfaceSearchMetadata<T>- Returns:
- the first value
- See Also:
-
setAddToText
public void setAddToText(boolean addToText) Adds the metadata values to the user facing fulltext index.- Specified by:
setAddToTextin interfaceSearchMetadata<T>- Parameters:
addToText-trueto add the values to the fulltext index- See Also:
-
addToText
public boolean addToText()Returnstrueif the values should be added to the user facing fulltext search index.- Specified by:
addToTextin interfaceSearchMetadata<T>- Returns:
trueif the metadata values should be added to the fulltext index
-
clear
public void clear()Removes all values currently in the metadata container.- Specified by:
clearin interfaceSearchMetadata<T>- See Also:
-
hashCode
public int hashCode() -
equals
-
toString
-