Class CC_OperationParameterGroup
- Since:
- 0.6
- Version:
- 0.6
-
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.PropertyType
metadata -
Constructor Summary
ConstructorsModifierConstructorDescriptionEmpty constructor for JAXB only.privateCC_OperationParameterGroup(org.opengis.parameter.ParameterDescriptorGroup parameter) Constructor for thewrap(org.opengis.parameter.ParameterDescriptorGroup)method only. -
Method Summary
Modifier and TypeMethodDescriptionprotected Class<org.opengis.parameter.ParameterDescriptorGroup>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.static org.opengis.parameter.GeneralParameterDescriptor[]merge(List<org.opengis.parameter.GeneralParameterDescriptor> descriptors, org.opengis.parameter.GeneralParameterDescriptor[] fromValues, Map<org.opengis.parameter.GeneralParameterDescriptor, org.opengis.parameter.GeneralParameterDescriptor> replacements) Invoked byDefaultParameterDescriptorGroup.setDescriptors(GeneralParameterDescriptor[])for merging into a single set the descriptors which are repeated twice in a GML document.voidsetElement(DefaultParameterDescriptorGroup parameter) Invoked by JAXB at unmarshalling time for storing the result temporarily.private static voidverifyEquivalence(String name, boolean condition) Throws an exception for mismatched descriptor if a condition is false.protected CC_OperationParameterGroupwrap(org.opengis.parameter.ParameterDescriptorGroup parameter) Invoked byPropertyTypeat marshalling time for wrapping the given value in a<gml:OperationParameterGroup>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_OperationParameterGroup
public CC_OperationParameterGroup()Empty constructor for JAXB only. -
CC_OperationParameterGroup
private CC_OperationParameterGroup(org.opengis.parameter.ParameterDescriptorGroup parameter) Constructor for thewrap(org.opengis.parameter.ParameterDescriptorGroup)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_OperationParameterGroup,org.opengis.parameter.ParameterDescriptorGroup> - Returns:
ParameterDescriptorGroup.class
-
wrap
Invoked byPropertyTypeat marshalling time for wrapping the given value in a<gml:OperationParameterGroup>XML element.- Specified by:
wrapin classPropertyType<CC_OperationParameterGroup,org.opengis.parameter.ParameterDescriptorGroup> - 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.
-
merge
public static org.opengis.parameter.GeneralParameterDescriptor[] merge(List<org.opengis.parameter.GeneralParameterDescriptor> descriptors, org.opengis.parameter.GeneralParameterDescriptor[] fromValues, Map<org.opengis.parameter.GeneralParameterDescriptor, org.opengis.parameter.GeneralParameterDescriptor> replacements) Invoked byDefaultParameterDescriptorGroup.setDescriptors(GeneralParameterDescriptor[])for merging into a single set the descriptors which are repeated twice in a GML document.The
descriptorsargument gives the descriptors listed explicitly inside a<gml:OperationParameterGroup>or<gml:OperationMethod>element. Those descriptors are said "incomplete" (from SIS point of view) because they are missing theParameterDescriptor.getValueClass()property, which does not exist in GML but is mandatory for us. However, an exception to this "incompleteness" happen when SIS has been able to match the<gml:OperationMethod>parent to one of the predefined operations in theorg.apache.sis.internal.referencing.providerpackage.The
fromValuesargument gives the descriptors declared in each<gml:ParameterValue>instances of a<gml:ParameterValueGroup>or<gml:AbstractSingleOperation>element. Contrarily to thedescriptorsargument, thefromValuesinstances should have non-nullParameterDescriptor.getValueClass()property inferred by SIS from the parameter value.So the preferred descriptors from more complete to less complete are:
descriptorsif and only if they contain predefined parameters inferred by SIS from the<gml:OperationMethod>name.fromValues, which contain the descriptors declared in the<gml:ParameterValue>instances.descriptors, which contain the descriptor listed in<gml:OperationParameterGroup>or<gml:OperationMethod>.
Note: this code is defined in thisCC_OperationParameterGroupclass instead of in theDefaultParameterDescriptorGroupclass 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:
descriptors- the descriptors declared in theParameterDescriptorGroup.fromValues- the descriptors declared in theParameterValueinstances. They are said "valid" because they contain the mandatoryvalueClassproperty.replacements- anIdentityHashMapwhere to store the replacements that the caller needs to apply in theGeneralParameterValueinstances.- Returns:
- a sequence containing the merged set of parameter descriptors.
- See Also:
-
verifyEquivalence
Throws an exception for mismatched descriptor if a condition is false. This is used for verifying that a descriptors has the expected properties.
-