org.gcube.opensearch.opensearchlibrary.query
Interface URLTemplate

All Known Implementing Classes:
BasicURLTemplate

public interface URLTemplate

Interface of the URL template class that is used to construct parse OpenSearch query templates and expose their parameters

Author:
gerasimos.farantatos

Method Summary
 java.util.List<java.lang.String> getOptionalParameters()
          Returns a list containing the qualified names of all optional parameters contained in the template
 java.util.List<java.lang.String> getRequiredParameters()
          Returns a list containing the qualified names of all required parameters contained in the template
 java.lang.String getTemplate()
          Returns the query template
 boolean hasParameter(java.lang.String name)
          Determines if the template contains a parameter with a given qualified name
 boolean isParameterRequired(java.lang.String name)
          Determines if a parameter with a given qualified name is a required parameter
 

Method Detail

getRequiredParameters

java.util.List<java.lang.String> getRequiredParameters()
Returns a list containing the qualified names of all required parameters contained in the template

Returns:
A list of all required parameters of the template

getOptionalParameters

java.util.List<java.lang.String> getOptionalParameters()
Returns a list containing the qualified names of all optional parameters contained in the template

Returns:
A list of all optional parameters of the template

isParameterRequired

boolean isParameterRequired(java.lang.String name)
                            throws NonExistentParameterException,
                                   java.lang.Exception
Determines if a parameter with a given qualified name is a required parameter

Parameters:
name - The qualified name of the parameter
Returns:
true if the parameter is required, false otherwise
Throws:
NonExistentParameterException - If the parameter is not found among the parameters contained in the template
java.lang.Exception - In case of other error

hasParameter

boolean hasParameter(java.lang.String name)
Determines if the template contains a parameter with a given qualified name

Parameters:
name - The qualified name of the parameter
Returns:
true if the parameter is contained in the template, false otherwise

getTemplate

java.lang.String getTemplate()
Returns the query template

Returns:
The query template