Hi Jesper,<br>
<br>
<br>
<span style="color: rgb(255, 102, 0);">1. Hashtable outConne= <span style="color: rgb(255, 0, 0);">atomObject</span>.getOutConnections();</span><br style="color: rgb(255, 102, 0);">
<br style="color: rgb(255, 102, 0);">
<span style="color: rgb(255, 102, 0);">2. Vector list = (Vector)outConne.get(<span style="color: rgb(255, 0, 0);">atomName</span>);</span><br>
<br>
In the 1 statement, <span style="color: rgb(51, 102, 255);">atomObject is <span style="color: rgb(0, 0, 0);">the object</span>  of&nbsp; type JBuilderAtom or JBuilderModel</span>.&nbsp; What exactly I am trying to do in the above two statements is 
<br>
1. finding out the out connections (if any) for the JBuilderAtom or JBuilderModel.<br>
I hope this can be achieved thorough the first statement.<br>
2. Next is getting those connections from the hash table with the name of the above object.<br>
<br>
<br>
I hope cleared my problem.<br>
<br>
Regards<br>
Adi<br>
<br>
<br>
<br><br><div><span class="gmail_quote">On 10/24/06, <b class="gmail_sendername">Berthing Jesper</b> &lt;<a href="mailto:f35594@danfoss.com">f35594@danfoss.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Hi Adi,<br><br>It looks correct, if the atomName[i] is a stored as a key in the HashTable.<br>So if you say that it returns null, the it is not present in the HashTable.<br><br>Try: (I guess that atomName[i] is the name of your connections from the MetaModel)
<br><br>if(true == outConne.containsKey(atomName[i])<br>{<br>&nbsp;&nbsp; Vector list = (Vector)outConne.get(atomName[i]);<br>}<br>else<br>{<br>&nbsp;&nbsp; // Look for another connection<br>}<br><br>toString() function from the HashTable class is also a good way to visualize the content of the HashTable.
<br><br>\Jesper<br><br>-----Original Message-----<br>From: <a href="mailto:gme-users-bounces@list.isis.vanderbilt.edu">gme-users-bounces@list.isis.vanderbilt.edu</a> on behalf of Adi Mallikarjuna Reddy V<br>Sent: Mon 10/23/2006 6:39 PM
<br>To: A list for GME users to share thoughts and discuss bugs and fixes.<br>Subject: [gme-users] Re: Traversing model<br><br>Is anyone in the list know about the following problem.<br><br><br><br>1. Hashtable outConne= atomNames[i].getOutConnections();
<br><br>2. Vector list = (Vector)outConne.get(atomName[i]);<br>Are the above statements correct?<br>I am getting null in the 2 statement. Is it the right way to access the<br>hashtable list?<br><br>Regards<br>Adi<br><br>On 10/21/06, Adi Mallikarjuna Reddy V &lt;
<a href="mailto:adimallikarjunareddy@gmail.com">adimallikarjunareddy@gmail.com</a>&gt;<br>wrote:<br>&gt;<br>&gt; Hi all,<br>&gt; I got API that I required to traverse the model. But I am facing some<br>&gt; problems. When I tried accessing Connections (In and Out) of an Object
<br>&gt; (Atom, Model), I am getting null as a result. I tried the following APIs<br>&gt;<br>&gt; getOutConnections(String name) one which returns Vector<br>&gt; getOutConnections() one which returns Hashtable<br>&gt;<br>
&gt; this two functions I tried using the instance of (JBuilderAtom or<br>&gt; JBuilderModel).<br>&gt;<br>&gt; I would be helpful if you can help me in this regard.<br>&gt;<br>&gt;<br>&gt; Regards<br>&gt; Adi<br><br><br>_______________________________________________
<br>gme-users mailing list<br><a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a><br><a href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
</a><br><br><br></blockquote></div><br>