Class CC_OperationParameter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
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, ornullif unknown.The domain of values of the enclosing<gml:ParameterValue>element, ornullif unknown.Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata -
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB only.privateCC_OperationParameter(org.opengis.parameter.ParameterDescriptor<?> parameter) Constructor for thewrap(org.opengis.parameter.ParameterDescriptor<?>)method only. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidafterUnmarshal(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 voidbeforeUnmarshal(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.voidsetElement(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, ornullif unknown.static MeasurementRange<?>valueDomain(org.opengis.parameter.ParameterValue<?> param) Saves the unit of measurement in a boundless range.protected CC_OperationParameterwrap(org.opengis.parameter.ParameterDescriptor<?> parameter) Invoked byPropertyTypeat 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, ornullif unknown.This is set by the private
beforeMarshal(…)method at unmarshalling time and read by theDefaultParameterDescriptordefault constructor. -
valueDomain
The domain of values of the enclosing<gml:ParameterValue>element, ornullif 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 theDefaultParameterDescriptordefault 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:
getBoundTypein classPropertyType<CC_OperationParameter,org.opengis.parameter.ParameterDescriptor<?>> - Returns:
ParameterDescriptor.class
-
wrap
Invoked byPropertyTypeat marshalling time for wrapping the given value in a<gml:OperationParameter>XML element.- Specified by:
wrapin classPropertyType<CC_OperationParameter,org.opengis.parameter.ParameterDescriptor<?>> - Parameters:
parameter- the element to marshal.- Returns:
- a
PropertyTypewrapping 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 thewrapmethod.- 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, ornullif 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
nullif unknown.
-
valueDomain
Saves the unit of measurement in a boundless range. This method should be invoked only whenvalueClassisDoubleordouble[]. 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
nullif 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 theDefaultParameterDescriptorprivate constructor.- Parameters:
unmarshaller- the unmarshaller.parent- the enclosingParameterValueinstance 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.
-