Package ch.galinet.xml.xmlmerge.factory
Class AttributeOperationFactory
java.lang.Object
ch.galinet.xml.xmlmerge.factory.AttributeOperationFactory
- All Implemented Interfaces:
OperationFactory
Creates operations by inspecting keywords passed as attributes in patch
elements.
- Author:
- Laurent Bovet (LBO), Alex Mathey (AMA)
-
Constructor Summary
ConstructorsConstructorDescriptionAttributeOperationFactory(Operation defaultOperation, OperationResolver resolver, String keyword, String namespace) Creates a new AttributeOperationFactory. -
Method Summary
Modifier and TypeMethodDescriptiongetOperation(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.
-
Constructor Details
-
AttributeOperationFactory
public AttributeOperationFactory(Operation defaultOperation, OperationResolver resolver, String keyword, String namespace) Creates a new AttributeOperationFactory.- Parameters:
defaultOperation- The factory's default operationresolver- The factory's operation resolverkeyword- The name of the attribute representing the factory's operationnamespace- 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:
getOperationin interfaceOperationFactory- Parameters:
originalElement- Original elementmodifiedElement- Modified element- Returns:
- The operation (action, mapper or matcher) for the given element pair
- Throws:
AbstractXmlMergeException- If an error occurs during operation creation
-