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
  • Constructor Details

    • CC_OperationMethod

      public CC_OperationMethod()
      Empty constructor for JAXB only.
    • CC_OperationMethod

      private CC_OperationMethod(org.opengis.referencing.operation.OperationMethod method)
  • Method Details

    • getBoundType

      protected Class<org.opengis.referencing.operation.OperationMethod> 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 class PropertyType<CC_OperationMethod,org.opengis.referencing.operation.OperationMethod>
      Returns:
      OperationMethod.class
    • wrap

      protected CC_OperationMethod wrap(org.opengis.referencing.operation.OperationMethod method)
      Invoked by PropertyType at marshalling time for wrapping the given value in a <gml:OperationMethod> XML element.
      Specified by:
      wrap in class PropertyType<CC_OperationMethod,org.opengis.referencing.operation.OperationMethod>
      Parameters:
      method - the element to marshal.
      Returns:
      a PropertyType wrapping the given the element.
    • getElement

      public DefaultOperationMethod 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 the wrap method.
      Returns:
      the element to be marshalled.
    • setElement

      public void setElement(DefaultOperationMethod method)
      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 implicit MapProjection 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 implicit MapProjection parameters.
      Parameters:
      array - the parameters to filter.
      Returns:
      the filtered parameters.
    • isImplicitParameter

      static boolean isImplicitParameter(org.opengis.parameter.GeneralParameterDescriptor descriptor)
      Returns true 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 this CC_OperationMethod class instead of in the DefaultOperationMethod 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 given parameters into the given addTo 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 this CC_OperationMethod class instead of in the DefaultOperationMethod 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 the addTo collection.
      addTo - where to store the parameters.
      replacements - the replacements to apply in the GeneralParameterValue instances.