Class LinkOperation

All Implemented Interfaces:
Serializable, BiFunction<AbstractFeature,org.opengis.parameter.ParameterValueGroup,Object>, Deprecable

final class LinkOperation extends AbstractOperation
A link operation, which is like a redirection or an alias. The operation acts like a reference to another property.
Since:
0.6
Version:
1.1
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • PARAMETERS

      private static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERS
      The parameter descriptor for the "Link" operation, which does not take any parameter.
    • result

      private final AbstractIdentifiedType result
      The type of the result.
    • referentName

      final String referentName
      The name of the referenced attribute or feature association.
  • Constructor Details

    • LinkOperation

      LinkOperation(Map<String,?> identification, AbstractIdentifiedType referent)
      Creates a new link to the given attribute or association.
      Parameters:
      identification - the name of the link, together with optional information.
      referent - the referenced attribute or feature association.
  • Method Details

    • getParameters

      public org.opengis.parameter.ParameterDescriptorGroup getParameters()
      Returns a description of the input parameters.
      Specified by:
      getParameters in class AbstractOperation
      Returns:
      description of the input parameters.
    • getResult

      public AbstractIdentifiedType getResult()
      Returns the expected result type.
      Specified by:
      getResult in class AbstractOperation
      Returns:
      the type of the result, or null if none.
    • getDependencies

      public Set<String> getDependencies()
      Returns the names of feature properties that this operation needs for performing its task.
      Overrides:
      getDependencies in class AbstractOperation
      Returns:
      the names of feature properties needed by this operation for performing its task.
    • apply

      public Object apply(AbstractFeature feature, org.opengis.parameter.ParameterValueGroup parameters)
      Returns the property from the referenced attribute of feature association.
      Specified by:
      apply in interface BiFunction<AbstractFeature,org.opengis.parameter.ParameterValueGroup,Object>
      Specified by:
      apply in class AbstractOperation
      Parameters:
      feature - the feature from which to get the property.
      parameters - ignored (can be null).
      Returns:
      the linked property from the given feature.
    • hashCode

      public int hashCode()
      Computes a hash-code value for this operation.
      Overrides:
      hashCode in class AbstractOperation
      Returns:
      the hash code for this type.
    • equals

      public boolean equals(Object obj)
      Compares this operation with the given object for equality.
      Overrides:
      equals in class AbstractOperation
      Parameters:
      obj - the object to compare with this type.
      Returns:
      true if the given object is equal to this type.
    • formatResultFormula

      void formatResultFormula(Appendable buffer) throws IOException
      Appends a string representation of the "formula" used for computing the result.
      Overrides:
      formatResultFormula in class AbstractOperation
      Parameters:
      buffer - where to format the "formula".
      Throws:
      IOException - if an error occurred while writing in buffer.