<?xml version="1.0" encoding="UTF-8"?>
<plugin
  name="%pluginName"
  id="ru.biosoft.plugins.jri"
  version="0.8.6"  
  provider-name="%providerName">
  
  <requires>
    <import plugin="org.apache.log4j"/>
    <import plugin="biouml.workbench"/>
    <import plugin="com.beanexplorer"/>
    <import plugin="com.developmentontheedge.util"/>
    <import plugin="ru.biosoft.access"/>
    <import plugin="ru.biosoft.server"/>
    <import plugin="ru.biosoft.table"/>
    <import plugin="org.rosuda.rengine"/>
    <import plugin="ru.biosoft.plugins.javascript"/>
    <import plugin="org.mozilla.javascript"/>
  </requires>

  <runtime>
    <library name="jri.jar">
      <export name="*"/>
    </library>
    <!-- WTF?
     library name="jri_plugin.jar">
      <export name="*"/>
    </library -->
  </runtime>
  
  <extension id="jri" point="ru.biosoft.plugins.javascript.hostObject"> 
    <hostObject name="R" class="ru.biosoft.plugins.jri.RFacade" >
        <doc description="Facade for R usage">
		<function name="local" description="returns RObject for local R installation">    														
            <returns type="ru.biosoft.plugins.jri.RObject" description="local R object"/>              
        </function>
        <function name="rserve" description="returns RObject for RServe type of R connection">    														
            <returns type="ru.biosoft.plugins.jri.RObject" description="RServe R object"/>              
        </function>
        <function name="connect" description="returns RObject for remote R installation"> 
            <argument name="host" type="String" obligatory="true" description="Remote BioUML server host"/>
            <argument name="port"  type="String" obligatory="true" description="Remote BioUML server port"/>   														
            <returns type="ru.biosoft.plugins.jri.RObject" description="local R object"/>              
        </function>
        </doc>
      </hostObject>
  </extension>  
  
  <extension id="jri.service" point="ru.biosoft.server.service"> 
        <service name="jri.service" class="ru.biosoft.plugins.jri.server.RService"/>
  </extension>
  
  <extension id="rplot" point="ru.biosoft.plugins.javascript.function"> 
    <function
      name="rplot" 
      class="ru.biosoft.plugins.jri.GlobalFunctions" 
      method="rplot" 
      varargs="true"> 
        <doc description="%rplot.descr">
           <argument name="r" type="RObject" obligatory="true" description="%rplot.arg_1"/>
           <argument name="exp" type="String" obligatory="true" description="%rplot.arg_2"/>
           <example code="%rplot.ex_1c" description="%rplot.ex_1d"/>
        </doc>
    </function>
  </extension>
  
  <extension id="R preprocessor" point="ru.biosoft.plugins.javascript.preprocessor"> 
        <preprocessor name="R script" class="ru.biosoft.plugins.jri.RPreprocessor"/>
  </extension>
  
</plugin>
