[ 
https://issues.apache.org/jira/browse/MUSE-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465021
 ] 

Mohammad Fakhar commented on MUSE-153:
--------------------------------------

As long as the parent/child relationships described in a topicset document are 
honored in the data structure that represents the topicset, I am ok. 
As I mentioned in Muse-151, setting message patterns programatically sounds ok 
to me for now, my main concern was being able to model parent and child topics 
properly in order to get expected results from query dialects. 

> Child topics in topic set documents are being parsed as root topics by 
> notification producer
> --------------------------------------------------------------------------------------------
>
>                 Key: MUSE-153
>                 URL: https://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
>             Fix For: 2.2.0
>
>
> 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: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to