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
 List<String> getOptionalParameters()
          Returns a list containing the qualified names of all optional parameters contained in the template
 List<String> getRequiredParameters()
          Returns a list containing the qualified names of all required parameters contained in the template
 String getTemplate()
          Returns the query template
 boolean hasParameter(String name)
          Determines if the template contains a parameter with a given qualified name
 boolean isParameterRequired(String name)
          Determines if a parameter with a given qualified name is a required parameter
 

Method Detail

getRequiredParameters

List<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

List<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(String name)
                            throws NonExistentParameterException,
                                   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
Exception - In case of other error

hasParameter

boolean hasParameter(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

String getTemplate()
Returns the query template

Returns:
The query template


Copyright © 2013. All Rights Reserved.