Class AbstractParameterDescriptor
Object
FormattableObject
AbstractIdentifiedObject
AbstractParameterDescriptor
- All Implemented Interfaces:
Serializable, Formattable, Deprecable, LenientComparable, Printable, GeneralParameterDescriptor, IdentifiedObject
- Direct Known Subclasses:
DefaultParameterDescriptor, DefaultParameterDescriptorGroup
public abstract class AbstractParameterDescriptor
extends AbstractIdentifiedObject
implements GeneralParameterDescriptor
Abstract definition of a parameter or group of parameters used by a coordinate operation or a process.
This interface combines information provided by Referencing by Coordinates (ISO 19111),
Service Metadata (ISO 19115) and Web Processing Services (WPS) standards.
The main information are:
| Getter method | ISO 19111 | WPS | ISO 19115 | Remarks |
|---|---|---|---|---|
getName() |
name |
Identifier |
name |
See Parameters.getMemberName(ParameterDescriptor) for MemberName ↔ Identifier mapping. |
AbstractIdentifiedObject.getDescription() |
Abstract |
description |
Also known as “definition”. | |
getDirection() |
direction |
Tells if the parameter is a WPS Input or Output structure. |
||
getMinimumOccurs() |
minimumOccurs |
MinOccurs |
optionality |
optionality = (minimumOccurs > 0) |
getMaximumOccurs() |
maximumOccurs |
MaxOccurs |
repeatability |
repeatability = (maximumOccurs > 1) |
- Since:
- 0.5
- See Also:
-
Field Summary
Fields inherited from class AbstractIdentifiedObject
DEPRECATED_KEY, DOMAINS_KEY, LOCALE_KEYModifier and TypeFieldDescriptionstatic final StringOptional key which can be given to the constructor for specifying the object is deprecated.static final StringKey for the"domains"property to be given to theObjectFactory.createFoo(Map, ...)methods.static final StringOptional key which can be given to the constructor for specifying the locale to use for producing error messages.Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractParameterDescriptor(Map<String, ?> properties, int minimumOccurs, int maximumOccurs) Constructs a parameter descriptor from a set of properties.protectedConstructs a new parameter descriptor with the same values as the specified one. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(Object object, ComparisonMode mode) Compares the specified object with this parameter for equality.protected StringFormats this descriptor as a pseudo-Well Known Text element.intThe maximum number of times that values for this parameter group or parameter can be included.intThe minimum number of times that values for this parameter group or parameter are required.Returns the GeoAPI interface that defines the contract of this implementation class.voidprint()Prints a string representation of this descriptor to the standard output stream.Returns a string representation of this descriptor.Methods inherited from class AbstractIdentifiedObject
castOrCopy, computeHashCode, equals, formatTo, getAlias, getDescription, getDomains, getIdentifiers, getInterface, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameModifier and TypeMethodDescriptionstatic AbstractIdentifiedObjectcastOrCopy(IdentifiedObject object) Returns a SIS identified object implementation with the values of the given arbitrary implementation.protected longInvoked byAbstractIdentifiedObject.hashCode()for computing the hash code when first needed.final booleanCompares the specified object with this object for equality.voidFormats the name or identifier of this object using the provider formatter.Returns alternative names by which this object is identified.Returns a narrative explanation of the role of this object.Returns the usage of this CRS-related object.Returns identifiers which references elsewhere the object's defining information.final Class<? extends IdentifiedObject> Deprecated, for removal: This API element is subject to removal in a future version.getName()Returns the primary name by which this object is identified.Returns comments on or information about this object, including data source information.final intReturns a hash value for this identified object.booleanReturnstrueif this object is deprecated.booleanReturnstrueif either the primary name or at least one alias matches the given string according heuristic rules.Methods inherited from class FormattableObject
toString, toWKTModifier and TypeMethodDescriptiontoString(Convention convention) Returns a Well Known Text (WKT) for this object using the specified convention.toWKT()Returns a strictly compliant Well Known Text (WKT) using the default convention, symbols and indentation.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface GeneralParameterDescriptor
createValueModifier and TypeMethodDescriptionCreates a new instance of parameter value or group initialized with the default value(s).Methods inherited from interface IdentifiedObject
toWKT
-
Constructor Details
-
AbstractParameterDescriptor
protected AbstractParameterDescriptor(Map<String, ?> properties, int minimumOccurs, int maximumOccurs) Constructs a parameter descriptor from a set of properties. The properties map is given unchanged to the super-class constructor. The following table is a reminder of main (not all) properties:Recognized properties (non exhaustive list) Property name Value type Returned by "name" ReferenceIdentifierorStringAbstractIdentifiedObject.getName()"alias" GenericNameorCharSequence(optionally as array)AbstractIdentifiedObject.getAlias()"identifiers" ReferenceIdentifier(optionally as array)AbstractIdentifiedObject.getIdentifiers()"remarks" InternationalStringorStringAbstractIdentifiedObject.getRemarks()- Parameters:
properties- the properties to be given to the identified object.minimumOccurs- the minimum number of times that values for this parameter group are required, or 0 if no restriction.maximumOccurs- the maximum number of times that values for this parameter group are required, orInteger.MAX_VALUEif no restriction.
-
AbstractParameterDescriptor
Constructs a new parameter descriptor with the same values as the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.This constructor performs a shallow copy, i.e. the properties are not cloned.
- Parameters:
descriptor- the object to shallow copy.
-
-
Method Details
-
getStandardType
Returns the GeoAPI interface that defines the contract of this implementation class. The default implementation returnsGeneralParameterDescriptor.class. Subclasses implementing a more specific GeoAPI interface shall override this method.- Specified by:
getStandardTypein interfaceLenientComparable- Overrides:
getStandardTypein classAbstractIdentifiedObject- Returns:
- the parameter descriptor interface implemented by this class.
- Since:
- 1.7
- See Also:
-
getMinimumOccurs
public int getMinimumOccurs()The minimum number of times that values for this parameter group or parameter are required. A value of 0 means an optional parameter.- Specified by:
getMinimumOccursin interfaceGeneralParameterDescriptor- Returns:
- the minimum occurrence.
- See Also:
-
getMaximumOccurs
public int getMaximumOccurs()The maximum number of times that values for this parameter group or parameter can be included. A value greater than 1 means a repeatable parameter.- Specified by:
getMaximumOccursin interfaceGeneralParameterDescriptor- Returns:
- the maximum occurrence.
- See Also:
-
equals
Compares the specified object with this parameter for equality.- Specified by:
equalsin interfaceLenientComparable- Overrides:
equalsin classAbstractIdentifiedObject- Parameters:
object- the object to compare tothis.mode- the strictness level of the comparison.- Returns:
trueif both objects are equal according the given comparison mode.- See Also:
-
toString
Returns a string representation of this descriptor.This method is for information purpose only and may change in future SIS version.
- Overrides:
toStringin classFormattableObject- Returns:
- the Well Known Text (WKT) or an alternative representation of this object.
-
print
Prints a string representation of this descriptor to the standard output stream. If a console is attached to the running JVM (i.e. if the application is run from the command-line and the output is not redirected to a file) and if Apache SIS thinks that the console supports the ANSI escape codes (a.k.a. X3.64), then a syntax coloring will be applied.This is a convenience method for debugging purpose and for console applications.
- Specified by:
printin interfacePrintable- Overrides:
printin classFormattableObject
-
formatTo
Formats this descriptor as a pseudo-Well Known Text element. The WKT specification does not define any representation of parameter descriptors. Apache SIS fallbacks on a list of descriptors. The text formatted by this method is flagged as invalid WKT.- Overrides:
formatToin classAbstractIdentifiedObject- Parameters:
formatter- the formatter where to format the inner content of this WKT element.- Returns:
"Parameter"or"ParameterGroup".- See Also:
-
AbstractIdentifiedObject.getStandardType()for integration withLenientComparable.