C# Class Terradue.OpenSearch.OpenSearchFactory

OpenSearch factory. Helper class with a set of static class with the most common manipulation functions for OpenSearch.
Afficher le fichier Open project: Terradue/DotNetOpenSearch

Méthodes publiques

Méthode Description
BuildRequestUrlForTemplate ( OpenSearchDescriptionUrl remoteUrlTemplate, NameValueCollection searchParameters, NameValueCollection requestUrlTemplateDef, QuerySettings querySettings ) : OpenSearchUrl

Builds the request URL for template.

BuildRequestUrlForTemplate ( OpenSearchDescriptionUrl remoteUrlTemplate, NameValueCollection searchParameters, QuerySettings querySettings ) : OpenSearchUrl

Builds the request URL for template.

BuildRequestUrlFromTemplateNameParameters ( OpenSearchUrl remoteUrlTemplate, NameValueCollection templateSearchParameters ) : string

Builds the request URL from template name parameters.

FindOpenSearchable ( OpenSearchEngine ose, Uri baseUrl, string mimeType = null, bool soft = false ) : IOpenSearchable

Finds the open search description.

GetBaseOpenSearchParameter ( ) : NameValueCollection

Gets the base open search parameter.

GetCount ( NameValueCollection parameters ) : int
GetDefaultParametersDescription ( int maxCount ) : List
GetEnclosures ( IOpenSearchResultCollection result ) : SyndicationLink[]
GetIdFromParamName ( IOpenSearchable entity, string mimeType, string paramName ) : string

Gets the name of the identifier from parameter.

GetOpenSearchParameters ( OpenSearchDescriptionUrl osUrl ) : NameValueCollection

Gets the open search parameters.

GetOpenSearchUrlByRel ( OpenSearchDescription osd, string rel ) : OpenSearchDescriptionUrl

Gets the open search URL by rel.

GetOpenSearchUrlByType ( OpenSearchDescription osd, string type ) : OpenSearchDescriptionUrl

Gets the type of the open search URL by.

GetOpenSearchUrlByTypeAndMaxParam ( OpenSearchDescription osd, List mimeTypes, NameValueCollection osParameters ) : OpenSearchDescriptionUrl
GetParamNameFromId ( NameValueCollection parameters, string id ) : string

Gets the parameter name from identifier.

LoadOpenSearchDescriptionDocument ( OpenSearchUrl url ) : OpenSearchDescription

Loads the OpenSearch description document.

MergeOpenSearchParameters ( IOpenSearchable entities, string contentType ) : NameValueCollection

Merges the open search parameters.

PaginationFreeEqual ( NameValueCollection parameters, NameValueCollection parameters2 ) : bool

Paginations the free equal.

RemoveLinksByRel ( IOpenSearchResultCollection &results, string relType ) : void
ReplaceOpenSearchDescriptionLinks ( IOpenSearchable entity, IOpenSearchResultCollection osr ) : void
ReplaceSelfLinks ( IOpenSearchable entity, NameValueCollection parameters, IOpenSearchResultCollection osr, Func entryTemplate ) : void
ReplaceSelfLinks ( IOpenSearchable entity, NameValueCollection parameters, IOpenSearchResultCollection osr, Func entryTemplate, string contentType ) : void
ReplaceSelfLinks ( IOpenSearchable entity, OpenSearchRequest request, IOpenSearchResultCollection osr, Func entryTemplate ) : void
ReplaceTemplateByIdentifier ( NameValueCollection osParameters, OpenSearchDescriptionUrl osdUrl ) : NameValueCollection
ResolveTypeFromRequest ( HttpRequest request, OpenSearchEngine ose ) : Type
ReverseTemplateOpenSearchParameters ( NameValueCollection osdParam ) : NameValueCollection

Reverses the template open search parameters.

Method Details

BuildRequestUrlForTemplate() public static méthode

