asjava.uniobjects
Class UniXML

java.lang.Object
  extended byasjava.uniobjects.UniBase
      extended byasjava.uniobjects.UniXML

public class UniXML
extends UniBase

UniXML is used to access to U2 server XML features

Since:
UNIOBJECTS 2.0.4
Version:
Version 2.0.4
Author:
Weiming Yeh

Field Summary
 
Fields inherited from class asjava.uniobjects.UniBase
inPacket, outPacket, uniConnection, uniEncryptionType, uniParentSession, uniStatus
 
Constructor Summary
UniXML()
          Default constructor for this class.
UniXML(UniSession aSession)
          Default constructor for this class.
 
Method Summary
 void generateXML(java.lang.String cmd)
          Executes the cataloged program GETXMLSUB to use the user given query/sql command to call XMLEXECUTE().
 void generateXML(java.lang.String cmd, java.lang.String options)
          Executes the cataloged program GETXMLSUB to use the user given query or sql command to call XMLEXECUTE().
 void generateXMLUsingXmap(java.lang.String Xmapname)
          Execute cataloged basic program DBTOXMLXMAP to generate xml document using xmap, returns strXml as result
 int getErrcode()
          retrieve contents of errmsg
 java.lang.String getErrmsg()
          retrieve contents of errmsg
 java.lang.String getXML()
          retrieve the contents of retuened strXml after successful generateXML has been executed getXML method, return existing strXml
 java.lang.String getXsd()
          retrieve the contents of retuened strXsd after successful generateXML has been executed it should hold xml schema corresponding to strXml.
 void setXML(java.lang.String axml)
          set strXml to String axml, it is assumed hold xml doc setXML
 void setXsd(java.lang.String axsd)
          set strXsd to String axsd, it is assumed hold xml schema setXsd
 void updateDataUsingXmap(java.lang.String xmapName)
          Execute cataloged basic program XMLTODBXMAP to update the U2 server datafile using Xmap as defined relationship between the xml document and file's dictionary defines.
 void updateDataUsingXmap(java.lang.String xmapName, java.lang.String xmlName)
          Execute cataloged basic program XMLTODBXMAP to update the U2 server datafile using Xmap as defined relationship between the xml document and file's dictionary defines.
 
Methods inherited from class asjava.uniobjects.UniBase
getEncryptionType, isCommandActive, setEncryptionType, status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniXML

public UniXML()
       throws UniXMLException
Default constructor for this class.

Throws:
UniXMLException - is thrown if an error occurs
Since:
UNIOBJECTS 2.0.4

UniXML

public UniXML(UniSession aSession)
       throws UniXMLException
Default constructor for this class.

Parameters:
aSession - unisession representing the parent sesion object we are created by
Throws:
UniXMLException - is thrown if an error occurs
Since:
UNIOBJECTS 2.0.4
Method Detail

getXML

public java.lang.String getXML()
retrieve the contents of retuened strXml after successful generateXML has been executed getXML method, return existing strXml

Since:
UNIOBJECTS 2.0.4

setXML

public void setXML(java.lang.String axml)
set strXml to String axml, it is assumed hold xml doc setXML

Parameters:
axml - String value of the xml document holder
Since:
UNIOBJECTS 2.0.4

getXsd

public java.lang.String getXsd()
retrieve the contents of retuened strXsd after successful generateXML has been executed it should hold xml schema corresponding to strXml. getXsd method, return existing strXml

Since:
UNIOBJECTS 2.0.4

setXsd

public void setXsd(java.lang.String axsd)
set strXsd to String axsd, it is assumed hold xml schema setXsd

Parameters:
axsd - String value of the xml schema
Since:
UNIOBJECTS 2.0.4

getErrmsg

public java.lang.String getErrmsg()
retrieve contents of errmsg

Since:
UNIOBJECTS 2.0.4

getErrcode

public int getErrcode()
retrieve contents of errmsg

Since:
UNIOBJECTS 2.0.4

generateXML

public void generateXML(java.lang.String cmd)
                 throws UniXMLException,
                        UniSessionException
Executes the cataloged program GETXMLSUB to use the user given query/sql command to call XMLEXECUTE().

Parameters:
cmd - a String represent Uniquery/UniSql command valid for U2 server
Throws:
UniXMLException - if a server or query error occurs
UniSessionException
Since:
UNIOBJECTS 2.0.4

generateXML

public void generateXML(java.lang.String cmd,
                        java.lang.String options)
                 throws UniXMLException,
                        UniSessionException
Executes the cataloged program GETXMLSUB to use the user given query or sql command to call XMLEXECUTE().

Parameters:
cmd - a String represent Uniquery/UniSql command valid for U2 server
options - can be @FM or ' ' separated xmlout options.
Throws:
UniXMLException - if a server or query error occurs
UniSessionException
Since:
UNIOBJECTS 2.0.4

generateXMLUsingXmap

public void generateXMLUsingXmap(java.lang.String Xmapname)
                          throws UniXMLException,
                                 UniSessionException
Execute cataloged basic program DBTOXMLXMAP to generate xml document using xmap, returns strXml as result

Parameters:
Xmapname - a String represent U2 server side xmap file name.
Throws:
UniXMLException - if a server error occurs
UniSessionException
Since:
UNIOBJECTS 2.0.4

updateDataUsingXmap

public void updateDataUsingXmap(java.lang.String xmapName)
                         throws UniXMLException,
                                UniSessionException
Execute cataloged basic program XMLTODBXMAP to update the U2 server datafile using Xmap as defined relationship between the xml document and file's dictionary defines. using xml doc stored in strXml in this class to be base of the update

Parameters:
xmapName - a String represent U2 server side xmap file name.
Throws:
UniXMLException - if a server error occurs
UniSessionException
Since:
UNIOBJECTS 2.0.4

updateDataUsingXmap

public void updateDataUsingXmap(java.lang.String xmapName,
                                java.lang.String xmlName)
                         throws UniXMLException,
                                UniSessionException
Execute cataloged basic program XMLTODBXMAP to update the U2 server datafile using Xmap as defined relationship between the xml document and file's dictionary defines. using xml doc stored in U2 server _XML_ / &XML& as xmlName

Parameters:
xmapName - a String represent U2 server side xmap file name.
xmlName - a String represents U2 server side xml doc name.
Throws:
UniXMLException - if a server error occurs
UniSessionException
Since:
UNIOBJECTS 2.0.4