ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | jawe List | March 2004 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [jawe] Data Types


Thx Sasa.
Now I have another problem: can I define for an "Application" some FormalParameters? If the answer is YES, how can I reach them after Jawe has parsed the file?
 
Example:
<Application Id="Try" Name="try">
    <FormalParameters>
   <FormalParameter Id="x" Index="x" Mode="IN">
    <DataType>
  <BasicType Type="INTEGER" />
  </DataType>
  </FormalParameter>
    <FormalParameter Id="y" Index="y" Mode="OUT">    
     <DataType>
      <BasicType Type="INTEGER" />
  </DataType>
  </FormalParameter>
  </FormalParameters>
  </Application>
 
Is this a valid XPDL file portion? Is the parser able to parse it?
----- Original Message -----
Sent: Thursday, March 04, 2004 11:06 AM
Subject: Re: [jawe] Data Types

Hi,
 
you have to do following:
 
DataType dt=fp.get("DataType");
Object choosenType=dt.get("Type").toValue();
String subTypeName="";
if (choosenType instanceof BasicType) {
    subTypeName=((BasicType)choosenType).get("Type").toValue().toString();
}
 
 
if the FormalParameter is defined as in your example, you should get "INTEGER" for the subTypeName variable value.
 
Regards,
Sasa.
----- Original Message -----
Sent: Thursday, March 04, 2004 10:46 AM
Subject: [jawe] Data Types

Hi all, I'm developing a code generator from XPDL using Jawe as frontend to access xpdl informations.
How can I reach the information about the Basic Type of a formal parameter?
 
Example of XPDL file:
<FormalParameter Id="n" Index="n" Mode="IN">
    <DataType>
  <BasicType Type="INTEGER" />
  </DataType>
  </FormalParameter>
 
I create an object of type FormalParameter, then with FormalParameter.get("DataType") method I extract the object Datatype. The how I extract the information about parameter type, in the example INTEGER?
Is this the right procedure?
 
Thanks
    Alessandro


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.