Author: ruschein
Date: 2011-08-18 14:02:33 -0700 (Thu, 18 Aug 2011)
New Revision: 26604

Modified:
   
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyTableEntryImpl.java
Log:
Cleanup.

Modified: 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyTableEntryImpl.java
===================================================================
--- 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyTableEntryImpl.java
   2011-08-18 20:14:15 UTC (rev 26603)
+++ 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/CyTableEntryImpl.java
   2011-08-18 21:02:33 UTC (rev 26604)
@@ -1,14 +1,6 @@
-
 /*
- Copyright (c) 2008, The Cytoscape Consortium (www.cytoscape.org)
+ Copyright (c) 2008, 2011, The Cytoscape Consortium (www.cytoscape.org)
 
- The Cytoscape Consortium is:
- - Institute for Systems Biology
- - University of California San Diego
- - Memorial Sloan-Kettering Cancer Center
- - Institut Pasteur
- - Agilent Technologies
-
  This library is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
@@ -33,9 +25,9 @@
  along with this library; if not, write to the Free Software Foundation,
  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 */
-
 package org.cytoscape.model.internal;
 
+
 import org.cytoscape.model.CyTable;
 import org.cytoscape.model.CyRow;
 import org.cytoscape.model.CyTableEntry;
@@ -53,16 +45,11 @@
        CyTableEntryImpl(final Map<String, CyTable> attrMgr) {
                suid = SUIDFactory.getNextSUID();
                this.attrMgr = attrMgr;
-               getCyRow().set("name","");
-               getCyRow().set("selected",Boolean.FALSE);
+               getCyRow().set(CyTableEntry.NAME, "");
+               getCyRow().set(CyNetwork.SELECTED, Boolean.FALSE);
        }
 
-       /**
-        *  DOCUMENT ME!
-        *
-        * @return  DOCUMENT ME!
-        */
-       public long getSUID() {
+       final public long getSUID() {
                return suid;
        }
 
@@ -73,12 +60,11 @@
         *
         * @return  DOCUMENT ME!
         */
-       public CyRow getCyRow(String namespace) {
+       final public CyRow getCyRow(final String namespace) {
                if (namespace == null)
                        throw new NullPointerException("namespace is null");
 
-               CyTable mgr = attrMgr.get(namespace);
-
+               final CyTable mgr = attrMgr.get(namespace);
                if (mgr == null)
                        throw new NullPointerException("attribute manager is 
null for namespace: " + namespace);
 
@@ -90,7 +76,12 @@
         *
         * @return  DOCUMENT ME!
         */
-       public CyRow getCyRow() {
-               return getCyRow(CyNetwork.DEFAULT_ATTRS);
+       final public CyRow getCyRow() {
+               final CyTable mgr = attrMgr.get(CyNetwork.DEFAULT_ATTRS);
+               if (mgr == null)
+                       throw new NullPointerException("attribute manager is 
null for namespace: "
+                                                      + 
CyNetwork.DEFAULT_ATTRS);
+
+               return mgr.getRow(suid);
        }
 }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to