Package com.luciad.ogc.csw.server
Class TLcdCSWOpenSearchTemplate.Builder
java.lang.Object
com.luciad.ogc.csw.server.TLcdCSWOpenSearchTemplate.Builder
- Enclosing class:
TLcdCSWOpenSearchTemplate
Builder class for
TLcdCSWOpenSearchTemplate instances.-
Method Summary
Modifier and TypeMethodDescriptionaddAnyTextKeyword(String aKey) Adds an "any text" search to this template.addAnyTextKeyword(String aKey, boolean aOptional) Adds an "any text" search to this template.addBBoxKeyword(String aKey) Adds a "Bounding Box" search to this template.addBBoxKeyword(String aKey, boolean aOptional) Adds a "Bounding Box" search to this template.addCountKeyword(String aKey, boolean aOptional) Adds a "count" search to this template.addCustomKeyword(String aKey, QName aQName, boolean aOptional) Creates a custom keyword for this templateaddGeometryKeyword(String aKey, boolean aOptional) Adds a "geometry" search to this template.addGeometryRelationKeyword(String aKey, boolean aOptional) Adds a "geometry relation" search to this template.addProximityKeywords(String aLonKey, String aLatKey, String aRadiusKey, boolean aOptional) Adds a proximity search to this opensearch template.addRecordIdKeyword(String aKey) Adds an "record id" search to this template.addRecordIdKeyword(String aKey, boolean aOptional) Adds a "record id" search to this template.addStartIndexKeyword(String aKey, boolean aOptional) Adds a "startIndex" search to this template.addStartPageKeyword(String aKey, boolean aOptional) Adds a "startPage" search to this template.addTimeKeyword(String aKey) Adds a "Time" search to this template.addTimeKeyword(String aKey, boolean aOptional) Adds a "Time" search to this template.addTimeRelationKeyword(String aKey, boolean aOptional) Adds time relation to this template.build()Creates a new template with the collected parametersoutputFormat(TLcdCSWRecordType aOutputFormat) Sets the output format of the template
-
Method Details
-
addAnyTextKeyword
Adds an "any text" search to this template. In OpenSearch terms this is a "searchTerms" parameter.- Parameters:
aKey- The key of the parameter. Typically this is "q"aOptional- Whether or not this parameter is optional in the request- Returns:
- The builder
- See Also:
-
addAnyTextKeyword
Adds an "any text" search to this template. In OpenSearch terms this is a "searchTerms" parameter.- Parameters:
aKey- The key of the parameter. Typically this is "q"- Returns:
- The builder
- See Also:
-
addRecordIdKeyword
Adds a "record id" search to this template. In OpenSearch terms this is a "Uid" parameter.- Parameters:
aKey- The key of the parameter. Typically this is "recordIds"aOptional- Whether or not this parameter is optional in the request- Returns:
- The builder
- See Also:
-
addRecordIdKeyword
Adds an "record id" search to this template. In OpenSearch terms this is a "Uid" parameter.- Parameters:
aKey- The key of the parameter. Typically this is "recordIds"- Returns:
- The builder
- See Also:
-
addCountKeyword
Adds a "count" search to this template. In OpenSearch terms this is the "count" parameter. This parameter is used to indicate how many records are desired in a response.- Parameters:
aKey- The key of the parameter. Typically this is "count"aOptional- Whether or not the request is optional- Returns:
- The Builder
- See Also:
-
addStartIndexKeyword
Adds a "startIndex" search to this template. In OpenSearch terms this is the "startIndex" parameter. This parameter is used to indicate what the index of the first matched record should be.- Parameters:
aKey- The key of the parameter. Typically this is "start"aOptional- Whether or not the request is optional- Returns:
- The Builder
- See Also:
-
addStartPageKeyword
Adds a "startPage" search to this template. In OpenSearch terms this is the {startPage} parameter. This parameter is used to indicate what the index of the first matched record should be.- Parameters:
aKey- The key of the parameter. Typically this is "page"aOptional- Whether or not the request is optional- Returns:
- The Builder
- See Also:
-
addBBoxKeyword
Adds a "Bounding Box" search to this template. In OpenSearch terms this is a "geo:box" parameter.- Parameters:
aKey- The key of the parameter. Typically this is "bbox"aOptional- Whether or not this parameter is optional in the request- Returns:
- The builder
- See Also:
-
addBBoxKeyword
Adds a "Bounding Box" search to this template. In OpenSearch terms this is a "geo:box" parameter.- Parameters:
aKey- The key of the parameter. Typically this is "bbox"- Returns:
- The builder
- See Also:
-
addGeometryKeyword
Adds a "geometry" search to this template. In OpenSearch terms this is a "geo:geometry", and the expected value will be a WKT-String, defined in WGS84 coordinates.- Parameters:
aKey- The key of the parameter. Typically this is "geometry"aOptional- Whether or not the value is optional- Returns:
- The builder
- See Also:
-
addGeometryRelationKeyword
Adds a "geometry relation" search to this template. In OpenSearch terms this is a "geo:relation", and the expected value will be one of intersects, contains or disjoint. The value is used to determine which operation to use together with theaddAnyTextKeyword(String)parameter. The default is intersects.- Parameters:
aKey- The key of the parameter. Typically this is "relation"aOptional- Whether or not the value is optional- Returns:
- The builder
- See Also:
-
addProximityKeywords
public TLcdCSWOpenSearchTemplate.Builder addProximityKeywords(String aLonKey, String aLatKey, String aRadiusKey, boolean aOptional) Adds a proximity search to this opensearch template. This parameter requires 3 keys:- Longitude: Longitude coordinate expressed in WGS84
- Latitude: Latitude coordinate expressed in WGS84
- Radius: Radius of the search in meters
- Parameters:
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 optional- Returns:
- The builder
- See Also:
-
addTimeKeyword
Adds a "Time" search to this template. In OpenSearch terms this is the "time:start" and "time:end parameters.- Parameters:
aKey- The key of the parameter. Typically this is "time"aOptional- Whether or not this parameter is optional in the request- Returns:
- The builder
- See Also:
-
addTimeKeyword
Adds a "Time" search to this template. In OpenSearch terms this is the "time:start" and "time:end parameters.- Parameters:
aKey- The key of the parameter. Typically this is "time"- Returns:
- The builder
- See Also:
-
addTimeRelationKeyword
Adds time relation to this template. This keyword is combined withaddTimeKeyword(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.- Parameters:
aKey- The key of the parameter. typically this is "trelation"aOptional- Whether or not this parameter is optional in the request- Returns:
- The Builder
- See Also:
-
addCustomKeyword
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}- Parameters:
aKey- The key of the parameter.aQName- The fully qualified QName of the parameteraOptional- Whether or not this parameter is optional.- Returns:
- The Builder
-
outputFormat
Sets the output format of the template- Parameters:
aOutputFormat- the output format of the template- Returns:
- The Builder
- Since:
- 2017.1
-
build
Creates a new template with the collected parameters- Returns:
- A new
TLcdCSWOpenSearchTemplate
-