Class BabelAudio

java.lang.Object
it.uniroma1.lcl.babelnet.data.BabelAudio

public class BabelAudio extends Object
Au audio item in BabelNet.
Author:
navigli, vannella
  • Constructor Details

    • BabelAudio

      public BabelAudio(String lemma, it.uniroma1.lcl.jlt.util.Language language, String filename)
      Constructor
      Parameters:
      lemma - lemma pronounced
      language - lemma language
      filename - audio filename associated
  • Method Details

    • getLemma

      public String getLemma()
      Gets the lemma of this BabelAudio.
      Returns:
      the lemma of this BabelAudio.
    • getLanguage

      public it.uniroma1.lcl.jlt.util.Language getLanguage()
      Gets the Language of this BabelAudio
      Returns:
      the Language of this BabelAudio.
    • getFileName

      public String getFileName()
      Gets the filename (name.ogg) of this BabelAudio.
      Returns:
      the filename (name.ogg) of this BabelAudio.
    • getUrl

      public String getUrl()
      Gets the full URL this BabelAudio.
      Returns:
      the URL from which this BabelAudio can be retrieved.
    • getValidatedUrl

      @Deprecated public String getValidatedUrl()
      Deprecated.
      Returns a valid URL for the audio file
      Returns:
      valid URL
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public static int getResponseCode(String urlString) throws MalformedURLException, IOException
      Gets the response code for an input URL string
      Parameters:
      urlString - the URL string
      Returns:
      the response code for an input URL
      Throws:
      MalformedURLException - thrown if the URL is malformed
      IOException - thrown if the URL cannot be opened
    • main

      public static void main(String[] args)