|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.edustructures.sifworks.SIFParser
public abstract class SIFParser
Parses a SIF message or Data Object into a SIFElement object graph.
A single instance of SIFParser can be reused by a thread. However, the parse method is synchronized for serial access. If multiple threads wish to parse messages concurrently a unique SIFParser instance should be allocated to each.
| Field Summary | |
|---|---|
static int |
FLG_EXPECT_INNER_ENVELOPE
Flag that indicates that SIFParser should expect a nested SIF_Message |
| Constructor Summary | |
|---|---|
SIFParser()
|
|
| Method Summary | |
|---|---|
abstract SIFElement |
getParsed()
Gets the last SIFElement parsed |
static void |
main(java.lang.String[] args)
Run SIFParser as a command-line program. |
static SIFParser |
newInstance()
Factory method for creatin a new instance of a SIFParser |
abstract SIFElement |
parse(java.io.Reader msg,
Zone zone)
Parses a SIF data element into a SIFElement. |
abstract SIFElement |
parse(java.io.Reader msg,
Zone zone,
int flags)
Parses a SIF data element into a SIFElement. |
abstract SIFElement |
parse(java.io.Reader msg,
Zone zone,
int flags,
SIFVersion version)
Parses a SIF data element into a SIFElement. |
abstract SIFElement |
parse(java.lang.String msg,
Zone zone)
Parses a SIF data element into a SIFElement. |
abstract SIFElement |
parse(java.lang.String msg,
Zone zone,
int flags)
Parses a SIF data element into a SIFElement. |
abstract SIFElement |
parse(java.lang.String msg,
Zone zone,
int flags,
SIFVersion version)
Parses a SIF data element into a SIFElement. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FLG_EXPECT_INNER_ENVELOPE
| Constructor Detail |
|---|
public SIFParser()
| Method Detail |
|---|
public static SIFParser newInstance()
throws ADKException
ADKException - If a SIFParser class cannot be instantiated
public abstract SIFElement parse(java.lang.String msg,
Zone zone)
throws ADKParsingException,
SIFException,
java.io.IOException
SIFElement.
msg - The content to parsezone - The Zone from which the message was received, or null if
not applicable or not known
ADKParsingException - is thrown if unable to parse the message
SIFException - is thrown if unable to parse the message
java.io.IOException - is thrown if an error is reported while reading the message content
public abstract SIFElement parse(java.lang.String msg,
Zone zone,
int flags)
throws ADKParsingException,
SIFException,
java.io.IOException
SIFElement.
msg - The content to parsezone - The Zone from which the message was received, or null if
not applicable or not knownflags - One or more FLG_ constants, or zero if no
flags are applicable
ADKParsingException - is thrown if unable to parse the message
SIFException - is thrown if unable to parse the message
java.io.IOException - is thrown if an error is reported while reading the message content
public abstract SIFElement parse(java.lang.String msg,
Zone zone,
int flags,
SIFVersion version)
throws ADKParsingException,
SIFException,
java.io.IOException
SIFElement.
msg - The content to parsezone - The Zone from which the message was received, or null if
not applicable or not knownflags - One or more FLG_ constants, or zero if no
flags are applicableversion - The version of SIF that will be associated with the
returned object. By default, SIFParser uses the default version of
SIF in effect for the agent when parsing messages that do not have
a SIF_Message envelope. By specifying a value to this parameter, you
can change the version of SIF associated with the returned object in
the event there is no SIF_Message envelope present in the XML
content. Note that when parsing XML content with a SIF_Message
envelope, SIFParser ignores this parameter and instead uses the
version indicated by the Version and xmlns attributes
ADKParsingException - is thrown if unable to parse the message
SIFException - is thrown if unable to parse the message
java.io.IOException - is thrown if an error is reported while reading the message content
public abstract SIFElement parse(java.io.Reader msg,
Zone zone)
throws ADKParsingException,
SIFException,
java.io.IOException
SIFElement.
msg - The content to parsezone - The Zone from which the message was received, or null if
not applicable or not known
ADKParsingException - is thrown if unable to parse the message
SIFException - is thrown if unable to parse the message
java.io.IOException - is thrown if an error is reported while reading the message content
public abstract SIFElement parse(java.io.Reader msg,
Zone zone,
int flags)
throws ADKParsingException,
SIFException,
java.io.IOException
SIFElement.
msg - The content to parsezone - The Zone from which the message was received, or null if
not applicable or not knownflags - One or more FLG_ constants, or zero if no
flags are applicable
ADKParsingException - is thrown if unable to parse the message
SIFException - is thrown if unable to parse the message
java.io.IOException - is thrown if an error is reported while reading the message content
public abstract SIFElement parse(java.io.Reader msg,
Zone zone,
int flags,
SIFVersion version)
throws ADKParsingException,
SIFException,
java.io.IOException
SIFElement.
msg - The content to parsezone - The Zone from which the message was received, or null if
not applicable or not knownflags - One or more FLG_ constants, or zero if no
flags are applicableversion - The version of SIF that will be associated with the
returned object. By default, SIFParser uses the default version of
SIF in effect for the agent when parsing messages that do not have
a SIF_Message envelope. By specifying a value to this parameter, you
can change the version of SIF associated with the returned object in
the event there is no SIF_Message envelope present in the XML
content. Note that when parsing XML content with a SIF_Message
envelope, SIFParser ignores this parameter and instead uses the
version indicated by the Version and xmlns attributes
ADKParsingException - is thrown if unable to parse the message
SIFException - is thrown if unable to parse the message
java.io.IOException - is thrown if an error is reported while reading the message contentpublic abstract SIFElement getParsed()
public static void main(java.lang.String[] args)
Usage: SIFParser [/v n.n] file
Use the /v option to specify a version of SIF (e.g. "/v 1.5r1").
Defaults to the latest version of SIF supported by the ADK.
args - Command-Line arguments ([/v n.n] file)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||