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 ofthisas a fully-implemented parameter descriptor.Fields inherited from class org.apache.sis.internal.simple.SimpleIdentifiedObject
nameFields 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 booleanequals(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.TypeNameReturns the name that describes the type of parameter values.private static StringtoString(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, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.parameter.GeneralParameterDescriptor
getMaximumOccurs, getMinimumOccursMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
descriptor
A copy ofthisas 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 inDefaultParameterDescriptorcopy 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
nullif 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:
getValueClassin interfaceorg.opengis.parameter.ParameterDescriptor<T>- Returns:
- the value class inferred from the attribute type, or
nullif unknown.
-
createValue
Creates a new instance ofParameterValue. This method delegates the work toDefaultParameterDescriptorsince thisServiceParameterclass is not a full-featured parameter descriptor implementation.- Specified by:
createValuein interfaceorg.opengis.parameter.GeneralParameterDescriptor- Specified by:
createValuein interfaceorg.opengis.parameter.ParameterDescriptor<T>- Returns:
- a new instance of
ParameterValue.
-
getValidValues
Optional properties.- Specified by:
getValidValuesin interfaceorg.opengis.parameter.ParameterDescriptor<T>- Returns:
null.
-
getMinimumValue
- Specified by:
getMinimumValuein interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
getMaximumValue
- Specified by:
getMaximumValuein interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceorg.opengis.parameter.ParameterDescriptor<T>
-
getUnit
public javax.measure.Unit<?> getUnit()- Specified by:
getUnitin 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 someParameterproperty values are always null.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classSimpleIdentifiedObject- Parameters:
object- the object to compare with this reference system.mode- the strictness level of the comparison.- Returns:
trueif 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.
-