public abstract class CsdlFetcher
extends java.lang.Object
Constructor and Description |
---|
CsdlFetcher() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.lang.String uri,
java.lang.String ns)
Return
true if this fetcher accepts a location (or associated namespace), meaning that a CsdlFetcher.fetch call would be expected to succeed. |
abstract java.lang.String |
fetch(java.lang.String uri,
java.lang.String ns)
Return the XML content of a service metadata document at the specified URL.
|
boolean |
ignore(java.lang.String uri,
java.lang.String ns)
Return
true if this fetcher wants to force the CsdlParser to ignore a reference. |
public boolean accept(java.lang.String uri, java.lang.String ns)
Return true
if this fetcher accepts a location (or associated namespace), meaning that a CsdlFetcher.fetch
call would be expected to succeed.
This function returns false
by default for OData standard vocabulary namespaces (Org.OData.*), otherwise this function returns true
.
Override this function in subclasses to return true
only for those well-known location/namespace values that the fetcher expects that it can resolve to a service metadata document.
uri
- Location of document to be read.ns
- Namespace for schema to be read.true
if this fetcher accepts a location (or associated namespace), meaning that a CsdlFetcher.fetch
call would be expected to succeed.public abstract java.lang.String fetch(java.lang.String uri, java.lang.String ns)
Return the XML content of a service metadata document at the specified URL.
CsdlException
if the document cannot be fetched.
uri
- Location of document to be read.ns
- Namespace for schema to be read.public boolean ignore(java.lang.String uri, java.lang.String ns)
Return true
if this fetcher wants to force the CsdlParser
to ignore a reference.
This function returns false
by default.
Override this function in subclasses to return true
only for those well-known location/namespace values that the fetcher wants to suppress fetching for.
uri
- Location of document to be read.ns
- Namespace for schema to be read.true
if this fetcher wants to force the CsdlParser
to ignore a reference.