Class ConfigurableIDFetcher

java.lang.Object
org.biopax.paxtools.normalizer.ConfigurableIDFetcher
All Implemented Interfaces:
IDFetcher

public class ConfigurableIDFetcher extends Object implements IDFetcher
Tries to get preferred type IDs of an entity reference. This id-fetcher can be optionally used when converting (reducing) BioPAX to the binary SIF format.
  • Constructor Details

    • ConfigurableIDFetcher

      public ConfigurableIDFetcher()
      Constructor.
  • Method Details

    • seqDbStartsWithOrEquals

      public ConfigurableIDFetcher seqDbStartsWithOrEquals(String dbStartsWithOrEquals)
      Set to prefer collecting gene/sequence IDs of such Xrefs where the db starts with or equals given string, ignoring case. You can chain this method calls like seqDbStartsWithOrEquals(A).seqDbStartsWithOrEquals(B)... - it will try to match a xref.db and collect xref.id in the given order/priority.
      Parameters:
      dbStartsWithOrEquals - the Xref.db value or prefix (case-insensitive)
      Returns:
      this id-fetcher instance
    • getSeqDbStartsWithOrEquals

      public List<String> getSeqDbStartsWithOrEquals()
    • chemDbStartsWithOrEquals

      public ConfigurableIDFetcher chemDbStartsWithOrEquals(String dbStartsWithOrEquals)
      Set to prefer collecting chemical IDs of such Xrefs where the small molecules db starts with or equals given string, ignoring case. You can chain this method calls like chemDbStartsWithOrEquals(A).chemDbStartsWithOrEquals(B)... - it will try to match a xref.db and collect xref.id in the given order/priority.
      Parameters:
      dbStartsWithOrEquals - the Xref.db value or prefix (case-insensitive)
      Returns:
      this id-fetcher instance
    • getChemDbStartsWithOrEquals

      public List<String> getChemDbStartsWithOrEquals()
    • useNameWhenNoDbMatch

      public ConfigurableIDFetcher useNameWhenNoDbMatch(boolean useNameWhenNoDbMatch)
      Set the flag to use the entity reference's names when no desired ID type can be found (none of xref.db matched before, or there were no xrefs at all).
      Parameters:
      useNameWhenNoDbMatch - true/false (default is 'true' - when this method's never been called)
      Returns:
      this id-fetcher instance
    • fetchID

      public Set<String> fetchID(BioPAXElement ele)
      Specified by:
      fetchID in interface IDFetcher