|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openadaptor.doconverter.XMLReader
org.openadaptor.doconverter.DOConverter
org.openadaptor.doconverter.BasicXML2DOConverter
public class BasicXML2DOConverter
The BasicXML2DOConverter is a subclass of DOConverter used for reading arrays of DataObjects in XML format. Currently it supports two versions of the syntax; 1.0 was the original, and 1.1 extends it to support 'streamed' attributes and a special 'wrapper' DataObject with a variable number of arguments whose DOTypes are encoded in the attribute tags.
BasicDO2XMLConverter| Field Summary | |
|---|---|
protected OASecurityManager |
_securityManager
Holds the OASecurityManager or null for no security |
protected static int |
ONE_OH
symbolic name for 1.0 syntax version (equals index in VERSION_STR_ARRAY) |
protected static int |
ONE_ONE
symbolic name for 1.1 syntax version (equals index in VERSION_STR_ARRAY) |
protected static java.lang.String |
TYPE_STR
DO XML syntax name "basicdo". |
protected static java.lang.String[] |
VERSION_STR_ARRAY
array of supported versions |
| Fields inherited from class org.openadaptor.doconverter.DOConverter |
|---|
_SECTION_START_TAG, _SECTIONEND, DCD_FALSE_VAL, DCD_NULL_ATTR, DCD_TRUE_VAL, decompressorFactory, DOC_TYPE_ATTR, DOC_VERSION_ATTR, ENDROW, log, MESSAGEID_ATTR, metadataParserFactory, ROW, ROWNUM, ROWNUM_NUMATTR, ROWNUM_TAG, SECTION_END_STR, SECTION_START_STR, START_TAG, XMLDATA_FALSE_VAL, XMLDATA_TRUE_VAL |
| Constructor Summary | |
|---|---|
BasicXML2DOConverter()
Designated constructor. |
|
| Method Summary | |
|---|---|
DataObject[] |
fromFile(java.lang.String filename,
DataObject[] prototypes,
DOTypeHolder types)
Reads a serialised DataObject message from file filename. |
DataObject[] |
fromParser(XParser parser,
DataObject[] prototypes,
DOTypeHolder types)
Creates an array of DataObjects from XML on parser input
stream. |
DataObject[] |
fromParser(XParser parser,
DOFactoryTypeHolder prototypes)
Creates an array of DataObjects from XML on parser input
stream. |
OASecurityManager |
getSecurityManager()
Returns the OASecurityManager used by the receiver. |
java.lang.String |
getSyntaxName()
Returns the type string "basicdo" |
java.lang.String |
getSyntaxVersion()
Returns the most "highest" version strings. |
java.lang.String[] |
getSyntaxVersions()
Returns the version strings. |
void |
setSecurityManager(OASecurityManager securityManager)
Sets the OASecurityManager used by the receiver. |
| Methods inherited from class org.openadaptor.doconverter.DOConverter |
|---|
getNewSectionStartTag, getNumberedRowTag, getSectionEndTag, getSectionStartTag, initialiseTags, main, xmlParsingFailed, xmlParsingFailed |
| Methods inherited from class org.openadaptor.doconverter.XMLReader |
|---|
matchComment, matchEndTagNamed, matchTag, matchTagExactly, nextTag, nextXMLElement, xmlParsingFailedExpecting, xmlParsingFailedExpecting |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.lang.String TYPE_STR
protected static java.lang.String[] VERSION_STR_ARRAY
protected static final int ONE_OH
protected static final int ONE_ONE
protected OASecurityManager _securityManager
| Constructor Detail |
|---|
public BasicXML2DOConverter()
| Method Detail |
|---|
public void setSecurityManager(OASecurityManager securityManager)
setSecurityManager in interface XML2DOConvertersecurityManager - New OASecurityManager.public OASecurityManager getSecurityManager()
getSecurityManager in interface XML2DOConverterpublic java.lang.String getSyntaxName()
getSyntaxName in interface XML2DOConvertergetSyntaxName in class DOConverterpublic java.lang.String getSyntaxVersion()
getSyntaxVersion in interface XML2DOConvertergetSyntaxVersion in class DOConverterpublic java.lang.String[] getSyntaxVersions()
getSyntaxVersions in interface XML2DOConvertergetSyntaxVersions in class DOConverter
public DataObject[] fromFile(java.lang.String filename,
DataObject[] prototypes,
DOTypeHolder types)
throws java.io.IOException,
DataObjectException
filename.
filename - name of file to be read.prototypes - Collection of DataObjects instances to be cloned
when creating DataObjects from the message.types - A collection of DOTypes for use in building the DataObjects,
but not defined in the Array of prototypes.
filename.
java.io.IOException - throw if there is a problem reading file
filename.
DataObjectException - thrown if there is a problem decoding the
the DataObject message (contains explanatory text).
public DataObject[] fromParser(XParser parser,
DataObject[] prototypes,
DOTypeHolder types)
throws java.io.IOException,
DataObjectException
parser input
stream.
If the prototypes reader is not null, the method will
populate copies of the prototype DataObject instances when it reads in
DataObjects with the same type name as that prototype.
fromParser in interface XML2DOConverterparser - XML data stream.prototypes - Collection of DataObjects instances to be cloned
when creating DataObjects from the message.types - A collection of DOTypes for use in building the DataObjects,
but not defined in the Array of prototypes.
DataObjectException - raised if the input stream was not valid
XML format.
java.io.IOException - raised if there was an input error.
public DataObject[] fromParser(XParser parser,
DOFactoryTypeHolder prototypes)
throws java.io.IOException,
DataObjectException
parser input
stream.
If the prototypes reader is not null, the method will
populate copies of the prototype DataObject instances when it reads in
DataObjects with the same type name as that prototype.
fromParser in interface XML2DOConverterparser - XML data stream.prototypes - Collection of DataObjects instances to be cloned
when creating DataObjects from the message.
DataObjectException - raised if the input stream was not valid
XML format.
java.io.IOException - raised if there was an input error.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||