Class QueryNodeImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PLAINTEXT_FIELD_NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryNodeImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.util.List<QueryNode> children)  
      void add​(QueryNode child)  
      QueryNode clone()  
      QueryNode cloneTree()
      Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
      boolean containsTag​(java.lang.String tagName)
      verify if a node contains a tag
      java.util.List<QueryNode> getChildren()
      get Children nodes
      QueryNode getParent()  
      java.lang.Object getTag​(java.lang.String tagName)
      Returns object stored under that tag name
      java.util.Map<java.lang.String,​java.lang.Object> getTagMap()
      Returns a map containing all tags attached to this query node.
      boolean isLeaf()
      verify if a node is a Leaf node
      void removeFromParent()
      Removes this query node from its parent.
      void set​(java.util.List<QueryNode> children)  
      void setTag​(java.lang.String tagName, java.lang.Object value)
      Associate the specified value with the specified tagName.
      java.lang.String toString()
      Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
      void unsetTag​(java.lang.String tagName)
      Unset a tag.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • PLAINTEXT_FIELD_NAME

        public static final java.lang.String PLAINTEXT_FIELD_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • QueryNodeImpl

        public QueryNodeImpl()
    • Method Detail

      • add

        public final void add​(java.util.List<QueryNode> children)
        Specified by:
        add in interface QueryNode
      • isLeaf

        public boolean isLeaf()
        Description copied from interface: QueryNode
        verify if a node is a Leaf node
        Specified by:
        isLeaf in interface QueryNode
      • set

        public final void set​(java.util.List<QueryNode> children)
        Specified by:
        set in interface QueryNode
      • cloneTree

        public QueryNode cloneTree()
                            throws java.lang.CloneNotSupportedException
        Description copied from interface: QueryNode
        Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
        Specified by:
        cloneTree in interface QueryNode
        Returns:
        the cloned tree
        Throws:
        java.lang.CloneNotSupportedException
      • clone

        public QueryNode clone()
                        throws java.lang.CloneNotSupportedException
        Throws:
        java.lang.CloneNotSupportedException
      • getChildren

        public final java.util.List<QueryNode> getChildren()
        Description copied from interface: QueryNode
        get Children nodes
        Specified by:
        getChildren in interface QueryNode
        Returns:
        a List for QueryNode object. Returns null, for nodes that do not contain children. All leaf Nodes return null.
      • setTag

        public void setTag​(java.lang.String tagName,
                           java.lang.Object value)
        Description copied from interface: QueryNode
        Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.
        Specified by:
        setTag in interface QueryNode
      • unsetTag

        public void unsetTag​(java.lang.String tagName)
        Description copied from interface: QueryNode
        Unset a tag. tagName will be converted to lowercase.
        Specified by:
        unsetTag in interface QueryNode
      • containsTag

        public boolean containsTag​(java.lang.String tagName)
        verify if a node contains a tag
        Specified by:
        containsTag in interface QueryNode
      • getTag

        public java.lang.Object getTag​(java.lang.String tagName)
        Description copied from interface: QueryNode
        Returns object stored under that tag name
        Specified by:
        getTag in interface QueryNode
      • toString

        public java.lang.String toString()
        Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
        Specified by:
        toString in interface QueryNode
        Overrides:
        toString in class java.lang.Object
        See Also:
        QueryNode.toString()
      • getTagMap

        public java.util.Map<java.lang.String,​java.lang.Object> getTagMap()
        Returns a map containing all tags attached to this query node.
        Specified by:
        getTagMap in interface QueryNode
        Returns:
        a map containing all tags attached to this query node
      • removeFromParent

        public void removeFromParent()
        Description copied from interface: QueryNode
        Removes this query node from its parent.
        Specified by:
        removeFromParent in interface QueryNode