Class SearchResult

java.lang.Object
net.ygbstudio.jbrave.core.domain.dto.result.Result
net.ygbstudio.jbrave.core.domain.dto.result.SearchResult
Direct Known Subclasses:
DiscussionResult

public sealed class SearchResult extends Result permits DiscussionResult
Represents a search result in search results. This class provides structured information about search results in the Brave Search API results.
  • Field Details

    • type

      protected final String type
      The result type.
    • subtype

      protected final String subtype
      The result subtype.
    • isLive

      protected final Boolean isLive
      Whether the result is a live stream.
    • deepResults

      protected final DeepResult deepResults
      Deep results associated with this result.
    • schemas

      protected final List<List<String>> schemas
      The schema definitions for this result.
    • metaUrl

      protected final MetaUrl metaUrl
      The meta URL information for this result.
    • thumbnail

      protected final Thumbnail thumbnail
      The thumbnail for this result.
    • age

      protected final String age
      The age of the result content.
    • location

      protected final LocationResult location
      The location associated with this result.
    • video

      protected final VideoData video
      The video data for this result.
    • movie

      protected final MovieData movie
      The movie data for this result.
    • faq

      protected final FAQ faq
      The FAQ data for this result.
    • qa

      protected final QAPage qa
      The Q&A page data for this result.
    • book

      protected final Book book
      The book data for this result.
    • rating

      protected final Rating rating
      The rating for this result.
    • article

      protected final Article article
      The article data for this result.
    • product

      protected final ProductPair product
      The primary product for this result.
    • productCluster

      protected final List<ProductPair> productCluster
      The cluster of related products.
    • clusterType

      protected final String clusterType
      The type of cluster this result belongs to.
    • cluster

      protected final List<Result> cluster
      The cluster of results this result belongs to.
    • creativeWork

      protected final CreativeWork creativeWork
      The creative work data for this result.
    • musicRecording

      protected final MusicRecording musicRecording
      The music recording data for this result.
    • review

      protected final Review review
      The review data for this result.
    • software

      protected final Software software
      The software data for this result.
    • recipe

      protected final Recipe recipe
      The recipe data for this result.
    • organization

      protected final Organization organization
      The organization data for this result.
    • contentType

      protected final String contentType
      The content type of this result.
    • extraSnippets

      protected final List<String> extraSnippets
      Extra snippets for this result.
  • Constructor Details

    • SearchResult

      public SearchResult(@NotNull @NotNull SearchResult.Builder builder)
      Creates a new search result from the given builder.
      Parameters:
      builder - the builder carrying the result fields
  • Method Details

    • type

      public String type()
      Returns the result type.
      Returns:
      the result type
    • subtype

      public String subtype()
      Returns the result subtype.
      Returns:
      the result subtype
    • isLive

      public Boolean isLive()
      Returns whether the result is a live stream.
      Returns:
      whether the result is live
    • deepResults

      public DeepResult deepResults()
      Returns the deep results.
      Returns:
      the deep results
    • schemas

      public List<List<String>> schemas()
      Returns the schema definitions.
      Returns:
      the schemas
    • metaUrl

      public MetaUrl metaUrl()
      Returns the meta URL.
      Returns:
      the meta URL
    • thumbnail

      public Thumbnail thumbnail()
      Returns the thumbnail.
      Returns:
      the thumbnail
    • age

      public String age()
      Returns the age of the result.
      Returns:
      the age
    • location

      public LocationResult location()
      Returns the location.
      Returns:
      the location
    • video

      public VideoData video()
      Returns the video data.
      Returns:
      the video data
    • movie

      public MovieData movie()
      Returns the movie data.
      Returns:
      the movie data
    • faq

      public FAQ faq()
      Returns the FAQ data.
      Returns:
      the FAQ data
    • qa

      public QAPage qa()
      Returns the Q&A page data.
      Returns:
      the Q&A page data
    • book

      public Book book()
      Returns the book data.
      Returns:
      the book data
    • rating

      public Rating rating()
      Returns the rating.
      Returns:
      the rating
    • article

      public Article article()
      Returns the article data.
      Returns:
      the article data
    • product

      public ProductPair product()
      Returns the primary product.
      Returns:
      the product
    • productCluster

      public List<ProductPair> productCluster()
      Returns the product cluster.
      Returns:
      the product cluster
    • clusterType

      public String clusterType()
      Returns the cluster type.
      Returns:
      the cluster type
    • cluster

      public List<Result> cluster()
      Returns the result cluster.
      Returns:
      the cluster
    • creativeWork

      public CreativeWork creativeWork()
      Returns the creative work data.
      Returns:
      the creative work data
    • musicRecording

      public MusicRecording musicRecording()
      Returns the music recording data.
      Returns:
      the music recording data
    • review

      public Review review()
      Returns the review data.
      Returns:
      the review data
    • software

      public Software software()
      Returns the software data.
      Returns:
      the software data
    • recipe

      public Recipe recipe()
      Returns the recipe data.
      Returns:
      the recipe data
    • organization

      public Organization organization()
      Returns the organization data.
      Returns:
      the organization data
    • contentType

      public String contentType()
      Returns the content type.
      Returns:
      the content type
    • extraSnippets

      public List<String> extraSnippets()
      Returns the extra snippets.
      Returns:
      the extra snippets
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object