Class BiContext


  • public class BiContext
    extends Object
    Contains all required BI data for MessageML instrumentation. It's composed by a list of BiItem, one per element found inside the message along with the current messageML-utils version.
    • Constructor Detail

      • BiContext

        public BiContext()
    • Method Detail

      • getLibraryVersion

        public String getLibraryVersion()
        Returns the messageML library version in use. Format is the following: "MessageML #version"
      • addItem

        public void addItem​(BiItem item)
        Adds a specific item to the context. No check if an item with same name already exists, the item will be added in any case.
        Parameters:
        item - to be added
      • updateItem

        public void updateItem​(String itemName,
                               String attributeName)
        Used for simple messageML elements (like Paragraphs, Links, Headers) where we only want to keep the count of attributes found. It checks if the context already has an item for the element and if that's the case it will increase the count of the specific attribute. If context does not have the item it will create a new one with default values.
        Parameters:
        itemName - name of the element to be checked
        attributeName - name of the attribute to be increased