[metacat-cvs] metacat/src/edu/ucsb/nceas/metacat NodeRecord.java

Saurabh Garg sgarg at ecoinformatics.org
Fri Nov 18 13:10:20 PST 2005


sgarg       05/11/18 13:10:20

  Modified:    src/edu/ucsb/nceas/metacat NodeRecord.java
  Log:
  1. Changed teh access modifier from public to private for variables
  2. Added a new variable for nodedatanumerical
  3. added a new constructor
  
  Revision  Changes    Path
  1.8       +30 -11    metacat/src/edu/ucsb/nceas/metacat/NodeRecord.java
  
  Index: NodeRecord.java
  ===================================================================
  RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/NodeRecord.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NodeRecord.java	10 Oct 2005 17:47:55 -0000	1.7
  +++ NodeRecord.java	18 Nov 2005 21:10:20 -0000	1.8
  @@ -7,8 +7,8 @@
    *    Release: @release@
    *
    *   '$Author: sgarg $'
  - *     '$Date: 2005/10/10 17:47:55 $'
  - * '$Revision: 1.7 $'
  + *     '$Date: 2005/11/18 21:10:20 $'
  + * '$Revision: 1.8 $'
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
  @@ -33,13 +33,14 @@
    * A utility class that encapsulates a node and its data
    */
   public class NodeRecord {
  -  public long nodeid = -1;
  -  public long parentnodeid = -1;
  -  public long nodeindex = -1;
  -  public String nodename = null;
  -  public String nodeprefix = null;
  -  public String nodetype = null;
  -  public String nodedata = null;
  +  private long nodeid = -1;
  +  private long parentnodeid = -1;
  +  private long nodeindex = -1;
  +  private String nodename = null;
  +  private String nodeprefix = null;
  +  private String nodetype = null;
  +  private String nodedata = null;
  +  private float nodedatanumerical = -1;
     private Logger logMetacat = Logger.getLogger(NodeRecord.class);
   
     /**
  @@ -57,6 +58,20 @@
       this.nodedata = nodedata;
     }
     
  +  
  +  public NodeRecord(long nodeid, long parentnodeid, long nodeindex,
  +                    String nodetype, String nodename, String nodeprefix, 
  +                    String nodedata, float nodedatanumerical) {
  +    this.nodeid = nodeid;
  +    this.parentnodeid = parentnodeid;
  +    this.nodeindex = nodeindex;
  +    this.nodename = nodename;
  +    this.nodeprefix = nodeprefix;
  +    this.nodetype = nodetype;
  +    this.nodedata = nodedata;
  +    this.nodedatanumerical = nodedatanumerical;
  +  }
  +  
     /** Get functions*/
     public long getNodeId()
     {
  @@ -92,7 +107,11 @@
     {
       return nodedata;
     }
  -  
  +
  +  public float getNodeDataNumerical()
  +  {
  +    return nodedatanumerical;
  +  }
     /** Method compare two records */
     public boolean contentEquals(NodeRecord record)
     {
  
  
  


More information about the Metacat-cvs mailing list