Class 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 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) fullform
        year - the year of the document
        mesh - all MeshTerms of the document
        unnormalizedFulls - 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) fullform
        ffE - the FullformEntry containg document information
    • Method Detail

      • hasfullform

        public boolean hasfullform​(String full)
      • 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 representative
        ffEntryToInclude - 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 form
        includeMeshs - 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()