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.ParameterDescriptorGroup
The parameter descriptor for the "Link" operation, which does not take any parameter.(package private) final String
The name of the referenced attribute or feature association.private final AbstractIdentifiedType
The type of the result.private static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.feature.AbstractOperation
RESULT_PREFIX
Fields 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.boolean
Compares this operation with the given object for equality.(package private) void
formatResultFormula
(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.ParameterDescriptorGroup
Returns a description of the input parameters.Returns the expected result type.int
hashCode()
Computes a hash-code value for this operation.Methods inherited from class org.apache.sis.feature.AbstractOperation
defaultFormula, resultIdentification, toString
Methods inherited from class org.apache.sis.feature.AbstractIdentifiedType
createName, getDefinition, getDescription, getDesignation, getName, getRemarks, isDeprecated, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
getParameters
in classAbstractOperation
- Returns:
- description of the input parameters.
-
getResult
Returns the expected result type.- Specified by:
getResult
in classAbstractOperation
- Returns:
- the type of the result, or
null
if none.
-
getDependencies
Returns the names of feature properties that this operation needs for performing its task.- Overrides:
getDependencies
in 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:
apply
in interfaceBiFunction<AbstractFeature,
org.opengis.parameter.ParameterValueGroup, Object> - Specified by:
apply
in 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:
hashCode
in classAbstractOperation
- Returns:
- the hash code for this type.
-
equals
Compares this operation with the given object for equality.- Overrides:
equals
in classAbstractOperation
- Parameters:
obj
- the object to compare with this type.- Returns:
true
if the given object is equal to this type.
-
formatResultFormula
Appends a string representation of the "formula" used for computing the result.- Overrides:
formatResultFormula
in classAbstractOperation
- Parameters:
buffer
- where to format the "formula".- Throws:
IOException
- if an error occurred while writing inbuffer
.
-