Package it.uniroma1.lcl.babelnet.data
Class BabelCategory
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.data.BabelCategory
-
-
Field Summary
Fields Modifier and Type Field Description static StringBABEL_CATEGORY_PREFIXCategory prefix
-
Constructor Summary
Constructors Constructor Description BabelCategory(String category, it.uniroma1.lcl.jlt.util.Language language)Creates a new instance of aBabelCategory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BabelCategoryfromString(String categoryString)Creates a new instance of aBabelCategoryfrom a string with format [language_id]:[category_label], e.g.it.uniroma1.lcl.jlt.util.LanguagegetLanguage()Gets the language of thisBabelCategory.BabelLicensegetLicense()Returns theBabelLicensefor this Babel categoryStringgetValue()Gets the label of thisBabelCategory.StringgetWikipediaURI()Gets the URI of the Wikipedia page thisBabelCategorycorresponds to.StringtoString()
-
-
-
Field Detail
-
BABEL_CATEGORY_PREFIX
public static final String BABEL_CATEGORY_PREFIX
Category prefix- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BabelCategory
public BabelCategory(String category, it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of aBabelCategory- Parameters:
category- the category stringlanguage- the category language
-
-
Method Detail
-
getValue
public String getValue()
Gets the label of thisBabelCategory.- Specified by:
getValuein interfaceTag<String>- Returns:
- the label of this
BabelCategory.
-
getLanguage
public it.uniroma1.lcl.jlt.util.Language getLanguage()
Gets the language of thisBabelCategory.- Returns:
- the language of this
BabelCategory.
-
getWikipediaURI
public String getWikipediaURI()
Gets the URI of the Wikipedia page thisBabelCategorycorresponds to. For instance "http://en.wikipedia.org/wiki/Category:Mathematicians_who_committed_suicide" for the English category "Mathematicians_who_committed_suicide" and "http://de.wikipedia.org/wiki/Kategorie:Mitglied_der_Royal_Society" for the German category "Kategorie:Mitglied der Royal Society"- Returns:
- the Wikipedia URI for the page corresponding to this
BabelCategory.
-
fromString
public static BabelCategory fromString(String categoryString)
Creates a new instance of aBabelCategoryfrom a string with format [language_id]:[category_label], e.g. EN:Scientist_who_committed_suicide- Parameters:
categoryString- the string of the category to be retrieved- Returns:
- an instance of a
BabelCategoryfrom an input string
-
getLicense
public BabelLicense getLicense()
Returns theBabelLicensefor this Babel category- Returns:
- the license for this category
-
-