AVEVA OMI Software Developer Kit
Using the Navigation SDK

NavigationModel

This class is exposed to retrieve the underlying ViewApp Navigation Model, and encapsulates your navigation hierarchy, either built from scratch or using the Asset Model as input. This hierarchy holds navigation items for use in run time. These navigation items are primary consumed by Navigation-aware controls.

NavigationModel
Copy Code
   public abstract class NavigationModel
   {
   /// <summary>
   /// Gets the default NavigationModel of the ViewApp
   /// </summary>
   public static NavigationModel ViewAppNavigationModel { get; }

   /// <summary>
   /// Gets the root item of the model
   /// </summary>
   public abstract NavigationItem RootItem { get; }

   /// <summary>
   /// Gets the collection of navigation items.
   /// </summary>
   /// <returns> Returns an observable collection of immediate child navigation items
   /// </returns>
   public abstract ReadOnlyObservableNavigationItemCollection Items { get; }

   /// <summary>
   /// Gets the item for the given navigation item path
   /// </summary>
   /// <param name="navigationItemFullPath"> Full path or URI of a particular hierarchy item
   /// </param>
   /// <returns> Navigation item
   /// </returns>
   public abstract NavigationItem GetItemBypath(string navigationItemFullPath);

   /// <summary>
   /// Retrieves the content available under the navigation hierarchy path, based on the the given filter options
   /// </summary>
   /// <param name="NavigationHierarchyPath"> The navigation hierarchy path. This should be something like
   /// \\Home\NavigationItem1
   /// </param>
   /// <param name="FilterOption"> This is the filter criteria to retrieve content
   /// </param>
   /// <returns> Array of ContentData </returns>
   public abstract ContentData[] GetContentInHierarchy(string navigationHierarchyPath, FilterOptions filterOptions);
   }

NavigationItem

This class is exposed to define how individual navigation items in the underlying ViewApp Navigation Model should appear. It contains all required information to show a visual representation of a navigation item in various forms.

NavigationItem
Copy Code
   public abstract class NavigationItem
   {
   /// <summary>
   /// Gets or sets the actual name of the Navigation Item.
   /// </summary>
   public virtual string Name { get;}

   /// <summary> 
   /// Gets or sets the friendly name of the Navigation Item to be shown on
   /// navigation-aware control items.
   /// </summary>
   public virtual string Title { get;}

   /// <summary>
   /// Gets or sets a value indicating whether or not the Navigation Item has errors.
   /// </summary>
   /// <value>
   /// true if [HasErrors]; otherwise, false.
   /// </value>
   public virtual bool HasErrors { get;}

   /// <summary>
   /// Gets or sets the errors for this Navigation Item.
   /// </summary>
   public virtual IEnumerable Errors { get;}

   /// <summary>
   /// Gets or sets the parent of the Navigation Item.
   /// </summary>
   public NavigationItem Parent { get; }

   /// <summary>
   /// Gets a value indicating whether Navigation Item [has items].
   /// </summary>
   /// <value>
   /// true if [has items]; otherwise, false.
   /// <value>
   public abstract bool HasItems { get; }

   /// <summary>
   /// Gets the child item collection.
   /// </summary>
   /// <returns> An observable collection of navigation item that are immediate child items of this instance.
   /// </returns>
   public abstract ReadOnlyNavigationItemCollection Items { get; }

   /// <summary>
   /// Gets the previous sibling.
   /// </summary>
   /// <returns> NavigationItem
   /// </returns>
   navigationItem public NavigationItem PreviousSibling

   /// <summary>
   /// Gets the next sibling.
   /// </summary>
   /// <returns> NavigationItem
   /// </returns>
   public NavigationItem NextSibling

   /// <summary>
   /// Gets a value indicating the path of the item in its hierarchy.
   /// </summary>
   public string Path

   /// <summary>
   /// Gets or sets a value that indicates the Access Level of the configured Nav Item.
   /// </summary>
   public virtual int AccessLevel { get; }

   /// <summary>
   /// Gets the item located at a given hierarchy path.
   /// </summary>
   /// <param name="fullPath"> The full or relative path of the item to be retrieved.
   /// </param>
   /// <returns> Requested Navigation Item
   /// <returns>
   public abstract NavigationItem GetItem(string fullPath);
   }

 NavigationException

NavigationException
Copy Code
   /// <summary>
   /// A custom exception class that wraps the exception/error information related to the Navigation Extension.
   /// </summary>
   [Serializable]
   public class NavigationException : Exception
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="NavigationException"/> class.
      /// </summary>
      public NavigationException()
      {
      }
        /// <summary>
        /// Initializes a new instance of the NavigationException class.
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public NavigationException(string message) : base(message)
        {
        }
         /// <summary>
        /// Initializes a new instance of the NavigationException class.
        /// </summary>
        /// <param name="message">The error message that explains the reason for the exception.
        /// </param>
        /// <param name="innerException">The exception that is the cause of the current exception, or a null reference
        /// (nothing in Visual Basic) if no inner exception is specified.
        /// </param>
        public NavigationException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
         /// <summary>
        /// Initializes a new instance of the <see cref="NavigationException"/> class.
        /// </summary>
        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the
        /// serialized object data about the exception being thrown.
        /// </param>
        /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains
        /// contextual information about the source or destination.
        /// </param>
        protected NavigationException(SerializationInfo info, StreamingContext context)
            : base(info, context)
         }
    }