Class Subtree
java.lang.Object
com.deltaxml.core.config.subtreeProcessing.Subtree
This class configures elements based on how they need to be processed.
-
Constructor Summary
ConstructorsConstructorDescriptionInitialises a subtree with only an element XPath.Subtree(String elemXpath, SubtreeMode mode) Initialises a subtree with both element XPath and mode.Subtree(String elemXpath, SubtreeMode mode, Boolean ordered) Initialises a subtree with element XPath, mode and ordered.Subtree(String elemXpath, SubtreeMode mode, Boolean ordered, List<ChildAlignment> childAlignments) Initialises a subtree with element XPath, mode and ordered along with the child alignment list.Initialises a subtree with both element XPath and ordered.Subtree(String elemXpath, Boolean ordered, List<ChildAlignment> childAlignments) Initialises a subtree with both element XPath and ordered along with the child alignment list. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildAlignment(ChildAlignment childAlignment) Adds to the list of children alignments.Gets the list of all children alignment specifiers.Gets the Subtree element XPath.getMode()Gets the Subtree element mode.Returns the ordered alignment value.voidsetChildAlignments(List<ChildAlignment> childAlignments) Sets the list for children alignment specifiers.voidsetElemXpath(String elemXpath) Sets the element XPath.voidsetMode(SubtreeMode mode) Sets the element mode.voidsetOrdered(Boolean ordered) Sets the ordered alignment value.
-
Constructor Details
-
Subtree
Initialises a subtree with both element XPath and mode.- Parameters:
elemXpath- The XPath string representing the element location.mode- The SubtreeMode used to identify content type for the subtree.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
Subtree
Initialises a subtree with element XPath, mode and ordered.- Parameters:
elemXpath- The XPath string representing the element location.mode- The SubtreeMode used to identify content type for the subtree.ordered- The boolean where true represents ordered alignment, and false represents unordered alignment.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
Subtree
Initialises a subtree with both element XPath and ordered.- Parameters:
elemXpath- The XPath string representing the element location.ordered- The boolean where true represents ordered alignment, and false represents unordered alignment.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
Subtree
Initialises a subtree with both element XPath and ordered along with the child alignment list.- Parameters:
elemXpath- The XPath string representing the element location.ordered- The boolean where true represents ordered alignment, and false represents unordered alignment.childAlignments- The list of ChildAlignment instances specifying children for alignment.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
Subtree
public Subtree(String elemXpath, SubtreeMode mode, Boolean ordered, List<ChildAlignment> childAlignments) Initialises a subtree with element XPath, mode and ordered along with the child alignment list.- Parameters:
elemXpath- The XPath string representing the element location.mode- The SubtreeMode used to identify content type for the subtree.ordered- The boolean where true represents ordered alignment, and false represents unordered alignment.childAlignments- The list of ChildAlignment instances specifying children for alignment.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
Subtree
Initialises a subtree with only an element XPath. The mode in which the subtree will be processed is the default mode for the file.- Parameters:
elemXpath- The Subtree element XPath.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
-
Method Details
-
getElemXpath
Gets the Subtree element XPath.- Returns:
- An element XPath used to identify the subtree.
-
setElemXpath
Sets the element XPath.- Parameters:
elemXpath- An XPath used to identify the subtree.- Throws:
IllegalArgumentException- if passed elemXpath is invalid.
-
getMode
Gets the Subtree element mode.- Returns:
- The SubtreeMode used to identify content type for the subtree.
-
setMode
Sets the element mode.- Parameters:
mode- The SubtreeMode used to identify content type for the subtree.
-
getChildAlignments
Gets the list of all children alignment specifiers.- Returns:
- The list of ChildAlignment instances specifying children for alignment.
-
setChildAlignments
Sets the list for children alignment specifiers.- Parameters:
childAlignments- The list of ChildAlignment instances specifying children for alignment.
-
addChildAlignment
Adds to the list of children alignments.- Parameters:
childAlignment- The ChildAlignment to be added to the existing list of children alignment specifiers.
-
isOrdered
Returns the ordered alignment value.- Returns:
- The boolean where true represents ordered alignment, and false represents unordered alignment.
-
setOrdered
Sets the ordered alignment value.- Parameters:
ordered- The boolean where true represents ordered alignment, and false represents unordered alignment.
-