java.lang.Object
com.pervasive.datarush.analytics.text.TextElement
com.pervasive.datarush.analytics.text.TextContainer
- All Implemented Interfaces:
TextNode
- Direct Known Subclasses:
TokenizedParagraph,TokenizedSentence,TokenizedText,TokenizedWord
A tree node that can hold information on text elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<TextContainer>protected TextContainerprotected TextContainerprotected TextContainer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for empty text container.protectedTextContainer(TextElementType type, String value) Construct a container of element type with a specific value.protectedTextContainer(TextElementType type, List<? extends TextContainer> children) Construct a container of element type with the specified children. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the number of direct children of this node.Get the ordered list of direct children of this node.static TokenDecoderstatic TokenEncoderGet an iterator over all descendants of this node including this node.getIterator(TextElementType type) Get an iterator over the node and all descendants of this node of the specified type.Get the right sibling of this node or null if this node has no right sibling.Get the parent node of this node or null if this node is the root.Get the left sibling of this node or null if this node has no left sibling.inthashCode()toString()Methods inherited from class com.pervasive.datarush.analytics.text.TextElement
getType, getValue
-
Field Details
-
children
-
parent
-
prevSibling
-
nextSibling
-
-
Constructor Details
-
TextContainer
protected TextContainer()Default constructor for empty text container. -
TextContainer
Construct a container of element type with the specified children.- Parameters:
type- the type of this text elementchildren- the children of this container
-
TextContainer
Construct a container of element type with a specific value.- Parameters:
type- the type of this text elementvalue- the text value of this container
-
-
Method Details
-
getChildCount
public int getChildCount()Description copied from interface:TextNodeGet the number of direct children of this node.- Specified by:
getChildCountin interfaceTextNode- Returns:
- the child count of this node
-
getParent
Description copied from interface:TextNodeGet the parent node of this node or null if this node is the root. -
getPrevSibling
Description copied from interface:TextNodeGet the left sibling of this node or null if this node has no left sibling.- Specified by:
getPrevSiblingin interfaceTextNode- Returns:
- the previous sibling node of this node
-
getNextSibling
Description copied from interface:TextNodeGet the right sibling of this node or null if this node has no right sibling.- Specified by:
getNextSiblingin interfaceTextNode- Returns:
- the next sibling node of this node
-
getChildren
Description copied from interface:TextNodeGet the ordered list of direct children of this node.- Specified by:
getChildrenin interfaceTextNode- Returns:
- a list of the child nodes
-
getIterator
Description copied from interface:TextNodeGet an iterator over all descendants of this node including this node.- Specified by:
getIteratorin interfaceTextNode- Returns:
- a list iterator over the node and all descendants
-
getIterator
Description copied from interface:TextNodeGet an iterator over the node and all descendants of this node of the specified type.- Specified by:
getIteratorin interfaceTextNode- Parameters:
type- the type of nodes to iterate over- Returns:
- a list iterator over the selected nodes
-
getPostIterator
-
getPostIterator
-
toString
-
hashCode
public int hashCode()- Overrides:
hashCodein classTextElement
-
equals
- Overrides:
equalsin classTextElement
-
getEncoder
-
getDecoder
-