|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.data.GraphObjAttributes
CyAttributes
instead.
public class GraphObjAttributes
GraphObjAttributes provides access to node and edge attributes within Cytoscape.
GraphObjAttributes will be replaced by CyAttributes
, and
will be officially removed from the Cytoscape core in
September, 2006.
Field Summary | |
---|---|
static String |
DEFAULT_CATEGORY
Deprecated. |
Constructor Summary | |
---|---|
GraphObjAttributes(CyAttributes cyAttrs)
Deprecated. Constructor. |
Method Summary | |
---|---|
void |
add(GraphObjAttributes attributes)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
boolean |
add(String graphObjectName,
HashMap bundle)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
boolean |
add(String attributeName,
String id,
double value)
Deprecated. Use CyAttributes.setAttribute(String, String, Double) instead. |
boolean |
add(String attributeName,
String id,
Object value)
Deprecated. Storing arbitrary Java objects as attribute values will no longer be supported in CyAttributes. However, you will be able to store arbitrarily complex trees of Boolean, Integer, Double, and String Objects. For details, refer to CyAttributes . |
void |
addClassMap(HashMap newClassMap)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
addNameMap(HashMap nameMapping)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
addNameMapping(String canonicalName,
Object graphObject)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
addObjectMap(HashMap objectMapping)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
boolean |
append(String attributeName,
String id,
Object value)
Deprecated. Use CyAttributes.setAttributeList(String, String, java.util.List)
for equivalent functionality. |
void |
clearNameMap()
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
clearObjectMap()
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
int |
countIdentical(String graphObjName)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
static Class |
deduceClass(String string)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
deleteAttribute(String attributeName)
Deprecated. Use CyAttributes.deleteAttribute(String) instead. |
void |
deleteAttribute(String attributeName,
String id)
Deprecated. Use CyAttributes.deleteAttribute(String, String) instead. |
void |
deleteAttributeValue(String attributeName,
String graphObjName,
Object value)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
Object |
get(String attributeName,
String id)
Deprecated. Use CyAttributes instead. It provides several
getter methods for retrieving Boolean, Integer, Double and String values. |
Object[] |
getArrayValues(String attributeName,
String graphObjectName)
Deprecated. There is no one method in CyAttributes that provides
this functionality, but it can be recreated via several calls. |
HashMap |
getAttribute(String attributeName)
Deprecated. Use CyAttributesUtils.getAttribute(String, CyAttributes)
instead. |
String[] |
getAttributeNames()
Deprecated. Use CyAttributes.getAttributeNames() instead. |
HashMap |
getAttributes(String canonicalName)
Deprecated. use CyAttributeUtils.getAttributes(String,CyAttributes) . |
String |
getCanonicalName(Object graphObj)
Deprecated. Use CyNode.getIdentifier() or
CyEdge.getIdentifier() instead. |
String |
getCategory(String attributeName)
Deprecated. Gets a category for the specified attribute. |
Class |
getClass(String attributeName)
Deprecated. Use CyAttributesUtils.getClass(String,CyAttributes) instead. |
HashMap |
getClassMap()
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
Double |
getDoubleValue(String attributeName,
String id)
Deprecated. Use CyAttributes.getDoubleAttribute(String, String) instead. |
Object |
getGraphObject(String canonicalName)
Deprecated. Use Cytoscape.getCyNode(String) or
Cytoscape.getCyEdge(String, String, String, String) instead. |
Integer |
getIntegerValue(String attributeName,
String id)
Deprecated. Use CyAttributes.getIntegerAttribute(String, String)
instead. |
List |
getList(String attributeName,
String id)
Deprecated. Use CyAttributes.getAttributeList(String, String)
instead. |
HashMap |
getNameMap()
Deprecated. Use GraphPerspective.nodesIterator() or
GraphPerspective.edgesIterator() instead. |
int |
getObjectCount(String attributeName)
Deprecated. There is no one method in CyAttributes that provides
this functionality, but it can be recreated via several calls. |
HashMap |
getObjectMap()
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
String[] |
getObjectNames(String attributeName)
Deprecated. Use MultiHashMap.getObjectKeys(String)
instead. |
String[] |
getStringArrayValues(String attributeName,
String id)
Deprecated. Use CyAttributes.getAttributeList(String, String)
instead. |
String |
getStringValue(String attributeName,
String id)
Deprecated. Use CyAttributes.getStringAttribute(String, String)
instead. |
HashMap |
getSummary()
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
String[] |
getUniqueStringValues(String attributeName)
Deprecated. There is no one method in CyAttributes that provides
this functionality, but it can be recreated via several calls. |
Object[] |
getUniqueValues(String attributeName)
Deprecated. There is no one method in CyAttributes that provides
this functionality, but it can be recreated via several calls. |
Object |
getValue(String attributeName,
String id)
Deprecated. Use CyAttributes instead. It provides several
getter methods for retrieving Boolean, Integer, Double and String values. |
boolean |
hasAttribute(String attributeName)
Deprecated. Use CyAttributes.getType(String) instead. |
boolean |
hasAttribute(String attributeName,
String id)
Deprecated. Use CyAttributes.hasAttribute(String, String) instead. |
int |
numberOfAttributes()
Deprecated. Use CyAttributes.getAttributeNames() .length instead. |
String |
processFileHeader(String text)
Deprecated. Use CyAttributesReader instead. |
void |
readAttributesFromFile(File file)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
readAttributesFromFile(String filename)
Deprecated. Use CyAttributesReader instead. |
void |
removeNameMapping(String canonicalName)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
removeObjectMapping(Object graphObj)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
set(GraphObjAttributes attributes)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
boolean |
set(String graphObjName,
HashMap bundle)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
boolean |
set(String attributeName,
String id,
double value)
Deprecated. Use CyAttributes.setAttribute(String, String, Double) instead. |
boolean |
set(String attributeName,
String id,
Object value)
Deprecated. Storing arbitrary Java objects as attribute values will no longer be supported in CyAttributes. However, you will be able to store arbitrarily complex trees of Boolean, Integer, Double, and String Objects. For details, refer to CyAttributes . |
void |
setCategory(String attributeName,
String newValue)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
boolean |
setClass(String attributeName,
Class attributeClass)
Deprecated. Method is no longer needed in the Cytoscape core, and no equivalent method will be provided. |
void |
setTaskMonitor(cytoscape.task.TaskMonitor taskMonitor)
Deprecated. |
String |
toString()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CATEGORY
Constructor Detail |
---|
public GraphObjAttributes(CyAttributes cyAttrs)
cyAttrs
- CyAttributes.Method Detail |
---|
public static Class deduceClass(String string)
public boolean set(String attributeName, String id, Object value)
CyAttributes
.
attributeName
- Attribute Name.id
- Unique Identifier.value
- The value of this attribute, either a java object
or an array of java objects
IllegalArgumentException
- if the class of obj (or of obj [0],
if obj is an array) does not match the
already assigned or deduced java class
for this attribute.public boolean append(String attributeName, String id, Object value)
CyAttributes.setAttributeList(String, String, java.util.List)
for equivalent functionality.
attributeName
- Attribute Name.id
- Unique Identifier.value
- The value of this attribute.
public boolean set(String attributeName, String id, double value)
CyAttributes.setAttribute(String, String, Double)
instead.
Value will be promoted to Double.
attributeName
- Attribute Name.id
- Unique Identifier.value
- Attribute double value.
public void setTaskMonitor(cytoscape.task.TaskMonitor taskMonitor)
taskMonitor
- public int numberOfAttributes()
CyAttributes.getAttributeNames()
.length instead.
public String[] getAttributeNames()
CyAttributes.getAttributeNames()
instead.
public boolean hasAttribute(String attributeName)
CyAttributes.getType(String)
instead.
attributeName
- Attribute Name.
public boolean hasAttribute(String attributeName, String id)
CyAttributes.hasAttribute(String, String)
instead.
attributeName
- Attribute Name.id
- Unique Identifier.
public void deleteAttribute(String attributeName)
CyAttributes.deleteAttribute(String)
instead.
attributeName
- AttributeNamepublic void deleteAttribute(String attributeName, String id)
CyAttributes.deleteAttribute(String, String)
instead.
attributeName
- AttributeNameid
- Unique Identifier.public Class getClass(String attributeName)
CyAttributesUtils.getClass(String,CyAttributes)
instead.
attributeName
- AttributeName
public List getList(String attributeName, String id)
CyAttributes.getAttributeList(String, String)
instead.
attributeName
- AttributeName.id
- Unique Identifier.
public Object getValue(String attributeName, String id)
CyAttributes
instead. It provides several
getter methods for retrieving Boolean, Integer, Double and String values.
attributeName
- AttributeName.id
- Unique Identifier.
public Object get(String attributeName, String id)
CyAttributes
instead. It provides several
getter methods for retrieving Boolean, Integer, Double and String values.
attributeName
- Attribute Name.id
- Unique Identifier.
public Double getDoubleValue(String attributeName, String id)
CyAttributes.getDoubleAttribute(String, String)
instead.
attributeName
- Attribute Name.id
- Unique Identifier.
public Integer getIntegerValue(String attributeName, String id)
CyAttributes.getIntegerAttribute(String, String)
instead.
attributeName
- Attribute Name.id
- Unique Identifier.
public String getStringValue(String attributeName, String id)
CyAttributes.getStringAttribute(String, String)
instead.
attributeName
- Attribute Name.id
- Unique Identifier.
public HashMap getAttribute(String attributeName)
CyAttributesUtils.getAttribute(String, CyAttributes)
instead.
attributeName
- Attribute Name.
public String[] getStringArrayValues(String attributeName, String id)
CyAttributes.getAttributeList(String, String)
instead.
attributeName
- Attribute Name.id
- Unique Identifier.
public String toString()
toString
in class Object
public boolean set(String graphObjName, HashMap bundle)
public void clearNameMap()
public void clearObjectMap()
public HashMap getClassMap()
public void addClassMap(HashMap newClassMap)
public HashMap getObjectMap()
public void addNameMap(HashMap nameMapping)
public void addObjectMap(HashMap objectMapping)
public void set(GraphObjAttributes attributes)
public void deleteAttributeValue(String attributeName, String graphObjName, Object value)
public void readAttributesFromFile(File file) throws IOException
file
- File Object.
IOException
public HashMap getSummary()
public int countIdentical(String graphObjName)
VNG0382G (geneFusion) VNG1230G VNG0382G (geneFusion) VNG1232Gthe first pair encountered may be give the name
VNG0382G (geneFusion) VNG1230Gwe may wish to give the second pair the name
VNG0382G (geneFusion) VNG1230G_1this method provides a count of matches based on String.startsWith ("VNG0382G (geneFusion) VNG1230G") which solves the problem of all subsequent duplicates simply append a number to the base name. whoever calls this method must construct the new object's name -first- and then is expected to append "_N" where N is the value returned here (and of course, if the result is 0, there is no need to append '_0'. Deprecation note: This method has 0 usages in the core.
public int getObjectCount(String attributeName)
CyAttributes
that provides
this functionality, but it can be recreated via several calls.
public String getCanonicalName(Object graphObj)
CyNode.getIdentifier()
or
CyEdge.getIdentifier()
instead.
public HashMap getAttributes(String canonicalName)
CyAttributeUtils.getAttributes(String,CyAttributes)
.
public void addNameMapping(String canonicalName, Object graphObject)
getCanonicalName(java.lang.Object)
public Object getGraphObject(String canonicalName)
Cytoscape.getCyNode(String)
or
Cytoscape.getCyEdge(String, String, String, String)
instead.
public String[] getObjectNames(String attributeName)
MultiHashMap.getObjectKeys(String)
instead.
public void removeNameMapping(String canonicalName)
public boolean setClass(String attributeName, Class attributeClass)
public void removeObjectMapping(Object graphObj)
public Object[] getArrayValues(String attributeName, String graphObjectName)
CyAttributes
that provides
this functionality, but it can be recreated via several calls.
public void readAttributesFromFile(String filename) throws IOException
CyAttributesReader
instead.
expresssion ratio geneA = 0.1 geneB = 8.9 ... geneZ = 23.2Deprecation note: This method has 2 usages in the core.
IOException
public HashMap getNameMap()
GraphPerspective.nodesIterator()
or
GraphPerspective.edgesIterator()
instead.
public Object[] getUniqueValues(String attributeName)
CyAttributes
that provides
this functionality, but it can be recreated via several calls.
public String[] getUniqueStringValues(String attributeName)
CyAttributes
that provides
this functionality, but it can be recreated via several calls.
public String processFileHeader(String text)
CyAttributesReader
instead.
attribute name (category=xxxx) (class=yyyy)category and class are optional; if absent, class will be inferred (see deduceClass), and category set to DEFAULT_CATEGORY every attribute file must have, at minimum, the name attribute in the first line, possibly with embedded spaces in addition, the first line may have category and class information, as in homologene (category=staticWebPage) (class=java.net.URL) the present method extracts the mandatory attribute name, and the optional category and class information. note: category and class information, if present, are not only parsed here: the information is also stored as appropriate in the current class data members. Deprecation note: This method has 1 usage in the core.
public void add(GraphObjAttributes attributes)
attributes
- GraphObjAttributes Object.
Deprecation note: This method has 0 usages in the core.public boolean add(String attributeName, String id, Object value)
CyAttributes
.
attributeName
- Attribute Nameid
- Unique Identifiervalue
- Value
public boolean add(String attributeName, String id, double value)
CyAttributes.setAttribute(String, String, Double)
instead.
Value will be promoted to Double.
attributeName
- Attribute Name.id
- Unique Identifier.value
- Attribute double value.
public boolean add(String graphObjectName, HashMap bundle)
public void setCategory(String attributeName, String newValue)
attributeName
- Attribute namenewValue
- New value.public String getCategory(String attributeName)
attributeName
- Attribute name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |