Class TagtraumLocalizedOntology

  • All Implemented Interfaces:
    GenreOntology

    public class TagtraumLocalizedOntology
    extends Object
    implements GenreOntology
    Ontology that's specific to a Locale. In case the desired locale is not supported, the English ontology is returned by default.
    Author:
    Hendrik Schreiber
    • Method Detail

      • getGenres

        public Set<AudioGenre> getGenres​(String label)
        Description copied from interface: GenreOntology
        Return the genre(s) registered under the given label. Due to ambiguities having to do with translations, this method may return more than one genre.
        Specified by:
        getGenres in interface GenreOntology
        Parameters:
        label - label
        Returns:
        set of mapped genres
      • getDepth

        public int getDepth()
        Description copied from interface: GenreOntology
        Number of hierarchy levels in this ontology. An ontology with one or more members has at least the depth 1. An empty ontology has the depth 0.
        Specified by:
        getDepth in interface GenreOntology
        Returns:
        depth
      • getGenres

        public Set<AudioGenre> getGenres​(String label,
                                         Collection<GenreOntology> secondaryOntologies)
        Description copied from interface: GenreOntology

        Return the genre(s) registered under the given label. If the label is not found in this ontology, secondary ontologies may be used to look up genre ids, which in turn are looked up in this ontology. Therefore genres may be found, which aren't found just by looking up the label alone.

        Due to ambiguities having to do with translations, this method may return more than one genre.

        Specified by:
        getGenres in interface GenreOntology
        Parameters:
        label - genre label
        secondaryOntologies - secondary ontologies which may be used to lookup ids, if a match cannot be found right away. The ids are in turn looked up in this ontology
        Returns:
        set of genres or the empty set