Builds the request URL for template.
public static BuildRequestUrlForTemplate ( OpenSearchDescriptionUrl remoteUrlTemplate, NameValueCollection searchParameters, NameValueCollection requestUrlTemplateDef, QuerySettings querySettings ) : OpenSearchUrl
remoteUrlTemplate Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl Remote URL template.
searchParameters System.Collections.Specialized.NameValueCollection Search parameters.
requestUrlTemplateDef System.Collections.Specialized.NameValueCollection
querySettings QuerySettings
Résultat OpenSearchUrl

BuildRequestUrlForTemplate() public static méthode

Builds the request URL for template.
public static BuildRequestUrlForTemplate ( OpenSearchDescriptionUrl remoteUrlTemplate, NameValueCollection searchParameters, QuerySettings querySettings ) : OpenSearchUrl
remoteUrlTemplate Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl Remote URL template.
searchParameters System.Collections.Specialized.NameValueCollection Search parameters.
querySettings QuerySettings
Résultat OpenSearchUrl

BuildRequestUrlFromTemplateNameParameters() public static méthode

Builds the request URL from template name parameters.
public static BuildRequestUrlFromTemplateNameParameters ( OpenSearchUrl remoteUrlTemplate, NameValueCollection templateSearchParameters ) : string
remoteUrlTemplate OpenSearchUrl Remote URL template.
templateSearchParameters System.Collections.Specialized.NameValueCollection Template search parameters.
Résultat string

FindOpenSearchable() public static méthode

Finds the open search description.
public static FindOpenSearchable ( OpenSearchEngine ose, Uri baseUrl, string mimeType = null, bool soft = false ) : IOpenSearchable
ose Terradue.OpenSearch.Engine.OpenSearchEngine
baseUrl System.Uri Base URL.
mimeType string
soft bool
Résultat IOpenSearchable

GetBaseOpenSearchParameter() public static méthode

Gets the base open search parameter.
public static GetBaseOpenSearchParameter ( ) : NameValueCollection
Résultat System.Collections.Specialized.NameValueCollection

GetCount() public static méthode

public static GetCount ( NameValueCollection parameters ) : int
parameters System.Collections.Specialized.NameValueCollection
Résultat int

GetDefaultParametersDescription() public static méthode

public static GetDefaultParametersDescription ( int maxCount ) : List
maxCount int
Résultat List

GetEnclosures() public static méthode

public static GetEnclosures ( IOpenSearchResultCollection result ) : SyndicationLink[]
result IOpenSearchResultCollection
Résultat SyndicationLink[]

GetIdFromParamName() public static méthode

Gets the name of the identifier from parameter.
public static GetIdFromParamName ( IOpenSearchable entity, string mimeType, string paramName ) : string
entity IOpenSearchable Entity.
mimeType string MIME type.
paramName string Parameter name.
Résultat string

GetOpenSearchParameters() public static méthode

Gets the open search parameters.
public static GetOpenSearchParameters ( OpenSearchDescriptionUrl osUrl ) : NameValueCollection
osUrl Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl Os URL.
Résultat System.Collections.Specialized.NameValueCollection

GetOpenSearchUrlByRel() public static méthode

Gets the open search URL by rel.
public static GetOpenSearchUrlByRel ( OpenSearchDescription osd, string rel ) : OpenSearchDescriptionUrl
osd Terradue.OpenSearch.Schema.OpenSearchDescription Osd.
rel string Rel.
Résultat Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl

GetOpenSearchUrlByType() public static méthode

Gets the type of the open search URL by.
public static GetOpenSearchUrlByType ( OpenSearchDescription osd, string type ) : OpenSearchDescriptionUrl
osd Terradue.OpenSearch.Schema.OpenSearchDescription Osd.
type string Type.
Résultat Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl

GetOpenSearchUrlByTypeAndMaxParam() public static méthode

public static GetOpenSearchUrlByTypeAndMaxParam ( OpenSearchDescription osd, List mimeTypes, NameValueCollection osParameters ) : OpenSearchDescriptionUrl
osd Terradue.OpenSearch.Schema.OpenSearchDescription
mimeTypes List
osParameters System.Collections.Specialized.NameValueCollection
Résultat Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl

