Interface ReactionSearchDataSource


  • public interface ReactionSearchDataSource
    • Field Detail

    • Method Detail

      • isSupportedSearchType

        boolean isSupportedSearchType​(ReactionSearchSpecification specification)
        Returns true if idcodes and/or hash codes for this particular search specification are directly available by the source, i.e. without calculating idcodes, descriptors or hash codes on-the-fly. In case of search types other than substructure search the implementation needs to check specification.isLargestFragmentOnly(). In case of similarity searches the implementation needs to consider specification.getDescriptorShortName().
        Parameters:
        specification -
        Returns:
      • getRowCount

        int getRowCount()
        This is the total number of records, whether they qualify for a structure search or not.
        Returns:
      • getReactionDescriptor

        long[] getReactionDescriptor​(int row)
        Parameters:
        row -
        Returns:
        null if this row has no reaction descriptor
      • getReactantDescriptor

        long[] getReactantDescriptor​(int row)
        Parameters:
        row -
        Returns:
        null if this row has no reactant descriptor
      • getProductDescriptor

        long[] getProductDescriptor​(int row)
        Parameters:
        row -
        Returns:
        null if this row has no product descriptor
      • getReactionCode

        byte[] getReactionCode​(int row)
        Returns the reaction idcode. If the code is not available, null is returned. This method is not supposed to calculate idcodes on-the-fly.
        Parameters:
        row -
        Returns:
        idcode of this row or null, if no reaction is associated to this row
      • getCoordinates

        byte[] getCoordinates​(int row)
        Returns the encoded reaction coordinates.
        Parameters:
        row -
        Returns:
        coords of this row or null, if no reaction is associated to this row
      • getMapping

        byte[] getMapping​(int row)
        Returns the encoded reaction mapping.
        Parameters:
        row -
        Returns:
        mapping of this row or null, if no reaction is associated to this row
      • getExactHash

        long getExactHash​(int row)
        Returns a hash code representing the exact reaction. If this code is not available, SEARCH_TYPE_NOT_SUPPORTED is returned. This method is not supposed to calculate the code on-the-fly.
        Parameters:
        row -
        Returns:
      • getNoStereoHash

        long getNoStereoHash​(int row)
        Returns a hash code representing the reaction without any stereo information. If this code is not available, SEARCH_TYPE_NOT_SUPPORTED is returned. This method is not supposed to calculate the code on-the-fly.
        Parameters:
        row -
        Returns: