\name{generateFunctionMap} \alias{generateFunctionMap} \title{Create java wrapper functions for a list of R functions} \description{ The \code{generateFunctionMap} function generates java wrapper functions for a list of R functions. It also generates java beans and R--Java data type conversions for any R data types that are related to the function but unavailable in the environment \code{lookup}. This function also updates environments \code{lookup} and \code{cvtImport} (see arguments below) as a side effect. } \usage{ generateFunctionMap(rTypeInfo, genTest = TRUE, workDir = getwd(), verbose = FALSE, deployModeName = "jms", typeModeName = "javalib", wsdlStyle = "WRAPPED", wsdlUse = "LITERAL", extraClasses = "", pkgRoot="org.bioconductor", ...) } \arguments{ \item{rTypeInfo}{a list, each component is an instance of \code{\link{RJavaSignature-class}} and represents the signature of a R function.} \item{genTest}{logical, TRUE if want to generate a java program to test the java wrapper functions generated by \code{generateFunctionMap}, FALSE otherwise.} \item{workDir}{a character string, the path of the directory where this function generates all its outputs.} \item{verbose}{logical, TRUE if want to print out debug information, FALSE otherwise.} \item{deployModeName}{Character, either "demo" or "jms". How the service will be deployed. "demo" is no longer supported.} \item{typeModeName}{Character, either "robject" or "javalib". How Java objects should be generated; see \code{\link{generateDataMap}} and \code{\link{converters}}} \item{wsdlStyle}{Style of wsdl to create. A value of \dQuote{WRAPPED} adds \dQuote{_PortType} to the short name of the main service interface; all other values do not add \dQuote{_PortType}.} \item{wsdlUse}{Whether SOAP bindings are document/literal (value \dQuote{LITERAL} or document/encoded (any other value). Only \dQuote{LITERAL} is currently supported.} \item{extraClasses}{character. Extra classes requied to convert function argument or return values, e.g., an argument of type \code{list} might require information about the classes present in the list. Usually this argument is not required, as S4 classes are parsed to their constituent parts} \item{pkgRoot}{character. Root package name of the java classes classes being created. It should be a sequence of one or more character strings delimited by dot, and no dot after the last string} \item{\dots}{Additional arguments, to be compatiable with \code{\link{createMap}}.} } \details{ The java mappings generated under \code{workDir} are organized as following: \itemize{ \item{biocJavaMap} The base directory \item{biocJavaMap/\code{package1}} Java mappings for functions and data types defined in R \code{package1} \item{biocJavaMap/\code{package1}/data} Java beans and java <-> R mapping functions (in R) for data types defined in \code{pacakge1} \item{biocJavaMap/\code{package1}/function} Java wrapper functions for functions defined in \code{package1} \item{biocJavaMap/\code{package2}} Java mappings for functions and data types defined in \code{package2} \item{biocJavaMap/\code{mainService}} Main java API, which invokes the java mapping functions for \code{package1}, \code{package2}, etc. \code{mainService} value is provided by user as input. } } \value{ A list, each component is an instance of \code{\link{RJavaSignature-class}} and represents the signature of a java wrapper function. The return value has a one-to-one mapping relation with input parameter \code{rTypeInfo}, i.e. the java wrapper function that is represented by the ith component in the return list, is the wrapper for the R function that is represend by the ith component in \code{rTypeInfo}. } \author{Nianhua Li} \examples{ ## This function is usually invoked by createMap. } \keyword{interface}