Author: pwang
Date: 2011-07-07 18:20:10 -0700 (Thu, 07 Jul 2011)
New Revision: 26115

Modified:
   
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/AttributeMappingParameters.java
Log:
clean up

Modified: 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/AttributeMappingParameters.java
===================================================================
--- 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/AttributeMappingParameters.java
       2011-07-08 01:17:36 UTC (rev 26114)
+++ 
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/reader/AttributeMappingParameters.java
       2011-07-08 01:20:10 UTC (rev 26115)
@@ -283,10 +283,6 @@
                                it = null;
                }
 
-
-               if ((this.mappingAttribute != null) && 
!this.mappingAttribute.equals(ID)) {
-                       buildAttribute2IDMap(it);
-               }
        }
 
        /**
@@ -444,74 +440,8 @@
                return attr2id;
        }
 
-       /**
-        * Building hashmap for attribute <--> object ID mapping.
-        *
-        */
-       private void buildAttribute2IDMap(Iterator it) {
-               // Mapping from attribute value to object ID.
-               attr2id = new HashMap<String, List<String>>();
 
-               String objectID = null;
-               Object valObj = null;
 
-               while (it.hasNext()) {
-                       switch (objectType) {
-                               case NODE:
-
-                                       CyNode node = (CyNode) it.next();
-                                       objectID = 
Long.toString(node.getSUID()); //.getIdentifier();
-
-                                       //if 
(CyAttributesUtils.getClass(mappingAttribute, attributes) == List.class) {
-                                       //      valObj = 
attributes.getListAttribute(objectID, mappingAttribute);
-                                       //} else if 
(CyAttributesUtils.getClass(mappingAttribute, attributes) != Map.class) {
-                                       //      valObj = 
attributes.getAttribute(objectID, mappingAttribute);
-                                       //}
-
-                                       valObj = 
node.getCyRow(mappingAttribute);                                               
-
-                                       break;
-
-                               case EDGE:
-
-                                       CyEdge edge = (CyEdge) it.next();
-                                       objectID = 
Long.toString(edge.getSUID()); //.getIdentifier();
-
-                                       //if 
(CyAttributesUtils.getClass(mappingAttribute, attributes) == List.class) {
-                                       //      valObj = 
attributes.getListAttribute(objectID, mappingAttribute);
-                                       //} else if 
(CyAttributesUtils.getClass(mappingAttribute, attributes) != Map.class) {
-                                       //      valObj = 
attributes.getAttribute(objectID, mappingAttribute);
-                                       //}
-
-                                       break;
-
-                               case NETWORK:
-                                       // Not supported yet.
-                                       it.next();
-
-                                       break;
-
-                               default:
-                       }
-
-                       // Put the <attribute value>-<object ID list> pair to 
the Map object.
-                       if (valObj != null) {
-                               if (valObj instanceof List) {
-                                       List keys = (List) valObj;
-
-                                       for (Object key : keys) {
-                                               if (key != null) {
-                                                       
putAttrValue(key.toString(), objectID);
-                                               }
-                                       }
-                               } else {
-                                       putAttrValue(valObj.toString(), 
objectID);
-                               }
-
-                       }
-               }
-       }
-
        private void putAttrValue(String attributeValue, String objectID) {
                List<String> objIdList = null;
 

-- 
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