Record Class NoteModel
java.lang.Object
java.lang.Record
io.meeds.notes.mcp.model.NoteModel
- Record Components:
noteId- the note idtitle- the note titlesummary- the note summaryhtmlContent- the note's HTML content, or the part of it readurl- the note's absolute URLcreatedDate- the date the note was createdupdatedDate- the date the note, or the version read, was updatedhasChildNotes- whether the note has sub-notescanEdit- whether the current user can edit the note- the note authorlastUpdater- the last user who updated the note, or the version's author- the note's ancestors, from the notebook's home noteversionNumber- the number of the version read; on a part of the current note, the published version it was cut from; null for the whole current noteoffset- the character of the HTML content the part starts at, null when the whole content is returnedendOffset- the character after the part's last one, null when the whole content is returnedtotalChars- the length of the whole HTML content, null when the whole content is returnednextOffset- where the next part starts, null when this part ends the content or the whole content is returned
public record NoteModel(long noteId, String title, String summary, String htmlContent, String url, String createdDate, String updatedDate, boolean hasChildNotes, boolean canEdit, io.meeds.mcp.server.tool.model.UserModel author, io.meeds.mcp.server.tool.model.UserModel lastUpdater, List<NoteBreadcrumbModel> breadcrumb, Long versionNumber, Integer offset, Integer endOffset, Integer totalChars, Integer nextOffset)
extends Record
A note, as
get_note and the note writes return it. A part of a long
note carries the part's bounds in its HTML content; a version of the note
carries the version's number.-
Constructor Summary
ConstructorsConstructorDescriptionNoteModel(long noteId, String title, String summary, String htmlContent, String url, String createdDate, String updatedDate, boolean hasChildNotes, boolean canEdit, io.meeds.mcp.server.tool.model.UserModel author, io.meeds.mcp.server.tool.model.UserModel lastUpdater, List<NoteBreadcrumbModel> breadcrumb, Long versionNumber, Integer offset, Integer endOffset, Integer totalChars, Integer nextOffset) Creates an instance of aNoteModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.meeds.mcp.server.tool.model.UserModelauthor()Returns the value of theauthorrecord component.Returns the value of thebreadcrumbrecord component.booleancanEdit()Returns the value of thecanEditrecord component.Returns the value of thecreatedDaterecord component.Returns the value of theendOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasChildNotesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehtmlContentrecord component.io.meeds.mcp.server.tool.model.UserModelReturns the value of thelastUpdaterrecord component.Returns the value of thenextOffsetrecord component.longnoteId()Returns the value of thenoteIdrecord component.offset()Returns the value of theoffsetrecord component.summary()Returns the value of thesummaryrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalCharsrecord component.Returns the value of theupdatedDaterecord component.url()Returns the value of theurlrecord component.Returns the value of theversionNumberrecord component.
-
Constructor Details
-
NoteModel
public NoteModel(long noteId, String title, String summary, String htmlContent, String url, String createdDate, String updatedDate, boolean hasChildNotes, boolean canEdit, io.meeds.mcp.server.tool.model.UserModel author, io.meeds.mcp.server.tool.model.UserModel lastUpdater, List<NoteBreadcrumbModel> breadcrumb, Long versionNumber, Integer offset, Integer endOffset, Integer totalChars, Integer nextOffset) Creates an instance of aNoteModelrecord class.- Parameters:
noteId- the value for thenoteIdrecord componenttitle- the value for thetitlerecord componentsummary- the value for thesummaryrecord componenthtmlContent- the value for thehtmlContentrecord componenturl- the value for theurlrecord componentcreatedDate- the value for thecreatedDaterecord componentupdatedDate- the value for theupdatedDaterecord componenthasChildNotes- the value for thehasChildNotesrecord componentcanEdit- the value for thecanEditrecord componentauthor- the value for theauthorrecord componentlastUpdater- the value for thelastUpdaterrecord componentbreadcrumb- the value for thebreadcrumbrecord componentversionNumber- the value for theversionNumberrecord componentoffset- the value for theoffsetrecord componentendOffset- the value for theendOffsetrecord componenttotalChars- the value for thetotalCharsrecord componentnextOffset- the value for thenextOffsetrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
noteId
-
title
-
summary
-
htmlContent
Returns the value of thehtmlContentrecord component.- Returns:
- the value of the
htmlContentrecord component
-
url
-
createdDate
Returns the value of thecreatedDaterecord component.- Returns:
- the value of the
createdDaterecord component
-
updatedDate
Returns the value of theupdatedDaterecord component.- Returns:
- the value of the
updatedDaterecord component
-
hasChildNotes
public boolean hasChildNotes()Returns the value of thehasChildNotesrecord component.- Returns:
- the value of the
hasChildNotesrecord component
-
canEdit
-
author
-
lastUpdater
public io.meeds.mcp.server.tool.model.UserModel lastUpdater()Returns the value of thelastUpdaterrecord component.- Returns:
- the value of the
lastUpdaterrecord component
-
breadcrumb
Returns the value of thebreadcrumbrecord component.- Returns:
- the value of the
breadcrumbrecord component
-
versionNumber
Returns the value of theversionNumberrecord component.- Returns:
- the value of the
versionNumberrecord component
-
offset
-
endOffset
-
totalChars
Returns the value of thetotalCharsrecord component.- Returns:
- the value of the
totalCharsrecord component
-
nextOffset
Returns the value of thenextOffsetrecord component.- Returns:
- the value of the
nextOffsetrecord component
-