|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--arlut.csd.ganymede.client.xmlclient
This is a text client for the Ganymede server. This client is designed to take the filename for an XML file on the command line, load the file, parse it, then connect to the server and transfer the file to the server for server-side integration into the Ganymede database.
| Field Summary | |
int |
bufferSize
The default buffer size in the XMLReader. |
static boolean |
debug
|
private boolean |
doTest
|
private boolean |
dumpData
|
private boolean |
dumpSchema
|
static int |
majorVersion
This major version number is compared with the "major" attribute in the Ganymede XML document element. |
static int |
minorVersion
This minor version number is provided to the server when handling raw schema files (files whose document element is <ganyschema>. |
java.lang.String |
password
|
java.lang.String |
propFilename
|
XMLReader |
reader
Streaming XML reader. |
int |
registryPortProperty
|
private boolean |
schemaOnly
|
private Server |
server
RMI reference to a Ganymede server |
java.lang.String |
server_url
|
java.lang.String |
serverHostProperty
|
XMLSession |
session
Remote session interface to the Ganymede server, used while loading data objects into the server. |
java.lang.String |
username
|
java.lang.String |
xmlFilename
|
| Constructor Summary | |
xmlclient(java.lang.String[] argv)
This constructor takes care of parsing the command line arguments for xmlclient when run from the command line. |
|
| Method Summary | |
void |
disconnected(ClientEvent e)
Handle a forced disconnect message from the ClientBase RMI object. |
boolean |
doEverything(boolean commandLine)
Actually do the thing. |
boolean |
doXMLDump(boolean commandLine,
boolean sendData,
boolean sendSchema)
|
XMLItem |
getNextItem()
Private helper method to process events from the XMLReader. |
boolean |
loadProperties(java.lang.String filename)
This method loads properties from the ganymede.properties file. |
static void |
main(java.lang.String[] argv)
main |
void |
messageReceived(ClientEvent e)
Handle a message from the ClientBase
RMI object. |
void |
printUsage()
|
void |
runTest()
Simple test rig for XMLReader.getNextTree(). |
boolean |
scanXML()
This method handles the actual XML processing, once the command line arguments have been parsed and handled by the xmlclient constructor. |
void |
skipToClose(java.lang.String name)
This method is called to consume XML elements until we find the matching close. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final boolean debug
public static final int majorVersion
This major version number is compared with the "major" attribute in the Ganymede XML document element. xmlclient won't try to read Ganymede XML files whose major number is too high
public static final int minorVersion
This minor version number is provided to the server when handling raw schema files (files whose document element is <ganyschema>.
public java.lang.String serverHostProperty
public int registryPortProperty
public java.lang.String server_url
public java.lang.String propFilename
public java.lang.String xmlFilename
public java.lang.String username
public java.lang.String password
private boolean dumpSchema
private boolean dumpData
private boolean doTest
private boolean schemaOnly
private Server server
public XMLSession session
Remote session interface to the Ganymede server, used while loading data objects into the server.
public int bufferSize
The default buffer size in the XMLReader.
This value determines how far ahead the XMLReader's i/o thread can get in
reading from the XML file. Higher or lower values of this variable may
give better performance, depending on the characteristics of the JVM with
regards threading, etc.
public XMLReader reader
Streaming XML reader. xmlclient creates one of these on startup, and from that point on, all XML reading is done through this object.
| Constructor Detail |
public xmlclient(java.lang.String[] argv)
This constructor takes care of parsing the command line arguments for xmlclient when run from the command line.
| Method Detail |
public static void main(java.lang.String[] argv)
public void printUsage()
public boolean doXMLDump(boolean commandLine,
boolean sendData,
boolean sendSchema)
throws java.rmi.RemoteException
public void runTest()
public boolean doEverything(boolean commandLine)
throws java.rmi.RemoteException,
java.io.IOException
Actually do the thing.
public boolean scanXML()
This method handles the actual XML processing, once the command line arguments have been parsed and handled by the xmlclient constructor.
public boolean loadProperties(java.lang.String filename)
This method loads properties from the ganymede.properties file.
This method is public so that loader code linked with the Ganymede server code can initialize the properties without going through Ganymede.main().
public XMLItem getNextItem()
throws org.xml.sax.SAXException
Private helper method to process events from
the XMLReader. By using
this method, the rest of the code in the xmlclient doesn't
have to check for error and warning conditions.
public void skipToClose(java.lang.String name)
throws org.xml.sax.SAXException
This method is called to consume XML elements until we find the matching close.
public void messageReceived(ClientEvent e)
ClientBase
RMI object.messageReceived in interface ClientListenerpublic void disconnected(ClientEvent e)
ClientBase RMI object.disconnected in interface ClientListener
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||