CSDLFetcher
open class CSDLFetcher : ObjectBase, @unchecked Sendable
Callback which can locate and fetch the text of an Open Data Protocol (OData) service metadata (CSDL) document.
See also
CsdlParser.csdlFetcher.
-
Default initializer.
Declaration
Swift
override public init() -
Declaration
Swift
open func accept(uri: String, ns: String) throws -> BoolParameters
uriLocation of document to be read.
nsNamespace for schema to be read.
Return Value
trueif this fetcher accepts a location (or associated namespace), meaning that afetchcall would be expected to succeed. This function returnsfalseby default for OData standard vocabulary namespaces (Org.OData.*), otherwise this function returnstrue. Override this function in subclasses to returntrueonly for those well-known location/namespace values that the fetcher expects that it can resolve to a service metadata document. -
Throws
CsdlExceptionif the document cannot be fetched.Declaration
Swift
open func fetch(uri: String, ns: String) throws -> StringParameters
uriLocation of document to be read.
nsNamespace for schema to be read.
Return Value
The XML content of a service metadata document at the specified URL.
-
Declaration
Swift
open func ignore(uri: String, ns: String) throws -> BoolParameters
uriLocation of document to be read.
nsNamespace for schema to be read.
Return Value
trueif this fetcher wants to force theCsdlParserto ignore a reference. This function returnsfalseby default. Override this function in subclasses to returntrueonly for those well-known location/namespace values that the fetcher wants to suppress fetching for.