package cytoscape.data;
import cytoscape.data.attr.CyData; import cytoscape.data.attr.CyDataDefinition;
import java.util.List; import java.util.Map;
public interface AttributeData {
- // TODO: Event Listener Framework? // TODO: Rowan's labels? /**
- Gets a List of All Attribute Names.
- @return An Array of String Objects.
- /
- Determines if the specified id/attributeName pair exists.
- @param id unique identifier.
- @param attributeName attribute name.
- @return true or false.
- /
- Sets an id/attributeName pair of type boolean.
- @param id unique identifier.
- @param attributeName attribute name.
- @param value boolean value.
- /
- Sets an id/attributeName pair of type integer.
- @param id unique identifier.
- @param attributeName attribute name.
- @param value integer value.
- /
- Sets an id/attributeName pair of type double.
- @param id unique identifier.
- @param attributeName attribute name.
- @param value double value.
- /
- Sets an id/attributeName pair of type String.
- @param id unique identifier.
- @param attributeName attribute name.
- @param value string value.
- /
- Gets a boolean value at the specified id/attributeName.
<P>If attributeName refers to a List, the zeroeth element in that list is
- returned.
- @param id unique identifier.
- @param attributeName attribute name.
- @return Boolean object, or null if no id/attributeName pair is found.
@throws ClassCastException Indicates that the specified attribute
- is not of type Boolean.
- /
throws ClassCastException;
- Gets an integer value at the specified id/attributeName.
<P>If attributeName refers to a List, the zeroeth element in that list is
- returned.
- @param id unique identifier.
- @param attributeName attribute name.
- @return Integer object, or null if no id/attributeName pair is found.
@throws ClassCastException Indicates that the specified attribute
- is not of type Integer.
- /
throws ClassCastException;
- Gets a double value at the specified id/attributeName.
<P>If attributeName refers to a List, the zeroeth element in that list is
- returned.
- @param id unique identifier.
- @param attributeName attribute name.
- @return Double object, or null if no id/attributeName pair is found..
@throws ClassCastException Indicates that the specified attribute
- is not of type Double.
- /
throws ClassCastException;
- Gets a String value at the specified id/attributeName.
<P>If attributeName refers to a List, the zeroeth element in that list is
- returned.
- @param id unique identifier.
- @param attributeName attribute name.
- @return String object, or null if no id/attributeName pair is found.
@throws ClassCastException Indicates that the specified attribute
- is not of type String.
- /
throws ClassCastException;
- Gets the Class of the specified attribute.
- @param attributeName Attribute Name.
- @return Return type will be of type: Boolean, Integer, Double,
- String, List or Map. If attributeName has not been
- defined, this method will return null.
- /
- Delete the id/attributeName pair.
- @param id unique identifier.
- @param attributeName attribute name.
- @return true indicates attribute was
- successfully removed.
- /
- Sets a List of Attributes.
<P><B>Note:</B>
<UL>
<LI>All items within the list must be of the same type,
- and and chosen from the following list: Boolean, Integer, Double,
- or String.
</LI>
</UL>
If the above requirement is not met, an IllegalArgumentException
- will be thrown.
- @param id unique identifier.
- @param list attribute name.
- @param list List Object.
- /
throws IllegalArgumentException;
- Gets a List of attributes for the id/attributeName pair.
- @param id unique identifier.
- @param attributeName attribute name.
- @return List object.
@throws ClassCastException Indicates that the specified attribute
- is not of type List.
- /
throws ClassCastException;
- Sets a Map of Attribute Values.
<P><B>Note:</B>
<UL>
<LI>All keys within the Map must be of type String.
<LI>All values within the Map must be of the same type,
- and chosen from the following list: Boolean, Integer, Double, or String.
</UL>
If the above requirements are not met, an IllegalArgumentException
- will be thrown.
- @param id unique identifier.
- @param attributeName attribute name.
- @param map Map Object.
- /
- Map map);
- Gets a Map of Attribute Value.
- @param id unique identifier.
- @param attributeName attribute name.
- @return Map Object.
- /
Gets the CyData Object, which stores the actual attribute values.
<P>By using CyData and CyDataDefintion directly, you can store
- arbitrarily complex data structures. Recommended for advanced
- coders only.
@return CyData Object.
- /
public CyData getCyData(); /**
Gets the CyDataDefinition Object, which stores attribute definitions.
<P>By using CyData and CyDataDefintion directly, you can store
- arbitrarily complex data structures. Recommended for advanced
- coders only.
@return CyDataDefintion Object.
- /
public CyDataDefinition getCyDataDefinition();
}