ch.elca.el4j.services.xmlmerge.action
Class DtdInsertAction

java.lang.Object
  extended by ch.elca.el4j.services.xmlmerge.action.DtdInsertAction
All Implemented Interfaces:
Action, Operation

public class DtdInsertAction
extends Object
implements Action

Copy the patch element in the output parent with the correct position according to the DTD declared in doctype.

Author:
Laurent Bovet (LBO), Alex Mathey (AMA)
File-location:
DtdInsertAction
Last check-in date:
2009-08-04 14:25:40 +0200 (Di, 04. Aug 2009) by swismer for revision 3874

Constructor Summary
DtdInsertAction()
           
 
Method Summary
 com.wutka.dtd.DTD getDTD(org.jdom.Element element)
          Gets the DTD declared in the doctype of the element's owning document.
 List getOrderedDtdElements(com.wutka.dtd.DTDContainer container)
          Retieves a list containing the DTD elements of a given DTD container.
 void perform(org.jdom.Element originalElement, org.jdom.Element patchElement, org.jdom.Element outputParentElement)
          Out of an original element and a second element provided by the patch DOM, applies an operation and modifies the parent node of the result DOM.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DtdInsertAction

public DtdInsertAction()
Method Detail

perform

public void perform(org.jdom.Element originalElement,
                    org.jdom.Element patchElement,
                    org.jdom.Element outputParentElement)
             throws AbstractXmlMergeException
Out of an original element and a second element provided by the patch DOM, applies an operation and modifies the parent node of the result DOM.

Specified by:
perform in interface Action
Parameters:
originalElement - Original element
patchElement - Patch element
outputParentElement - Output parent element
Throws:
AbstractXmlMergeException

getDTD

public com.wutka.dtd.DTD getDTD(org.jdom.Element element)
                         throws DocumentException
Gets the DTD declared in the doctype of the element's owning document.

Parameters:
element - The element for which the DTD will be retrieved
Returns:
The DTD declared in the doctype of the element's owning document
Throws:
DocumentException - If an error occurred during DTD retrieval

getOrderedDtdElements

public List getOrderedDtdElements(com.wutka.dtd.DTDContainer container)
Retieves a list containing the DTD elements of a given DTD container.

Parameters:
container - A DTD container.
Returns:
A list containing the DTD elements of a given DTD container


Copyright © 2005-2011 ELCA. All Rights Reserved.