Author : Krol Kevin Mathias Date: 6/22/2005 APIs for BNBConnection object: 1. public void connect(String host, int port) Connect to the data server with (host, port) @param host data server name, @param port the prot number which the server is listening 2. public void close() throws IOException Close the connection to the data server 3. public ArrayList projectlist() throws IOException Get the names of the projects in the data server 4. public ArrayList networklist(String project_name) throws IOException Get the names of the networks belonging to a single project in the data server. @param project_name is the project id which can be got from the projectlist() method 5. public String getx(String xquery) throws IOException Getting the xml string (containing xml files) based on xpath query @param xquery is a two step xpath query. Note: Kindly look at Xpath.pdf to be able to write valid Xpath queries 6. public String get(String filename, String project_name) throws IOException method used to retrieve the file from the server @param filename is the xml file that needs to be retrieved from the Bayes Net Server @param project_name is the project id Note: This method writes a file locally to the folder that has the main class. You can change it to just have the xml file as a string. In that case you will need to comment the saveretrievedfile() method. 7. public String delete(String filename, String project_name) throws IOException method used to delete the file on the server @param filename is the xml file that needs to be deleted from the Bayes Net Server @param project_name is the project id 8. public String modify(String filename, String project_name) throws IOException method used to modify the file on the server @param filename is the xml file that needs to be modified on the Bayes Net Server @param project_name is the project id Note: This method is used when a xml file on the server needs to be updated 9. public String store(String filename, String project_name) throws IOException method used to store the file on the server @param filename is the xml file that needs to be stored on the Bayes Net Server @param project_name is the project id Note: This method is used when a new xml file on the server needs to be stored