public class ITSWriter
extends java.lang.Object
| Constructor and Description |
|---|
ITSWriter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDeclaration(StartXliffData sxd)
Adds the namespaces and version information for supporting ITS mapping in an XLIFF 2 document.
|
static IITSItem |
annotate(Fragment fragment,
int start,
int end,
IITSItem item)
Annotates a given fragment with an ITS item.
|
static MTag |
annotate(Fragment fragment,
int start,
int end,
IITSItem item,
java.lang.String matchingType)
Tries to reuse an existing annotation to add an ITS item.
|
AnnotatorsRef |
createAnnotatorsRef(IWithITSAttributes object) |
java.util.List<java.util.AbstractMap.SimpleEntry<java.lang.String,AnnotatorsRef>> |
createAnnotatorsRefList(java.util.Stack<InheritedData> context) |
java.lang.String |
outputAttributes(IWithITSAttributes object,
AnnotatorsRef objectAR,
AnnotatorsRef parentAR) |
java.lang.String |
outputStandOffElements(java.lang.String indent,
java.lang.String lb,
Unit unit)
Outputs any stand-off elements used in the markers for the given unit.
|
public static IITSItem annotate(Fragment fragment, int start, int end, IITSItem item)
fragment - the fragment to annotate.start - the start position (in the coded text)end - the position just after the last character of the span (in the coded text).
You can use -1 to indicate the end of the fragment.item - the ITS item to set (it can be a single instance or a group).public static MTag annotate(Fragment fragment, int start, int end, IITSItem item, java.lang.String matchingType)
fragment - the fragment to annotate.start - the start position (in the coded text)end - the position just after the last character of the span (in the coded text).
You can use -1 to indicate the end of the fragment.item - the ITS item to set (it can be a single instance or a group).matchingType - the type of the existing annotation that can be reused.
Use null to reuse any type.public static void addDeclaration(StartXliffData sxd)
sxd - the StartXliffData object where to add the mapping.public java.lang.String outputStandOffElements(java.lang.String indent,
java.lang.String lb,
Unit unit)
indent - the base indentation to use.lb - the line-break to use.unit - the unit to process.public java.util.List<java.util.AbstractMap.SimpleEntry<java.lang.String,AnnotatorsRef>> createAnnotatorsRefList(java.util.Stack<InheritedData> context)
public AnnotatorsRef createAnnotatorsRef(IWithITSAttributes object)
public java.lang.String outputAttributes(IWithITSAttributes object, AnnotatorsRef objectAR, AnnotatorsRef parentAR)