X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsearchable%2FSearchableTag.java;fp=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsearchable%2FSearchableTag.java;h=f73dd15d7ce627fc3d3f7a72eb16959db52c96a6;hb=aaeabf3a939ce517e3044a0a8ee782f19f3f930d;hp=c12b3c68eeeb5b0d3c2135b521bf5bbd354dbfa3;hpb=12443642377be74159578c99af7a9883571e38bf;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/searchable/SearchableTag.java b/src/be/nikiroo/fanfix/searchable/SearchableTag.java index c12b3c6..f73dd15 100644 --- a/src/be/nikiroo/fanfix/searchable/SearchableTag.java +++ b/src/be/nikiroo/fanfix/searchable/SearchableTag.java @@ -43,7 +43,7 @@ public class SearchableTag { * the tag is a leaf tag, that is, it will not return subtags * with {@link BasicSearchable#fillTag(SearchableTag)} but will * return stories with - * {@link BasicSearchable#search(SearchableTag)} + * {@link BasicSearchable#search(SearchableTag, int)} */ public SearchableTag(String id, String name, boolean leaf) { this(id, name, leaf, true); @@ -60,7 +60,7 @@ public class SearchableTag { * the tag is a leaf tag, that is, it will not return subtags * with {@link BasicSearchable#fillTag(SearchableTag)} but will * return stories with - * {@link BasicSearchable#search(SearchableTag)} + * {@link BasicSearchable#search(SearchableTag, int)} * @param complete * the tag {@link SearchableTag#isComplete()} or not */ @@ -92,6 +92,21 @@ public class SearchableTag { return name; } + /** + * The fully qualified tag name, which can be displayed to the user. + *

+ * It will display all the tags that lead to this one as well as this one. + * + * @return the fully qualified name + */ + public String getFqName() { + if (parent != null) { + return parent.getFqName() + " / " + name; + } + + return name; + } + /** * Non-complete, non-leaf tags can still be completed via a * {@link BasicSearchable#fillTag(SearchableTag)} operation from a @@ -171,7 +186,7 @@ public class SearchableTag { /** * This tag is a leaf tag, that is, it will not return other subtags with * {@link BasicSearchable#fillTag(SearchableTag)} but will return stories - * with {@link BasicSearchable#search(SearchableTag)}. + * with {@link BasicSearchable#search(SearchableTag, int)}. * * @return TRUE if it is */ @@ -182,7 +197,7 @@ public class SearchableTag { /** * This tag is a leaf tag, that is, it will not return other subtags with * {@link BasicSearchable#fillTag(SearchableTag)} but will return stories - * with {@link BasicSearchable#search(SearchableTag)}. + * with {@link BasicSearchable#search(SearchableTag, int)}. *

* Will reset the number of pages to -1. *