SDMParser Public APIs

Provides a list of public APIs in SDMParser library.

SDMParser Interfaces

ISDMParser
ISDMODataServiceDocument parseSDMODataServiceDocumentXML(String serviceDocumentXML) 
ISDMODataServiceDocument parseSDMODataServiceDocumentXML(InputStream stream)

ISDMODataSchema parseSDMODataSchemaXML(String schemaXML, ISDMODataServiceDocument serviceDocument)
ISDMODataSchema parseSDMODataSchemaXML(InputStream stream, ISDMODataServiceDocument serviceDocument)

List<ISDMODataEntry> parseSDMODataEntriesXML(String entriesXML, String collectionId, ISDMODataSchema schema) 
List<ISDMODataEntry> parseSDMODataEntriesXML(InputStream stream, String collectionId, ISDMODataSchema schema)

ISDMODataOpenSearchDescription parseSDMODataOpenSearchDescriptionXML(String openSearchDescriptionXML, String collectionId, ISDMODataServiceDocument serviceDocument) 
ISDMODataOpenSearchDescription parseSDMODataOpenSearchDescriptionXML(InputStream stream, String collectionId, ISDMODataServiceDocument serviceDocument)

ISDMODataError parseSDMODataErrorXML(String errorXML)
ISDMODataError parseSDMODataErrorXML(InputStream stream)

List<ISDMODataEntry> parseFunctionImportResultXML(String xml, ISDMODataFunctionImport functionImport, ISDMODataSchema schema) 
List<ISDMODataEntry> parseFunctionImportResultXML(InputStream stream, ISDMODataFunctionImport functionImport, ISDMODataSchema schema)

String buildSDMODataEntryXML(ISDMODataEntry entry) 
String buildSDMODataDocumentXML(ISDMParserDocument document)
	
ISDMParserDocument parseXML(String xml) 
ISDMParserDocument parseXML(InputStream stream)
    

SDM Parser APIs

void enableParserPerformanceLog(boolean perflog, android.content.Context applicationContext);
    void readNameMap();
    void writeNameMap(int starpos);
    public abstract void putComplexPropertyValue(String propertyValue,String... propertyName) ;

Technical Details

The SDMParser component uses javax.xml.parsers.SAXParser as a parser engine, defining its own extension of org.xml.sax.helpers.DefaultHandler class as a handler for SAXParser.

The outcome documents of SDMParser are all optimized for persistence using SDMPersistence, implementing the ISDMPersistable interface.

To support optimized performance and ensure consistent behavior, SDMParser can persist parsing related data on the device. End users can not delete parser related persisted data, unless they uninstall the whole application. To set the default folder of SDMParser’s persistence, change the default value of the appropriate preference: PARSER_DEFAULTFOLDER_PATH (see more at the section about the SDMConfiguration component of the Android OData SDK).

Parsing related data is loaded during the initialization of the SDMParser component. This means that SDMParser must always be initialized before using the SDMParser documents.

As a result of parsing, SDMParser provides Java Object representations of the appropriate OData structures. Each such SDMOData Java Object is a representation of the appropriate Data XML and provides dynamic access to all of its elements and attributes. Besides the full access with the dynamic method, OData Java Objects provide interfaces for a more convenient access of data used in the most common scenarios.