com.maplesoft.client
Class MathMLToMaple

java.lang.Object
  |
  +--com.maplesoft.client.MapleStatement
        |
        +--com.maplesoft.client.MathMLToMaple

public class MathMLToMaple
extends MapleStatement

Converts a string representation of a mathml equation into its equivalent Maple string


Constructor Summary
MathMLToMaple(HostInfo hostinfo, UserInfo userinfo)
          Create a MathMLToMaple for a given host and user configuration
 
Method Summary
 java.lang.String execute(java.lang.String sMathML)
          Sends the MathML string to the server to be converted to its Maple representation.
 java.lang.String[] execute(java.lang.String[] saMathML)
          Sends an array of MathML strings to the server to be converted to an array of Maple strings.
 java.lang.String[] execute(java.lang.String[] saMathML, int iType)
          Sends an array of MathML strings to the server to be converted to an array of Maple strings.
 java.lang.String execute(java.lang.String sMathML, int iType)
          Sends the MathML string to the server to be converted to its Maple representation.
 java.lang.String getResult()
          Returns the Server response to the last execute() invocation.
 java.lang.String[] getResultArray()
          Returns the Server response to the last execute() invocation.
 
Methods inherited from class com.maplesoft.client.MapleStatement
doMaple, getHost, getLock, getResponse, getResponseArray, getUser, getXMLString, getXMLStringArray, releaseLock, setHost, setHost, setUser, setUser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathMLToMaple

public MathMLToMaple(HostInfo hostinfo,
                     UserInfo userinfo)
Create a MathMLToMaple for a given host and user configuration
Method Detail

execute

public java.lang.String execute(java.lang.String sMathML)
                         throws MapleStatementException,
                                MapleException
Sends the MathML string to the server to be converted to its Maple representation.
Overrides:
execute in class MapleStatement
Parameters:
sMathML - string representing the MathML equation
Returns:
string representing the answer from the server
Throws:
MapleException - if it cannot connect to server, if the user is invalid or if the host is unknown.
MapleStatementException - if it cannot the request cannot be processed by the server
See Also:
MapleStatement.execute( String ), getResult()

execute

public java.lang.String[] execute(java.lang.String[] saMathML)
                           throws MapleStatementException,
                                  MapleException
Sends an array of MathML strings to the server to be converted to an array of Maple strings.
Overrides:
execute in class MapleStatement
Parameters:
saMathML - string array representing the MathML equation
Returns:
string array representing the answer from the server
Throws:
MapleException - if it cannot connect to server, if the user is invalid or if the host is unknown.
MapleStatementException - if it cannot the request cannot be processed by the server
See Also:
MapleStatement.execute( String[] ), getResult()

execute

public java.lang.String execute(java.lang.String sMathML,
                                int iType)
                         throws MapleStatementException,
                                MapleException
Sends the MathML string to the server to be converted to its Maple representation.
Parameters:
sMathML - a string representing the MathML equation
iType - either MathMLToMaple.PARALLEL or MathMLToMaple.CONTENT
Returns:
a string representing the answer from the server
Throws:
MapleException - if it cannot connect to server, if the user is invalid or if the host is unknown.
MapleStatementException - if it cannot the request cannot be processed by the server
See Also:
MapleStatement.execute( String ), getResult()

execute

public java.lang.String[] execute(java.lang.String[] saMathML,
                                  int iType)
                           throws MapleStatementException,
                                  MapleException
Sends an array of MathML strings to the server to be converted to an array of Maple strings.
Parameters:
saMathML - a string array representing the MathML equation
iType - either MathMLToMaple.PARALLEL or MathMLToMaple.CONTENT
Returns:
a string array representing the answer from the server
Throws:
MapleException - if it cannot connect to server, if the user is invalid or if the host is unknown.
MapleStatementException - if it cannot the request cannot be processed by the server
See Also:
MapleStatement.execute( String[] ), getResult()

getResult

public java.lang.String getResult()
Returns the Server response to the last execute() invocation.
Returns:
A string representing the answer from the server. This will be the same response that the execute() method returned.

getResultArray

public java.lang.String[] getResultArray()
Returns the Server response to the last execute() invocation.
Returns:
A string array representing the answer from the server. This will be the same response that the execute() method returned.