public class Segment extends TextPart
TextPart with an identifier.| Modifier and Type | Field and Description |
|---|---|
static String |
REF_MARKER |
annotations, id, originalId, properties, text, whitespaceStrategyCOPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY| Constructor and Description |
|---|
Segment()
Creates an empty Segment object with a null identifier.
|
Segment(String id)
Creates an empty Segment object with a given identifier.
|
Segment(String id,
TextFragment text)
Creates a Segment object with a given identifier and a given
text fragment.
|
| Modifier and Type | Method and Description |
|---|---|
Segment |
clone()
Clone of
TextPart |
void |
forceId(String id)
Deprecated.
use
IResource#setId(String) |
boolean |
isSegment()
Indicates if this part is a
Segment. |
static String |
makeRefMarker(String segId) |
getAnnotations, getContent, getId, getOriginalId, getProperties, getWhitespaceStrategy, preserveWhitespaces, setContent, setId, setOriginalId, setPreserveWhitespaces, setWhitespaceStrategy, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopy, getProperty, getPropertyNames, hasProperty, propertyIterator, removeProperty, setPropertyannotationIterator, clear, copy, getAnnotation, getAnnotationsTypesAsSet, hasAnnotation, hasAnnotations, remove, setAnnotationgetSkeleton, setSkeletonpublic static String REF_MARKER
public Segment()
public Segment(String id)
id - identifier for the new segment (Can be null).public Segment(String id, TextFragment text)
id - identifier for the new segment (Can be null).text - text fragment for the new segment.public boolean isSegment()
TextPartSegment.@Deprecated public void forceId(String id)
IResource#setId(String)id - Copyright © 2022. All rights reserved.