public void removePublisher(JID jid) {
        // Get the current affiliation of the specified JID
        NodeAffiliate affiliate = getAffiliate(jid);
        if (affiliate.getSubscriptions().isEmpty()) {
            removeAffiliation(jid, NodeAffiliate.Affiliation.publisher);
            removeSubscriptions(jid);
        }
        else {
            // The user has subscriptions so change affiliation to NONE
            addNoneAffiliation(jid);
        }
    }
Removes the publisher affiliation of the specified entity JID. If the user that is
no longer a publisher was subscribed to the node then his affiliation will be of
type {@link NodeAffiliate.Affiliation#none}.

@param jid the JID of the user being removed as a node publisher.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/Node.java