Author: scooter
Date: 2011-06-15 13:02:14 -0700 (Wed, 15 Jun 2011)
New Revision: 25762
Modified:
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/AttributeUtils.java
Log:
ID is a special attribute name that we should honor
Modified:
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/AttributeUtils.java
===================================================================
---
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/AttributeUtils.java
2011-06-15 20:01:29 UTC (rev 25761)
+++
cytoscape/trunk/coreplugins/CoreCommands/src/main/java/coreCommands/namespaces/AttributeUtils.java
2011-06-15 20:02:14 UTC (rev 25762)
@@ -197,9 +197,8 @@
// For each object
for (GraphObject obj: objects) {
- String objectName = obj.getIdentifier();
// Output a row
- exportRow(output, objectName, attrs, attrList, delim);
+ exportRow(output, obj.getIdentifier(), attrs, attrList,
delim);
lineCount++;
}
output.close();
@@ -209,7 +208,9 @@
private static void exportRow(BufferedWriter output, String name,
CyAttributes attrs,
List<String>attrList, String delim)
throws IOException {
for (String attr: attrList) {
- if (attrs.hasAttribute(name, attr) &&
attrs.getUserVisible(attr)) {
+ if (attr.equals("ID")) {
+ output.write(name);
+ } else if (attrs.hasAttribute(name, attr) &&
attrs.getUserVisible(attr)) {
byte type = attrs.getType(attr);
// Special handling for Lists or Maps
if (type == CyAttributes.TYPE_SIMPLE_LIST) {
--
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.