CsdlParser

open class CsdlParser

Parser for Open Data Protocol (OData) service metadata documents (CSDL). A new parser should be created for each {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#parse(kotlin.String, kotlin.String) CsdlParser.parse} call. A parser should not be shared by multiple threads.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var includeElements: XmlElementList
Link copied to clipboard
var includeReferences: XmlElementList
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun includeNamespace(ns: String)
open fun includeNamespace(ns: String, alias: String?)

Add to {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeReferences CsdlParser.includeReferences} a supplementary CSDL edmx:Reference (with embedded edmx:Include). Call this function before {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#parse(kotlin.String, kotlin.String) CsdlParser.parse} if the document to be parsed is missing expected edmx:Reference elements for well-known schemas. This function generates an edmx:Reference with a fabricated "Uri" (with value "include/ns.xml"). It can be used together with a {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#csdlFetcher CsdlParser.csdlFetcher} which resolves documents either by fabricated location (include/ns.xml) or by namespace (ns).

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#csdlOptions CsdlParser.csdlOptions}, {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeReference(kotlin.String, kotlin.String, kotlin.String?) CsdlParser.includeReference}.

Link copied to clipboard
open fun includeReference(uri: String, ns: String)
open fun includeReference(uri: String, ns: String, alias: String?)

Add to {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeReferences CsdlParser.includeReferences} a supplementary CSDL edmx:Reference (with embedded edmx:Include). Call this function before {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#parse(kotlin.String, kotlin.String) CsdlParser.parse} if the document to be parsed is missing expected edmx:Reference elements for well-known schemas. This function generates an edmx:Reference with a caller-specified "Uri". It can be used together with a {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#csdlFetcher CsdlParser.csdlFetcher} which resolves documents either by caller-specified location (uri) or by namespace (ns).

See Also:

{@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#csdlOptions CsdlParser.csdlOptions}, {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeNamespace(kotlin.String, kotlin.String?) CsdlParser.includeNamespace}.

Link copied to clipboard
open fun includeSchema(schema: DataSchema)

Include the definitions of a pre-parsed schema into the document to be parsed. Call this function before {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#parse(kotlin.String, kotlin.String) CsdlParser.parse} if the document to be parsed has an edmx:Reference element for a well-known schema, and the pre-parsed schema should be used rather than loading the referenced schema over the network.

Link copied to clipboard
open fun mergeAnnotationsFrom(text: String, file: String)
open fun mergeAnnotationsFrom(text: String, file: String, tags: StringSet)

Merge into {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeReferences CsdlParser.includeReferences} and {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeElements CsdlParser.includeElements} any extra annotation elements that are found in text.

Link copied to clipboard
open fun mergeDefinitionsFrom(text: String, file: String)
open fun mergeDefinitionsFrom(text: String, file: String, tags: StringSet)

Merge into {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeReferences CsdlParser.includeReferences} and {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeElements CsdlParser.includeElements} any extra definition elements that are found in text.

Link copied to clipboard
open fun mergeReferencesFrom(text: String, file: String)

Merge into {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeReferences CsdlParser.includeReferences} any extra Reference elements that are found in text.

Link copied to clipboard
open fun mergeSchemasFrom(text: String, file: String)

Merge into {@link com.sap.cloud.mobile.kotlin.odata.csdl.CsdlParser#includeElements CsdlParser.includeElements} any extra Schema elements that are found in text.

Link copied to clipboard
open fun parse(text: String, url: String): CsdlDocument

Parse the text of an Open Data Protocol (OData) service metadata (CSDL) document. Supports OData versions 1.0 to 4.0.

Link copied to clipboard
open fun parseInProxy(text: String, url: String): CsdlDocument

For internal use only.

Link copied to clipboard
open fun parseNoExcept(text: String, url: String): CsdlDocument

For internal use only.