com.evernote.edam.type
Class Note

java.lang.Object
  extended by com.evernote.edam.type.Note
All Implemented Interfaces:
com.evernote.thrift.TBase<Note>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Note>

public class Note
extends java.lang.Object
implements com.evernote.thrift.TBase<Note>, java.io.Serializable, java.lang.Cloneable

Represents a single note in the user's account.

guid
The unique identifier of this note. Will be set by the server, but will be omitted by clients calling NoteStore.createNote()
Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
Regex: EDAM_GUID_REGEX
title
The subject of the note. Can't begin or end with a space.
Length: EDAM_NOTE_TITLE_LEN_MIN - EDAM_NOTE_TITLE_LEN_MAX
Regex: EDAM_NOTE_TITLE_REGEX
content
The XHTML block that makes up the note. This is the canonical form of the note's contents, so will include abstract Evernote tags for internal resource references. A client may create a separate transformed version of this content for internal presentation, but the same canonical bytes should be used for transmission and comparison unless the user chooses to modify their content.
Length: EDAM_NOTE_CONTENT_LEN_MIN - EDAM_NOTE_CONTENT_LEN_MAX
contentHash
The binary MD5 checksum of the UTF-8 encoded content body. This will always be set by the server, but clients may choose to omit this when they submit a note with content.
Length: EDAM_HASH_LEN (exactly)
contentLength
The number of Unicode characters in the content of the note. This will always be set by the service, but clients may choose to omit this value when they submit a Note.
created
The date and time when the note was created in one of the clients. In most cases, this will match the user's sense of when the note was created, and ordering between notes will be based on ordering of this field. However, this is not a "reliable" timestamp if a client has an incorrect clock, so it cannot provide a true absolute ordering between notes. Notes created directly through the service (e.g. via the web GUI) will have an absolutely ordered "created" value.
updated
The date and time when the note was last modified in one of the clients. In most cases, this will match the user's sense of when the note was modified, but this field may not be absolutely reliable due to the possibility of client clock errors.
deleted
If present, the note is considered "deleted", and this stores the date and time when the note was deleted by one of the clients. In most cases, this will match the user's sense of when the note was deleted, but this field may be unreliable due to the possibility of client clock errors.
active
If the note is available for normal actions and viewing, this flag will be set to true.
updateSequenceNum
A number identifying the last transaction to modify the state of this note (including changes to the note's attributes or resources). The USN values are sequential within an account, and can be used to compare the order of modifications within the service.
notebookGuid
The unique identifier of the notebook that contains this note. If no notebookGuid is provided on a call to createNote(), the default notebook will be used instead.
Length: EDAM_GUID_LEN_MIN - EDAM_GUID_LEN_MAX
Regex: EDAM_GUID_REGEX
tagGuids
A list of the GUID identifiers for tags that are applied to this note. This may be provided in a call to createNote() to unambiguously declare the tags that should be assigned to the new note. Alternately, clients may pass the names of desired tags via the 'tagNames' field during note creation. If the list of tags are omitted on a call to createNote(), then the server will assume that no changes have been made to the resources. Maximum: EDAM_NOTE_TAGS_MAX tags per note
resources
The list of resources that are embedded within this note. If the list of resources are omitted on a call to updateNote(), then the server will assume that no changes have been made to the resources. The binary contents of the resources must be provided when the resource is first sent to the service, but it will be omitted by the service when the Note is returned in the future. Maximum: EDAM_NOTE_RESOURCES_MAX resources per note
attributes
A list of the attributes for this note. If the list of attributes are omitted on a call to updateNote(), then the server will assume that no changes have been made to the resources.
tagNames
May be provided by clients during calls to createNote() as an alternative to providing the tagGuids of existing tags. If any tagNames are provided during createNote(), these will be found, or created if they don't already exist. Created tags will have no parent (they will be at the top level of the tag panel).

See Also:
Serialized Form

Constructor Summary
Note()
           
Note(Note other)
          Performs a deep copy on other.
 
Method Summary
 void addToResources(Resource elem)
           
 void addToTagGuids(java.lang.String elem)
           
 void addToTagNames(java.lang.String elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(Note other)
           
 Note deepCopy()
          Creates a deep copy of the object.
 boolean equals(Note that)
           
 boolean equals(java.lang.Object that)
           
 NoteAttributes getAttributes()
           
 java.lang.String getContent()
           
 byte[] getContentHash()
           
 int getContentLength()
           
 long getCreated()
           
 long getDeleted()
           
 java.lang.String getGuid()
           
 java.lang.String getNotebookGuid()
           
 java.util.List<Resource> getResources()
           
 java.util.Iterator<Resource> getResourcesIterator()
           
 int getResourcesSize()
           
 java.util.List<java.lang.String> getTagGuids()
           
 java.util.Iterator<java.lang.String> getTagGuidsIterator()
           
 int getTagGuidsSize()
           
 java.util.List<java.lang.String> getTagNames()
           
 java.util.Iterator<java.lang.String> getTagNamesIterator()
           
 int getTagNamesSize()
           
 java.lang.String getTitle()
           
 long getUpdated()
           
 int getUpdateSequenceNum()
           
 int hashCode()
           
 boolean isActive()
           
 boolean isSetActive()
          Returns true if field active is set (has been asigned a value) and false otherwise
 boolean isSetAttributes()
          Returns true if field attributes is set (has been asigned a value) and false otherwise
 boolean isSetContent()
          Returns true if field content is set (has been asigned a value) and false otherwise
 boolean isSetContentHash()
          Returns true if field contentHash is set (has been asigned a value) and false otherwise
 boolean isSetContentLength()
          Returns true if field contentLength is set (has been asigned a value) and false otherwise
 boolean isSetCreated()
          Returns true if field created is set (has been asigned a value) and false otherwise
 boolean isSetDeleted()
          Returns true if field deleted is set (has been asigned a value) and false otherwise
 boolean isSetGuid()
          Returns true if field guid is set (has been asigned a value) and false otherwise
 boolean isSetNotebookGuid()
          Returns true if field notebookGuid is set (has been asigned a value) and false otherwise
 boolean isSetResources()
          Returns true if field resources is set (has been asigned a value) and false otherwise
 boolean isSetTagGuids()
          Returns true if field tagGuids is set (has been asigned a value) and false otherwise
 boolean isSetTagNames()
          Returns true if field tagNames is set (has been asigned a value) and false otherwise
 boolean isSetTitle()
          Returns true if field title is set (has been asigned a value) and false otherwise
 boolean isSetUpdated()
          Returns true if field updated is set (has been asigned a value) and false otherwise
 boolean isSetUpdateSequenceNum()
          Returns true if field updateSequenceNum is set (has been asigned a value) and false otherwise
 void read(com.evernote.thrift.protocol.TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setActive(boolean active)
           
 void setActiveIsSet(boolean value)
           
 void setAttributes(NoteAttributes attributes)
           
 void setAttributesIsSet(boolean value)
           
 void setContent(java.lang.String content)
           
 void setContentHash(byte[] contentHash)
           
 void setContentHashIsSet(boolean value)
           
 void setContentIsSet(boolean value)
           
 void setContentLength(int contentLength)
           
 void setContentLengthIsSet(boolean value)
           
 void setCreated(long created)
           
 void setCreatedIsSet(boolean value)
           
 void setDeleted(long deleted)
           
 void setDeletedIsSet(boolean value)
           
 void setGuid(java.lang.String guid)
           
 void setGuidIsSet(boolean value)
           
 void setNotebookGuid(java.lang.String notebookGuid)
           
 void setNotebookGuidIsSet(boolean value)
           
 void setResources(java.util.List<Resource> resources)
           
 void setResourcesIsSet(boolean value)
           
 void setTagGuids(java.util.List<java.lang.String> tagGuids)
           
 void setTagGuidsIsSet(boolean value)
           
 void setTagNames(java.util.List<java.lang.String> tagNames)
           
 void setTagNamesIsSet(boolean value)
           
 void setTitle(java.lang.String title)
           
 void setTitleIsSet(boolean value)
           
 void setUpdated(long updated)
           
 void setUpdatedIsSet(boolean value)
           
 void setUpdateSequenceNum(int updateSequenceNum)
           
 void setUpdateSequenceNumIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetActive()
           
 void unsetAttributes()
           
 void unsetContent()
           
 void unsetContentHash()
           
 void unsetContentLength()
           
 void unsetCreated()
           
 void unsetDeleted()
           
 void unsetGuid()
           
 void unsetNotebookGuid()
           
 void unsetResources()
           
 void unsetTagGuids()
           
 void unsetTagNames()
           
 void unsetTitle()
           
 void unsetUpdated()
           
 void unsetUpdateSequenceNum()
           
 void validate()
           
 void write(com.evernote.thrift.protocol.TProtocol oprot)
          Writes the object to the given protocol.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Note

public Note()

Note

public Note(Note other)
Performs a deep copy on other.

Method Detail

deepCopy

public Note deepCopy()
Description copied from interface: com.evernote.thrift.TBase
Creates a deep copy of the object.

Specified by:
deepCopy in interface com.evernote.thrift.TBase<Note>

clear

public void clear()
Description copied from interface: com.evernote.thrift.TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface com.evernote.thrift.TBase<Note>

getGuid

public java.lang.String getGuid()

setGuid

public void setGuid(java.lang.String guid)

unsetGuid

public void unsetGuid()

isSetGuid

public boolean isSetGuid()
Returns true if field guid is set (has been asigned a value) and false otherwise


setGuidIsSet

public void setGuidIsSet(boolean value)

getTitle

public java.lang.String getTitle()

setTitle

public void setTitle(java.lang.String title)

unsetTitle

public void unsetTitle()

isSetTitle

public boolean isSetTitle()
Returns true if field title is set (has been asigned a value) and false otherwise


setTitleIsSet

public void setTitleIsSet(boolean value)

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

unsetContent

public void unsetContent()

isSetContent

public boolean isSetContent()
Returns true if field content is set (has been asigned a value) and false otherwise


setContentIsSet

public void setContentIsSet(boolean value)

getContentHash

public byte[] getContentHash()

setContentHash

public void setContentHash(byte[] contentHash)

unsetContentHash

public void unsetContentHash()

isSetContentHash

public boolean isSetContentHash()
Returns true if field contentHash is set (has been asigned a value) and false otherwise


setContentHashIsSet

public void setContentHashIsSet(boolean value)

getContentLength

public int getContentLength()

setContentLength

public void setContentLength(int contentLength)

unsetContentLength

public void unsetContentLength()

isSetContentLength

public boolean isSetContentLength()
Returns true if field contentLength is set (has been asigned a value) and false otherwise


setContentLengthIsSet

public void setContentLengthIsSet(boolean value)

getCreated

public long getCreated()

setCreated

public void setCreated(long created)

unsetCreated

public void unsetCreated()

isSetCreated

public boolean isSetCreated()
Returns true if field created is set (has been asigned a value) and false otherwise


setCreatedIsSet

public void setCreatedIsSet(boolean value)

getUpdated

public long getUpdated()

setUpdated

public void setUpdated(long updated)

unsetUpdated

public void unsetUpdated()

isSetUpdated

public boolean isSetUpdated()
Returns true if field updated is set (has been asigned a value) and false otherwise


setUpdatedIsSet

public void setUpdatedIsSet(boolean value)

getDeleted

public long getDeleted()

setDeleted

public void setDeleted(long deleted)

unsetDeleted

public void unsetDeleted()

isSetDeleted

public boolean isSetDeleted()
Returns true if field deleted is set (has been asigned a value) and false otherwise


setDeletedIsSet

public void setDeletedIsSet(boolean value)

isActive

public boolean isActive()

setActive

public void setActive(boolean active)

unsetActive

public void unsetActive()

isSetActive

public boolean isSetActive()
Returns true if field active is set (has been asigned a value) and false otherwise


setActiveIsSet

public void setActiveIsSet(boolean value)

getUpdateSequenceNum

public int getUpdateSequenceNum()

setUpdateSequenceNum

public void setUpdateSequenceNum(int updateSequenceNum)

unsetUpdateSequenceNum

public void unsetUpdateSequenceNum()

isSetUpdateSequenceNum

public boolean isSetUpdateSequenceNum()
Returns true if field updateSequenceNum is set (has been asigned a value) and false otherwise


setUpdateSequenceNumIsSet

public void setUpdateSequenceNumIsSet(boolean value)

getNotebookGuid

public java.lang.String getNotebookGuid()

setNotebookGuid

public void setNotebookGuid(java.lang.String notebookGuid)

unsetNotebookGuid

public void unsetNotebookGuid()

isSetNotebookGuid

public boolean isSetNotebookGuid()
Returns true if field notebookGuid is set (has been asigned a value) and false otherwise


setNotebookGuidIsSet

public void setNotebookGuidIsSet(boolean value)

getTagGuidsSize

public int getTagGuidsSize()

getTagGuidsIterator

public java.util.Iterator<java.lang.String> getTagGuidsIterator()

addToTagGuids

public void addToTagGuids(java.lang.String elem)

getTagGuids

public java.util.List<java.lang.String> getTagGuids()

setTagGuids

public void setTagGuids(java.util.List<java.lang.String> tagGuids)

unsetTagGuids

public void unsetTagGuids()

isSetTagGuids

public boolean isSetTagGuids()
Returns true if field tagGuids is set (has been asigned a value) and false otherwise


setTagGuidsIsSet

public void setTagGuidsIsSet(boolean value)

getResourcesSize

public int getResourcesSize()

getResourcesIterator

public java.util.Iterator<Resource> getResourcesIterator()

addToResources

public void addToResources(Resource elem)

getResources

public java.util.List<Resource> getResources()

setResources

public void setResources(java.util.List<Resource> resources)

unsetResources

public void unsetResources()

isSetResources

public boolean isSetResources()
Returns true if field resources is set (has been asigned a value) and false otherwise


setResourcesIsSet

public void setResourcesIsSet(boolean value)

getAttributes

public NoteAttributes getAttributes()

setAttributes

public void setAttributes(NoteAttributes attributes)

unsetAttributes

public void unsetAttributes()

isSetAttributes

public boolean isSetAttributes()
Returns true if field attributes is set (has been asigned a value) and false otherwise


setAttributesIsSet

public void setAttributesIsSet(boolean value)

getTagNamesSize

public int getTagNamesSize()

getTagNamesIterator

public java.util.Iterator<java.lang.String> getTagNamesIterator()

addToTagNames

public void addToTagNames(java.lang.String elem)

getTagNames

public java.util.List<java.lang.String> getTagNames()

setTagNames

public void setTagNames(java.util.List<java.lang.String> tagNames)

unsetTagNames

public void unsetTagNames()

isSetTagNames

public boolean isSetTagNames()
Returns true if field tagNames is set (has been asigned a value) and false otherwise


setTagNamesIsSet

public void setTagNamesIsSet(boolean value)

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Note that)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(Note other)
Specified by:
compareTo in interface java.lang.Comparable<Note>

read

public void read(com.evernote.thrift.protocol.TProtocol iprot)
          throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Reads an instance of the object from the given protocol.

Specified by:
read in interface com.evernote.thrift.TBase<Note>
Parameters:
iprot - Input protocol
Throws:
com.evernote.thrift.TException

write

public void write(com.evernote.thrift.protocol.TProtocol oprot)
           throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Writes the object to the given protocol.

Specified by:
write in interface com.evernote.thrift.TBase<Note>
Parameters:
oprot - Output protocol
Throws:
com.evernote.thrift.TException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws com.evernote.thrift.TException
Throws:
com.evernote.thrift.TException