Class ICMLContext


  • public class ICMLContext
    extends Object
    • Constructor Detail

      • ICMLContext

        public ICMLContext​(boolean isReferent,
                           Node topNode)
        Create a new context.
        Parameters:
        rootNode - Node when starting embedded context. Should be null for the top-level context.
    • Method Detail

      • enterScope

        public void enterScope​(Node scopeNode,
                               String tuId)
      • getTopNode

        public Node getTopNode()
      • getScopeNode

        public Node getScopeNode()
      • leaveScope

        public void leaveScope()
      • inScope

        public boolean inScope()
      • addToQueue

        public boolean addToQueue​(List<Event> queue,
                                  boolean evenIfEmpty)
        Adds the text unit to the given queue.
        Parameters:
        queue - the event queue where to add the event.
        evenIfEmpty - true to create a TU event with empty content.
        Returns:
        true if a text unit with possibly inline codes was added, false otherwise.
      • addContent

        public void addContent​(Element elem)
        Adds a Content element to the text unit.
        Parameters:
        elem - the Content element node.
      • addCode

        public void addCode​(Code code)
      • addCode

        public void addCode​(Node node)
      • addStartTag

        public void addStartTag​(Element elem)
      • addEndTag

        public void addEndTag​(Element elem)
      • buildStartTag

        public String buildStartTag​(Element elem)
        If the tag has no contents, it will return a self closing tag.
      • buildStartTag

        public String buildStartTag​(Element elem,
                                    boolean selfClosing)