Record Class NoteModel

java.lang.Object
java.lang.Record
io.meeds.notes.mcp.model.NoteModel
Record Components:
noteId - the note id
title - the note title
summary - the note summary
htmlContent - the note's HTML content, or the part of it read
url - the note's absolute URL
createdDate - the date the note was created
updatedDate - the date the note, or the version read, was updated
hasChildNotes - whether the note has sub-notes
canEdit - whether the current user can edit the note
author - the note author
lastUpdater - the last user who updated the note, or the version's author
breadcrumb - the note's ancestors, from the notebook's home note
versionNumber - 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 note
offset - the character of the HTML content the part starts at, null when the whole content is returned
endOffset - the character after the part's last one, null when the whole content is returned
totalChars - the length of the whole HTML content, null when the whole content is returned
nextOffset - 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 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 a NoteModel record class.
      Parameters:
      noteId - the value for the noteId record component
      title - the value for the title record component
      summary - the value for the summary record component
      htmlContent - the value for the htmlContent record component
      url - the value for the url record component
      createdDate - the value for the createdDate record component
      updatedDate - the value for the updatedDate record component
      hasChildNotes - the value for the hasChildNotes record component
      canEdit - the value for the canEdit record component
      author - the value for the author record component
      lastUpdater - the value for the lastUpdater record component
      breadcrumb - the value for the breadcrumb record component
      versionNumber - the value for the versionNumber record component
      offset - the value for the offset record component
      endOffset - the value for the endOffset record component
      totalChars - the value for the totalChars record component
      nextOffset - the value for the nextOffset record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • noteId

      public long noteId()
      Returns the value of the noteId record component.
      Returns:
      the value of the noteId record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • summary

      public String summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • htmlContent

      public String htmlContent()
      Returns the value of the htmlContent record component.
      Returns:
      the value of the htmlContent record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • createdDate

      public String createdDate()
      Returns the value of the createdDate record component.
      Returns:
      the value of the createdDate record component
    • updatedDate

      public String updatedDate()
      Returns the value of the updatedDate record component.
      Returns:
      the value of the updatedDate record component
    • hasChildNotes

      public boolean hasChildNotes()
      Returns the value of the hasChildNotes record component.
      Returns:
      the value of the hasChildNotes record component
    • canEdit

      public boolean canEdit()
      Returns the value of the canEdit record component.
      Returns:
      the value of the canEdit record component
    • author

      public io.meeds.mcp.server.tool.model.UserModel author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • lastUpdater

      public io.meeds.mcp.server.tool.model.UserModel lastUpdater()
      Returns the value of the lastUpdater record component.
      Returns:
      the value of the lastUpdater record component
    • versionNumber

      public Long versionNumber()
      Returns the value of the versionNumber record component.
      Returns:
      the value of the versionNumber record component
    • offset

      public Integer offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • endOffset

      public Integer endOffset()
      Returns the value of the endOffset record component.
      Returns:
      the value of the endOffset record component
    • totalChars

      public Integer totalChars()
      Returns the value of the totalChars record component.
      Returns:
      the value of the totalChars record component
    • nextOffset

      public Integer nextOffset()
      Returns the value of the nextOffset record component.
      Returns:
      the value of the nextOffset record component