# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig. # License: Apache License, Version 2.0 module RTM::Sugar module TopicMap module Scoped # Returns all topics in the topic map used # in the scope property of Associations. # # The result may be empty. # # :call-seq: # association_themes -> Collection of Topics # def association_themes scoped_index.getAssociationThemes end # Returns all topics in the topic map used # in the scope property of Associations sorted by their best names. # # The result may be empty. # # :call-seq: # association_themes -> Array of Topics sorted by their best_name # def association_themes_sorted(by_what = :best_name) scoped_index.getAssociationThemes.sort_by(&by_what) end # Returns all topics in the topic map used # in the scope property of Names. # # :call-seq: # name_themes -> Collection of Topics # def name_themes scoped_index.getNameThemes end # Returns all topics in the topic map used # in the scope property of Names sorted by their best names. # # :call-seq: # name_themes -> Array of Topics sorted by their best_name # def name_themes_sorted(by_what = :best_name) scoped_index.getNameThemes.sort_by(&by_what) end # Returns all topics in the topic map used # in the scope property of Occurrences. # # :call-seq: # occurrence_themes -> Collection of Topics # def occurrence_themes scoped_index.getOccurrenceThemes end # Returns all topics in the topic map used # in the scope property of Occurrences sorted by their best names. # # :call-seq: # occurrence_themes -> Array of Topics sorted by their best_name # def occurrence_themes_sorted(by_what = :best_name) scoped_index.getOccurrenceThemes.sort_by(&by_what) end # Returns all topics in the topic map used # in the scope property of Variants. # # :call-seq: # variant_themes -> Collection of Topics # def variant_themes scoped_index.getVariantThemes end # Returns all topics in the topic map used # in the scope property of Variants sorted by their best names. # # :call-seq: # variant_themes -> Array of Topics sorted by their best_name # def variant_themes_sorted(by_what = :best_name) scoped_index.getVariantThemes.sort_by(&by_what) end end end end