|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.presentation.Source
biz.c24.io.api.presentation.swift.SwiftPreParser
public class SwiftPreParser
A source capable of parsing any SWIFT message.
If the element passed to the readObject(biz.c24.io.api.data.Element)
method is null
then the appropriate message type will
be found via reflection. If the base package name has not been set, then the SWIFT messages will be presumed to have
been deployed into (the default) packages:
biz.c24.io.swift2008.mt1xx
biz.c24.io.swift2008.mt2xx
biz.c24.io.swift2008.mt3xx
biz.c24.io.swift2008.mt4xx
biz.c24.io.swift2008.mt5xx
biz.c24.io.swift2008.mt6xx
biz.c24.io.swift2008.mt7xx
biz.c24.io.swift2008.mt8xx
biz.c24.io.swift2008.mt9xx
biz.c24.io.swift2008.commongroup
If none of these yield a valid class then the default packages for past releases will be examined, i.e.
biz.c24.io.swift2006.*, biz.c24.io.swift2005.*, biz.c24.io.swift2003.*, biz.c24.io.swift2002.*
.
The elements that represent the root of the message types will be presumed to use the (default) naming scheme of the
SWIFT data model, i.e. "MTxxxi" for incoming messages or "MTxxxo" for outgoing messages.
If the element passed to the readObject(biz.c24.io.api.data.Element)
method is not null
then it should have a complex type
which contains elements whose types are the incoming and outgoing SWIFT messages. The names of these elements should
conform to the naming scheme described above.
Source
,
Serialized FormConstructor Summary | |
---|---|
SwiftPreParser()
Constructs a new instance. |
|
SwiftPreParser(InputStream stream)
Constructs a new instance which will read from stream . |
|
SwiftPreParser(Reader reader)
Constructs a new instance which will read from reader . |
|
SwiftPreParser(SwiftPreParser clone)
Constructs a new instance cloned from clone . |
Method Summary | |
---|---|
Object |
clone()
|
String |
getBasePackageName()
Returns the base package name. |
ClassLoader |
getClassLoader()
Returns the class loader. |
TextualSource |
getWrappedSource()
Deprecated. Use getWrappedSwiftSource() instead. |
SwiftSource |
getWrappedSwiftSource()
|
ComplexDataObject |
readObject()
Reads an object from the the reader or input stream that has been set, infering the SWIFT FIN message type by pre-parsing the required header blocks. |
void |
readObject(ComplexDataObject object)
Reads an object from the the reader or input stream that has been set (optional operation). |
ComplexDataObject |
readObject(Element element)
Reads an object from the the reader or input stream that has been set. |
SwiftMessage |
readSwiftMessage()
Reads a SwiftMessage from the the reader or input stream that has been set, infering the SWIFT FIN message type by pre-parsing. |
void |
setBasePackageName(String basePackageName)
Sets the base package name. |
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader. |
void |
setInputStream(InputStream stream,
URI systemId)
Sets the input stream and system ID (optional operation). |
void |
setReader(Reader reader)
Sets the reader (optional operation). |
Methods inherited from class biz.c24.io.api.presentation.Source |
---|
checkInit, getEncoding, getInputStream, getMarkableInputStream, getParseListener, getReader, getSystemId, reader, ready, setEncoding, setInputStream, setParseListener, setReader, setSystemId, stream |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwiftPreParser()
public SwiftPreParser(SwiftPreParser clone)
clone
.
clone
- The instance to clone.public SwiftPreParser(Reader reader)
reader
.
reader
- The reader to read the SWIFT data from.public SwiftPreParser(InputStream stream)
stream
.
stream
- The stream to read the SWIFT data from.Method Detail |
---|
public String getBasePackageName()
null
is passed to the
readObject(biz.c24.io.api.data.Element)
method.
null
if it has not been set.public void setBasePackageName(String basePackageName)
basePackageName
- The new base package name.public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader classLoader)
classLoader
- The new class loader.public void setReader(Reader reader)
Source
setReader
in class Source
reader
- The new value.public void setInputStream(InputStream stream, URI systemId)
Source
setInputStream
in class Source
stream
- The new value.systemId
- The system ID identifying the stream.public ComplexDataObject readObject(Element element) throws IOException
This method can be used as for other Source
subclasses. Passing the value (Element) null
is
equivalent to calling readObject()
and this later approach should be preferred for code simplicity.
readObject
in class Source
element
- The element declaration to which the input data is expected to adhere.
IOException
- If the complete object could not be read for any reason.public void readObject(ComplexDataObject object) throws IOException
This method can be used as for other Source
subclasses. Passing the value (ComplexDataObject) null
is
equivalent to calling readObject()
and this later approach should be preferred for code simplicity.
readObject
in class Source
object
- The object into which the input data should be parsed.
IOException
- If the complete object could not be read for any reason.public ComplexDataObject readObject() throws IOException
IOException
- If there is a problem reading the message.public SwiftMessage readSwiftMessage() throws IOException
SwiftMessage
from the the reader or input stream that has been set, infering the SWIFT FIN message type by pre-parsing.
This method wraps the return value of readObject()
in a new SwiftMessage
object.
IOException
- If there is a problem reading the message.public TextualSource getWrappedSource()
getWrappedSwiftSource()
instead.
public SwiftSource getWrappedSwiftSource()
public Object clone()
clone
in class Source
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |