Package it.uniroma1.lcl.babelnet.data
Class BabelImage
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.data.BabelImage
-
- All Implemented Interfaces:
Comparable<BabelImage>
public class BabelImage extends Object implements Comparable<BabelImage>
An image in BabelNet.- Author:
- navigli, ponzetto, vannella
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddLanguage(it.uniroma1.lcl.jlt.util.Language language)Add a newLanguageintcompareTo(BabelImage o)booleanequals(Object o)Set<it.uniroma1.lcl.jlt.util.Language>getLanguages()Gets the MediaWiki page languages for this image.BabelLicensegetLicense()Returns the license for this Babel senseStringgetName()Gets the MediaWiki page name for this image.BabelImageSourcegetSource()Returns the source for this Babel senseStringgetThumbURL()Gets the thumb URL this image.StringgetURL()Gets the full URL this image.StringgetValidatedThumbURL()Deprecated.use getThumbURL() Gets a verified version of the Thumb URL this image.StringgetValidatedURL()Deprecated.use getURL() Gets a verified version of the full URL this image.booleanisBadImage()Is it a bad or censored imageStringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
getName
public String getName()
Gets the MediaWiki page name for this image.- Returns:
- the MediaWiki page name for this image.
-
getLanguages
public Set<it.uniroma1.lcl.jlt.util.Language> 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
public String getURL()
Gets the full URL this image.- Returns:
- the URL from which this image can be retrieved.
-
getThumbURL
public String 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 public String 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 public String 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
public BabelLicense getLicense()
Returns the license for this Babel sense- Returns:
- the license
-
getSource
public BabelImageSource getSource()
Returns the source for this Babel sense- Returns:
- the source
-
compareTo
public int compareTo(BabelImage o)
- Specified by:
compareToin interfaceComparable<BabelImage>
-
-