View Javadoc

    1   package baseCode.dataStructure;
    2
    3   /***
    4    * A class representing a descriptive term that can be associated with things. Copyright (c) 2004 Columbia University
    5    *
    6    * @author Paul Pavlidis
    7    * @version $Id: OntologyEntry.java,v 1.7 2004/07/27 03:18:58 pavlidis Exp $
    8    */
    9   public class OntologyEntry {
    10
    11     private String id = "";
    12     private String name = "";
    13     private String definition = "";
    14
    15     /***
    16      * @param id
    17      */
    18     public OntologyEntry( String id ) {
    19        this( id, null, null );
    20     }
    21
    22     /***
    23      * @param id
    24      * @param name
    25      * @param def
    26      */
    27     public OntologyEntry( String id, String name, String def ) {
    28        this.id = id.intern();
    29        this.name = name.intern();
    30        this.definition = def.intern();
    31     }
    32
    33     /***
    34      * @return
    35      */
    36     public String getName() {
    37        return name.intern();
    38     }
    39
    40     /***
    41      * @return
    42      */
    43     public String getId() {
    44        return id;
    45     }
    46
    47     /***
    48      * @return
    49      */
    50     public String getDefinition() {
    51        return definition;
    52     }
    53
    54     /***
    55      * @param n
    56      */
    57     public void setName( String n ) {
    58        name = n;
    59     }
    60
    61     /***
    62      * @param d
    63      */
    64     public void setDefinition( String d ) {
    65        definition = d;
    66     }
    67
    68     public String toString() {
    69        return new String( id + ": \t" + name );
    70     }
    71
    72  }