CSDLFetcher
open class CSDLFetcher : ObjectBase
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 -> Bool
Parameters
uri
Location of document to be read.
ns
Namespace for schema to be read.
Return Value
true
if this fetcher accepts a location (or associated namespace), meaning that afetch
call would be expected to succeed. This function returnsfalse
by default for OData standard vocabulary namespaces (Org.OData.*), otherwise this function returnstrue
. Override this function in subclasses to returntrue
only for those well-known location/namespace values that the fetcher expects that it can resolve to a service metadata document. -
Throws
CsdlException
if the document cannot be fetched.Declaration
Swift
open func fetch(uri: String, ns: String) throws -> String
Parameters
uri
Location of document to be read.
ns
Namespace 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 -> Bool
Parameters
uri
Location of document to be read.
ns
Namespace for schema to be read.
Return Value
true
if this fetcher wants to force theCsdlParser
to ignore a reference. This function returnsfalse
by default. Override this function in subclasses to returntrue
only for those well-known location/namespace values that the fetcher wants to suppress fetching for.