Class FSNode

java.lang.Object
org.apache.uima.tools.cvd.FSTreeNode
org.apache.uima.tools.cvd.FSNode

public class FSNode extends FSTreeNode
A node in the FS Tree Model A node is - an Feature Structure array -- elements may be other nodes - a primitive value, including Strings - a Feature Structure.
  • Field Details

    • maxStringLength

      private static final int maxStringLength
      The Constant maxStringLength.
      See Also:
    • fSTreeModel

      private final FSTreeModel fSTreeModel
      The s tree model.
    • INT_FS

      static final int INT_FS
      The Constant INT_FS.
      See Also:
    • FLOAT_FS

      static final int FLOAT_FS
      The Constant FLOAT_FS.
      See Also:
    • STRING_FS

      static final int STRING_FS
      The Constant STRING_FS.
      See Also:
    • ARRAY_FS

      static final int ARRAY_FS
      The Constant ARRAY_FS.
      See Also:
    • STD_FS

      static final int STD_FS
      The Constant STD_FS.
      See Also:
    • DISPLAY_NODE

      static final int DISPLAY_NODE
      The Constant DISPLAY_NODE.
      See Also:
    • BYTE_FS

      static final int BYTE_FS
      The Constant BYTE_FS.
      See Also:
    • BOOL_FS

      static final int BOOL_FS
      The Constant BOOL_FS.
      See Also:
    • SHORT_FS

      static final int SHORT_FS
      The Constant SHORT_FS.
      See Also:
    • LONG_FS

      static final int LONG_FS
      The Constant LONG_FS.
      See Also:
    • DOUBLE_FS

      static final int DOUBLE_FS
      The Constant DOUBLE_FS.
      See Also:
    • nodeClass

      private final int nodeClass
      The node class.
    • intOrLongLikeValue

      private final long intOrLongLikeValue
      The int or long like value.
    • fs

      private final TOP fs
      The fs.
    • string

      private final String string
      The string.
    • feat

      private final Feature feat
      The feat.
    • arrayElemIdx

      private final int arrayElemIdx
      The array elem idx.
    • isArrayElem

      private final boolean isArrayElem
      The is array elem.
    • isShortenedString

      private boolean isShortenedString
      The is shortened string.
  • Constructor Details

    • FSNode

      FSNode(FSTreeModel fSTreeModel, int nodeClass, Object fsOrString, long intOrLongLikeValue, Feature feat)
      Instantiates a new FS node.
      Parameters:
      fSTreeModel - the f S tree model
      nodeClass - the node class
      fsOrString - the fs or string
      intOrLongLikeValue - the int or long like value
      feat - the feat
    • FSNode

      FSNode(FSTreeModel fSTreeModel, int nodeClass, Object fsOrString, long intOrLongLikeValue, int elementIndex)
      Instantiates a new FS node.
      Parameters:
      fSTreeModel - the f S tree model
      nodeClass - the node class
      fsOrString - the fs or string
      intOrLongLikeValue - the int or long like value
      elementIndex - the element index
  • Method Details

    • k2nc

      private int k2nc(SlotKinds.SlotKind kind)
      K 2 nc.
      Parameters:
      kind - the kind
      Returns:
      the int
    • getNodeClass

      int getNodeClass()
      Gets the node class.
      Returns:
      the node class
    • initChildren

      protected void initChildren()
      Description copied from class: FSTreeNode
      Inits the children.
      Specified by:
      initChildren in class FSTreeNode
    • makeNodes

      private void makeNodes(List<FSNode> arrayNodes, int size, IntFunction<FSNode> newFSNode)
      Make nodes.
      Parameters:
      arrayNodes - the array nodes
      newFSNode - the new FS node
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFeatureString

      private String getFeatureString()
      Gets the feature string.
      Returns:
      the feature string
    • isShortenedString

      boolean isShortenedString()
      Checks if is shortened string.
      Returns:
      if this is a string node displaying a shortened string
    • getFullString

      String getFullString()
      Returns:
      for string nodes, return the string value (so it can be displayed seperately
    • getValueString

      private String getValueString()
      Gets the value string.
      Returns:
      the value string
    • shortenString

      private static final String shortenString(String s)
      Shorten string.
      Parameters:
      s - the s
      Returns:
      the string
    • escapeLt

      private static final String escapeLt(String s)
      Escape lt.
      Parameters:
      s - the s
      Returns:
      the string
    • getNullString

      private String getNullString()
      Gets the null string.
      Returns:
      the null string
    • getArrayPos

      int getArrayPos()
      Gets the array pos.
      Returns:
      the array pos
    • getType

      TypeImpl getType()
      Gets the type.
      Returns:
      the type
    • isAnnotation

      public boolean isAnnotation()
      Checks if is annotation.
      Returns:
      true, if is annotation
    • getStart

      public int getStart()
      Gets the start.
      Returns:
      the start
    • getEnd

      public int getEnd()
      Gets the end.
      Returns:
      the end