|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Link | +--PicLink
A PicLink object represents a picture. This class provides the mechanisms necessary to create a web page for the picture with links to the categories to which the picture belongs.
Field Summary | |
protected java.util.Vector |
categoriesItIsIn
The list of CatLinks to which this picture belongs. |
protected java.lang.String |
contributor
The person(s) who contributed the photo. |
protected static java.util.Properties |
curTitles
The translation table for picture-related phrases. |
protected MyDate |
date
The date the picture was added to the site. |
protected java.lang.String |
subjects
The person(s) who participated in the photo. |
Fields inherited from class Link |
caption, filename, htmlBaseName, keywords, lineend |
Constructor Summary | |
PicLink()
|
Method Summary | |
protected void |
addToCategory(java.lang.String fullCaption,
boolean flag)
Adds the picture to the category specified by its full Caption (for example, "Countries:Spain"). |
protected CatLink |
catLinkForContributor(java.lang.String contrib)
Retrieves the CatLink for the given contributor. |
protected CatLink |
catLinkForSubject(java.lang.String subject)
Retrieves the CatLink for the given subject. |
protected void |
changeCaption(java.lang.String newCaption)
Assigns a new caption to the picture and flags affected web pages for update. |
protected void |
changeContributor(java.lang.String newContributor)
Assigns a new contributor to the picture and flags affected web pages for update. |
protected boolean |
changeDate(java.lang.String newDate)
Assigns a new date to the picture and flags affected web pages for update. |
protected void |
changeStory(java.lang.String newStory)
Assigns a new story to the picture and flags affected web pages for update. |
protected void |
changeSubjects(java.lang.String newSubjects)
Assigns a new subject or subjects to the picture and flags affected web pages for update. |
protected java.lang.String |
contributorToHtmlLink()
Returns an HTML expression representing the names of the contributor as a link to his or her category web page. |
protected void |
dateToCatLink(boolean flag)
Adds the picture to the Sorted by Date category. |
protected static boolean |
deletePicture(java.lang.String jpgFilename)
Deletes the specified picture from the database and flags appropriate web pages for update. |
protected static java.lang.String |
fromTabsToPicLink(java.lang.String tabFormat)
Converts a tab-separated format of picture information to a picLink and returns the jpg filename of the picture. |
protected java.lang.String |
getIcons(CatLink catLink)
Returns icons appropriate for the PicLink, such as NEW. |
protected java.lang.String |
getKeywords()
Determines and returns the keywords appropriate for this picture's web page. |
protected java.lang.String |
getLinksToCategories()
Returns an HTML expression representing links to the category web pages that this picture is in. |
protected int |
getPoints()
Returns the number of points awarded to this picture. |
protected boolean |
isAFirstInCat()
Reports whether this picLink was the first to appear in any category. |
protected boolean |
isAnEditorsPick()
Reports whether this picLink is an Editor's Pick in any category. |
protected boolean |
isRecentAddition()
Reports whether the picture is a recent addition. |
protected static java.lang.String |
myDateToString(MyDate date)
Converts MyDate object to yyyy/mm/dd format. |
protected static boolean |
newPic(java.lang.String jpgFilename,
boolean flag)
Attempts to create a new picture in the database, returning false if the name is already being used. |
protected boolean |
removeFromCategory(java.lang.String fullCaption)
Removes the picture from the specified category (for example, "Countries:Spain") and flags appropriate web pages for update. |
protected static MyDate |
stringToMyDate(java.lang.String dateStr)
Converts yyyy/mm/dd string to MyDate object. |
protected java.lang.String |
subjectsToHtmlLinks()
Returns an HTML expression representing the names of the subjects as links to their category web pages. |
protected java.util.Vector |
subjectsToNames()
Extracts individual names from single subject string, returning as separate String in a vector. |
protected java.lang.String |
toFullPicHtml()
Returns an html expression for the image itself. |
protected java.lang.String |
toHrefThumbPic()
Returns an HTML expression representing a linked thumbnail image. |
void |
toHtml()
Generates a web page for the picture. |
protected java.lang.String |
toPiclistFormat()
Returns a String representation of the picLink in the format seen in piclist.txt. |
java.lang.String |
toString()
Returns a String representation of the picLink. |
static java.lang.String |
translateContributor(java.lang.String contrib,
java.lang.String subjects)
Translates the contributor name, if needed (for example, if the contributor is "same", returns the name of the subject). |
static java.lang.String |
translateSubject(java.lang.String subject)
Translates the subject name, if needed (for example, if the subject is "me", returns "John"). |
Methods inherited from class Link |
compareTo, getIconEditorsPick, getIconFirstInCat, getIconNew, toUniqueKeywords |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected MyDate date
protected java.lang.String contributor
protected java.lang.String subjects
protected static java.util.Properties curTitles
protected java.util.Vector categoriesItIsIn
Constructor Detail |
public PicLink()
Method Detail |
protected static java.lang.String fromTabsToPicLink(java.lang.String tabFormat)
protected static MyDate stringToMyDate(java.lang.String dateStr)
protected static java.lang.String myDateToString(MyDate date)
protected java.lang.String getKeywords()
protected java.lang.String toFullPicHtml()
protected void dateToCatLink(boolean flag)
protected java.lang.String getIcons(CatLink catLink)
protected java.util.Vector subjectsToNames()
protected boolean isRecentAddition()
protected java.lang.String getLinksToCategories()
protected java.lang.String toHrefThumbPic()
public void toHtml()
toHtml
in class Link
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String translateSubject(java.lang.String subject)
public static java.lang.String translateContributor(java.lang.String contrib, java.lang.String subjects)
protected java.lang.String toPiclistFormat()
protected boolean changeDate(java.lang.String newDate)
protected void changeCaption(java.lang.String newCaption)
protected void changeSubjects(java.lang.String newSubjects)
protected boolean isAnEditorsPick()
protected boolean isAFirstInCat()
protected void changeContributor(java.lang.String newContributor)
protected void changeStory(java.lang.String newStory)
protected void addToCategory(java.lang.String fullCaption, boolean flag)
protected boolean removeFromCategory(java.lang.String fullCaption)
protected static boolean deletePicture(java.lang.String jpgFilename)
protected static boolean newPic(java.lang.String jpgFilename, boolean flag)
protected int getPoints()
protected CatLink catLinkForSubject(java.lang.String subject)
protected CatLink catLinkForContributor(java.lang.String contrib)
protected java.lang.String subjectsToHtmlLinks()
protected java.lang.String contributorToHtmlLink()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |