public static class TLcdCSWOpenSearchTemplate.Builder extends Object
TLcdCSWOpenSearchTemplate
instances.Modifier and Type | Method and Description |
---|---|
TLcdCSWOpenSearchTemplate.Builder |
addAnyTextKeyword(String aKey)
Adds an "any text" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addAnyTextKeyword(String aKey,
boolean aOptional)
Adds an "any text" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addBBoxKeyword(String aKey)
Adds a "Bounding Box" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addBBoxKeyword(String aKey,
boolean aOptional)
Adds a "Bounding Box" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addCountKeyword(String aKey,
boolean aOptional)
Adds a "count" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addCustomKeyword(String aKey,
QName aQName,
boolean aOptional)
Creates a custom keyword for this template
|
TLcdCSWOpenSearchTemplate.Builder |
addGeometryKeyword(String aKey,
boolean aOptional)
Adds a "geometry" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addGeometryRelationKeyword(String aKey,
boolean aOptional)
Adds a "geometry relation" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addProximityKeywords(String aLonKey,
String aLatKey,
String aRadiusKey,
boolean aOptional)
Adds a proximity search to this opensearch template.
|
TLcdCSWOpenSearchTemplate.Builder |
addRecordIdKeyword(String aKey)
Adds an "record id" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addRecordIdKeyword(String aKey,
boolean aOptional)
Adds a "record id" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addStartIndexKeyword(String aKey,
boolean aOptional)
Adds a "startIndex" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addStartPageKeyword(String aKey,
boolean aOptional)
Adds a "startPage" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addTimeKeyword(String aKey)
Adds a "Time" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addTimeKeyword(String aKey,
boolean aOptional)
Adds a "Time" search to this template.
|
TLcdCSWOpenSearchTemplate.Builder |
addTimeRelationKeyword(String aKey,
boolean aOptional)
Adds time relation to this template.
|
TLcdCSWOpenSearchTemplate |
build()
Creates a new template with the collected parameters
|
TLcdCSWOpenSearchTemplate.Builder |
outputFormat(TLcdCSWRecordType aOutputFormat)
Sets the output format of the template
|
public TLcdCSWOpenSearchTemplate.Builder addAnyTextKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "q"aOptional
- Whether or not this parameter is optional in the requestTLcdCSWOpenSearchTemplate.SEARCH_TERMS_QNAME
public TLcdCSWOpenSearchTemplate.Builder addAnyTextKeyword(String aKey)
aKey
- The key of the parameter. Typically this is "q"TLcdCSWOpenSearchTemplate.SEARCH_TERMS_QNAME
public TLcdCSWOpenSearchTemplate.Builder addRecordIdKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "recordIds"aOptional
- Whether or not this parameter is optional in the requestTLcdCSWOpenSearchTemplate.GEO_UID_QNAME
public TLcdCSWOpenSearchTemplate.Builder addRecordIdKeyword(String aKey)
aKey
- The key of the parameter. Typically this is "recordIds"TLcdCSWOpenSearchTemplate.GEO_UID_QNAME
public TLcdCSWOpenSearchTemplate.Builder addCountKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "count"aOptional
- Whether or not the request is optionalTLcdCSWOpenSearchTemplate.COUNT_QNAME
public TLcdCSWOpenSearchTemplate.Builder addStartIndexKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "start"aOptional
- Whether or not the request is optionalTLcdCSWOpenSearchTemplate.START_INDEX_QNAME
public TLcdCSWOpenSearchTemplate.Builder addStartPageKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "page"aOptional
- Whether or not the request is optionalTLcdCSWOpenSearchTemplate.START_PAGE_QNAME
public TLcdCSWOpenSearchTemplate.Builder addBBoxKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "bbox"aOptional
- Whether or not this parameter is optional in the requestTLcdCSWOpenSearchTemplate.GEO_BOX_QNAME
public TLcdCSWOpenSearchTemplate.Builder addBBoxKeyword(String aKey)
aKey
- The key of the parameter. Typically this is "bbox"TLcdCSWOpenSearchTemplate.GEO_BOX_QNAME
public TLcdCSWOpenSearchTemplate.Builder addGeometryKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "geometry"aOptional
- Whether or not the value is optionalTLcdCSWOpenSearchTemplate.GEO_GEOMETRY_QNAME
public TLcdCSWOpenSearchTemplate.Builder addGeometryRelationKeyword(String aKey, boolean aOptional)
addAnyTextKeyword(String)
parameter. The default is intersects.aKey
- The key of the parameter. Typically this is "relation"aOptional
- Whether or not the value is optionalTLcdCSWOpenSearchTemplate.GEO_RELATION_QNAME
public TLcdCSWOpenSearchTemplate.Builder addProximityKeywords(String aLonKey, String aLatKey, String aRadiusKey, boolean aOptional)
aLonKey
- The key of the longitude parameter. Typically this is "lon"aLatKey
- The key of the latitude parameter. Typically this is "lat"aRadiusKey
- The key of the radius parameter. Typically this is "radius"aOptional
- Whether or not the value is optionalTLcdCSWOpenSearchTemplate.GEO_LON_QNAME
,
TLcdCSWOpenSearchTemplate.GEO_LAT_QNAME
,
TLcdCSWOpenSearchTemplate.GEO_RADIUS_QNAME
public TLcdCSWOpenSearchTemplate.Builder addTimeKeyword(String aKey, boolean aOptional)
aKey
- The key of the parameter. Typically this is "time"aOptional
- Whether or not this parameter is optional in the requestTLcdCSWOpenSearchTemplate.TIME_START_QNAME
,
TLcdCSWOpenSearchTemplate.TIME_END_QNAME
public TLcdCSWOpenSearchTemplate.Builder addTimeKeyword(String aKey)
aKey
- The key of the parameter. Typically this is "time"TLcdCSWOpenSearchTemplate.TIME_START_QNAME
,
TLcdCSWOpenSearchTemplate.TIME_END_QNAME
public TLcdCSWOpenSearchTemplate.Builder addTimeRelationKeyword(String aKey, boolean aOptional)
addTimeKeyword(String, boolean)
to
describe the relation between the time and the queried record. In OpenSearch terms, this is the "time:relation"
parameter. The default of this key is TEquals for time instances, and AnyInteraction for time periods.aKey
- The key of the parameter. typically this is "trelation"aOptional
- Whether or not this parameter is optional in the requestTLcdCSWOpenSearchTemplate.TIME_RELATION_QNAME
public TLcdCSWOpenSearchTemplate.Builder addCustomKeyword(String aKey, QName aQName, boolean aOptional)
Creates a custom keyword for this template
For example:
TLcdCSWOpenSearchTemplate.newBuilder().addCustomKeyword("mykeyword", new QName("http://example.com","example","custom"), false)Would result in the following template:
mykeyword={custom:example}
aKey
- The key of the parameter.aQName
- The fully qualified QName of the parameteraOptional
- Whether or not this parameter is optional.public TLcdCSWOpenSearchTemplate.Builder outputFormat(TLcdCSWRecordType aOutputFormat)
aOutputFormat
- the output format of the templatepublic TLcdCSWOpenSearchTemplate build()
TLcdCSWOpenSearchTemplate