Class AttributeOperationFactory

java.lang.Object
ch.galinet.xml.xmlmerge.factory.AttributeOperationFactory
All Implemented Interfaces:
OperationFactory

public class AttributeOperationFactory extends Object implements OperationFactory
Creates operations by inspecting keywords passed as attributes in patch elements.
Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
  • Constructor Details

    • AttributeOperationFactory

      public AttributeOperationFactory(Operation defaultOperation, OperationResolver resolver, String keyword, String namespace)
      Creates a new AttributeOperationFactory.
      Parameters:
      defaultOperation - The factory's default operation
      resolver - The factory's operation resolver
      keyword - The name of the attribute representing the factory's operation
      namespace - The namespace describing the operations to apply
  • Method Details

    • getOperation

      public Operation getOperation(org.jdom2.Element originalElement, org.jdom2.Element modifiedElement) throws AbstractXmlMergeException
      Creates operation (action, mapper and matcher) instances corresponding to a pair of elements from the original and patch DOMs.
      Specified by:
      getOperation in interface OperationFactory
      Parameters:
      originalElement - Original element
      modifiedElement - Modified element
      Returns:
      The operation (action, mapper or matcher) for the given element pair
      Throws:
      AbstractXmlMergeException - If an error occurs during operation creation