|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.opensearch.opensearchlibrary.query.BasicURLTemplate
public class BasicURLTemplate
Class implementing the URLTemplate interface
| Nested Class Summary | |
|---|---|
protected static class |
BasicURLTemplate.Parameter
Class representing a query parameter, containing the qualified name of the parameter and information about whether the parameter is required or not |
| Field Summary | |
|---|---|
protected List<BasicURLTemplate.Parameter> |
parameters
|
protected String |
template
|
| Constructor Summary | |
|---|---|
BasicURLTemplate(String template,
Map<String,String> nsPrefixes)
Creates a new BasicURLTemplate object |
|
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String template
protected List<BasicURLTemplate.Parameter> parameters
| Constructor Detail |
|---|
public BasicURLTemplate(String template,
Map<String,String> nsPrefixes)
throws Exception
template - The query template that will be usednsPrefixes - The mapping from namespace URIs to namespace prefixes for all namespaces contained in a description document
Exception - If a parameter namespace URI is not present in the description document or in case of other error| Method Detail |
|---|
public List<String> getRequiredParameters()
getRequiredParameters in interface URLTemplateURLTemplate.getRequiredParameters()public List<String> getOptionalParameters()
getOptionalParameters in interface URLTemplateURLTemplate.getOptionalParameters()
public boolean isParameterRequired(String name)
throws NonExistentParameterException
isParameterRequired in interface URLTemplatename - The qualified name of the parameter
NonExistentParameterException - If the parameter is not found among the parameters contained in the templateURLTemplate.isParameterRequired(String)public boolean hasParameter(String name)
hasParameter in interface URLTemplatename - The qualified name of the parameter
URLTemplate.hasParameter(String)public String getTemplate()
getTemplate in interface URLTemplateURLTemplate.getTemplate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||