generateFunctionMap: Create java wrapper functions for a list of R functions

Description Usage Arguments Details Value Author(s) Examples

Description

The 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 lookup. This function also updates environments lookup and cvtImport (see arguments below) as a side effect.

Usage

1
2
3
4
5
generateFunctionMap(rTypeInfo, genTest = TRUE, workDir = getwd(),
                    verbose = FALSE,
                    deployModeName = "jms", typeModeName = "javalib",
                    wsdlStyle = "WRAPPED", wsdlUse = "LITERAL",
                    extraClasses = "", pkgRoot="org.bioconductor", ...)

Arguments

rTypeInfo

a list, each component is an instance of RJavaSignature-class and represents the signature of a R function.

genTest

logical, TRUE if want to generate a java program to test the java wrapper functions generated by generateFunctionMap, FALSE otherwise.

workDir

a character string, the path of the directory where this function generates all its outputs.

verbose

logical, TRUE if want to print out debug information, FALSE otherwise.

deployModeName

Character, either "demo" or "jms". How the service will be deployed. "demo" is no longer supported.

typeModeName

Character, either "robject" or "javalib". How Java objects should be generated; see generateDataMap and converters

wsdlStyle

Style of wsdl to create. A value of “WRAPPED” adds “_PortType” to the short name of the main service interface; all other values do not add “_PortType”.

wsdlUse

Whether SOAP bindings are document/literal (value “LITERAL” or document/encoded (any other value). Only “LITERAL” is currently supported.

extraClasses

character. Extra classes requied to convert function argument or return values, e.g., an argument of type 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

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

...

Additional arguments, to be compatiable with createMap.

Details

The java mappings generated under workDir are organized as following:

Value

A list, each component is an instance of RJavaSignature-class and represents the signature of a java wrapper function. The return value has a one-to-one mapping relation with input parameter 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 rTypeInfo.

Author(s)

Nianhua Li

Examples

1
##  This function is usually invoked by createMap.

RWebServices documentation built on Oct. 5, 2016, 4:53 a.m.