nesstar.example
Class MadieraExample

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

public class MadieraExample
extends Object


Constructor Summary
MadieraExample()
          Constructor NOTE: no real need to create an instance.
 
Method Summary
 List addListItem(List list, Term term)
          This adds a term to a list.
 void addSynonym(Term t, String syn)
          This adds a synonym to an Array of synonyms
static void addToObjsToSave(Object obj, Set objsToSave)
          Add an object and its parts to the set of object to save
static void addToSave(List parts, Set objsToSave)
          Add a list of objects to the list of objects to be saved in the RDF file
 void convertTableClass()
          This converts the contents of table dbo_elsst_class into Term and Concept objects.
 void convertTableScope()
          This populates the Term.comment or Term.translationNote fields from the dbo_elsst_scope table, depending on the value of the 'smark' field
 void convertTableThes()
          This manages the relationships between Terms based on the information in the dbo_elsst_thes table
 String getLanguageCode(int lang)
          this maps the language code from int to char
static String getRDF(NetDB db, Collection roots)
          These three methods turn the collection of objects into the RDF description
 void initDB()
          This sets up the connection to the database using the jdbc:odbc driver
 void initNesstar()
          This initialises the Nesstar Client Protocol
static void main(String[] args)
          main entry point required parameters: - ODBC source name (for connecting to the MS Access database) - target server ip address - target server port - target server name - target server username - target server password - xml output file
 Concept newConcept(String id)
          This creates a new Concept object, using the id
 void outputRDF()
           
 void parseDB()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MadieraExample

public MadieraExample()
Constructor NOTE: no real need to create an instance.

Method Detail

main

public static void main(String[] args)
main entry point required parameters: - ODBC source name (for connecting to the MS Access database) - target server ip address - target server port - target server name - target server username - target server password - xml output file


parseDB

public void parseDB()
             throws Exception
Throws:
Exception

convertTableClass

public void convertTableClass()
                       throws Exception
This converts the contents of table dbo_elsst_class into Term and Concept objects. Term & Concept objects are stored in hashtables by the getOrCreate methods

Throws:
Exception

getLanguageCode

public String getLanguageCode(int lang)
this maps the language code from int to char


newConcept

public Concept newConcept(String id)
                   throws Exception
This creates a new Concept object, using the id

Throws:
Exception

convertTableScope

public void convertTableScope()
                       throws Exception
This populates the Term.comment or Term.translationNote fields from the dbo_elsst_scope table, depending on the value of the 'smark' field

Throws:
Exception

convertTableThes

public void convertTableThes()
                      throws Exception
This manages the relationships between Terms based on the information in the dbo_elsst_thes table

Throws:
Exception

addListItem

public List addListItem(List list,
                        Term term)
                 throws Exception
This adds a term to a list. If that list is null, creates a new list

Throws:
Exception

addSynonym

public void addSynonym(Term t,
                       String syn)
                throws Exception
This adds a synonym to an Array of synonyms

Throws:
Exception

outputRDF

public void outputRDF()
               throws Exception
Throws:
Exception

getRDF

public static String getRDF(NetDB db,
                            Collection roots)
                     throws Exception
These three methods turn the collection of objects into the RDF description

Parameters:
root - the root of the object graph
Returns:
the RDF serialization of the object graph
Throws:
Exception

addToObjsToSave

public static void addToObjsToSave(Object obj,
                                   Set objsToSave)
                            throws Exception
Add an object and its parts to the set of object to save

Throws:
Exception

addToSave

public static void addToSave(List parts,
                             Set objsToSave)
                      throws Exception
Add a list of objects to the list of objects to be saved in the RDF file

Parameters:
parts - - the list of objects to save
objsToSave - - the total set of objects to save
Throws:
Exception

initNesstar

public void initNesstar()
                 throws Exception
This initialises the Nesstar Client Protocol

Throws:
Exception

initDB

public void initDB()
            throws Exception
This sets up the connection to the database using the jdbc:odbc driver

Throws:
Exception

Nesstar SDK

Copyright©2003 NSD - All Rights Reserved