Class AcronymEntry
- java.lang.Object
-
- de.julielab.jcore.ae.acronymtagger.entries.AcronymEntry
-
- All Implemented Interfaces:
Serializable
public class AcronymEntry extends Object implements Serializable
a part of an Acronym: an Acronym contains shortform + AcronymEntry an AcronymEntry contains all fullforms to the shortform plus information about them (information is saved in a FullformEntry)- Author:
- tusche
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAcronymEntry(String full)adds only a fullform (no further information) to the internal fullformListprotectedAcronymEntry(String full, int year, Set<String> mesh, Set<String> unnormalizedFulls)adds a fullform with all information to the internal fullformListprotectedAcronymEntry(String fullName, FullformEntry ffE)adds a fullform with all information in the FullformEntry to the internal fullformList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFullform(String fullName, FullformEntry f)Set<Map.Entry<String,FullformEntry>>getAllFullforms()StringgetHTMLString(String shortform, boolean includeMeshs)returns a html representation of this entry for including it in a table.StringgetString(String shortform)returns a formatted String containing all information of the AcronymEntry format is Short Full_1 Year_1 MeshList_1 # Unnormalized Fullforms_1 Short Full_2 Year_2 MeshList_2 # Unnormalized Fullforms_2 ...booleanhasfullform(String full)voidmerge(String ffToKeep, String ffEntryToInclude)This method treads the second parameter as a variation of of the FullformEntry connected to the first parameter.voidremove(String fullform)removes the fullform entry defined by the Stringintsize()
-
-
-
Constructor Detail
-
AcronymEntry
protected AcronymEntry(String full)
adds only a fullform (no further information) to the internal fullformList- Parameters:
full- the (normalized) fullform
-
AcronymEntry
protected AcronymEntry(String full, int year, Set<String> mesh, Set<String> unnormalizedFulls)
adds a fullform with all information to the internal fullformList- Parameters:
full- the (normalized) fullformyear- the year of the documentmesh- all MeshTerms of the documentunnormalizedFulls- all unnormalized fullforms
-
AcronymEntry
protected AcronymEntry(String fullName, FullformEntry ffE)
adds a fullform with all information in the FullformEntry to the internal fullformList- Parameters:
fullName- the (normalized) fullformffE- the FullformEntry containg document information
-
-
Method Detail
-
hasfullform
public boolean hasfullform(String full)
-
getAllFullforms
public Set<Map.Entry<String,FullformEntry>> getAllFullforms()
-
addFullform
public void addFullform(String fullName, FullformEntry f)
-
merge
public void merge(String ffToKeep, String ffEntryToInclude) throws NullPointerException
This method treads the second parameter as a variation of of the FullformEntry connected to the first parameter. In general, the information included in the ffEntryToInclude is merged with the FullformEntry connected to ffToKeep. That means that year, count and meshtermlist of ffToKeep are merged with those of ffEntryToInclude in the currently defined way (see AcronymEntry.addFullform() for more information) while the name of ffEntryToInclude is added to ffToKeep as a spelling variation. Warning1: the FullformEntry connected to ffEntryToInclude is deleted from this AcronymEntry afterwards Warning2: a NullPointerException is thrown, if at least one of the two parameters are not found in this AcronymEntry.- Parameters:
ffToKeep- the name of the FullformEntry that is supposed to be the representativeffEntryToInclude- the name of the FullformEntry that contains the information which shall be added to the represantative. Will be deleted afterwards- Throws:
NullPointerException
-
remove
public void remove(String fullform)
removes the fullform entry defined by the String- Parameters:
fullform-
-
getString
public String getString(String shortform)
returns a formatted String containing all information of the AcronymEntry format is Short Full_1 Year_1 MeshList_1 # Unnormalized Fullforms_1 Short Full_2 Year_2 MeshList_2 # Unnormalized Fullforms_2 ...- Parameters:
shortform- the current short form- Returns:
- formatted String
-
getHTMLString
public String getHTMLString(String shortform, boolean includeMeshs)
returns a html representation of this entry for including it in a table.- Parameters:
shortform- the current short formincludeMeshs- decide whether the table contains a column listing all meshterms to the short-full-pair- Returns:
- a string containing a formatted html table row
-
size
public int size()
-
-