Research Article

Concept Tree-Based Event Matching Algorithm in Publish/Subscribe Systems

Algorithm 7

Tree matching algorithm.
treeMatch(tree, key, sid){
(1) node = tree.hashtable.get(key);
(2) tmpid = new BitSet( );
(3) while node is not null{
(4)  tmpid = tmpid | node.sid;
(5)  node = node.parentNode;
(6) }
(7) resize(tree.sid, sid.length);
(8) sid = (∼tree.sid | tmpid) & sid;
(9) return sid;
}