nesstar.example
Class Client

java.lang.Object
  extended by nesstar.example.Client

public class Client
extends Object

An example client.

Created:
16 August 2002

Field Summary
static boolean init
          param
 
Constructor Summary
Client()
           
 
Method Summary
static void addDatafile(Study study, String studyID, String fileID)
          Adds a feature to the Datafile attribute of the Client class
static Dataset addDataset(Catalog catalog, String name)
          Adds a feature to the Dataset attribute of the Client class
static Study addStudy(StudyHome studyHome, String uid, String sid)
          Adds a feature to the Study attribute of the Client class
static File getLocalDB()
          Gets the localDB attribute of the Client class
static File getTestFile(String name)
           
static void loadLocalDB()
          Method
static void loadServices(String serverID)
          Method
static void main(String[] args)
          The main program for the Client class
static String query(String catIP, String query)
          Method
static void saveLocalDB()
          Method
static void setDebug()
          Sets the debug attribute of the Client class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

init

public static boolean init
param

Constructor Detail

Client

public Client()
Method Detail

setDebug

public static void setDebug()
Sets the debug attribute of the Client class


getTestFile

public static File getTestFile(String name)
                        throws Exception
Parameters:
name -
Returns:
a file from the test directory with the given name
Throws:
Exception

getLocalDB

public static File getLocalDB()
                       throws Exception
Gets the localDB attribute of the Client class

Returns:
The localDB value
Throws:
Exception

addDataset

public static Dataset addDataset(Catalog catalog,
                                 String name)
                          throws Exception
Adds a feature to the Dataset attribute of the Client class

Parameters:
catalog - The feature to be added to the Dataset attribute
name - The feature to be added to the Dataset attribute
Returns:
a Dataset
Throws:
Exception

addDatafile

public static void addDatafile(Study study,
                               String studyID,
                               String fileID)
                        throws Exception
Adds a feature to the Datafile attribute of the Client class

Parameters:
study - The feature to be added to the Datafile attribute
studyID - The feature to be added to the Datafile attribute
fileID - The feature to be added to the Datafile attribute
Throws:
Exception

addStudy

public static Study addStudy(StudyHome studyHome,
                             String uid,
                             String sid)
                      throws Exception
Adds a feature to the Study attribute of the Client class

Parameters:
studyHome - The studyHome object
uid - The id of the study
sid - The short id (used as a name of the XML file)
Returns:
Example: Study d2981 = addStudy(studyHome, "uk.ac.data-archive.ddi.2981", "2981");
Throws:
Exception

loadLocalDB

public static void loadLocalDB()
                        throws Exception
Method

Throws:
Exception

saveLocalDB

public static void saveLocalDB()
                        throws Exception
Method

Throws:
Exception

loadServices

public static void loadServices(String serverID)
                         throws Exception
Method

Parameters:
serverID -
Throws:
Exception

query

public static String query(String catIP,
                           String query)
                    throws Exception
Method

Parameters:
catIP -
query -
Returns:
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
The main program for the Client class

Parameters:
args - The command line arguments
Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved