Author: ruschein
Date: 2010-12-08 10:23:10 -0800 (Wed, 08 Dec 2010)
New Revision: 23132

Modified:
   
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/AttributeValueUtil.java
   
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/HandleComplexAttribute.java
   
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/write/xgmml/XGMMLWriter.java
Log:
Fixed compiler errors.

Modified: 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/AttributeValueUtil.java
===================================================================
--- 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/AttributeValueUtil.java
      2010-12-08 01:51:17 UTC (rev 23131)
+++ 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/AttributeValueUtil.java
      2010-12-08 18:23:10 UTC (rev 23132)
@@ -271,8 +271,7 @@
                return new Color(Integer.parseInt(attribute.substring(1), 16));
        }
 
-       public ParseState handleAttribute(Attributes atts, CyRow cyAtts)
-                       throws SAXParseException {
+       public ParseState handleAttribute(Attributes atts, CyRow cyAtts) throws 
SAXParseException {
                String name = atts.getValue("name");
                ObjectType objType = typeMap.getType(atts.getValue("type"));
                Object obj = getTypedAttributeValue(objType, atts);
@@ -303,17 +302,17 @@
                // must make sure to clear out any existing values before we 
parse.
                case LIST:
                        manager.currentAttributeID = name;
-                       if (List.class == cyAtts.getType(name))
+                       if (List.class == 
cyAtts.getDataTable().getColumnTypeMap().get(name))
                                cyAtts.set(name, null);
                        return ParseState.LISTATT;
                case MAP:
                        manager.currentAttributeID = name;
-                       if (Map.class == cyAtts.getType(name))
+                       if (Map.class == 
cyAtts.getDataTable().getColumnTypeMap().get(name))
                                cyAtts.set(name, null);
                        return ParseState.MAPATT;
                case COMPLEX:
                        manager.currentAttributeID = name;
-                       if (Map.class == cyAtts.getType(name)) // assuming 
complex will
+                       if (Map.class == 
cyAtts.getDataTable().getColumnTypeMap().get(name)) // assuming complex will
                                // become Map
                                cyAtts.set(name, null);
                        // If this is a complex attribute, we know that the 
value attribute
@@ -329,7 +328,6 @@
        }
 
        public void addAttributes(Attributes attI, Attributes atts) {
-
                final int attrLength = atts.getLength();
 
                for (int i = 0; i < attrLength; i++)

Modified: 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/HandleComplexAttribute.java
===================================================================
--- 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/HandleComplexAttribute.java
  2010-12-08 01:51:17 UTC (rev 23131)
+++ 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/read/xgmml/handler/HandleComplexAttribute.java
  2010-12-08 18:23:10 UTC (rev 23132)
@@ -38,8 +38,8 @@
  * properties are only set for keys
  */
 public class HandleComplexAttribute extends AbstractHandler {
-       public ParseState handle(String tag, Attributes atts, ParseState 
current)
-                       throws SAXException {
+       public ParseState handle(String tag, Attributes atts, ParseState 
current) throws SAXException
+       {
                // We can't create the complex attribute until we know what the
                // definition is, but
                // since a complex attribute is really nothing more than a 
HashMap with
@@ -49,19 +49,19 @@
                // Get our attributes
                ObjectType type = typeMap.getType(atts.getValue("type"));
                String value = atts.getValue("value");
-               // System.out.println("Complex attribute: 
"+currentAttributeID+" level "+level+" value="+atts.getValue("value"));
 
                if (manager.level == manager.numKeys) {
                        manager.complexMap[manager.level - 1].put(
                                        manager.complexKey[manager.level - 1], 
typeMap
                                                        .getTypedValue(type, 
value));
                        manager.valueType = 
attributeValueUtil.getMultHashMapType(type);
+
                        // See if we've defined the attribute already
-                       if (Map.class == manager.currentAttributes
-                                       .getType(manager.currentAttributeID)) {
+                       if (Map.class == 
manager.currentAttributes.getDataTable().getColumnTypeMap()
+                           .get(manager.currentAttributeID))
                                
manager.currentAttributes.getDataTable().createColumn(
                                                manager.currentAttributeID, 
Map.class);
-                       }
+
                        // Now define set the attribute
                        if (manager.objectTarget != null)
                                
manager.currentAttributes.set(manager.currentAttributeID,

Modified: 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/write/xgmml/XGMMLWriter.java
===================================================================
--- 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/write/xgmml/XGMMLWriter.java
    2010-12-08 01:51:17 UTC (rev 23131)
+++ 
core3/io-impl/trunk/src/main/java/org/cytoscape/io/internal/write/xgmml/XGMMLWriter.java
    2010-12-08 18:23:10 UTC (rev 23132)
@@ -688,11 +688,10 @@
         *
         * @throws IOException
         */
-       private void writeAttribute(final CyRow attributes, final String 
attributeName) 
-               throws IOException {
-               // create an attribute and its type
-               final Class attType = attributes.getType(attributeName);
-               if ( attType == null )
+       private void writeAttribute(final CyRow attributes, final String 
attributeName)  throws IOException {
+               // create an attribute and its type:
+               final Class attType = 
attributes.getDataTable().getColumnTypeMap().get(attributeName);
+               if (attType == null)
                        return;
                        
                String value = 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