org.graphdrawing.graphml.attr
Interface AttributeProvider


public interface AttributeProvider

This interface defines the contract of a GraphML attribute.


Method Summary
 int getContentType()
          The type of the content of the attribute.
 String getName()
          Returns the name of the Attribute.
 Object getValue(GraphMLWriteContext context)
          Returns the value of the Attribute in a given context.
 

Method Detail

getContentType

public int getContentType()
The type of the content of the attribute.

Returns:
one of AttributeConstants.TYPE_INT, AttributeConstants.TYPE_LONG, AttributeConstants.TYPE_FLOAT, AttributeConstants.TYPE_DOUBLE, AttributeConstants.TYPE_BOOLEAN, AttributeConstants.TYPE_STRING.

getName

public String getName()
Returns the name of the Attribute.

Returns:
an identifier for the attribute.

getValue

public Object getValue(GraphMLWriteContext context)
Returns the value of the Attribute in a given context.

Returns:
an instance of of either Integer,Long, Float, Double, String.


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