boolean canSendChildNodeEvent(Node originatingNode) {
        // Check that this is a subscriber to a collection node
        if (!node.isCollectionNode()) {
            Log.trace("Cannot send child node event: node is not a collection node.");
            return false;
        }

        if (!canSendEvents()) {
            return false;
        }
        // Check that subscriber is using type "nodes"
        if (Type.nodes != type) {
            Log.trace("Cannot send child node event: type is not 'nodes'.");
            return false;
        }
        // Check if added/deleted node is a first-level child of the subscribed node
        if (getDepth() == 1 && !node.isChildNode(originatingNode)) {
            Log.trace("Cannot send child node event: node is not a first-level child of the subscribed node.");
            return false;
        }
        // Check if added/deleted node is a descendant child of the subscribed node
        if (getDepth() == 0 && !node.isDescendantNode(originatingNode)) {
            Log.trace("Cannot send child node event: node is not a descendant child of the subscribed node.");
            return false;
        }

        if (!originatingNode.getAccessModel().canAccessItems(originatingNode, this.owner, this.getJID())) {
            return false;
        }

        Log.trace("Can send child node event.");
        return true;
    }
Returns true if an event notification can be sent to the subscriber of the collection
node for a newly created node that was associated to the collection node or a child
node that was deleted. The subscription has to be of type {@link Type#nodes}.

@param originatingNode the node that was added or deleted from the collection node.
@return true if an event notification can be sent to the subscriber of the collection
        node.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/NodeSubscription.java