Class Parameter<T>
java.lang.Object
org.apache.sis.internal.simple.SimpleIdentifiedObject
org.apache.sis.internal.jaxb.metadata.replace.Parameter<T>
- Type Parameters:
T
- the type of parameter values.
- All Implemented Interfaces:
Serializable
,LenientComparable
,org.opengis.parameter.GeneralParameterDescriptor
,org.opengis.parameter.ParameterDescriptor<T>
,org.opengis.referencing.IdentifiedObject
- Direct Known Subclasses:
QualityParameter
,ServiceParameter
abstract class Parameter<T>
extends SimpleIdentifiedObject
implements org.opengis.parameter.ParameterDescriptor<T>
Base class for ISO/OGC parameter classes replaced by
ParameterDescriptor
in GeoAPI.
GeoAPI tries to provides a single API for the parameter classes defined in various specifications
(ISO 19111, ISO 19115, ISO 19157, Web Processing Service).
But we still need separated representations at XML (un)marshalling time.
Note that this implementation is simple and serves no other purpose than being a container for XML
parsing and formatting. For real parameter framework, consider using org.apache.sis.parameter
package instead.
- Since:
- 1.3
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.parameter.ParameterDescriptor<T>
A copy ofthis
as a fully-implemented parameter descriptor.Fields inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject
name
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal org.opengis.parameter.ParameterValue<T>
Creates a new instance ofParameterValue
.final boolean
equals
(Object object, ComparisonMode mode) Compares this object with the given one for equality.javax.measure.Unit<?>
getUnit()
Optional properties.Returns the class that describes the type of parameter values.org.opengis.util.TypeName
Returns the name that describes the type of parameter values.private static String
toString
(org.opengis.metadata.Identifier identifier) Null-safe string representation of the given identifier, for comparison purpose.Methods inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject
equals, getAlias, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, hashCode, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.parameter.GeneralParameterDescriptor
getMaximumOccurs, getMinimumOccurs
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
descriptor
A copy ofthis
as a fully-implemented parameter descriptor. This is created when first needed for implementation ofcreateValue()
. Should not be created for other purposes — in particular for implementation of getter methods — because it would create an infinite loop inDefaultParameterDescriptor
copy constructor.
-
-
Constructor Details
-
Parameter
Parameter()Creates an initially empty parameter. This constructor is needed by JAXB at unmarshalling time. -
Parameter
Parameter(org.opengis.parameter.ParameterDescriptor<T> parameter) Creates a parameter with the values of the given descriptor. This is used at marshalling time for converting a generic descriptor to the standard-specific parameter representation defined by subclass.- Parameters:
parameter
- the parameter to marshal.
-
-
Method Details
-
getValueType
public org.opengis.util.TypeName getValueType()Returns the name that describes the type of parameter values. The default implementation returns a non-null value only if this class is wrapping another parameter descriptor. Subclasses should override this method for computing a type name if this method returns null.- Returns:
- the type name of value component(s) in this parameter, or
null
if unknown.
-
getValueClass
Returns the class that describes the type of parameter values. The default implementation returns a non-null value only if this class is wrapping another parameter descriptor. Subclasses should override this method for computing a class if this method returns null.- Specified by:
getValueClass
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
- Returns:
- the value class inferred from the attribute type, or
null
if unknown.
-
createValue
Creates a new instance ofParameterValue
. This method delegates the work toDefaultParameterDescriptor
since thisServiceParameter
class is not a full-featured parameter descriptor implementation.- Specified by:
createValue
in interfaceorg.opengis.parameter.GeneralParameterDescriptor
- Specified by:
createValue
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
- Returns:
- a new instance of
ParameterValue
.
-
getValidValues
Optional properties.- Specified by:
getValidValues
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
- Returns:
null
.
-
getMinimumValue
- Specified by:
getMinimumValue
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
getMaximumValue
- Specified by:
getMaximumValue
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
getDefaultValue
- Specified by:
getDefaultValue
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
getUnit
public javax.measure.Unit<?> getUnit()- Specified by:
getUnit
in interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
equals
Compares this object with the given one for equality. This implementation should be consistent withAbstractIdentifiedObject.equals(Object)
implementation, with the simplification that someParameter
property values are always null.- Specified by:
equals
in interfaceLenientComparable
- Overrides:
equals
in classSimpleIdentifiedObject
- Parameters:
object
- the object to compare with this reference system.mode
- the strictness level of the comparison.- Returns:
true
if both objects are equal.- See Also:
-
toString
Null-safe string representation of the given identifier, for comparison purpose. We ignore codespace because they cannot be represented in ISO 19139 XML documents.
-