Cytoscape 2.8.0 API

cytoscape.data.synonyms
Class Aliases

java.lang.Object
  extended by cytoscape.data.synonyms.Aliases

public class Aliases
extends Object

Simpler version of Thesaurus.

Purpose of this class is providing simple aliasing without biological context. No species, commonname, nor canonical name are available. Just maintains keys (IDs) and their aliases in CyAttributes.
This will be used for importing attribute data.

This class has no redundant data structure: everything will be stored in CyAttributes, and uses immutable special attributes called Alias

Since:
Cytoscape 2.4
Version:
0.6
Author:
kono

Field Summary
static String ALIAS
          Name of the attribute for aliases
 
Constructor Summary
Aliases(AliasType type)
          Constructor for the aliases object.
 
Method Summary
 void add(String key, List<String> aliasList)
          Add list of aliases to the existing alias lists.
 void add(String key, String alias)
          Add new alias for an object.
 List<String> getAliases(String key)
           
 Set<String> getIdSet(String key)
          Return set of all names for the key (including key itself.)
 String getKey(String alias)
          Returns true if the object with the alias wxists in the memory (rootGraph).
 void remove(String key, String alias)
          Remove an alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS

public static final String ALIAS
Name of the attribute for aliases

See Also:
Constant Field Values
Constructor Detail

Aliases

public Aliases(AliasType type)
Constructor for the aliases object.

Parameters:
type - Type of alias: node, edge, or network.
Method Detail

add

public void add(String key,
                String alias)
Add new alias for an object.

Parameters:
key - ID of the object.
alias - New alias to be added.

add

public void add(String key,
                List<String> aliasList)
Add list of aliases to the existing alias lists.

Parameters:
key -
aliaseList -

remove

public void remove(String key,
                   String alias)
Remove an alias.

Parameters:
key - ID of the object.
alias - Alias to be removed.

getAliases

public List<String> getAliases(String key)
Parameters:
key -
Returns:

getKey

public String getKey(String alias)
Returns true if the object with the alias wxists in the memory (rootGraph). This is an O(n) operation, which is expensive!

Parameters:
key -
alias -
Returns:
Key for this alias. If it does not exist, return null.

getIdSet

public Set<String> getIdSet(String key)
Return set of all names for the key (including key itself.)

Parameters:
key -
Returns:

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.