Package com.github.rcaller.rstuff
Interface ROutputParser
-
- All Known Implementing Classes:
ROutputParserArrow,ROutputParserXML
public interface ROutputParserAPI for reading R IPC output.- Author:
- Mehmet Hakan Satman
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static ROutputParsercreate(RCallerOptions rCallerOptions)Static factory implementation creator with given options.double[]getAsDoubleArray(String name)double[][]getAsDoubleMatrix(String name)double[][]getAsDoubleMatrix(String name, int n, int m)float[]getAsFloatArray(String name)int[]getAsIntArray(String name)default boolean[]getAsLogicalArray(String name)long[]getAsLongArray(String name)String[]getAsStringArray(String name)int[]getDimensions(String name)DocumentgetDocument()Deprecated.Do not use if you are not using XML consciouslyURIgetIPCResource()ArrayList<String>getNames()StringgetType(String variablename)NodeListgetValueNodes(String name)Deprecated.Do not use if you are not using XML consciouslyFilegetXMLFile()Deprecated.Do not use if you are not using XML consciously.StringgetXMLFileAsString()Deprecated.Do not use if you are not using XML consciouslyvoidparse()voidsetDocument(Document document)Deprecated.Do not use if you are not using XML consciouslyvoidsetIPCResource(URI ipcResourceURI)voidsetXMLFile(File xmlFile)Deprecated.Do not use if you are not using XML consciously.
-
-
-
Method Detail
-
create
static ROutputParser create(RCallerOptions rCallerOptions)
Static factory implementation creator with given options. Returned implementation uses XML or Arrow IPC format.- Parameters:
rCallerOptions- given options- Returns:
- ROutputParser implementing object
-
getDocument
@Deprecated Document getDocument()
Deprecated.Do not use if you are not using XML consciouslyReturns parsed XML document.- Returns:
- parsed XML document
-
setDocument
@Deprecated void setDocument(Document document)
Deprecated.Do not use if you are not using XML consciouslyInits parsed XML document.
-
getXMLFile
@Deprecated File getXMLFile()
Deprecated.Do not use if you are not using XML consciously. Can be replaced withgetIPCResource()Returns XML file.- Returns:
- XML file
-
getIPCResource
URI getIPCResource()
-
getXMLFileAsString
@Deprecated String getXMLFileAsString() throws IOException
Deprecated.Do not use if you are not using XML consciouslyReturns raw XML document.- Returns:
- raw XML document
- Throws:
IOException
-
setXMLFile
@Deprecated void setXMLFile(File xmlFile)
Deprecated.Do not use if you are not using XML consciously. Can be replaced withsetIPCResource(java.net.URI)Inits XML file.
-
setIPCResource
void setIPCResource(URI ipcResourceURI)
-
parse
void parse() throws ParseException- Throws:
ParseException
-
getDimensions
int[] getDimensions(String name)
-
getValueNodes
@Deprecated NodeList getValueNodes(String name)
Deprecated.Do not use if you are not using XML consciouslyReturns nodes from parsed XML document.- Returns:
- nodes from parsed XML document
-
getAsStringArray
String[] getAsStringArray(String name) throws ParseException
- Throws:
ParseException
-
getAsDoubleArray
double[] getAsDoubleArray(String name) throws ParseException
- Throws:
ParseException
-
getAsFloatArray
float[] getAsFloatArray(String name) throws ParseException
- Throws:
ParseException
-
getAsIntArray
int[] getAsIntArray(String name) throws ParseException
- Throws:
ParseException
-
getAsLongArray
long[] getAsLongArray(String name) throws ParseException
- Throws:
ParseException
-
getAsLogicalArray
default boolean[] getAsLogicalArray(String name) throws ParseException
- Throws:
ParseException
-
getAsDoubleMatrix
double[][] getAsDoubleMatrix(String name, int n, int m) throws ParseException
- Throws:
ParseException
-
getAsDoubleMatrix
double[][] getAsDoubleMatrix(String name) throws ParseException
- Throws:
ParseException
-
-