Author: scooter
Date: 2010-02-11 09:30:50 -0800 (Thu, 11 Feb 2010)
New Revision: 19294
Modified:
csplugins/trunk/ucsf/scooter/chemViz/src/chemViz/model/CompoundColumn.java
Log:
Migrated toByte from 2.7.0 core
Modified:
csplugins/trunk/ucsf/scooter/chemViz/src/chemViz/model/CompoundColumn.java
===================================================================
--- csplugins/trunk/ucsf/scooter/chemViz/src/chemViz/model/CompoundColumn.java
2010-02-11 17:25:24 UTC (rev 19293)
+++ csplugins/trunk/ucsf/scooter/chemViz/src/chemViz/model/CompoundColumn.java
2010-02-11 17:30:50 UTC (rev 19294)
@@ -130,7 +130,7 @@
columnType = ColumnType.ATTRIBUTE;
attributeName = words[1];
objectType = words[2];
- attributeType = CyAttributesUtils.toByte(words[3]);
+ attributeType = attributeStringToByte(words[3]);
columnWidth = Integer.parseInt(words[4]);
} else {
throw new RuntimeException("Illegal column
specification: "+attributeString);
@@ -256,4 +256,32 @@
}
return;
}
+
+ private byte attributeStringToByte(String attributeType) {
+ if (attributeType.equals("COMPLEX"))
+ return CyAttributes.TYPE_COMPLEX;
+
+ if (attributeType.equals("SIMPLE_MAP"))
+ return CyAttributes.TYPE_SIMPLE_MAP;
+
+ if (attributeType.equals("SIMPLE_LIST"))
+ return CyAttributes.TYPE_SIMPLE_LIST;
+
+ if (attributeType.equals("UNDEFINED"))
+ return CyAttributes.TYPE_UNDEFINED;
+
+ if (attributeType.equals("BOOLEAN"))
+ return CyAttributes.TYPE_BOOLEAN;
+
+ if (attributeType.equals("INTEGER"))
+ return CyAttributes.TYPE_INTEGER;
+
+ if (attributeType.equals("FLOATING"))
+ return CyAttributes.TYPE_FLOATING;
+
+ if (attributeType.equals("STRING"))
+ return CyAttributes.TYPE_STRING;
+
+ return CyAttributes.TYPE_UNDEFINED;
+ }
}
--
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.