| Package | Description |
|---|---|
| net.sf.okapi.common.resource |
Interfaces and classes that represent the parsed resources attached to the
events sent by a filter.
|
| Modifier and Type | Method and Description |
|---|---|
Segment |
Segment.clone() |
Segment |
Segments.get(int index) |
Segment |
ISegments.get(int index)
Gets the segment for a given segment index.
|
Segment |
Segments.get(String id) |
Segment |
ISegments.get(String id)
Gets the segment for a given identifier.
|
Segment |
AlignedSegments.getCorrespondingSource(Segment trgSeg,
LocaleId trgLoc) |
Segment |
IAlignedSegments.getCorrespondingSource(Segment trgSeg,
LocaleId trgLoc)
Gets the source segment corresponding to a given target segment
|
Segment |
AlignedSegments.getCorrespondingTarget(Segment srcSeg,
LocaleId trgLoc) |
Segment |
IAlignedSegments.getCorrespondingTarget(Segment seg,
LocaleId trgLoc)
Gets the target segment corresponding to a given source segment
|
Segment |
TextContainer.getFirstSegment()
Returns the first
Segment of this container. |
Segment |
Segments.getLast() |
Segment |
ISegments.getLast()
Gets the last
Segment of the container. |
Segment |
AlignedSegments.getSource(int index,
LocaleId trgLoc) |
Segment |
IAlignedSegments.getSource(int index,
LocaleId trgLoc)
Gets the source segment for the given target locale at a given position.
|
Segment |
TextUnit.getSourceSegment(String segId,
boolean createIfNeeded) |
Segment |
ITextUnit.getSourceSegment(String segId,
boolean createIfNeeded)
Gets the source segment for a given segment id.
|
Segment |
TextUnit.getTargetSegment(LocaleId trgLoc,
String segId,
boolean createIfNeeded) |
Segment |
ITextUnit.getTargetSegment(LocaleId trgLoc,
String segId,
boolean createIfNeeded)
Gets the segment for a given segment id in a given target.
|
Segment |
AlignedSegments.splitSource(LocaleId trgLoc,
Segment srcSeg,
int splitPos) |
Segment |
IAlignedSegments.splitSource(LocaleId trgLoc,
Segment srcSeg,
int splitPos)
Splits a given source segment into two.
|
Segment |
AlignedSegments.splitTarget(LocaleId trgLoc,
Segment trgSeg,
int splitPos) |
Segment |
IAlignedSegments.splitTarget(LocaleId trgLoc,
Segment trgSeg,
int splitPos)
Splits a given target segment into two.
|
| Modifier and Type | Method and Description |
|---|---|
List<Segment> |
Segments.asList() |
List<Segment> |
ISegments.asList()
Get all segments.
|
Iterator<Segment> |
AlignedSegments.iterator() |
Iterator<Segment> |
IAlignedSegments.iterator()
Gets an iterator for the default source segments of this text unit.
|
Iterator<Segment> |
Segments.iterator() |
Iterator<Segment> |
ISegments.iterator()
Gets an iterator for the segments of this container.
|
Iterator<Segment> |
AlignedSegments.iterator(LocaleId trgLoc) |
Iterator<Segment> |
IAlignedSegments.iterator(LocaleId trgLoc)
Gets an iterator for the source of the specified target locale.
|
| Modifier and Type | Method and Description |
|---|---|
static AltTranslationsAnnotation |
TextUnitUtil.addAltTranslation(Segment seg,
AltTranslation alt)
Adds an
AltTranslation object to a given Segment. |
void |
Segments.append(Segment segment) |
void |
ISegments.append(Segment segment)
Appends a segment at the end of this container.
|
void |
Segments.append(Segment segment,
boolean collapseIfPreviousEmpty) |
void |
ISegments.append(Segment segment,
boolean collapseIfPreviousEmpty)
Appends a segment at the end of this container.
|
void |
AlignedSegments.append(Segment srcSeg,
Segment trgSeg,
LocaleId trgLoc) |
void |
IAlignedSegments.append(Segment srcSeg,
Segment trgSeg,
LocaleId trgLoc)
Adds given source and target segments to the end of the content.
|
void |
Segments.append(Segment segment,
String textBefore) |
void |
ISegments.append(Segment segment,
String textBefore)
Appends a segment at the end of this container, with an optional non-segment part just before.
|
void |
Segments.append(Segment segment,
String textBefore,
boolean collapseIfPreviousEmpty) |
void |
ISegments.append(Segment segment,
String textBefore,
boolean collapseIfPreviousEmpty)
Appends a segment at the end of this container, with an optional non-segment part just before.
|
Segment |
AlignedSegments.getCorrespondingSource(Segment trgSeg,
LocaleId trgLoc) |
Segment |
IAlignedSegments.getCorrespondingSource(Segment trgSeg,
LocaleId trgLoc)
Gets the source segment corresponding to a given target segment
|
Segment |
AlignedSegments.getCorrespondingTarget(Segment srcSeg,
LocaleId trgLoc) |
Segment |
IAlignedSegments.getCorrespondingTarget(Segment seg,
LocaleId trgLoc)
Gets the target segment corresponding to a given source segment
|
void |
Segments.insert(int index,
Segment seg) |
void |
ISegments.insert(int index,
Segment seg)
Inserts a given segment at the specified position.
|
void |
AlignedSegments.insert(int index,
Segment srcSeg,
Segment trgSeg,
LocaleId trgLoc) |
void |
IAlignedSegments.insert(int index,
Segment srcSeg,
Segment trgSeg,
LocaleId trgLoc)
Inserts given source and target segments at the specified position in the
list of segments.
|
void |
AlignedSegments.joinWithNext(Segment seg,
LocaleId trgLoc) |
void |
IAlignedSegments.joinWithNext(Segment seg,
LocaleId trgLoc)
Joins the segment for a given segment's id to the next segment, including
all the parts between the two segments.
|
boolean |
AlignedSegments.remove(Segment seg,
LocaleId trgLoc) |
boolean |
IAlignedSegments.remove(Segment seg,
LocaleId trgLoc)
Removes the given segment and any segments with the same id from the
specified sources and targets.
|
void |
Segments.set(int index,
Segment seg) |
void |
ISegments.set(int index,
Segment seg)
Sets a new segment at a given segment index.
|
void |
AlignedSegments.setSegment(int index,
Segment seg,
LocaleId trgLoc) |
void |
IAlignedSegments.setSegment(int index,
Segment seg,
LocaleId trgLoc)
Replaces a segment at a given position with a clone of the given segment.
|
Segment |
AlignedSegments.splitSource(LocaleId trgLoc,
Segment srcSeg,
int splitPos) |
Segment |
IAlignedSegments.splitSource(LocaleId trgLoc,
Segment srcSeg,
int splitPos)
Splits a given source segment into two.
|
Segment |
AlignedSegments.splitTarget(LocaleId trgLoc,
Segment trgSeg,
int splitPos) |
Segment |
IAlignedSegments.splitTarget(LocaleId trgLoc,
Segment trgSeg,
int splitPos)
Splits a given target segment into two.
|
void |
Segments.validateSegmentId(Segment seg)
Checks if the id of a given segment is empty, null or a duplicate.
|
| Constructor and Description |
|---|
AlignedPair(Segment sourceSegment,
Segment targetSegment,
LocaleId localeId)
Creates an AlignedPair from source and target
Segments |
TextContainer(Segment segment)
Creates a new TextContainer object with an initial segment.
|
Copyright © 2021. All rights reserved.