ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Fakhar (JIRA)" <j...@apache.org>
Subject [jira] Created: (MUSE-153) Child topics in topic set documents are being parsed as root topics by notification producer
Date Tue, 28 Nov 2006 20:57:22 GMT
Child topics in topic set documents are being parsed as root topics by notification producer
--------------------------------------------------------------------------------------------

                 Key: MUSE-153
                 URL: http://issues.apache.org/jira/browse/MUSE-153
             Project: Muse
          Issue Type: Bug
          Components: WSN Topics
    Affects Versions: 2.0.0
         Environment: any
            Reporter: Mohammad Fakhar
         Assigned To: Dan Jemiolo


The addTopic routines in SimpleNotificationProducer, which parse topic set documents to TopicNameSpace
objects, are treating child topics in the topic set document as root topics.  

Lets say I  have this topic set doucment (root and children belong to same namespace):
<root1>
    <child1/>
    <child2/>
</root1>

Here is the sequence of events which leads to the erroneous behavior:

1) createTopicSetDocument in SimpleNotificationProducer calls addTopics on all root topics
in document.
2) addTopics calls addTopic to add root1, and then recursively calls itself for all children
of root.
3) Now, when addTopic is called with child1, the following code is executed (in the addTopic
method):
        Topic topic = new SimpleTopic(localName, topicSpace);
        topicSpace.addTopic(topic);

This causes the child1 to be added as a root topic as this code is executed in SimpleTopicSpace.addTopic:
"_rootTopics.put(name, topic);"
where the name is child1. Same applies to child2.

The problem was exposed when I tried to evaluate a concrete topic expression against this
topic set document; it was treating child1 and child2 as root topics in the namespace, instead
of child topics of root1. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Mime
View raw message