Search in sources :

Example 6 with ParseState

use of org.cytoscape.io.internal.read.xgmml.ParseState in project cytoscape-impl by cytoscape.

the class HandleViewGraphGraphics method handle.

@Override
public ParseState handle(String tag, Attributes atts, ParseState current) throws SAXException {
    if (atts == null)
        return current;
    manager.attState = current;
    ParseState nextState = current;
    if (tag.equals("graphics")) {
        manager.addViewGraphicsAttributes(manager.getNetworkId(), atts, false);
    } else if (tag.equals("att")) {
        String name = atts.getValue(AttributeValueUtil.ATTR_NAME);
        if (AttributeValueUtil.LOCKED_VISUAL_PROPS.equalsIgnoreCase(name))
            return ParseState.LOCKED_VISUAL_PROP_ATT;
        String value = atts.getValue(AttributeValueUtil.ATTR_VALUE);
        if (name != null && value != null)
            manager.addViewGraphicsAttribute(manager.getNetworkId(), name, value, false);
    }
    if (nextState != ParseState.NONE)
        return nextState;
    return current;
}
Also used : ParseState(org.cytoscape.io.internal.read.xgmml.ParseState)

Aggregations

ParseState (org.cytoscape.io.internal.read.xgmml.ParseState)6 CyNode (org.cytoscape.model.CyNode)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 ObjectType (org.cytoscape.io.internal.util.xgmml.ObjectType)1 CyColumn (org.cytoscape.model.CyColumn)1 CyEdge (org.cytoscape.model.CyEdge)1 CyIdentifiable (org.cytoscape.model.CyIdentifiable)1 CyNetwork (org.cytoscape.model.CyNetwork)1 CyRow (org.cytoscape.model.CyRow)1 CyTable (org.cytoscape.model.CyTable)1 VirtualColumnInfo (org.cytoscape.model.VirtualColumnInfo)1