Interface ViewItem

All Superinterfaces:
Labelable, ModifiableLabelable
All Known Subinterfaces:
ModelViewItem<T>, ViewItemGroup
All Known Implementing Classes:
AbstractViewItemGroup, ModelViewItemGroup, SimpleViewItemGroup, TemporaryViewReference, ViewElement, ViewElementAccessor

public interface ViewItem extends ModifiableLabelable
Interface for view items
  • Method Details

    • createInstance

      Create an instance of ViewItem
      Returns:
      the created instance
    • getParent

      Retrieves the parent of the view item
      Returns:
      the parent group
    • setParent

      Sets the parent of the view item
      Parameters:
      parent - the parent to set
    • toJSON

      Converts the view item in a JSON map
      Parameters:
      context - the context of the definitions referenced in this view item and/or its children
      Returns:
      The view item as a JSON map
      Throws:
      ProcessingException - If an error occurs when converting the view item
    • toSAX

      void toSAX(ContentHandler contentHandler, DefinitionContext context) throws SAXException
      Generates SAX events for the view item
      Parameters:
      contentHandler - the ContentHandler that will receive the SAX events
      context - the context of the definitions included in the view item
      Throws:
      SAXException - if an error occurs during the SAX events generation
    • copyTo

      default void copyTo(ViewItem item, View referenceView, String itemPath)
      Copy the current view item in the given one. If the view item is an accessor, its view items are copied only if they are not already present in the reference view
      Parameters:
      item - the copy
      referenceView - the reference view
      itemPath - the path of the view item in the reference view
    • copyTo

      void copyTo(ViewItem item)
      Copy the current view item in the given one. If the view item is an accessor, its view items are not copied
      Parameters:
      item - the copy
    • equals

      boolean equals(Object obj, boolean checkDetails)
      Indicates whether some other object is "equal to" this one.
      Parameters:
      obj - the reference object with which to compare.
      checkDetails - true to check the view item's details during comparison (label, description, ...)
      Returns:
      true if this object is the same as the given obj, false otherwise.