Class TLcdCSWOpenSearchTemplate.Builder

java.lang.Object
com.luciad.ogc.csw.server.TLcdCSWOpenSearchTemplate.Builder
Enclosing class:
TLcdCSWOpenSearchTemplate

public static class TLcdCSWOpenSearchTemplate.Builder extends Object
Builder class for TLcdCSWOpenSearchTemplate instances.
  • Method Details

    • addAnyTextKeyword

      public TLcdCSWOpenSearchTemplate.Builder addAnyTextKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addAnyTextKeyword(String aKey)
      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

      public TLcdCSWOpenSearchTemplate.Builder addRecordIdKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addRecordIdKeyword(String aKey)
      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

      public TLcdCSWOpenSearchTemplate.Builder addCountKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addStartIndexKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addStartPageKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addBBoxKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addBBoxKeyword(String aKey)
      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

      public TLcdCSWOpenSearchTemplate.Builder addGeometryKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addGeometryRelationKeyword(String aKey, boolean aOptional)
      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 the addAnyTextKeyword(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

      public TLcdCSWOpenSearchTemplate.Builder addTimeKeyword(String aKey, boolean aOptional)
      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

      public TLcdCSWOpenSearchTemplate.Builder addTimeKeyword(String aKey)
      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

      public TLcdCSWOpenSearchTemplate.Builder addTimeRelationKeyword(String aKey, boolean aOptional)
      Adds time relation to this template. This keyword is combined with 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.
      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 parameter
      aOptional - Whether or not this parameter is optional.
      Returns:
      The Builder
    • outputFormat

      public TLcdCSWOpenSearchTemplate.Builder outputFormat(TLcdCSWRecordType aOutputFormat)
      Sets the output format of the template
      Parameters:
      aOutputFormat - the output format of the template
      Returns:
      The Builder
      Since:
      2017.1
    • build

      public TLcdCSWOpenSearchTemplate build()
      Creates a new template with the collected parameters
      Returns:
      A new TLcdCSWOpenSearchTemplate