public class HNSInputToHandler
extends java.lang.Object
An instance of this class supports the scanning of an HNS or
HNST data stream to generate a sequence of
HNSSign
s which are passed to an
HNSSignsHandler
.
HNS input contains data for one sign per line, apart from
comment lines. This data consists of, in order, a gloss name,
a manual part and a non-manual part.
The non-manual part is represented in the same format as
an HNST non-manual part, i.e. a non-manual token sequence
enclosed in [ ... ]
.
Either the manual part or the non-manual part, but not both, may
be omitted. The sign data components are separated by whitespace.
HNST is a free-form input format which uses [ ... ]
pairs
for sequencing and grouping. Within each sequence or group
adjacent pairs of items are separated by non-empty sequences of
whitespace and/or comma characters.
The entire HNST text is a sequence of signs;
each sign is a group containing three groups,
one for the gloss, one for the non-manuals and one for the manual
HNS tokens.
Modifier and Type | Field and Description |
---|---|
static boolean |
DO_ASCIIFIED_GLOSS
Non-final global flag, indicating whether gloss names in the
generated sign sequence are to be ASCII-fied.
|
static boolean |
HNS_INPUT_IS_MAC_ROMAN
Non-final global flag, indicating whether HNS input uses the
MacRoman encoding.
|
Constructor and Description |
---|
HNSInputToHandler()
Constructs a new HNS/HNST input driver.
|
Modifier and Type | Method and Description |
---|---|
int |
getHNSTErrorCount()
Returns the accumulated HNST error count.
|
void |
inputHNSTFormatSigns(java.io.InputStream ins,
boolean warn,
HNSSignsHandler hndlr)
Given an HNST text input stream and an HNS signs handler, this
method scans the string and feeds the generated stream of signs
to the handler, generating warning messages or not as specified
by the given flag argument.
|
void |
inputHNSTFormatSigns(java.lang.String hnsttxt,
boolean warn,
HNSSignsHandler hndlr)
Given an HNST string and an HNS signs handler, this method
scans the string and feeds the generated stream of signs to
the handler, generating warning messages or not as specified
by the given flag argument.
|
void |
inputStandardHNSFormatSigns(java.io.InputStream hamins,
int limit,
HNSSignsHandler hndlr)
Given an input stream for a multi-line HNS signs text and an
HNS signs handler, this method scans the text and feeds the
generated stream of signs to the handler, up to the given limit
on the number of signs.
|
void |
inputStandardHNSFormatSigns(java.io.Reader hamrdr,
int limit,
HNSSignsHandler hndlr)
Given a reader for a multi-line HNS signs text and an HNS signs
handler, this method scans the text and feeds the generated stream
of signs to the handler, up to the given limit on the number of
signs.
|
void |
inputStandardHNSFormatSigns(java.lang.String hns,
int limit,
HNSSignsHandler hndlr)
Given a (typically multi-line) HNS signs text and an HNS signs
handler, this method scans the text and feeds the generated stream
of signs to the handler, up to the given limit on the number of
signs.
|
public static boolean DO_ASCIIFIED_GLOSS
public static boolean HNS_INPUT_IS_MAC_ROMAN
public HNSInputToHandler()
public void inputStandardHNSFormatSigns(java.io.InputStream hamins, int limit, HNSSignsHandler hndlr)
public void inputStandardHNSFormatSigns(java.lang.String hns, int limit, HNSSignsHandler hndlr)
public void inputStandardHNSFormatSigns(java.io.Reader hamrdr, int limit, HNSSignsHandler hndlr)
public void inputHNSTFormatSigns(java.lang.String hnsttxt, boolean warn, HNSSignsHandler hndlr)
public void inputHNSTFormatSigns(java.io.InputStream ins, boolean warn, HNSSignsHandler hndlr)
public int getHNSTErrorCount()