org.gcube.opensearch.opensearchoperator.resource
Interface OpenSearchResource

All Known Implementing Classes:
ISOpenSearchResource, LocalOpenSearchResource

public interface OpenSearchResource

Interface of the OpenSearch resource class that contains information pertaining to an OpenSearch provider

Author:
gerasimos.farantatos

Method Summary
 org.w3c.dom.Document getDescriptionDocument()
          Retrieves the description document of the OpenSearch provider described by this resource
 java.lang.String getDescriptionDocURL()
          Retrieves the URL of the description document of the OpenSearch provider described by this resource
 java.lang.String getName()
          Returns the name of the OpenSearch provider
 java.lang.String getParameterQName(java.lang.String fieldName)
          Retrieves the fully qualified name of an OpenSearch parameter which corresponds to a field
 java.util.Map<java.lang.String,java.lang.String> getParameters()
          Retrieved the full mapping from field names to fully ns-qualified OpenSearch parameters as contained in the OpenSearch Resource
 java.util.Map<java.lang.String,java.lang.String> getPresentationInformation(java.lang.String MIMEType)
          Retrieves the presentation information, that is, a mapping from field names to XPath expressions
 javax.xml.xpath.XPathExpression getRecordIdXPath(java.lang.String MIMEType)
          Retrieves an XPathExpression that can be used to extract a record id a from a search result record
 javax.xml.xpath.XPathExpression getRecordSplitXPath(java.lang.String MIMEType)
          Retrieves an XPathExpression that can be used to split a search result page of a given MIME type to individual records
 java.lang.String getSecuritySpecs()
          Retrieves the security specifications of this OpenSearch provider
 java.util.List<java.lang.String> getTransformationTypes()
          Retrieves a list of all MIME types for which there exists a transformation specification
 javax.xml.transform.Transformer getTransformer()
          Retrieves a transformer that can be used to transform the results of the first MIME type appearing in this OpenSearch resource that are returned by the provider described by this resource
 javax.xml.transform.Transformer getTransformer(java.lang.String MIMEType)
          Retrieves a transformer that can be used to transform the results of a given MIME type that are returned by the provider described by this resource
 boolean isBrokered()
          Determines whether the provider described by this resource returns brokered results, i.e the results it returns describe other OpenSearch providers
 boolean isSecure()
          Determines if the provider described by this resource uses a security scheme
 

Method Detail

getName

java.lang.String getName()
Returns the name of the OpenSearch provider

Returns:
The name of the OpenSearch provider

isBrokered

boolean isBrokered()
Determines whether the provider described by this resource returns brokered results, i.e the results it returns describe other OpenSearch providers

Returns:
true if the provider returns brokered results, false otherwise

isSecure

boolean isSecure()
Determines if the provider described by this resource uses a security scheme

Returns:
true if the provider uses a security scheme, false otherwise

getSecuritySpecs

java.lang.String getSecuritySpecs()
Retrieves the security specifications of this OpenSearch provider

Returns:
The security specifications of the provider

getDescriptionDocument

org.w3c.dom.Document getDescriptionDocument()
Retrieves the description document of the OpenSearch provider described by this resource

Returns:
A Document representing the description document of the provider

getDescriptionDocURL

java.lang.String getDescriptionDocURL()
Retrieves the URL of the description document of the OpenSearch provider described by this resource

Returns:
A String containing the URL of the description document of the provider

getTransformer

javax.xml.transform.Transformer getTransformer(java.lang.String MIMEType)
                                               throws java.lang.Exception
Retrieves a transformer that can be used to transform the results of a given MIME type that are returned by the provider described by this resource

Parameters:
MIMEType - The MIME type of the results that will be transformed
Returns:
The transformer that can be used to transform the results of the given MIME type
Throws:
java.lang.Exception - In case of error

getRecordSplitXPath

javax.xml.xpath.XPathExpression getRecordSplitXPath(java.lang.String MIMEType)
                                                    throws java.lang.Exception
Retrieves an XPathExpression that can be used to split a search result page of a given MIME type to individual records

Parameters:
MIMEType - The MIME type of the results returned by the provider described by this resource
Returns:
The Xpath expression that can be used to split search result pages to individual records
Throws:
java.lang.Exception - In case of error

getRecordIdXPath

javax.xml.xpath.XPathExpression getRecordIdXPath(java.lang.String MIMEType)
                                                 throws java.lang.Exception
Retrieves an XPathExpression that can be used to extract a record id a from a search result record

Parameters:
MIMEType - The MIME type of the results returned by the provider described by this resource
Returns:
The Xpath expression that can be used extract a record id from a search result record
Throws:
java.lang.Exception - In case of error

getTransformer

javax.xml.transform.Transformer getTransformer()
                                               throws java.lang.Exception
Retrieves a transformer that can be used to transform the results of the first MIME type appearing in this OpenSearch resource that are returned by the provider described by this resource

Returns:
The transformer that can be used to transform the results of the first MIME type appearing in this OpenSearch resource
Throws:
java.lang.Exception - In case of error

getTransformationTypes

java.util.List<java.lang.String> getTransformationTypes()
Retrieves a list of all MIME types for which there exists a transformation specification

Returns:
All MIME types for which there exists a transformation specification

getPresentationInformation

java.util.Map<java.lang.String,java.lang.String> getPresentationInformation(java.lang.String MIMEType)
Retrieves the presentation information, that is, a mapping from field names to XPath expressions

Returns:

getParameterQName

java.lang.String getParameterQName(java.lang.String fieldName)
Retrieves the fully qualified name of an OpenSearch parameter which corresponds to a field

Parameters:
fieldName - The name of the field corresponding to the requested OpenSearch parameter
Returns:
The fully qualified name of the OpenSearch parameter

getParameters

java.util.Map<java.lang.String,java.lang.String> getParameters()
Retrieved the full mapping from field names to fully ns-qualified OpenSearch parameters as contained in the OpenSearch Resource

Returns:
All field name to fully ns-qualified mappings