|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Link | +--CatLink
A CatLink object represents a category. This class contains the mechanisms necessary to create a web page for the category with links to its base category and to its subcategories or pictures.
Field Summary | |
protected CatLink[] |
clones
Clones of the original. |
protected static java.util.Properties |
curCatDescr
The translations of category descriptions for the current language. |
protected static java.util.Properties |
curCatTitles
The translations of category titles for the current language. |
protected java.util.Vector |
editorsPicks
The collection of picLinks that are editor's picks within this category. |
protected PicLink |
firstInCat
The picLink selected as the first in this category. |
protected java.lang.String |
fullCaption
The full record of the category and its ancestors. |
protected java.util.Vector |
links
The links within this CatLink (either PicLinks or CatLinks). |
protected CatLink |
original
A reference only used by clones of the original. |
protected CatLink |
parent
The category containing this category. |
int |
subcatColWidth
The width of the table columns. |
Fields inherited from class Link |
caption, filename, htmlBaseName, keywords, lineend |
Constructor Summary | |
CatLink()
|
Method Summary | |
protected void |
addEditorsPick(PicLink picLink)
Identifies this picture as one of the category's Editor's Picks. |
protected void |
addFirstInCat(PicLink picLink)
Assigns the picture as this category's first picture. |
boolean |
allowsEdPickIconOnCatPage()
Returns whether or not this CatLink page allows the Editor's Pick icon to be displayed for a subcat or subpic. |
boolean |
allowsGrandkidLinks()
Returns whether this catLink displays only its subcategories or also the subcategories of those subcategories. |
boolean |
allowsRecAddIconOnPage()
Returns whether or not this CatLink page allows the New icon to appear for links to subcats or subpics. |
boolean |
allowsTranslation()
Returns whether this CatLink page should be translated. |
protected boolean |
changeFirstInCat(java.lang.String jpgFilename)
Assigns the specified picture as the picture that started the category. |
java.lang.Object |
clone()
Returns a clone of the CatLink. |
protected static java.lang.String |
deleteCategory(java.lang.String fullCaption)
Deletes a category. |
protected void |
flushKeywordsUpChain()
Nullifies Link.keywords for this catLink and
its ancestors, forcing keywords to be regenerated
for same upon HTML creation. |
java.util.Vector |
formCellContents()
Returns a collection of HTML expressions that can be inserted into an HTML table. |
protected java.lang.String |
getBlurb()
Returns the descriptive statement for this category in the current language and returns null if there is none. |
protected static CatLink |
getCatLink(java.lang.String fullCaption)
Retrieves an existing CatLink or creates a new one. |
protected static CatLink |
getCatLink(java.lang.String fullCaption,
boolean hasPics)
Retrieves an existing CatLink or creates a new one. |
protected static java.util.Vector |
getCatLinksSubset()
Returns a vector containing all CatLinks. |
protected static java.util.Vector |
getCatLinksSubset(boolean hasPicsOnly)
Returns a vector containing all CatLinks except for those starting with expressions found in PMDB.capRetrieverExclusionList. |
protected CatLink[] |
getClones()
Returns clones of the original category where each has a portion of the pics found in the category. |
protected java.lang.String |
getCount()
Returns an expression containing the number of links in this category. |
static java.util.Vector |
getFullCaptions()
Returns a vector containing the fullCaptions of all CatLinks. |
static java.util.Vector |
getFullCaptions(boolean hasPicsOnly)
Returns a vector containing the fullcaps of all CatLinks except for those starting with expressions found in PMDB.capRetrieverExclusionList. |
protected static java.util.Vector |
getHasPicsCatLinksSubset()
Returns a vector containing all CatLinks that have pictures. |
protected static java.util.Vector |
getHasPicsFullCaptions()
Returns a vector containing the fullCaptions of only those CatLinks that have pictures. |
java.lang.String |
getHref()
Used by toHref(boolean, boolean) to build the
linked-caption portion of the
expression. |
java.lang.String |
getHtmlBaseName(PicLink picLink)
Provides the appropriate href filename, depending on whether this is a clone or not. |
protected java.lang.String |
getIcons()
Returns the HTML expression for displaying icons appropriate for this catLink. |
protected java.lang.String |
getKeywords()
Establishes the keywords of a catLink and all catLinks beneath it, working from the bottom up via recursion. |
protected java.lang.String |
getLanguage(java.lang.String lang)
Returns the name of the language as locals know it. |
java.lang.String |
getPageLinkHeading(int pageNum)
Returns an appropriate heading for the page number and current language (for example, "Page 1"). |
java.lang.String |
getPageLinkLinks(int cloneNum)
Returns an appropriate heading for the page number and current language (for example, "Page 1"). |
java.lang.String |
getTable()
Returns an HTML table whose form depends on whether the category is a collection of pictures or subcategories. |
boolean |
hasEdPickPics()
Returns whether this category has any Editor's Picks. |
protected boolean |
hasPics()
Returns true if this category has pictures and false if it has subcategories. |
boolean |
hasRecAddPics()
Returns true if the catLink has a recent addition among its pictures or its subcats' pictures. |
boolean |
isEditorsPickForCatPage(PicLink picLink)
Returns whether the picLink is an editor's pick in this category. |
boolean |
isEditorsPickForPicPage(PicLink picLink)
Returns whether the picLink is an editor's pick in this category. |
boolean |
isFirstInCat(PicLink picLink)
Returns whether the picLink started this category. |
boolean |
isMulti()
Returns true if this CatLink has more pictures than could fit on a single page. |
protected void |
removeEditorsPick(PicLink picLink)
Removes this picture from the category's collection of Editor's Picks. |
java.lang.String |
toHref(boolean withCount,
boolean withIcons)
Builds and returns an HREF expression for this catLink, containing the basic HREF plus (optionally) the number of pictures in that category and icons for recent additions or editor's picks. |
java.lang.String |
toHref(PicLink picLink)
Returns an href link to the catLink for use on the picLink page, showing icons appropriate for the picLink/catLink relationship, such as Editor's Pick. |
protected java.lang.String |
toHrefAncestors()
Returns an HTML expression representing links to all ancestors of this category. |
void |
toHtml()
Generates a web page for the catLink. |
protected void |
toHtml(int cloneNum)
Generates the HTML for a selected clone of the catLink (a portion of the collection of pictures in the category). |
java.lang.String |
toString()
Returns a String representation of the catLink. |
protected java.lang.String |
translateDescr(java.lang.String lookup)
Retrieves the full translated expression for the English lookup phrase (or the English if no translation is found). |
protected java.lang.String |
translateFilename(java.lang.String filename)
Returns the filename unique to the current language. |
protected java.lang.String |
translateHtmlBaseName(int pageNum)
Returns the filename unique to the current language and specified page. |
protected java.lang.String |
translateTitle(java.lang.String lookup)
Retrieves the full translated expression for the English lookup phrase (or the English if no translation is found). |
Methods inherited from class Link |
compareTo, getIconEditorsPick, getIconFirstInCat, getIconNew, toUniqueKeywords |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int subcatColWidth
protected java.util.Vector links
protected CatLink original
protected CatLink[] clones
protected CatLink parent
protected PicLink firstInCat
protected java.util.Vector editorsPicks
protected java.lang.String fullCaption
protected static java.util.Properties curCatTitles
protected static java.util.Properties curCatDescr
Constructor Detail |
public CatLink()
Method Detail |
public static java.util.Vector getFullCaptions(boolean hasPicsOnly)
public static java.util.Vector getFullCaptions()
public boolean isMulti()
PMDB.maxPicsPerPage
.public java.lang.String toHref(PicLink picLink)
public java.lang.String getHtmlBaseName(PicLink picLink)
public java.lang.Object clone()
clone
in class java.lang.Object
public void toHtml()
toHtml
in class Link
public java.lang.String getTable()
public java.util.Vector formCellContents()
public java.lang.String getPageLinkHeading(int pageNum)
public java.lang.String getPageLinkLinks(int cloneNum)
public boolean allowsGrandkidLinks()
public boolean allowsRecAddIconOnPage()
public boolean allowsEdPickIconOnCatPage()
public boolean allowsTranslation()
public java.lang.String toString()
toString
in class java.lang.Object
protected static CatLink getCatLink(java.lang.String fullCaption)
fullCaption
- The title of the category. If it is a
subcategory, it is preceded by the parent category and a
colon ("Parent:Child").protected static CatLink getCatLink(java.lang.String fullCaption, boolean hasPics)
fullCaption
- The title of the category. If it is a
subcategory, it is preceded by the parent category and a
colon ("Parent:Child").hasPics
- Whether this category has pictures or
subcategories.protected static java.util.Vector getCatLinksSubset(boolean hasPicsOnly)
protected static java.util.Vector getCatLinksSubset()
protected static java.util.Vector getHasPicsCatLinksSubset()
protected static java.util.Vector getHasPicsFullCaptions()
protected CatLink[] getClones()
protected boolean hasPics()
protected void toHtml(int cloneNum)
protected java.lang.String getBlurb()
public java.lang.String toHref(boolean withCount, boolean withIcons)
public java.lang.String getHref()
toHref(boolean, boolean)
to build the
linked-caption portion of the
expression. Intended to be overridden.protected java.lang.String getCount()
protected java.lang.String getIcons()
toHref(boolean, boolean)
.public boolean hasRecAddPics()
public boolean isEditorsPickForPicPage(PicLink picLink)
public boolean isEditorsPickForCatPage(PicLink picLink)
public boolean isFirstInCat(PicLink picLink)
public boolean hasEdPickPics()
protected void flushKeywordsUpChain()
Link.keywords
for this catLink and
its ancestors, forcing keywords to be regenerated
for same upon HTML creation. See getKeywords()
.protected java.lang.String getKeywords()
protected boolean changeFirstInCat(java.lang.String jpgFilename)
protected void addFirstInCat(PicLink picLink)
protected void addEditorsPick(PicLink picLink)
protected void removeEditorsPick(PicLink picLink)
protected static java.lang.String deleteCategory(java.lang.String fullCaption)
protected java.lang.String toHrefAncestors()
protected java.lang.String translateTitle(java.lang.String lookup)
protected java.lang.String translateDescr(java.lang.String lookup)
protected java.lang.String translateHtmlBaseName(int pageNum)
protected java.lang.String getLanguage(java.lang.String lang)
protected java.lang.String translateFilename(java.lang.String filename)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |