Class QueryBuilder

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

@Service public class QueryBuilder extends Object
The entry point to create MotifSearchQuery instances.
  • Constructor Details

    • QueryBuilder

      @Autowired public QueryBuilder(StructureDataProvider structureDataProvider, KruskalMotifPruner kruskalMotifPruner, NoOperationMotifPruner noOperationMotifPruner, MotifSearchRuntime motifSearchRuntime, MotifSearchConfig motifSearchConfig)
      Construct a new query builder.
      Parameters:
      structureDataProvider - injectable structure provider
      kruskalMotifPruner - injectable motif pruner
      noOperationMotifPruner - injectable nop motif pruner
      motifSearchRuntime - injectable runtime
      motifSearchConfig - injectable config
  • Method Details

    • defineByPdbIdAndSelection

      public QueryBuilder.MandatoryBuilder defineByPdbIdAndSelection(String structureIdentifier, List<LabelSelection> selection)
      Define a motif based on the id of the reference structure and a selection of components.
      Parameters:
      structureIdentifier - the id to acquire
      selection - which components to select to define the motif
      Returns:
      mandatory parameter step
      Throws:
      IllegalQueryDefinitionException - if chains/residues aren't found or if distance constraints are violated
    • defineByFileAndSelection

      public QueryBuilder.MandatoryBuilder defineByFileAndSelection(InputStream inputStream, List<LabelSelection> selection)
      Define a motif based on a stream of structure data and a selection of components.
      Parameters:
      inputStream - the data to read
      selection - which components to select to define the motif
      Returns:
      mandatory parameter step
      Throws:
      IllegalQueryDefinitionException - if chains/residues aren't found or if distance constraints are violated
    • defineByStructureAndSelection

      public QueryBuilder.MandatoryBuilder defineByStructureAndSelection(Structure structure, List<LabelSelection> labelSelections)
      Routine if structure files contains extracted motif. Checks that the structure contains a reasonable number of components to rule out erroneous arguments.
      Parameters:
      structure - the file to ready - all components are considered the motif
      labelSelections - the residues of interest
      Returns:
      mandatory parameter step
      Throws:
      IllegalQueryDefinitionException - if chains/residues aren't found or if distance constraints are violated
    • defineByFile

      public QueryBuilder.MandatoryBuilder defineByFile(InputStream inputStream)
      Routine if stream of structure data contains extracted motif.
      Parameters:
      inputStream - the data to ready - all components are considered the motif
      Returns:
      mandatory parameter step