Class CC_OperationParameter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<CC_OperationParameter,org.opengis.parameter.ParameterDescriptor<?>>
org.apache.sis.internal.jaxb.gco.PropertyType<CC_OperationParameter,org.opengis.parameter.ParameterDescriptor<?>>
org.apache.sis.internal.jaxb.referencing.CC_OperationParameter
public final class CC_OperationParameter
extends PropertyType<CC_OperationParameter,org.opengis.parameter.ParameterDescriptor<?>>
JAXB adapter mapping implementing class to the GeoAPI interface. See
package documentation for more information about JAXB and interface.
This class tries also to resolve another difficulty: our implementation class needs to know the base class of values, but this information is not provided in the XML documents. We have to infer it from the actual value.
- Since:
- 0.6
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionClass
<?> The class of the value of the enclosing<gml:ParameterValue>
element, ornull
if unknown.The domain of values of the enclosing<gml:ParameterValue>
element, ornull
if unknown.Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB only.private
CC_OperationParameter
(org.opengis.parameter.ParameterDescriptor<?> parameter) Constructor for thewrap(org.opengis.parameter.ParameterDescriptor<?>)
method only. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
afterUnmarshal
(Unmarshaller unmarshaller, Object parent) Clears the value class and units of measurement after<gml:OperationParameter>
unmarshalling for avoiding that those information are wrongly used for an unrelatedParameterDescriptor
.private void
beforeUnmarshal
(Unmarshaller unmarshaller, Object parent) Invoked by JAXB during unmarshalling of the enclosing<gml:OperationParameter>
, before the childDefaultParameterDescriptor
.protected Class
<org.opengis.parameter.ParameterDescriptor<?>> Returns the GeoAPI interface which is bound by this adapter.Invoked by JAXB at marshalling time for getting the actual element to write inside the<gml:OperationParameter>
XML element.void
setElement
(DefaultParameterDescriptor<?> parameter) Invoked by JAXB at unmarshalling time for storing the result temporarily.static Class
<?> valueClass
(org.opengis.parameter.ParameterValue<?> param) Returns the base class of parameter values, ornull
if unknown.static MeasurementRange
<?> valueDomain
(org.opengis.parameter.ParameterValue<?> param) Saves the unit of measurement in a boundless range.protected CC_OperationParameter
wrap
(org.opengis.parameter.ParameterDescriptor<?> parameter) Invoked byPropertyType
at marshalling time for wrapping the given value in a<gml:OperationParameter>
XML element.Methods inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
accept2014, getActuate, getArcRole, getHRef, getNilReason, getRole, getShow, getTitle, getUUIDREF, incomplete, marshal, setActuate, setArcRole, setHRef, setNilReason, setRole, setShow, setTitle, setUUIDREF, unmarshal
-
Field Details
-
valueClass
The class of the value of the enclosing<gml:ParameterValue>
element, ornull
if unknown.This is set by the private
beforeMarshal(…)
method at unmarshalling time and read by theDefaultParameterDescriptor
default constructor. -
valueDomain
The domain of values of the enclosing<gml:ParameterValue>
element, ornull
if unknown. If non-null, typically only the unit of measurement is relevant in this object.This is set by the private
beforeUnmarshal(…)
method at unmarshalling time and read by theDefaultParameterDescriptor
default constructor.
-
-
Constructor Details
-
CC_OperationParameter
public CC_OperationParameter()Empty constructor for JAXB only. -
CC_OperationParameter
private CC_OperationParameter(org.opengis.parameter.ParameterDescriptor<?> parameter) Constructor for thewrap(org.opengis.parameter.ParameterDescriptor<?>)
method only.
-
-
Method Details
-
getBoundType
Returns the GeoAPI interface which is bound by this adapter. This method is indirectly invoked by the private constructor below, so it shall not depend on the state of this object.- Specified by:
getBoundType
in classPropertyType<CC_OperationParameter,
org.opengis.parameter.ParameterDescriptor<?>> - Returns:
ParameterDescriptor.class
-
wrap
Invoked byPropertyType
at marshalling time for wrapping the given value in a<gml:OperationParameter>
XML element.- Specified by:
wrap
in classPropertyType<CC_OperationParameter,
org.opengis.parameter.ParameterDescriptor<?>> - Parameters:
parameter
- the element to marshal.- Returns:
- a
PropertyType
wrapping the given the element.
-
getElement
Invoked by JAXB at marshalling time for getting the actual element to write inside the<gml:OperationParameter>
XML element. This is the value or a copy of the value given in argument to thewrap
method.- Returns:
- the element to be marshalled.
-
setElement
Invoked by JAXB at unmarshalling time for storing the result temporarily.- Parameters:
parameter
- the unmarshalled element.
-
valueClass
Returns the base class of parameter values, ornull
if unknown. This method assumes that the parameter value does not yet have a descriptor (which happens at GML unmarshalling time) and that the type must be derived from the actual value.- Parameters:
param
- the parameter from which to get the value class.- Returns:
- base class of values, or
null
if unknown.
-
valueDomain
Saves the unit of measurement in a boundless range. This method should be invoked only whenvalueClass
isDouble
ordouble[]
. It is the case in a well-formed GML.- Parameters:
param
- the parameter from which to get the unit of measurement.- Returns:
- unit of measurement wrapped in a boundless range, or
null
if none.
-
beforeUnmarshal
Invoked by JAXB during unmarshalling of the enclosing<gml:OperationParameter>
, before the childDefaultParameterDescriptor
. This method stores the class and the unit of measurement of the parameter descriptor to create. Those information will be used by theDefaultParameterDescriptor
private constructor.- Parameters:
unmarshaller
- the unmarshaller.parent
- the enclosingParameterValue
instance being unmarshalled.
-
afterUnmarshal
Clears the value class and units of measurement after<gml:OperationParameter>
unmarshalling for avoiding that those information are wrongly used for an unrelatedParameterDescriptor
.
-