org.graphdrawing.graphml.attr
Class AttributeOutputHandler

java.lang.Object
  extended byorg.graphdrawing.graphml.attr.AttributeOutputHandler
All Implemented Interfaces:
AttributeConstants, OutputHandler
Direct Known Subclasses:
AttrDataProviderOutputHandler

public class AttributeOutputHandler
extends Object
implements OutputHandler, AttributeConstants

This class handles the output of the GraphML extensions defined in the attribute module. One instance of the class is responsible for the output of one GraphML attribute. The attribute is defined by an instance of AttributeProvider.

See Also:
AttributeProvider

Field Summary
 
Fields inherited from interface org.graphdrawing.graphml.attr.AttributeConstants
TYPE_BOOLEAN, TYPE_COMPLEX, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_STRING
 
Constructor Summary
AttributeOutputHandler(AttributeProvider provider)
           
 
Method Summary
 AttributeProvider getAttributeProvider()
          Returns the attribute provider that is used by this class
 void printDataAttributes(GraphMLWriteContext context, XmlWriter writer)
          Write the XML attributes of a data tag
 void printDataOutput(GraphMLWriteContext context, XmlWriter writer)
          Write the element content of a data tag
 void printKeyAttributes(GraphMLWriteContext context, XmlWriter writer)
          Write the XML attributes of the key tag for this graphml attribute
 void printKeyOutput(GraphMLWriteContext context, XmlWriter ips)
          Write the element content of the key tag for this graphml attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeOutputHandler

public AttributeOutputHandler(AttributeProvider provider)
Method Detail

getAttributeProvider

public AttributeProvider getAttributeProvider()
Returns the attribute provider that is used by this class


printKeyAttributes

public void printKeyAttributes(GraphMLWriteContext context,
                               XmlWriter writer)
Description copied from interface: OutputHandler
Write the XML attributes of the key tag for this graphml attribute

Specified by:
printKeyAttributes in interface OutputHandler
Parameters:
context - the current write context
writer - XMLWriter instance that writes the result

printKeyOutput

public void printKeyOutput(GraphMLWriteContext context,
                           XmlWriter ips)
Description copied from interface: OutputHandler
Write the element content of the key tag for this graphml attribute

Specified by:
printKeyOutput in interface OutputHandler
Parameters:
context - the current write context
ips - XMLWriter instance that writes the result

printDataAttributes

public void printDataAttributes(GraphMLWriteContext context,
                                XmlWriter writer)
Description copied from interface: OutputHandler
Write the XML attributes of a data tag

Specified by:
printDataAttributes in interface OutputHandler
Parameters:
context - the current write context
writer - XMLWriter instance that writes the result

printDataOutput

public void printDataOutput(GraphMLWriteContext context,
                            XmlWriter writer)
Description copied from interface: OutputHandler
Write the element content of a data tag

Specified by:
printDataOutput in interface OutputHandler
Parameters:
context - the current write context
writer - XMLWriter instance that writes the result


Copyright ©2000-2009, yWorks GmbH. All rights reserved.