Class BabelImage
java.lang.Object
it.uniroma1.lcl.babelnet.data.BabelImage
- All Implemented Interfaces:
Comparable<BabelImage>
An image in BabelNet.
- Author:
- navigli, ponzetto, vannella
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLanguage(it.uniroma1.lcl.jlt.util.Language language) Add a newLanguageintbooleanSet<it.uniroma1.lcl.jlt.util.Language> Gets the MediaWiki page languages for this image.Returns the license for this Babel sensegetName()Gets the MediaWiki page name for this image.Returns the source for this Babel senseGets the thumb URL this image.getURL()Gets the full URL this image.Deprecated.use getThumbURL() Gets a verified version of the Thumb URL this image.Deprecated.use getURL() Gets a verified version of the full URL this image.booleanIs it a bad or censored imagetoString()
-
Constructor Details
-
BabelImage
public BabelImage(String title, String language, String url, String thumbUrl, String source, String license, boolean isBad) Creates an image- Parameters:
title- image titlelanguage- image languageurl- image URLthumbUrl- image thumbnail URLsource- URL sourcelicense- image licenseisBad- is it a bad/censored image?
-
-
Method Details
-
getName
Gets the MediaWiki page name for this image.- Returns:
- the MediaWiki page name for this image.
-
getLanguages
Gets the MediaWiki page languages for this image.- Returns:
- the MediaWiki page language for this image.
-
addLanguage
public void addLanguage(it.uniroma1.lcl.jlt.util.Language language) Add a newLanguage- Parameters:
language- the language to add
-
getURL
Gets the full URL this image.- Returns:
- the URL from which this image can be retrieved.
-
getThumbURL
Gets the thumb URL this image.- Returns:
- the URL from which this image can be retrieved.
-
isBadImage
public boolean isBadImage()Is it a bad or censored image- Returns:
- true if this image is bad, false otherwise.
-
getValidatedURL
Deprecated.use getURL() Gets a verified version of the full URL this image. Checks whether possible URLs of this image (including redirections)- Returns:
- a validated, known-to-exists, URL from which this image can be retrieved.
-
getValidatedThumbURL
Deprecated.use getThumbURL() Gets a verified version of the Thumb URL this image. Checks whether possible URLs of this image (including redirections)- Returns:
- a validated, known-to-exists, URL from which this image can be retrieved.
-
getLicense
-
getSource
-
toString
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<BabelImage>
-