Class CC_OperationMethod
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<ValueType,BoundType>
org.apache.sis.internal.jaxb.gco.PropertyType<CC_OperationMethod,org.opengis.referencing.operation.OperationMethod>
org.apache.sis.internal.jaxb.referencing.CC_OperationMethod
public final class CC_OperationMethod
extends PropertyType<CC_OperationMethod,org.opengis.referencing.operation.OperationMethod>
JAXB adapter mapping implementing class to the GeoAPI interface. See
package documentation for more information about JAXB and interface.
- Since:
- 0.6
- Version:
- 1.3
-
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata
-
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB only.private
CC_OperationMethod
(org.opengis.referencing.operation.OperationMethod method) Constructor for thewrap(org.opengis.referencing.operation.OperationMethod)
method only. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.opengis.parameter.GeneralParameterDescriptor[]
filterImplicit
(org.opengis.parameter.GeneralParameterDescriptor[] array) Returns the given descriptors, excluding the implicitMapProjection
parameters.static org.opengis.parameter.GeneralParameterValue[]
filterImplicit
(org.opengis.parameter.GeneralParameterValue[] array) Returns the given descriptors, excluding the implicitMapProjection
parameters.protected Class<org.opengis.referencing.operation.OperationMethod>
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:OperationMethod>
XML element.static org.opengis.parameter.ParameterDescriptorGroup
group
(org.opengis.metadata.Identifier name, org.opengis.parameter.GeneralParameterDescriptor[] descriptors) Wraps the given descriptors in a descriptor group of the given name.(package private) static boolean
isImplicitParameter
(org.opengis.parameter.GeneralParameterDescriptor descriptor) Returnstrue
if the given descriptor is for an implicit parameter which should be excluded from GML.void
setElement
(DefaultOperationMethod method) Invoked by JAXB at unmarshalling time for storing the result temporarily.static void
store
(org.opengis.parameter.GeneralParameterValue[] parameters, Collection<org.opengis.parameter.GeneralParameterValue> addTo, Map<org.opengis.parameter.GeneralParameterDescriptor, org.opengis.parameter.GeneralParameterDescriptor> replacements) Stores the givenparameters
into the givenaddTo
collection.protected CC_OperationMethod
wrap
(org.opengis.referencing.operation.OperationMethod method) Invoked byPropertyType
at marshalling time for wrapping the given value in a<gml:OperationMethod>
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
-
Constructor Details
-
CC_OperationMethod
public CC_OperationMethod()Empty constructor for JAXB only. -
CC_OperationMethod
private CC_OperationMethod(org.opengis.referencing.operation.OperationMethod method) Constructor for thewrap(org.opengis.referencing.operation.OperationMethod)
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_OperationMethod,
org.opengis.referencing.operation.OperationMethod> - Returns:
OperationMethod.class
-
wrap
Invoked byPropertyType
at marshalling time for wrapping the given value in a<gml:OperationMethod>
XML element.- Specified by:
wrap
in classPropertyType<CC_OperationMethod,
org.opengis.referencing.operation.OperationMethod> - Parameters:
method
- 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:OperationMethod>
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:
method
- the unmarshalled element.
-
filterImplicit
public static org.opengis.parameter.GeneralParameterValue[] filterImplicit(org.opengis.parameter.GeneralParameterValue[] array) Returns the given descriptors, excluding the implicitMapProjection
parameters.- Parameters:
array
- the parameters to filter.- Returns:
- the filtered parameters.
-
filterImplicit
public static org.opengis.parameter.GeneralParameterDescriptor[] filterImplicit(org.opengis.parameter.GeneralParameterDescriptor[] array) Returns the given descriptors, excluding the implicitMapProjection
parameters.- Parameters:
array
- the parameters to filter.- Returns:
- the filtered parameters.
-
isImplicitParameter
static boolean isImplicitParameter(org.opengis.parameter.GeneralParameterDescriptor descriptor) Returnstrue
if the given descriptor is for an implicit parameter which should be excluded from GML.- Parameters:
descriptor
- the parameter descriptor to test.- Returns:
true
if the given parameter should be omitted in the GML document.
-
group
public static org.opengis.parameter.ParameterDescriptorGroup group(org.opengis.metadata.Identifier name, org.opengis.parameter.GeneralParameterDescriptor[] descriptors) Wraps the given descriptors in a descriptor group of the given name. If the given name can be matched to the name of one of the predefined operation method, then the predefined parameters will be used.We try to use predefined parameters if possible because they contain information, especially the
ParameterDescriptor.getValueClass()
property, which are not available in the GML document.Note: this code is defined in thisCC_OperationMethod
class instead of in theDefaultOperationMethod
class in the hope to reduce the amount of code processed by the JVM in the common case where JAXB (un)marshalling is not needed.- Parameters:
name
- the operation method name, to be also given to the descriptor group.descriptors
- the parameter descriptors to wrap in a group. This array will be modified in-place.- Returns:
- a parameter group containing at least the given descriptors, or equivalent descriptors.
-
store
public static void store(org.opengis.parameter.GeneralParameterValue[] parameters, Collection<org.opengis.parameter.GeneralParameterValue> addTo, Map<org.opengis.parameter.GeneralParameterDescriptor, org.opengis.parameter.GeneralParameterDescriptor> replacements) Stores the givenparameters
into the givenaddTo
collection. This method copies only the references if possible. However, in some cases the values may need to be copied in new parameter instances.Note: this code is defined in thisCC_OperationMethod
class instead of in theDefaultOperationMethod
class in the hope to reduce the amount of code processed by the JVM in the common case where JAXB (un)marshalling is not needed.- Parameters:
parameters
- the parameters to add to theaddTo
collection.addTo
- where to store theparameters
.replacements
- the replacements to apply in theGeneralParameterValue
instances.
-