Package com.github.rcaller.io
Class ROutputParserArrow
- java.lang.Object
-
- com.github.rcaller.io.ROutputParserArrow
-
- All Implemented Interfaces:
ROutputParser
public class ROutputParserArrow extends Object implements ROutputParser
- Author:
- Kopilov Aleksandr
-
-
Constructor Summary
Constructors Constructor Description ROutputParserArrow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]getAsDoubleArray(String name)double[][]getAsDoubleMatrix(String name)double[][]getAsDoubleMatrix(String name, int n, int m)float[]getAsFloatArray(String name)int[]getAsIntArray(String name)long[]getAsLongArray(String name)String[]getAsStringArray(String name)int[]getDimensions(String name)DocumentgetDocument()Returns parsed XML document.URIgetIPCResource()ArrayList<String>getNames()StringgetType(String variablename)NodeListgetValueNodes(String name)Returns nodes from parsed XML document.FilegetXMLFile()Returns XML file.StringgetXMLFileAsString()Returns raw XML document.voidparse()voidsetDocument(Document document)Inits parsed XML document.voidsetIPCResource(URI ipcResourceURI)voidsetXMLFile(File xmlFile)Inits XML file.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.github.rcaller.rstuff.ROutputParser
getAsLogicalArray
-
-
-
-
Method Detail
-
getDocument
public Document getDocument()
Description copied from interface:ROutputParserReturns parsed XML document.- Specified by:
getDocumentin interfaceROutputParser- Returns:
- parsed XML document
-
setDocument
public void setDocument(Document document)
Description copied from interface:ROutputParserInits parsed XML document.- Specified by:
setDocumentin interfaceROutputParser
-
getXMLFile
public File getXMLFile()
Description copied from interface:ROutputParserReturns XML file.- Specified by:
getXMLFilein interfaceROutputParser- Returns:
- XML file
-
getIPCResource
public URI getIPCResource()
- Specified by:
getIPCResourcein interfaceROutputParser
-
setIPCResource
public void setIPCResource(URI ipcResourceURI)
- Specified by:
setIPCResourcein interfaceROutputParser
-
getXMLFileAsString
public String getXMLFileAsString() throws IOException
Description copied from interface:ROutputParserReturns raw XML document.- Specified by:
getXMLFileAsStringin interfaceROutputParser- Returns:
- raw XML document
- Throws:
IOException
-
setXMLFile
public void setXMLFile(File xmlFile)
Description copied from interface:ROutputParserInits XML file.- Specified by:
setXMLFilein interfaceROutputParser
-
parse
public void parse() throws ParseException- Specified by:
parsein interfaceROutputParser- Throws:
ParseException
-
getNames
public ArrayList<String> getNames()
- Specified by:
getNamesin interfaceROutputParser
-
getType
public String getType(String variablename)
- Specified by:
getTypein interfaceROutputParser
-
getDimensions
public int[] getDimensions(String name)
- Specified by:
getDimensionsin interfaceROutputParser
-
getValueNodes
public NodeList getValueNodes(String name)
Description copied from interface:ROutputParserReturns nodes from parsed XML document.- Specified by:
getValueNodesin interfaceROutputParser- Returns:
- nodes from parsed XML document
-
getAsStringArray
public String[] getAsStringArray(String name) throws ParseException
- Specified by:
getAsStringArrayin interfaceROutputParser- Throws:
ParseException
-
getAsDoubleArray
public double[] getAsDoubleArray(String name) throws ParseException
- Specified by:
getAsDoubleArrayin interfaceROutputParser- Throws:
ParseException
-
getAsFloatArray
public float[] getAsFloatArray(String name) throws ParseException
- Specified by:
getAsFloatArrayin interfaceROutputParser- Throws:
ParseException
-
getAsIntArray
public int[] getAsIntArray(String name) throws ParseException
- Specified by:
getAsIntArrayin interfaceROutputParser- Throws:
ParseException
-
getAsLongArray
public long[] getAsLongArray(String name) throws ParseException
- Specified by:
getAsLongArrayin interfaceROutputParser- Throws:
ParseException
-
getAsDoubleMatrix
public double[][] getAsDoubleMatrix(String name, int n, int m) throws ParseException
- Specified by:
getAsDoubleMatrixin interfaceROutputParser- Throws:
ParseException
-
getAsDoubleMatrix
public double[][] getAsDoubleMatrix(String name) throws ParseException
- Specified by:
getAsDoubleMatrixin interfaceROutputParser- Throws:
ParseException
-
-