Package se.datadosen.jalbum
Class WebLocation
java.lang.Object
se.datadosen.jalbum.WebLocation
-
Constructor Summary
ConstructorDescriptionWebLocation
(File webLocFile) WebLocation
(String uri) WebLocation
(URI uri) WebLocation
(URL url) -
Method Summary
Modifier and TypeMethodDescriptionLocate suitable representing image given URL.Call after successful findRepresentingImage() callCall after successful findRepresentingImage() callgetTitle()
Call after successful findRepresentingImage() callgetURI()
getUrl()
Deprecated.Use getURI instead in order to support relative paths in the futureboolean
Call after successful findRepresentingImage() callvoid
print()
static BufferedImage
void
void
writeToFile
(File f)
-
Constructor Details
-
WebLocation
-
WebLocation
-
WebLocation
- Throws:
IOException
URISyntaxException
-
WebLocation
- Throws:
IOException
-
-
Method Details
-
assertResolved
- Throws:
IOException
-
getUrl
Deprecated.Use getURI instead in order to support relative paths in the future- Returns:
- Throws:
MalformedURLException
-
getURI
-
setURI
-
getFileName
-
writeToFile
- Throws:
IOException
-
print
public void print() -
readImage
- Throws:
IOException
-
readImage
- Throws:
IOException
-
findRepresentingImage
Locate suitable representing image given URL. The representing image is resolved using the following steps: * First look for Facebook's og:image element * Second look for "folderthumb.jpg" (Turtle skin) * Then look for 1:st thumbnail image and locate corresponding image by replacing thumbs/ by slides/ * Then look for 1:st image pointed by album.rss feed *Finally return 1:st image larger than 120x120 or null Todo: Parse title and description too. * Finally- Returns:
- Throws:
IOException
-
getImageUrl
Call after successful findRepresentingImage() call- Returns:
-
getTitle
Call after successful findRepresentingImage() call- Returns:
-
isJsonAlbum
public boolean isJsonAlbum()Call after successful findRepresentingImage() call- Returns:
-
getDescription
Call after successful findRepresentingImage() call- Returns:
-