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 Type
    Method
    Description
    void
    Adds value to the list of language neutral values.
    boolean
    Returns true if the values should be added to the user facing fulltext search index.
    void
    Adds value to the list of language neutral values.
    void
    Removes all values currently in the metadata container.
    Returns the values for this metadata item, mapped to their respective languages.
    Returns the name of this metadata item.
    Returns the first value of the available values or null if no value is available.
    Returns a list of all all non-localized values.
    boolean
    Returns true if this metadata item has been localized.
    void
    setAddToText(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

      void addLocalizedValue(Language language, T v)
      Adds value to the list of language neutral values.
      Parameters:
      language - the language
      v - the value
    • getLocalizedValues

      Map<Language,List<T>> getLocalizedValues()
      Returns the values for this metadata item, mapped to their respective languages.
      Returns:
      the localized values
    • isLocalized

      boolean isLocalized()
      Returns true if this metadata item has been localized.
      Returns:
      true if the metadata item is localized
    • addValue

      void addValue(T v)
      Adds value to the list of language neutral values.
      Parameters:
      v - the value
    • getValues

      List<T> getValues()
      Returns a list of all all non-localized values. In order to retrieve localized values for this metadata field, use getLocalizedValues() .
      Returns:
      the list of language neutral values
    • getValue

      T getValue()
      Returns the first value of the available values or null if 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 - true to add the values to the fulltext index
    • addToText

      boolean addToText()
      Returns true if the values should be added to the user facing fulltext search index.
      Returns:
      true if the metadata values should be added to the fulltext index