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
  • 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 title
      language - image language
      url - image URL
      thumbUrl - image thumbnail URL
      source - URL source
      license - image license
      isBad - is it a bad/censored image?
  • Method Details

    • 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 new Language
      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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(BabelImage o)
      Specified by:
      compareTo in interface Comparable<BabelImage>