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.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.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:
-
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
-