Working with view entries and navigators

For navigation and access, a view or folder supports view entries, view entry collections, and view navigators.

View entries

A ViewEntry object represents a row in a view and can be of type category, document, or total. The following methods access a ViewEntry object:

  • getChildCount
  • getColumnIndentLevel
  • getColumnValues
  • getDescendantCount
  • getDocument
  • getFTSearchScore
  • getIndentLevel
  • getPosition
  • isCategory
  • isConflict
  • isDocument
  • isTotal
  • isValid
  • getNoteID
  • getParent
  • getSiblingCount
  • getUniversalID

The ViewNavigator methods (discussed later) return ViewEntry objects, as does getEntryByKey in View.

View entry collections

A ViewEntryCollection object represents zero or more ViewEntry objects of type document (excluding entries of type category and total).

  • getCount returns the number of entries in the view entry collection; getParent returns the parent View object; getQuery returns the search query if the collection is filtered or is the result of a search.
  • FTSearch filters the collection so that only those entries that meet the requirements of a search query remain.
  • getEntry, getNthEntry, getFirstEntry, getNextEntry, getLastEntry, and getPrevEntry return ViewEntry objects from the collection.

  • addEntry adds an entry to the collection and deleteEntry deletes an entry from the collection.
  • removeAll removes all the underlying documents of a view entry collection from the database; stampAll writes to an item in all the documents; putAllInFolder puts all the documents in a folder; removeAllFromFolder removes all the documents from a folder; updateAll marks all documents of a view entry collection as processed by an agent.

The methods getAllEntries and getAllEntriesByKey in View return ViewEntryCollection objects.

View navigators

A ViewNavigator object provides goto methods to position you at a view entry and get methods to both position you at a view entry and return it.

  • gotoFirst, getFirst, gotoNext, getNext, gotoLast, getLast, gotoPrev, and getPrev navigate sequentially.
  • gotoFirstDocument, getFirstDocument, gotoNextCategory, getNextCategory, gotoNextDocument, getNextDocument, gotoLastDocument, getLastDocument, gotoPrevCategory, getPrevCategory, gotoPrevDocument, and getPrevDocument navigate sequentially by type of entry.
  • gotoEntry, getCurrent, getNth, gotoPos, and getPos navigate to a specified entry.
  • gotoNextSibling, getNextSibling, gotoPrevSibling, getPrevSibling, gotoChild, getChild, gotoParent, and getParent navigate through the parent-child hierarchy.

  • getCount specifies the number of entries represented by the navigator; getMaxLevel and setMaxLevel specify the maximum level of navigation 0-30 (30 by default); getCacheSize and setCacheSize specify the cache for remote operations only; getParentView gets the parent View object.

The following View methods create ViewNavigator objects. A navigator is based on the view calling the method.

  • createViewNav creates a view navigator for all the entries in a view.
  • createViewNavFrom creates a view navigator for all the entries in a view starting at a specified entry.
  • createViewNavFromCategory creates a view navigator for all the entries in a view under a specified category.
  • createViewNavFromChildren creates a view navigator for the immediate children of a specified entry.
  • createViewNavFromDescendants creates a view navigator for all the descendants of a specified entry.
  • createViewNavMaxLevel creates a view navigator for all entries in a view down to a specified level.