| Package | Description |
|---|---|
| cdc.util.data | |
| cdc.util.data.util | |
| cdc.util.data.xml |
| Modifier and Type | Interface | Description |
|---|---|---|
interface |
Child |
Interface implemented by child nodes: they have an optional parent.
|
interface |
Leaf |
Interface implemented by leaf nodes (they have no children).
|
interface |
Parent |
Interface implemented by nodes that are parents (they have children nodes): Document and Element.
|
| Modifier and Type | Class | Description |
|---|---|---|
(package private) class |
AbstractChild |
Base class of nodes that are children (they have a parent node).
|
(package private) class |
AbstractContentNode |
Base class for nodes with content: text and comment.
|
class |
Comment |
Comment node.
|
class |
Document |
XML like Document node.
|
class |
Element |
XML like Element node.
|
class |
Text |
Text node.
|
| Modifier and Type | Field | Description |
|---|---|---|
static java.util.function.Predicate<Node> |
Node.ANY_NODE |
A Node Predicate that always return
true. |
static java.util.Comparator<Node> |
Node.ELEMENT_NAME_AND_ATTRIBUTES_COMPARATOR |
|
static java.util.Comparator<Node> |
Node.ELEMENT_NAME_COMPARATOR |
|
static java.util.function.Predicate<Node> |
Node.IS_COMMENT |
A Node Predicate that returns
true when the node is a Comment. |
static java.util.function.Predicate<Node> |
Node.IS_ELEMENT |
A Node Predicate that returns
true when the node is an Element. |
static java.util.function.Predicate<Node> |
Node.IS_IGNORABLE_TEXT |
A Node Predicate that returns
true when the node is a Text that is ignorable. |
static java.util.function.Predicate<Node> |
Node.IS_PURE_ELEMENT |
A Node Predicate that returns
true when the node is an Element
that has no attributes and no children . |
static java.util.function.Predicate<Node> |
Node.IS_TEXT |
A Node Predicate that returns
true when the node is a Text. |
| Modifier and Type | Method | Description |
|---|---|---|
default <T extends Node> |
Parent.getChild(java.lang.Class<T> childClass) |
|
default <T extends Node> |
Parent.getChild(java.lang.Class<T> childClass,
java.util.function.Predicate<? super T> predicate) |
|
default <T extends Node> |
Parent.getChildAt(java.lang.Class<T> childClass,
int index) |
Returns the child that is an instance of a given class and is at a given position.
|
default <T extends Node> |
Parent.getChildAt(java.lang.Class<T> childClass,
java.util.function.Predicate<? super T> predicate,
int index) |
Returns the child that is an instance of a given class, matches a Predicate and is at a given position.
|
default <T extends Node> |
Parent.getChildren(java.lang.Class<T> childClass) |
Returns an Iterable of children that are instance of a given class.
|
default <T extends Node> |
Parent.getChildren(java.lang.Class<T> childClass,
java.util.function.Predicate<? super T> predicate) |
Returns an Iterable of children that are instance of a given class and match a predicate.
|
default <T extends Node> |
Parent.getChildrenCount(java.lang.Class<T> childClass,
java.util.function.Predicate<? super T> predicate) |
Returns the number of children that match a class and predicate.
|
default <T extends Node> |
Parent.hasChildren(java.lang.Class<T> childClass,
java.util.function.Predicate<? super T> predicate) |
Returns
true if this parent has children of a given class and matching a predicate. |
| Modifier and Type | Method | Description |
|---|---|---|
Node |
Node.clone(boolean recurse) |
Return a clone of this node.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.function.Predicate<Node> |
Element.hasAttribute(java.lang.String attributeName,
java.lang.String attributeValue) |
Creates a Predicate that accepts Nodes that are elements that have an attribute with a given value.
|
static java.util.function.Predicate<Node> |
Element.matching(java.util.Set<SPath> paths) |
|
static java.util.function.Predicate<Node> |
Element.named(java.lang.String name) |
Creates a Predicate that accepts Nodes that are element with a given name.
|
static java.util.function.Predicate<Node> |
Element.named(java.lang.String... names) |
Creates a Predicate that accepts Nodes that are element whose named belongs to an array.
|
static java.util.function.Predicate<Node> |
Element.named(java.util.Set<java.lang.String> names) |
Creates a Predicate that accepts Nodes that are element whose named belongs to a set.
|
static java.util.function.Predicate<Node> |
Element.namedIgnoreCase(java.lang.String name) |
Creates a Predicate that accepts Nodes that are element with a given name, ignoring case.
|
static java.util.function.Predicate<Node> |
Element.namedWithAttribute(java.lang.String name,
java.lang.String attributeName,
java.lang.String attributeValue) |
Creates a Predicate that accepts Nodes that are elements with a given name and have an attribute with a given value.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
AbstractContentNode.deepEquals(Node node) |
|
boolean |
Document.deepEquals(Node node) |
|
boolean |
Element.deepEquals(Node node) |
|
boolean |
Node.deepEquals(Node node) |
Return true when this node and its descendants equals other node hierarchy.
|
static void |
Nodes.print(Node node,
org.apache.logging.log4j.Logger logger,
org.apache.logging.log4j.Level level) |
| Modifier and Type | Method | Description |
|---|---|---|
default int |
Parent.getChildrenCount(java.lang.Class<? extends Node> childClass) |
Returns the number of children that match a class.
|
default boolean |
Parent.hasChildren(java.lang.Class<? extends Node> childClass) |
Returns
true if this parent has children of a given class. |
| Modifier and Type | Field | Description |
|---|---|---|
static cdc.util.function.Evaluator<Node> |
DataUtil.RECURSE |
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
DataUtil.hasAllDescendantsMatching(Node node,
java.util.function.Predicate<Node> predicate,
boolean strict) |
|
static boolean |
DataUtil.hasAncestorMatching(Node node,
java.util.function.Predicate<Node> predicate) |
|
static boolean |
DataUtil.hasDescendantMatching(Node node,
java.util.function.Predicate<Node> predicate,
boolean strict) |
|
static void |
DataDebug.print(Node node,
int level,
java.io.PrintStream out) |
|
static void |
DataDebug.print(Node node,
Node highlight1,
Node highlight2,
int level,
java.io.PrintStream out) |
|
static void |
DataStats.print(Node node,
java.io.PrintStream out) |
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
DataUtil.hasAllDescendantsMatching(Node node,
java.util.function.Predicate<Node> predicate,
boolean strict) |
|
static boolean |
DataUtil.hasAncestorMatching(Node node,
java.util.function.Predicate<Node> predicate) |
|
static boolean |
DataUtil.hasDescendantMatching(Node node,
java.util.function.Predicate<Node> predicate,
boolean strict) |
| Constructor | Description |
|---|---|
DataStats(Node node) |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
XmlDataWriter.print(Node node,
boolean asDocument,
java.io.PrintStream out,
java.lang.String indent,
boolean close,
XmlWriter.Feature... features) |
Prints a Node to a PrintStream.
|
static void |
XmlDataWriter.save(Node node,
boolean asDocument,
java.io.File file,
java.lang.String indent,
XmlWriter.Feature... features) |
Saves a Node to a File.
|
static void |
XmlDataWriter.save(Node node,
boolean asDocument,
java.io.OutputStream os,
java.lang.String indent,
XmlWriter.Feature... features) |
Saves a Node to an OutputStream.
|
static void |
XmlDataWriter.save(Node node,
boolean asDocument,
java.io.Writer writer,
java.lang.String indent,
XmlWriter.Feature... features) |
Saves a Node to a Writer.
|
static void |
XmlDataWriter.save(Node node,
boolean asDocument,
java.lang.String filename,
java.lang.String indent,
XmlWriter.Feature... features) |
Saves a Node to a File.
|
static java.lang.String |
XmlDataWriter.toString(Node node,
boolean asDocument,
java.lang.String indent,
XmlWriter.Feature... features) |
|
void |
XmlDataWriter.write(Node node) |
Writes a node.
|
static void |
XmlDataWriter.write(XmlWriter writer,
Node node) |
Writes a node to an XmlWriter.
|
static void |
XmlDataWriter.write(XmlWriter writer,
Node node,
boolean asDocument) |
Writes a node to an XmlWriter.
|
Copyright © 2019. All rights reserved.