package org.ndexbio.model.object.network;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class BaseTerm extends NetworkElement
{
    private String _name;
    private long _namespace;
    
    
    
    /**************************************************************************
    * Default constructor.
    **************************************************************************/
    public BaseTerm()
    {
        super();
        _type = this.getClass().getSimpleName();
    }
    
    
    public String getName()
    {
        return _name;
    }

    public void setName(String termName)
    {
        _name = termName;
    }

    public long getNamespace()
    {
        return _namespace;
    }

    public void setNamespace(long namespace)
    {
        _namespace = namespace;
    }
}

@@ -36,16 +36,17 @@
 twork;%0A%0A
+%0A
 import c
@@ -188,16 +188,49 @@
 kElement
+ implements Comparable%3CBaseTerm%3E 
 %0A%7B%0A    p
@@ -894,10 +894,317 @@
 ;%0A    %7D%0A
+%0A%0A%09public int compareTo(BaseTerm o) %7B%0A%09%09long c = this.getId() - o.getId();%0A%09%09if ( c==0)%0A%09%09%09return 0;%0A%09%09return c%3E0? 1 : -1;%0A%09%09%0A%09%7D%0A%09%0A%09public int hasCode() %7B%0A%09%09return (int)getId();%0A%09%7D%0A%09%0A%09public boolean Equals (Object b2) %7B%0A%09%09if (b2 instanceof BaseTerm)%0A%09%09%09return compareTo((BaseTerm)b2)==0;%0A%09%09return false;%0A%09%7D%0A
 %7D%0A

Make BaseTerm comparable and implemnt equals and hashCode.