C# Class Terradue.OpenSearch.Engine.OpenSearchEngine

The engine for making OpenSearch request
Inheritance: IOpenSearchableFactory
Show file Open project: Terradue/DotNetOpenSearch Class Usage Examples

Public Methods

Method Description
ApplyOpenSearchElements ( IOpenSearchResultCollection &newResults, OpenSearchRequest request, IOpenSearchResponse response ) : void
AutoDiscoverFromQueryUrl ( OpenSearchUrl url ) : OpenSearchDescription

Try to discover the OpenSearchDescription from an URL.

Create ( OpenSearchDescription osd ) : IOpenSearchable

Create an IOpenSearchable from an OpenSearchUrl

Create ( OpenSearchUrl url ) : IOpenSearchable

Create an IOpenSearchable from an OpenSearchUrl

GetEnclosures ( IOpenSearchResultCollection result ) : SyndicationLink[]

Gets the enclosures.

GetExtensionByContentTypeAbility ( string contentType ) : IOpenSearchEngineExtension

Gets the first extension by content type ability.

GetExtensionByExtensionName ( string resultName ) : IOpenSearchEngineExtension
GetFirstExtensionByTypeAbility ( Type type ) : IOpenSearchEngineExtension
GetTypeByExtensionName ( string resultName ) : Type

Gets the name of the type by extension's result name

LoadOpenSearchDescriptionDocument ( OpenSearchUrl url ) : OpenSearchDescription

Loads an OpenSearchDescription document from an Url.

LoadPlugins ( ) : void

Loads the plugins automatically based on Mono.Addins

OpenSearchEngine ( ) : System

Initializes a new instance of the Terradue.OpenSearch.OpenSearchEngine class.

Query ( IOpenSearchable entity, NameValueCollection parameters ) : IOpenSearchResultCollection

Query the specified IOpenSearchable entity with specific parameters and returns result in native format.

Query ( IOpenSearchable entity, NameValueCollection parameters, Type resultType ) : IOpenSearchResultCollection

Query the specified IOpenSearchable entity with specific parameters and result with the specific result type.

Query ( IOpenSearchable entity, NameValueCollection parameters, string resultName ) : IOpenSearchResultCollection

Query the specified IOpenSearchable entity with specific parameters and result based on the extension's result name.

RegisterExtension ( IOpenSearchEngineExtension extension ) : void

Registers an extension for a specific type.

RegisterPostSearchFilter ( PostFilterAction filter ) : void

Registers a post search filter.

RegisterPreSearchFilter ( PreFilterAction filter ) : void

Registers a pre search filter.

Private Methods

Method Description
ApplyPostSearchFilters ( OpenSearchRequest request, IOpenSearchResponse &response ) : void

Applies the post search filters.

ApplyPreSearchFilters ( OpenSearchRequest &request ) : void

Applies the pre search filters.

Method Details

ApplyOpenSearchElements() public method

public ApplyOpenSearchElements ( IOpenSearchResultCollection &newResults, OpenSearchRequest request, IOpenSearchResponse response ) : void
newResults IOpenSearchResultCollection
request Terradue.OpenSearch.Request.OpenSearchRequest
response IOpenSearchResponse
return void

AutoDiscoverFromQueryUrl() public method

Try to discover the OpenSearchDescription from an URL.
public AutoDiscoverFromQueryUrl ( OpenSearchUrl url ) : OpenSearchDescription
url OpenSearchUrl URL.
return Terradue.OpenSearch.Schema.OpenSearchDescription

Create() public method

Create an IOpenSearchable from an OpenSearchUrl
public Create ( OpenSearchDescription osd ) : IOpenSearchable
osd Terradue.OpenSearch.Schema.OpenSearchDescription Osd.
return IOpenSearchable

Create() public method

Create an IOpenSearchable from an OpenSearchUrl
public Create ( OpenSearchUrl url ) : IOpenSearchable
url OpenSearchUrl URL to either a search or a description
return IOpenSearchable

GetEnclosures() public method

Gets the enclosures.
public GetEnclosures ( IOpenSearchResultCollection result ) : SyndicationLink[]
result IOpenSearchResultCollection Result.
return SyndicationLink[]

GetExtensionByContentTypeAbility() public method

Gets the first extension by content type ability.
public GetExtensionByContentTypeAbility ( string contentType ) : IOpenSearchEngineExtension
contentType string Content type.
return IOpenSearchEngineExtension

GetExtensionByExtensionName() public method

public GetExtensionByExtensionName ( string resultName ) : IOpenSearchEngineExtension
resultName string
return IOpenSearchEngineExtension

GetFirstExtensionByTypeAbility() public method

public GetFirstExtensionByTypeAbility ( Type type ) : IOpenSearchEngineExtension
type System.Type
return IOpenSearchEngineExtension

GetTypeByExtensionName() public method

Gets the name of the type by extension's result name
public GetTypeByExtensionName ( string resultName ) : Type
resultName string Result name.
return System.Type

LoadOpenSearchDescriptionDocument() public method

Loads an OpenSearchDescription document from an Url.
public LoadOpenSearchDescriptionDocument ( OpenSearchUrl url ) : OpenSearchDescription
url OpenSearchUrl URL.
return Terradue.OpenSearch.Schema.OpenSearchDescription

LoadPlugins() public method

Loads the plugins automatically based on Mono.Addins
public LoadPlugins ( ) : void
return void

OpenSearchEngine() public method

Initializes a new instance of the Terradue.OpenSearch.OpenSearchEngine class.
public OpenSearchEngine ( ) : System
return System

Query() public method

Query the specified IOpenSearchable entity with specific parameters and returns result in native format.
public Query ( IOpenSearchable entity, NameValueCollection parameters ) : IOpenSearchResultCollection
entity IOpenSearchable Entity.
parameters System.Collections.Specialized.NameValueCollection Parameters.
return IOpenSearchResultCollection

Query() public method

Query the specified IOpenSearchable entity with specific parameters and result with the specific result type.
public Query ( IOpenSearchable entity, NameValueCollection parameters, Type resultType ) : IOpenSearchResultCollection
entity IOpenSearchable Entity.
parameters System.Collections.Specialized.NameValueCollection Parameters.
resultType System.Type Result type.
return IOpenSearchResultCollection

Query() public method

Query the specified IOpenSearchable entity with specific parameters and result based on the extension's result name.
public Query ( IOpenSearchable entity, NameValueCollection parameters, string resultName ) : IOpenSearchResultCollection
entity IOpenSearchable Entity.
parameters System.Collections.Specialized.NameValueCollection Parameters.
resultName string Result name.
return IOpenSearchResultCollection

RegisterExtension() public method

Registers an extension for a specific type.
An extension with the same typoe already registered.
public RegisterExtension ( IOpenSearchEngineExtension extension ) : void
extension IOpenSearchEngineExtension Extension associated with the type
return void

RegisterPostSearchFilter() public method

Registers a post search filter.
public RegisterPostSearchFilter ( PostFilterAction filter ) : void
filter PostFilterAction Filter.
return void

RegisterPreSearchFilter() public method

Registers a pre search filter.
public RegisterPreSearchFilter ( PreFilterAction filter ) : void
filter PreFilterAction Filter.
return void