Changes between Version 9 and Version 10 of rappture_java_api


Ignore:
Timestamp:
01/31/11 18:09:56 (3 years ago)
Author:
braffert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rappture_java_api

    v9 v10  
    2525__'''Method Summary'''__ 
    2626 
    27   void '''finalize()''' 
    28  
    2927  String '''get(''' String ''path'' ''')''' 
    3028 
     
    4543  void '''putData(''' String ''path'', byte[] ''value'' ''')''' 
    4644 
    47   void '''putDouble(''' String ''path'', double ''value'' ''')''' 
    48  
    4945  void '''putFile(''' String ''path'', String ''filename'', boolean ''compress'', boolean ''append'' ''')''' 
    5046 
     
    5248 
    5349  void '''putFile(''' String ''path'', String ''filename'' ''')''' 
    54  
    55   void '''putString(''' String ''path'', String ''value'', boolean ''append'' ''')''' 
    56  
    57   void '''putString(''' String ''path'', String ''value'' ''')''' 
    5850 
    5951  void '''result(''' int ''exitStatus'' ''')''' 
     
    129121__'''Method Detail'''__ 
    130122 
    131   protected void '''finalize()''' throws Throwable 
    132  
    133     Purpose: 
    134    
    135       Deletes the underlying C++ !RpLibrary instance.  This method is called automatically by the garbage collector when there are no references to the Java Library instance. 
    136  
    137123  public String '''get(''' String ''path'' ''')''' 
    138124 
     
    352338      2)  ''value'' - Data to store in the library object. 
    353339 
    354   public void '''putDouble(''' String ''path'', double ''value'' ''')''' 
    355  
    356     Purpose: 
    357  
    358       Places ''value'' into the library at the xml location ''path''.  If the ''append'' flag is set to 1, then ''value'' will be appended to data that already exists at ''path''. If the ''append'' flag is set to false, then ''value'' will overwrite data that may have existed at ''path''. 
    359  
    360     Input Arguments: 
    361  
    362       1)  ''path'' - xml path (location) to store ''value''. 
    363  
    364       2)  ''value'' - Data to store in the library object. 
    365  
    366       3)  ''append'' - Append flag. If set to false, data at ''path'' will be overwritten. If set to true, new data will be appended to the existing data. 
     340  public void '''putFile(''' String ''path'', String ''filename'', boolean ''compress'', boolean ''append'' ''')''' 
     341 
     342    Purpose: 
     343 
     344      Places the contents of the file ''filename'' into the library at the xml location ''path''.  If the ''append'' flag is set to 1, then ''value'' will be appended to data that already exists at ''path''. If the ''append'' flag is set to false, then ''value'' will overwrite data that may have existed at ''path''. 
     345 
     346    Input Arguments: 
     347 
     348      1)  ''path'' - xml path (location) to store ''value''. 
     349 
     350      2)  ''filename'' - Name of the file to be stored. 
     351 
     352      3)  ''compress'' - Set to true to indicate that the binary data should be compressed. 
     353 
     354      4)  ''append'' - Append flag. If set to false, data at ''path'' will be overwritten. If set to true, new data will be appended to the existing data. 
     355 
     356  public void '''putFile(''' String ''path'', String ''filename'', boolean ''compress'' ''')''' 
     357 
     358    Purpose: 
     359 
     360      Places the contents of the file ''filename'' into the library at the xml location ''path''.  Overwrites any data that previously existed at path. Equivalent to putFile(''path'', ''value'', ''compress'', false). 
     361 
     362    Input Arguments: 
     363 
     364      1)  ''path'' - xml path (location) to store ''value''. 
     365 
     366      2)  ''filename'' - Name of the file to be stored. 
     367           
     368      3)  ''compress'' - Set to true to indicate that the binary data should be compressed. 
     369 
     370  public void '''putFile(''' String ''path'', String ''filename'' ''')''' 
     371 
     372    Purpose: 
     373 
     374      Places the contents of the file ''filename'' into the library at the xml location ''path''.  Binary data is automatically compressed.  Overwrites any data that previously existed at path. Equivalent to putFile(''path'', ''value'', true, false). 
     375 
     376    Input Arguments: 
     377 
     378      1)  ''path'' - xml path (location) to store ''value''. 
     379 
     380      2)  ''filename'' - Name of the file to be stored. 
     381 
     382  public void '''result(''' int ''exitStatus'' ''')''' 
     383 
     384    Purpose: 
     385 
     386      Write the data from Library object instance to file and signal the end of processing to the graphical user interface. 
     387 
     388    Input Arguments: 
     389 
     390      1)  ''exitStatus'' - Integer representing the success or failure of the application. 0 for success, any other number is failure. 
    367391 
    368392{{{ 
     
    384408    String Ef; 
    385409    rappture.Library driver = new rappture.Library("driver.xml"); 
    386     driver.put("input.number(Ef).current", 12.345); 
     410    driver.put("input.number(Ef).current", "6eV"); 
    387411    Ef = driver.get("input.number(Ef).current"); 
    388412    System.out.println("Ef = " + Ef); 
     413    driver.result(0); 
    389414    System.exit(0); 
    390415  } 
     
    393418# Result: 
    394419# 
    395 # Ef = 12.345 
    396 }}} 
    397  
    398   public void '''putFile(''' String ''path'', String ''filename'', boolean ''compress'', boolean ''append'' ''')''' 
    399  
    400     Purpose: 
    401  
    402       Places the contents of the file ''filename'' into the library at the xml location ''path''.  If the ''append'' flag is set to 1, then ''value'' will be appended to data that already exists at ''path''. If the ''append'' flag is set to false, then ''value'' will overwrite data that may have existed at ''path''. 
    403  
    404     Input Arguments: 
    405  
    406       1)  ''path'' - xml path (location) to store ''value''. 
    407  
    408       2)  ''filename'' - Name of the file to be stored. 
    409  
    410       3)  ''compress'' - Set to true to indicate that the binary data should be compressed. 
    411  
    412       4)  ''append'' - Append flag. If set to false, data at ''path'' will be overwritten. If set to true, new data will be appended to the existing data. 
    413  
    414   public void '''putFile(''' String ''path'', String ''filename'', boolean ''compress'' ''')''' 
    415  
    416     Purpose: 
    417  
    418       Places the contents of the file ''filename'' into the library at the xml location ''path''.  Overwrites any data that previously existed at path. Equivalent to putFile(''path'', ''value'', ''compress'', false). 
    419  
    420     Input Arguments: 
    421  
    422       1)  ''path'' - xml path (location) to store ''value''. 
    423  
    424       2)  ''filename'' - Name of the file to be stored. 
    425            
    426       3)  ''compress'' - Set to true to indicate that the binary data should be compressed. 
    427  
    428   public void '''putFile(''' String ''path'', String ''filename'' ''')''' 
    429  
    430     Purpose: 
    431  
    432       Places the contents of the file ''filename'' into the library at the xml location ''path''.  Binary data is automatically compressed.  Overwrites any data that previously existed at path. Equivalent to putFile(''path'', ''value'', true, false). 
    433  
    434     Input Arguments: 
    435  
    436       1)  ''path'' - xml path (location) to store ''value''. 
    437  
    438       2)  ''filename'' - Name of the file to be stored. 
    439  
    440   public void '''putString(''' String ''path'', String ''value'', boolean ''append'' ''')''' 
    441  
    442     Purpose: 
    443  
    444       Place the string ''value'' into the library at the xml location ''path''. If the ''append'' flag is set to 1, then ''value'' will be appended to data that already exists at ''path''. If the ''append'' flag is set to false, then ''value'' will overwrite data that may have existed at ''path''.  Similar to put(''path'', ''value'', ''append''), except only Strings are accepted for ''value''. 
    445  
    446     Input Arguments: 
    447  
    448       1)  ''path'' - xml path (location) to store ''value''. 
    449  
    450       2)  ''value'' - Data to store in the library. 
    451  
    452       3)  ''append'' - Append flag. If set to false, data at ''path'' will be overwritten. If set to true, new data will be appended to the existing data. 
    453  
    454   public void '''putString(''' String ''path'', String ''value'' ''')''' 
    455  
    456     Purpose: 
    457  
    458       Place the string ''value'' into the library at the xml location path. Overwrites any data that previously existed at path. Equivalent to putString(''path'', ''value'', ''false''). 
    459  
    460     Input Arguments: 
    461  
    462       1)  ''path'' - xml path (location) to store ''value''. 
    463  
    464       2)  ''value'' - Data to store in the library. 
    465  
    466  
    467   public void '''result(''' int ''exitStatus'' ''')''' 
    468  
    469     Purpose: 
    470  
    471       Write the data from Library object instance to file and signal the end of processing to the graphical user interface. 
    472  
    473     Input Arguments: 
    474  
    475       1)  ''exitStatus'' - Integer representing the success or failure of the application. 0 for success, any other number is failure. 
     420# A run.xml file is created and the Rappture graphical user Interface is signaled that processing has ended. 
     421}}} 
     422 
     423  public void '''result()''' 
     424 
     425    Purpose: 
     426 
     427      Write the data from Library object instance to file and signal the end of processing to the graphical user interface.  Equivalent to result(0). 
     428 
     429  public String '''xml()''' 
     430 
     431    Purpose: 
     432 
     433      Provides the entire xml of the Library. 
     434 
     435    Return Value: 
     436       
     437      Returns a String object containing the entire xml of the Library. 
     438 
     439       
     440== Units Class Detail == 
     441 
     442__'''Method Detail'''__ 
     443 
     444  public double '''convertDouble(''' String ''fromVal'', String ''to'' ''')''' 
     445 
     446    Purpose: 
     447 
     448      Returns the decimal value of the String ''fromVal'' in units given by the String ''to''.  Equivalent to Double.valueOf(convertString(fromVal, to, false)). 
     449 
     450    Input Arguments: 
     451 
     452      1)  ''fromVal'' - String with numeric portion as well as optional units (for example: "3m" or "3"). 
     453 
     454      2)  ''to'' - String name of the units to convert to. 
     455 
     456    Return Value: 
     457 
     458      Decimal value of ''fromVal'' in units specified by ''to''. 
     459 
     460  public String '''convertString(''' String ''fromVal'', String ''to'', boolean ''units'' ''')''' 
     461 
     462    Purpose: 
     463 
     464      Returns a String containing the value of the String ''fromVal'' in units given by the String ''to''.  Units are appended to the result if the ''units'' flag is true. 
     465 
     466    Input Arguments: 
     467 
     468      1)  ''fromVal'' - String with the numeric portion as well as optional units (for example: "3m" or "3"). 
     469 
     470      2)  ''to'' - String name of the units to convert to. 
     471 
     472      3)  ''units'' - Flag to indicate whether or not units should be included in the output String. 
     473 
     474    Return Value: 
     475 
     476      String containing the converted value of ''fromVal'' in units specified by ''to'' with optional units. 
    476477 
    477478{{{ 
     
    491492class Example{ 
    492493  public static void main(String args[]){ 
    493     String Ef; 
    494     rappture.Library driver = new rappture.Library("driver.xml"); 
    495     driver.put("input.number(Ef).current", "6eV"); 
    496     Ef = driver.get("input.number(Ef).current"); 
    497     System.out.println("Ef = " + Ef); 
    498     driver.result(0); 
    499     System.exit(0); 
    500   } 
    501 } 
    502  
    503 # Result: 
    504 # 
    505 # A run.xml file is created and the Rappture graphical user Interface is signaled that processing has ended. 
    506 }}} 
    507  
    508   public void '''result()''' 
    509  
    510     Purpose: 
    511  
    512       Write the data from Library object instance to file and signal the end of processing to the graphical user interface.  Equivalent to result(0). 
    513  
    514   public String '''xml()''' 
    515  
    516     Purpose: 
    517  
    518       Provides the entire xml of the Library. 
    519  
    520     Return Value: 
    521        
    522       Returns a String object containing the entire xml of the Library. 
    523  
    524        
    525 == Units Class Detail == 
    526  
    527 __'''Method Detail'''__ 
    528  
    529   public double '''convertDouble(''' String ''fromVal'', String ''to'' ''')''' 
    530  
    531     Purpose: 
    532  
    533       Returns the decimal value of the String ''fromVal'' in units given by the String ''to''.  Equivalent to Double.valueOf(convertString(fromVal, to, false)). 
    534  
    535     Input Arguments: 
    536  
    537       1)  ''fromVal'' - String with numeric portion as well as optional units (for example: "3m" or "3"). 
    538  
    539       2)  ''to'' - String name of the units to convert to. 
    540  
    541     Return Value: 
    542  
    543       Decimal value of ''fromVal'' in units specified by ''to''. 
    544  
    545   public String '''convertString(''' String ''fromVal'', String ''to'', boolean ''units'' ''')''' 
    546  
    547     Purpose: 
    548  
    549       Returns a String containing the value of the String ''fromVal'' in units given by the String ''to''.  Units are appended to the result if the ''units'' flag is true. 
    550  
    551     Input Arguments: 
    552  
    553       1)  ''fromVal'' - String with the numeric portion as well as optional units (for example: "3m" or "3"). 
    554  
    555       2)  ''to'' - String name of the units to convert to. 
    556  
    557       3)  ''units'' - Flag to indicate whether or not units should be included in the output String. 
    558  
    559     Return Value: 
    560  
    561       String containing the converted value of ''fromVal'' in units specified by ''to'' with optional units. 
    562  
    563 {{{ 
    564 # Contents of driver.xml 
    565 # <run> 
    566 #     <input> 
    567 #         <number id="Ef"> 
    568 #             <units>eV</units> 
    569 #             <min>-10eV</min> 
    570 #             <max>10eV</max> 
    571 #             <default>0eV</default> 
    572 #             <current>3eV</current> 
    573 #         </number> 
    574 #     </input> 
    575 # </run> 
    576  
    577 class Example{ 
    578   public static void main(String args[]){ 
    579494    String result; 
    580495    double resultD;