org.codehaus.cargo.module.merge.strategy
Class NodeMergeStrategy
java.lang.Object
org.codehaus.cargo.module.merge.strategy.MergeStrategy
org.codehaus.cargo.module.merge.strategy.NodeMergeStrategy
public class NodeMergeStrategy
- extends MergeStrategy
A merging strategy that can be used to combine two XML documents together.
- Version:
- $Id $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeMergeStrategy
public NodeMergeStrategy(org.w3c.dom.Element template)
- Constructor.
- Parameters:
template - in the template to use in the merge
NodeMergeStrategy
public NodeMergeStrategy(java.io.InputStream template)
throws org.xml.sax.SAXException,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException
- Constructor.
- Parameters:
template - in the template to use in the merge (XML)
- Throws:
javax.xml.parsers.ParserConfigurationException - if parser error
java.io.IOException - if IO Exception
org.xml.sax.SAXException - if SAX Exception
inRight
public int inRight(AbstractMergeSet set,
org.w3c.dom.Element element)
- Deal with merging an element that only appears in the right set.
- Overrides:
inRight in class MergeStrategy
- Parameters:
set - in the calling MergeSetelement - in the item present only in the left set
- Returns:
- count of merged items
- See Also:
MergeStrategy.inRight(org.codehaus.cargo.module.merge.AbstractMergeSet, org.w3c.dom.Element)
inBoth
public int inBoth(AbstractMergeSet set,
MergePair pair)
- Deal with merging an element appears in both sets.
- Overrides:
inBoth in class MergeStrategy
- Parameters:
set - in the calling MergeSetpair - the pair of items
- Returns:
- count of merged items
- See Also:
MergeStrategy.inBoth(org.codehaus.cargo.module.merge.AbstractMergeSet, org.codehaus.cargo.module.merge.MergePair)
Copyright © 2004-2007 Codehaus. All Rights Reserved.