GetParamNameFromId() public static méthode

Gets the parameter name from identifier.
public static GetParamNameFromId ( NameValueCollection parameters, string id ) : string
parameters System.Collections.Specialized.NameValueCollection Parameters.
id string Identifier.
Résultat string

LoadOpenSearchDescriptionDocument() public static méthode

Loads the OpenSearch description document.
public static LoadOpenSearchDescriptionDocument ( OpenSearchUrl url ) : OpenSearchDescription
url OpenSearchUrl URL.
Résultat Terradue.OpenSearch.Schema.OpenSearchDescription

MergeOpenSearchParameters() public static méthode

Merges the open search parameters.
public static MergeOpenSearchParameters ( IOpenSearchable entities, string contentType ) : NameValueCollection
entities IOpenSearchable Entities.
contentType string Content type.
Résultat System.Collections.Specialized.NameValueCollection

PaginationFreeEqual() public static méthode

Paginations the free equal.
public static PaginationFreeEqual ( NameValueCollection parameters, NameValueCollection parameters2 ) : bool
parameters System.Collections.Specialized.NameValueCollection Parameters.
parameters2 System.Collections.Specialized.NameValueCollection Parameters2.
Résultat bool

RemoveLinksByRel() public static méthode

public static RemoveLinksByRel ( IOpenSearchResultCollection &results, string relType ) : void
results IOpenSearchResultCollection
relType string
Résultat void

ReplaceOpenSearchDescriptionLinks() public static méthode

public static ReplaceOpenSearchDescriptionLinks ( IOpenSearchable entity, IOpenSearchResultCollection osr ) : void
entity IOpenSearchable
osr IOpenSearchResultCollection
Résultat void

ReplaceSelfLinks() public static méthode

public static ReplaceSelfLinks ( IOpenSearchable entity, NameValueCollection parameters, IOpenSearchResultCollection osr, Func entryTemplate ) : void
entity IOpenSearchable
parameters System.Collections.Specialized.NameValueCollection
osr IOpenSearchResultCollection
entryTemplate Func
Résultat void

ReplaceSelfLinks() public static méthode

public static ReplaceSelfLinks ( IOpenSearchable entity, NameValueCollection parameters, IOpenSearchResultCollection osr, Func entryTemplate, string contentType ) : void
entity IOpenSearchable
parameters System.Collections.Specialized.NameValueCollection
osr IOpenSearchResultCollection
entryTemplate Func
contentType string
Résultat void

ReplaceSelfLinks() public static méthode

public static ReplaceSelfLinks ( IOpenSearchable entity, OpenSearchRequest request, IOpenSearchResultCollection osr, Func entryTemplate ) : void
entity IOpenSearchable
request Terradue.OpenSearch.Request.OpenSearchRequest
osr IOpenSearchResultCollection
entryTemplate Func
Résultat void

ReplaceTemplateByIdentifier() public static méthode

public static ReplaceTemplateByIdentifier ( NameValueCollection osParameters, OpenSearchDescriptionUrl osdUrl ) : NameValueCollection
osParameters System.Collections.Specialized.NameValueCollection
osdUrl Terradue.OpenSearch.Schema.OpenSearchDescriptionUrl
Résultat System.Collections.Specialized.NameValueCollection

ResolveTypeFromRequest() public static méthode

public static ResolveTypeFromRequest ( HttpRequest request, OpenSearchEngine ose ) : Type
request System.Web.HttpRequest
ose Terradue.OpenSearch.Engine.OpenSearchEngine
Résultat System.Type

ReverseTemplateOpenSearchParameters() public static méthode

Reverses the template open search parameters.
public static ReverseTemplateOpenSearchParameters ( NameValueCollection osdParam ) : NameValueCollection
osdParam System.Collections.Specialized.NameValueCollection Osd parameter.
Résultat System.Collections.Specialized.NameValueCollection