Author: kono
Date: 2012-06-05 17:19:58 -0700 (Tue, 05 Jun 2012)
New Revision: 29477
Modified:
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/util/vizmap/VisualStyleSerializer.java
Log:
fixes #1029 Correct column data types will be used for Passthrough mapper.
Modified:
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/util/vizmap/VisualStyleSerializer.java
===================================================================
---
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/util/vizmap/VisualStyleSerializer.java
2012-06-06 00:11:28 UTC (rev 29476)
+++
core3/impl/trunk/io-impl/impl/src/main/java/org/cytoscape/io/internal/util/vizmap/VisualStyleSerializer.java
2012-06-06 00:19:58 UTC (rev 29477)
@@ -373,11 +373,24 @@
if (vpModel.getPassthroughMapping() != null) {
org.cytoscape.io.internal.util.vizmap.model.PassthroughMapping pmModel = vpModel
.getPassthroughMapping();
- String attrName =
pmModel.getAttributeName();
-
+ final String attrName =
pmModel.getAttributeName();
+ final AttributeType attrType =
pmModel.getAttributeType();
+ final Class<?> columnDataType;
+ if(attrType==AttributeType.BOOLEAN)
+ columnDataType = Boolean.class;
+ else if(attrType==AttributeType.FLOAT)
+ columnDataType = Double.class;
+ else if(attrType==AttributeType.INTEGER)
+ columnDataType = Integer.class;
+ else if(attrType==AttributeType.LIST)
+ columnDataType = List.class;
+ else {
+ columnDataType = String.class;
+ }
+
try {
PassthroughMapping<K, V> pm =
(PassthroughMapping<K, V>) passthroughMappingFactory
-
.createVisualMappingFunction(attrName, String.class, null, vp);
+
.createVisualMappingFunction(attrName, columnDataType, null, vp);
vs.addVisualMappingFunction(pm);
--
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.