ch.elca.el4j.services.xmlmerge.factory
Class XPathOperationFactory

java.lang.Object
  extended by ch.elca.el4j.services.xmlmerge.factory.XPathOperationFactory
All Implemented Interfaces:
OperationFactory

public class XPathOperationFactory
extends Object
implements OperationFactory

An operation factory that resolves operations given a map { xpath (as String), Operation }. The order in the map is relevant if several XPath matches.

Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
File-location:
XPathOperationFactory
Last check-in date:
2009-08-04 15:48:31 +0200 (Di, 04. Aug 2009) by swismer for revision 3884

Constructor Summary
XPathOperationFactory()
           
 
Method Summary
 Operation getOperation(org.jdom.Element originalElement, org.jdom.Element patchElement)
          Creates operation (action, mapper and matcher) instances corresponding to a pair of elements from the original and patch DOMs.
 void setDefaultOperation(Operation operation)
          Sets the default operation returned by this factory.
 void setOperationMap(Map map)
          Sets the factory's map containing configuration properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathOperationFactory

public XPathOperationFactory()
Method Detail

setOperationMap

public void setOperationMap(Map map)
Sets the factory's map containing configuration properties.

Parameters:
map - A map containing configuration properties.

setDefaultOperation

public void setDefaultOperation(Operation operation)
Sets the default operation returned by this factory.

Parameters:
operation - The default operation returned by this factory.

getOperation

public Operation getOperation(org.jdom.Element originalElement,
                              org.jdom.Element patchElement)
                       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
patchElement - Modified element
Returns:
The operation (action, mapper or matcher) for the given element pair
Throws:
AbstractXmlMergeException - If an error occurs during operation creation


Copyright © 2005-2011 ELCA. All Rights Reserved.