Class MotifSearchQuery

java.lang.Object
org.rcsb.strucmotif.domain.query.MotifSearchQuery

public class MotifSearchQuery extends Object
The immutable container for a structural motif query.
  • Method Details

    • getQueryStructure

      public QueryStructure getQueryStructure()
      The structure used to define this query/motif.
      Returns:
      a dedicated implementation wrapping a structure instance
    • getParameters

      public Parameters getParameters()
      All parameters defined for this search task.
      Returns:
      a parameter instance
    • getExchanges

      public Map<LabelSelection,Set<ResidueType>> getExchanges()
      All specified exchanges.
      Returns:
      a map (key: label selector, value: all allowed component types)
    • getWhitelist

      public Collection<String> getWhitelist()
      Returns the specified search space - no restrictions apply if empty.
      Returns:
      a collection of the search space
    • getBlacklist

      public Collection<String> getBlacklist()
      Returns disallowed entries of the search space.
      Returns:
      a collection of entries that will be ignored
    • run

      public MotifSearchResult run()
      Dispatch this query and perform the corresponding search.
      Returns:
      the result container
    • runAndConsume

      public void runAndConsume(Consumer<Hit> hitConsumer)
      Dispatch this query and consume each accepted hit on-the-fly. This doesn't keep hits in memory.
      Parameters:
      hitConsumer - terminal operation to perform on accepted hits
    • runAndWriteToPath

      public void runAndWriteToPath(Path path)
      Dispatch this query and write each accepted hit to a file. Overwrites existing files, doesn't keep hits in memory.
      Parameters:
      path - destination