Class TLcdSLDRule.Builder<T>

java.lang.Object
com.luciad.ogc.sld.model.TLcdSLDRule.Builder<T>
Enclosing class:
TLcdSLDRule

public static class TLcdSLDRule.Builder<T> extends Object
A builder for SLD rules.
Since:
2012.1
  • Method Details

    • filter

      public TLcdSLDRule.Builder<T> filter(TLcdOGCFilter aFilter)

      Specifies the filter for this rule. A rule without a filter applies to all objects.

      This method must not be called when filter(ILcdOGCCondition) or elseFilter() has already been called.

      Parameters:
      aFilter - The filter. Must not be null
      Returns:
      this builder
      See Also:
    • filter

      public TLcdSLDRule.Builder<T> filter(ILcdOGCCondition aCondition)

      Specifies the condition with which a filter should be created. A rule without a filter applies to all objects.

      This method must not be called when filter(com.luciad.ogc.filter.model.TLcdOGCFilter) or elseFilter() has already been called.

      Parameters:
      aCondition - The condition for the filter. Must not be null
      Returns:
      this builder
    • elseFilter

      public TLcdSLDRule.Builder<T> elseFilter()

      Indicates that this is an 'else' filter.

      This method must not be called when filter(com.luciad.ogc.filter.model.TLcdOGCFilter) or filter(ILcdOGCCondition) has already been called.

      Returns:
      this builder
    • addPolygonSymbolizer

      public TLcdSLDPolygonSymbolizer.Builder<TLcdSLDRule.Builder<T>> addPolygonSymbolizer()

      Starts the definition of a new polygon symbolizer which is to be added to the rule. End creation of the symbolizer by calling TLcdSLDPolygonSymbolizer.Builder.buildSymbolizer() to return this rule builder.

      The rule needs at least one symbolizer before it can be constructed.

      Returns:
      A builder for an SLD polygon symbolizer.
    • addLineSymbolizer

      public TLcdSLDLineSymbolizer.Builder<TLcdSLDRule.Builder<T>> addLineSymbolizer()

      Starts the definition of a new line symbolizer which is to be added to the rule. End creation of the symbolizer by calling TLcdSLDLineSymbolizer.Builder.buildSymbolizer() to return this rule builder.

      The rule needs at least one symbolizer before it can be constructed.

      Returns:
      A builder for an SLD line symbolizer.
    • addRasterSymbolizer

      public TLcdSLDRasterSymbolizer.Builder<TLcdSLDRule.Builder<T>> addRasterSymbolizer()

      Starts the definition of a new raster symbolizer which is to be added to the rule. End creation of the symbolizer by calling TLcdSLDRasterSymbolizer.Builder.buildSymbolizer() to return this rule builder.

      The rule needs at least one symbolizer before it can be constructed.

      Returns:
      A builder for an SLD raster symbolizer.
    • addPointSymbolizer

      public TLcdSLDPointSymbolizer.Builder<TLcdSLDRule.Builder<T>> addPointSymbolizer()

      Starts the definition of a new point symbolizer which is to be added to the rule. End creation of the symbolizer by calling TLcdSLDPointSymbolizer.Builder.buildSymbolizer() to return this rule builder.

      The rule needs at least one symbolizer before it can be constructed.

      Returns:
      A builder for an SLD point symbolizer.
    • addTextSymbolizer

      public TLcdSLDTextSymbolizer.Builder<TLcdSLDRule.Builder<T>> addTextSymbolizer()

      Starts the definition of a new text symbolizer which is to be added to the rule. End creation of the symbolizer by calling TLcdSLDPointSymbolizer.Builder.buildSymbolizer() to return this rule builder.

      The rule needs at least one symbolizer before it can be constructed.

      Returns:
      A builder for an SLD text symbolizer.
    • addSymbolizer

      public TLcdSLDRule.Builder<T> addSymbolizer(ALcdSLDSymbolizer aSymbolizer)

      Adds the given symbolizer directly to this rule.

      The rule needs at least one symbolizer before it can be constructed.

      Parameters:
      aSymbolizer - The symbolizer to add. Must not be null
      Returns:
      this builder.
    • minScaleDenominator

      public TLcdSLDRule.Builder<T> minScaleDenominator(double aMinScale)
      Sets the minimum scale denominator necessary for the rule to apply.
      Parameters:
      aMinScale - A valid scale denominator. For instance 25000 or 100000. Must not be negative
      Returns:
      this builder
      See Also:
      • ALcdSLDRule.getMinScaleDenominator()
    • maxScaleDenominator

      public TLcdSLDRule.Builder<T> maxScaleDenominator(double aMaxScale)
      Sets the maximum scale denominator necessary for which the rule still applies.
      Parameters:
      aMaxScale - A valid scale denominator. For instance 25000 or 100000. Must not be negative
      Returns:
      this builder
      See Also:
      • ALcdSLDRule.getMaxScaleDenominator()
    • buildRule

      public T buildRule()

      Builds the rule with the set parameters.

      This method can only be called once. When you used the builder to build an instance, the builder is no longer valid and should be thrown away.

      Returns:
      the resulting rule