Package psidev.psi.mi.jami.utils
Class AliasUtils
- java.lang.Object
-
- psidev.psi.mi.jami.utils.AliasUtils
-
public class AliasUtils extends Object
Utility class for aliases- Since:
01/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description AliasUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<Alias>collectAllAliasesHavingType(Collection<? extends Alias> aliases, String typeId, String typeName)Extract all the aliases having a specific type.static Collection<Alias>collectAllAliasesHavingTypeAndName(Collection<? extends Alias> aliases, String typeId, String typeName, String name)Extract all the aliases having a specific type.static AliascollectFirstAliasWithType(Collection<? extends Alias> aliases, String typeId, String typeName)This method will return the first Alias having this typeId/type name It will return null if there are no Alias with this type id/namestatic AliascollectFirstAliasWithTypeAndName(Collection<? extends Alias> aliases, String typeId, String typeName, String name)This method will return the first Alias having this typeId/type name It will return null if there are no Alias with this type id/namestatic AliascreateAlias(String typeName, String name)createAliasstatic AliascreateAlias(String typeName, String typeMi, String name)createAliasstatic AliascreateAuthorAssignedName(String name)createAuthorAssignedNamestatic AliascreateComplexSynonym(String name)createComplexSynonymstatic AliascreateGeneName(String name)createGeneNamestatic AliascreateGeneNameSynonym(String name)createGeneNameSynonymstatic AliascreateIsoformSynonym(String name)createIsoformSynonymstatic AliascreateLocusName(String name)createLocusNamestatic AliascreateOrfName(String name)createOrfNamestatic booleandoesAliasHaveType(Alias alias, String typeId, String typeName)To know if an alias have a specific type.static booleandoesAliasHaveTypeAndName(Alias alias, String typeId, String typeName, String name)To know if an alias have a specific type and name.static voidremoveAllAliasesWithType(Collection<? extends Alias> aliases, String typeId, String typeName)Remove all Alias having this method name/method id from the collection of aliasesstatic voidremoveAllAliasesWithTypeAndName(Collection<Alias> aliases, String typeId, String typeName, String name)Remove all Alias having this method name/method id from the collection of aliases
-
-
-
Method Detail
-
doesAliasHaveType
public static boolean doesAliasHaveType(Alias alias, String typeId, String typeName)
To know if an alias have a specific type.- Parameters:
alias- : the aliastypeId- : alias type MI identifiertypeName- : alias type name- Returns:
- true if the alias has the type with given name/identifier
-
collectAllAliasesHavingType
public static Collection<Alias> collectAllAliasesHavingType(Collection<? extends Alias> aliases, String typeId, String typeName)
Extract all the aliases having a specific type.- Parameters:
aliases- : the aliases to analysetypeId- : the alias type MI identifiertypeName- : the alias type name- Returns:
- the selection of aliases having the specified type (typeId or typeName if no ids)
-
collectFirstAliasWithType
public static Alias collectFirstAliasWithType(Collection<? extends Alias> aliases, String typeId, String typeName)
This method will return the first Alias having this typeId/type name It will return null if there are no Alias with this type id/name- Parameters:
aliases- : the collection of AliastypeId- : the type id to look fortypeName- : the type name to look for- Returns:
- the first alias having this type name/id, null if no Alias with this type name/id
-
removeAllAliasesWithType
public static void removeAllAliasesWithType(Collection<? extends Alias> aliases, String typeId, String typeName)
Remove all Alias having this method name/method id from the collection of aliases- Parameters:
aliases- : the collection of ChecksumtypeId- : the method id to look fortypeName- : the method name to look for
-
doesAliasHaveTypeAndName
public static boolean doesAliasHaveTypeAndName(Alias alias, String typeId, String typeName, String name)
To know if an alias have a specific type and name.- Parameters:
alias- : the aliastypeId- : the alias type MI identifiertypeName- : the alias type namename- : alias name- Returns:
- true if the alias has the type with given name/identifier
-
collectAllAliasesHavingTypeAndName
public static Collection<Alias> collectAllAliasesHavingTypeAndName(Collection<? extends Alias> aliases, String typeId, String typeName, String name)
Extract all the aliases having a specific type.- Parameters:
aliases- : : the aliases to analysetypeId- : : the alias type MI identifiertypeName- : : the alias type namename- : alias name- Returns:
- the selection of aliases having the specified type (typeId or typeName if no ids)
-
collectFirstAliasWithTypeAndName
public static Alias collectFirstAliasWithTypeAndName(Collection<? extends Alias> aliases, String typeId, String typeName, String name)
This method will return the first Alias having this typeId/type name It will return null if there are no Alias with this type id/name- Parameters:
aliases- : the collection of AliastypeId- : the type id to look fortypeName- : the type name to look forname- : alias name- Returns:
- the first alias having this type name/id, null if no Alias with this type name/id
-
removeAllAliasesWithTypeAndName
public static void removeAllAliasesWithTypeAndName(Collection<Alias> aliases, String typeId, String typeName, String name)
Remove all Alias having this method name/method id from the collection of aliases- Parameters:
aliases- : the collection of ChecksumtypeId- : the method id to look fortypeName- : the method name to look forname- : alias name
-
createAuthorAssignedName
public static Alias createAuthorAssignedName(String name)
createAuthorAssignedName
-
createAlias
public static Alias createAlias(String typeName, String typeMi, String name)
createAlias
-
-