Record Class Metadata
java.lang.Object
java.lang.Record
org.jweaver.crawler.internal.result.Metadata
- Record Components:
source- the uri of the documentdepth- the crawling depthretrievedOn- timestamp of retrieval datetimecharacters- a count of document characters
The Metadata record represents metadata associated with a web page. It includes information such
as the source of the page, its depth in the crawling hierarchy, the timestamp when it was
retrieved, and the number of characters in the content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecharactersrecord component.intdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theretrievedOnrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Metadata
Creates an instance of aMetadatarecord class.- Parameters:
source- the value for thesourcerecord componentdepth- the value for thedepthrecord componentretrievedOn- the value for theretrievedOnrecord componentcharacters- the value for thecharactersrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
retrievedOn
Returns the value of theretrievedOnrecord component.- Returns:
- the value of the
retrievedOnrecord component
-
characters
public int characters()Returns the value of thecharactersrecord component.- Returns:
- the value of the
charactersrecord component
-