<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2975" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2>Hi Adi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2>I think your question is clear. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2>You are using the functions correctly, but you need to be 
sure that the atomName is a key in the HashTable.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006></SPAN><SPAN 
class=801363806-24102006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2>Please use outConne.toString() and print it somewhere 
visible to you, then you are able to se what the HashTable 
contains.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
color=#0000ff size=2>Or you can use outConne.<A 
href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Hashtable.html#isEmpty()"><STRONG><FONT 
face="Courier New" size=3>isEmpty</FONT></STRONG></A><FONT face="Courier New" 
color=#000000 size=3>()<FONT face=Arial size=2>that returns true if outConne is 
empty (No out connections from the 
atomObject).</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=801363806-24102006><FONT face=Arial 
size=2>\Jesper</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> gme-users-bounces@list.isis.vanderbilt.edu 
[mailto:gme-users-bounces@list.isis.vanderbilt.edu] <B>On Behalf Of </B>Adi 
Mallikarjuna Reddy V<BR><B>Sent:</B> 24. oktober 2006 07:57<BR><B>To:</B> A list 
for GME users to share thoughts and discuss bugs and fixes.<BR><B>Subject:</B> 
Re: [gme-users] Re: Traversing model<BR></FONT><BR></DIV>
<DIV></DIV>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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><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></BODY></HTML>