Class Result
java.lang.Object
net.ygbstudio.jbrave.core.domain.dto.result.Result
- Direct Known Subclasses:
AbstractGraphInfobox,LocationResult,LocationWebResult,NewsResult,SearchResult,VideoResult
public sealed class Result
extends Object
permits AbstractGraphInfobox, LocationResult, LocationWebResult, NewsResult, SearchResult, VideoResult
Represents a generic result in search results. This class serves as a base for various types of
results in the Brave Search API.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe result description.protected final BooleanWhether the result is family friendly.protected final IntegerThe fetched content timestamp.protected final BooleanWhether the source is both.protected final BooleanWhether the source is local.protected final StringThe result language.protected final StringThe page age.protected final StringThe page fetched timestamp string.protected final ProfileThe profile.protected final StringThe result title.protected final StringThe result URL. -
Constructor Summary
ConstructorsConstructorDescriptionResult(@NotNull Result.Builder builder) Creates a new result from the given builder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the result description.Returns whether the result is family friendly.Returns the fetched content timestamp.Returns whether the source is both.Returns whether the source is local.language()Returns the result language.pageAge()Returns the page age.Returns the page fetched timestamp string.profile()Returns the profile.title()Returns the result title.url()Returns the result URL.
-
Field Details
-
title
The result title. -
url
The result URL. -
isSourceLocal
Whether the source is local. -
isSourceBoth
Whether the source is both. -
description
The result description. -
pageAge
The page age. -
pageFetched
The page fetched timestamp string. -
fetchedContentTimestamp
The fetched content timestamp. -
profile
The profile. -
language
The result language. -
familyFriendly
Whether the result is family friendly.
-
-
Constructor Details
-
Result
Creates a new result from the given builder.- Parameters:
builder- the builder carrying the result fields
-
-
Method Details
-
title
Returns the result title.- Returns:
- the title
-
url
Returns the result URL.- Returns:
- the URL
-
isSourceLocal
Returns whether the source is local.- Returns:
- whether the source is local
-
isSourceBoth
Returns whether the source is both.- Returns:
- whether the source is both
-
description
Returns the result description.- Returns:
- the description
-
pageAge
Returns the page age.- Returns:
- the page age
-
pageFetched
Returns the page fetched timestamp string.- Returns:
- the page fetched timestamp
-
fetchedContentTimestamp
Returns the fetched content timestamp.- Returns:
- the fetched content timestamp
-
profile
Returns the profile.- Returns:
- the profile
-
language
Returns the result language.- Returns:
- the language
-
familyFriendly
Returns whether the result is family friendly.- Returns:
- whether the result is family friendly
-