|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttools.namemapping.Synonyms
public class Synonyms
Manages synonyms for protein identifiers. Contains identifier/synonym
pairs. The resolveSynonym(String)
method then maps any incoming
synonyms to their identifiers. Transitive relations will be
followed. That is, if you add the synonym-mappings a => b
and
b => c
then a
will be mapped to c
.
ProteinManager
Constructor Summary | |
---|---|
Synonyms()
Creates a new empty set of synonyms |
Method Summary | |
---|---|
void |
addMappingNetwork(ProteinNetwork mappings)
Adds all mappings induced by the edges of a given directed network to the synonyms list. |
void |
addSynonym(String identifier,
String synonym)
Adds a new synonym. |
Set<String> |
getSynonyms(String identifier)
Returns all synonyms associated with a given identifier. |
String |
resolveSynonym(String id)
Returns the identifier a synonym is mapped to or id directly
of no synonym is associated with that string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Synonyms()
Method Detail |
---|
public void addSynonym(String identifier, String synonym)
synonym
will be mapped to
identifier
by resolveSynonym(String)
.
identifier
- identifier the synonym is mapped tosynonym
- synonym of the identifierpublic String resolveSynonym(String id)
id
directly
of no synonym is associated with that string.
id
- identifier which is resolved
id
is registered as a synonym or
id
directly otherwisepublic Set<String> getSynonyms(String identifier)
identifier
- identifier for which synonyms are looked up
null
if no
synonyms are associated with the identiferpublic void addMappingNetwork(ProteinNetwork mappings) throws IllegalArgumentException
a => b
the
corresponding synonym mapping will be added with a
being the
synonym and b
its associated identifier.
If the networks contains circles or nodes with multiple successors the method's behavious is undefined (but it will not crash).
mappings
- directed mapping network with synonyms to be added
IllegalArgumentException
- if the network is undirected
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |