Uses of Class
com.yahoo.document.annotation.SpanNode
-
Packages that use SpanNode Package Description com.yahoo.document.annotation Provides classes and interfaces for creating trees of spans over string values in Vespa documents, and annotating these spans.com.yahoo.document.serialization -
-
Uses of SpanNode in com.yahoo.document.annotation
Subclasses of SpanNode in com.yahoo.document.annotation Modifier and Type Class Description class
AlternateSpanList
A node in aSpanNode
tree that can have a multiple trees of child nodes, each with its own probability.class
Span
This class represents a range of characters from a string. This is the leaf node in a Span tree.class
SpanList
A node in a Span tree that can have child nodes.Fields in com.yahoo.document.annotation with type parameters of type SpanNode Modifier and Type Field Description protected java.util.ListIterator<SpanNode>
RecursiveNodeIterator. iteratorFromLastCallToNext
protected java.util.Stack<com.yahoo.document.annotation.PeekableListIterator<SpanNode>>
RecursiveNodeIterator. stack
Methods in com.yahoo.document.annotation that return SpanNode Modifier and Type Method Description SpanNode
SpanNode. annotate(Annotation annotation)
Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,annotation)
SpanNode
SpanNode. annotate(AnnotationType type)
Convenience method for adding an annotation with no value to this span, same asgetSpanTree().
spanTree.annotate(this,type)
SpanNode
SpanNode. annotate(AnnotationType type, FieldValue value)
Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,type,value)
SpanNode
SpanNode. annotate(AnnotationType type, java.lang.Integer value)
Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,type,new IntegerFieldValue(value))
SpanNode
SpanNode. annotate(AnnotationType type, java.lang.String value)
Convenience method for adding an annotation to this span, same asgetSpanTree().
spanTree.annotate(this,type,new StringFieldValue(value))
SpanNode
SpanTree. getRoot()
Returns the root node of this span tree.SpanNode
Annotation. getSpanNode()
Returns theSpanNode
this Annotation is annotating, if any.SpanNode
Annotation. getSpanNodeFast()
Returns theSpanNode
this Annotation is annotating, if any.Methods in com.yahoo.document.annotation that return types with arguments of type SpanNode Modifier and Type Method Description java.util.ListIterator<SpanNode>
AlternateSpanList. childIterator()
Traverses all immediate children of all subtrees of this AlternateSpanList.java.util.ListIterator<SpanNode>
AlternateSpanList. childIterator(int i)
Traverses all immediate children of the given subtree of this AlternateSpanList.java.util.ListIterator<SpanNode>
Span. childIterator()
Returns a ListIterator that iterates over absolutely nothing.java.util.ListIterator<SpanNode>
SpanList. childIterator()
Traverses all immediate children of this SpanList.abstract java.util.ListIterator<SpanNode>
SpanNode. childIterator()
Traverses all immediate children of this SpanNode.java.util.ListIterator<SpanNode>
AlternateSpanList. childIteratorRecursive()
Recursively traverses all children (not only leaf nodes) of all subtrees of this AlternateSpanList, in a depth-first fashion.java.util.ListIterator<SpanNode>
AlternateSpanList. childIteratorRecursive(int i)
Recursively traverses all children (not only leaf nodes) of the given subtree of this AlternateSpanList, in a depth-first fashion.java.util.ListIterator<SpanNode>
Span. childIteratorRecursive()
Returns a ListIterator that iterates over absolutely nothing.java.util.ListIterator<SpanNode>
SpanList. childIteratorRecursive()
Recursively traverses all children (not only leaf nodes) of this SpanList, in a depth-first fashion.abstract java.util.ListIterator<SpanNode>
SpanNode. childIteratorRecursive()
Recursively traverses all possible children (not only leaf nodes) of this SpanNode, in a depth-first fashion.protected java.util.List<SpanNode>
AlternateSpanList. children()
Returns a modifiableList
of child nodes of first subtree.protected java.util.List<SpanNode>
AlternateSpanList. children(int i)
Returns a modifiableList
of child nodes of the specified subtree.protected java.util.List<SpanNode>
SpanList. children()
Returns a modifiable list of the immediate children of this SpanList.java.util.List<SpanNode>
AlternateSpanList. removeChildren(int i)
Removes the subtree at index i (both the subtree itself and its contents, which become invalidated).java.util.List<SpanNode>
AlternateSpanList. setChildren(int i, java.util.List<SpanNode> subtree, double probability)
Sets the subtree at index i.Methods in com.yahoo.document.annotation with parameters of type SpanNode Modifier and Type Method Description AlternateSpanList
AlternateSpanList. add(int i, SpanNode node)
Convenience method to add a span node to the child tree at index i.AlternateSpanList
AlternateSpanList. add(SpanNode node)
Adds a child node to the first subtree of this AlternateSpanList.SpanList
SpanList. add(SpanNode node)
Adds a child node to this SpanList.SpanTree
SpanTree. annotate(SpanNode node, Annotation annotation)
Adds an Annotation to the internal list of annotations for this SpanTree. Use this when adding an Annotation that shall annotate a SpanNode.SpanTree
SpanTree. annotate(SpanNode node, AnnotationType type)
Creates an Annotation based on the given AnnotationType, and adds it to the internal list of annotations for this SpanTree (convenience method). Use this when adding an Annotation (that does not have a FieldValue) that shall annotate a SpanNode.SpanTree
SpanTree. annotate(SpanNode node, AnnotationType type, FieldValue value)
Adds an Annotation.SpanTree
SpanTree. annotateFast(SpanNode node, Annotation annotation)
Adds an Annotation to the internal list of annotations for this SpanTree. Use this when adding an Annotation that shall annotate a SpanNode.void
SpanTree. clearAnnotations(SpanNode node)
Clears all Annotations for a given SpanNode.void
SpanTree. clearAnnotationsRecursive(SpanNode node)
Clears all Annotations for a given SpanNode and its child nodes.int
SpanNode. compareTo(SpanNode o)
Compares two SpanNodes. Note: this class has a natural ordering that might be inconsistent with equals.boolean
SpanNode. contains(SpanNode o)
Checks if the text covered by another span is within the text covered by this span.java.util.Iterator<Annotation>
SpanTree. iterator(SpanNode node)
Returns an Iterator over all annotations that annotate the given node.java.util.Iterator<Annotation>
SpanTree. iteratorRecursive(SpanNode node)
Returns a recursive Iterator over all annotations that annotate the given node and its subnodes.void
AlternateSpanList. move(int i, SpanNode node, AlternateSpanList target, int targetSubTree)
Moves a child of this SpanList to another SpanList.void
AlternateSpanList. move(int i, SpanNode node, SpanList target)
Moves a child of this SpanList to another SpanList.void
SpanList. move(SpanNode node, AlternateSpanList target, int targetSubTree)
Moves a child of this SpanList to another SpanList.void
SpanList. move(SpanNode node, SpanList target)
Moves a child of this SpanList to another SpanList.boolean
SpanNode. overlaps(SpanNode o)
Checks if the text covered by this span overlaps with the text covered by another span.SpanList
SpanList. remove(SpanNode node)
Removes and invalidates the given SpanNode from this.void
SpanTree. setRoot(SpanNode root)
WARNING! Only to be used by deserializers! Sets the root of this SpanTree instance.void
Annotation. setSpanNode(SpanNode spanNode)
WARNING! Should only be used by deserializers! Sets the span node that this annotation points to.void
Annotation. setSpanNodeFast(SpanNode spanNode)
WARNING! Should only be used by deserializers! Sets the span node that this annotation points to.Method parameters in com.yahoo.document.annotation with type arguments of type SpanNode Modifier and Type Method Description void
AlternateSpanList. addChildren(int i, java.util.List<SpanNode> subtree, double probability)
Adds a possible subtree of this AlternateSpanList, with the given probability, at index i.boolean
AlternateSpanList. addChildren(java.util.List<SpanNode> subtree, double probability)
Adds a possible subtree of this AlternateSpanList, with the given probability.java.util.List<SpanNode>
AlternateSpanList. setChildren(int i, java.util.List<SpanNode> subtree, double probability)
Sets the subtree at index i.Constructors in com.yahoo.document.annotation with parameters of type SpanNode Constructor Description SpanTree(java.lang.String name, SpanNode root)
Creates a new SpanTree with a given root node.Constructor parameters in com.yahoo.document.annotation with type arguments of type SpanNode Constructor Description SpanList(java.util.List<SpanNode> children)
-
Uses of SpanNode in com.yahoo.document.serialization
Methods in com.yahoo.document.serialization with parameters of type SpanNode Modifier and Type Method Description void
SpanNodeWriter. write(SpanNode spanNode)
void
VespaDocumentSerializer6. write(SpanNode spanNode)
-