Package org.apache.sis.feature
Class LinkOperation
java.lang.Object
org.apache.sis.feature.AbstractIdentifiedType
org.apache.sis.feature.AbstractOperation
org.apache.sis.feature.LinkOperation
- All Implemented Interfaces:
Serializable,BiFunction<AbstractFeature,,org.opengis.parameter.ParameterValueGroup, Object> Deprecable
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.opengis.parameter.ParameterDescriptorGroupThe parameter descriptor for the "Link" operation, which does not take any parameter.(package private) final StringThe name of the referenced attribute or feature association.private final AbstractIdentifiedTypeThe type of the result.private static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.feature.AbstractOperation
RESULT_PREFIXFields inherited from class org.apache.sis.feature.AbstractIdentifiedType
DEFINITION_KEY, deprecated, DEPRECATED_KEY, DESCRIPTION_KEY, DESIGNATION_KEY, NAME_KEY -
Constructor Summary
ConstructorsConstructorDescriptionLinkOperation(Map<String, ?> identification, AbstractIdentifiedType referent) Creates a new link to the given attribute or association. -
Method Summary
Modifier and TypeMethodDescriptionapply(AbstractFeature feature, org.opengis.parameter.ParameterValueGroup parameters) Returns the property from the referenced attribute of feature association.booleanCompares this operation with the given object for equality.(package private) voidformatResultFormula(Appendable buffer) Appends a string representation of the "formula" used for computing the result.Returns the names of feature properties that this operation needs for performing its task.org.opengis.parameter.ParameterDescriptorGroupReturns a description of the input parameters.Returns the expected result type.inthashCode()Computes a hash-code value for this operation.Methods inherited from class org.apache.sis.feature.AbstractOperation
defaultFormula, resultIdentification, toStringMethods inherited from class org.apache.sis.feature.AbstractIdentifiedType
createName, getDefinition, getDescription, getDesignation, getName, getRemarks, isDeprecated, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
PARAMETERS
private static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERSThe parameter descriptor for the "Link" operation, which does not take any parameter. -
result
The type of the result. -
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:
getParametersin classAbstractOperation- Returns:
- description of the input parameters.
-
getResult
Returns the expected result type.- Specified by:
getResultin classAbstractOperation- Returns:
- the type of the result, or
nullif none.
-
getDependencies
Returns the names of feature properties that this operation needs for performing its task.- Overrides:
getDependenciesin classAbstractOperation- Returns:
- the names of feature properties needed by this operation for performing its task.
-
apply
Returns the property from the referenced attribute of feature association.- Specified by:
applyin interfaceBiFunction<AbstractFeature,org.opengis.parameter.ParameterValueGroup, Object> - Specified by:
applyin classAbstractOperation- Parameters:
feature- the feature from which to get the property.parameters- ignored (can benull).- Returns:
- the linked property from the given feature.
-
hashCode
public int hashCode()Computes a hash-code value for this operation.- Overrides:
hashCodein classAbstractOperation- Returns:
- the hash code for this type.
-
equals
Compares this operation with the given object for equality.- Overrides:
equalsin classAbstractOperation- Parameters:
obj- the object to compare with this type.- Returns:
trueif the given object is equal to this type.
-
formatResultFormula
Appends a string representation of the "formula" used for computing the result.- Overrides:
formatResultFormulain classAbstractOperation- Parameters:
buffer- where to format the "formula".- Throws:
IOException- if an error occurred while writing inbuffer.
-