Class StaticOperationFactory

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

public class StaticOperationFactory extends Object implements OperationFactory
An operation factory returning always the same operation whatever the specified elements.
Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
  • Constructor Details

    • StaticOperationFactory

      public StaticOperationFactory(Operation operation)
      Creates a StaticOperationFactory returning the given operation.
      Parameters:
      operation - The operation operation returned by this factory.
  • Method Details

    • getOperation

      public Operation getOperation(org.jdom2.Element originalElement, org.jdom2.Element modifiedElement)
      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