Package net.sf.okapi.common.resource
Class AnnotatedSpan
- java.lang.Object
-
- net.sf.okapi.common.resource.AnnotatedSpan
-
public class AnnotatedSpan extends Object
Span of text and its annotation data.
-
-
Field Summary
Fields Modifier and Type Field Description InlineAnnotation
annotation
The annotation itself (can be null).Range
range
The start and end positions of the span of text in the original coded text.TextFragment
span
Copy of the fragment of text to which the annotation is applied.String
type
Type of annotation.
-
Constructor Summary
Constructors Constructor Description AnnotatedSpan(String type, InlineAnnotation annotation, TextFragment span, int start, int end)
Creates a new AnnotatedSpan object with a give type of annotation, its annotation and its fragment of text.
-
-
-
Field Detail
-
type
public String type
Type of annotation.
-
annotation
public InlineAnnotation annotation
The annotation itself (can be null).
-
span
public TextFragment span
Copy of the fragment of text to which the annotation is applied.
-
range
public Range range
The start and end positions of the span of text in the original coded text.
-
-
Constructor Detail
-
AnnotatedSpan
public AnnotatedSpan(String type, InlineAnnotation annotation, TextFragment span, int start, int end)
Creates a new AnnotatedSpan object with a give type of annotation, its annotation and its fragment of text.- Parameters:
type
- the type of the annotation for this span of text.annotation
- the annotation associated with this span of text.span
- the span of text.start
- the start position of the span of text in the original coded text.end
- the end position of the span of text in the original coded text.
-
-