|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.ic.doc.automed.p2p.directory.P2PDirectoryRepository
public class P2PDirectoryRepository
| Field Summary | |
|---|---|
static java.lang.String |
PUBLIC_SCHEMA_DIRECTORY_SERVER_CFG
Name given to the public schema directory server configuration file |
| Method Summary | |
|---|---|
boolean |
addDataSource(java.lang.String peerName,
java.lang.String schema,
java.lang.String dsName,
java.lang.String type,
java.lang.String capability)
Add a new data source definition to the repository |
boolean |
addModel(java.lang.String name,
java.lang.String description,
java.lang.String structure)
Save a model structure to repository |
boolean |
addModel(java.lang.String name,
java.lang.String description,
java.lang.String structure,
java.lang.String[] schemas)
An overload method of #addModel(name, description, structure) above |
boolean |
addPathway(java.lang.Object[] row)
Add a new pathway definition to the repository |
boolean |
addPathwayTranformation(java.lang.Object[] row)
Add a new pathway transformation to the repository |
boolean |
addPeer(java.lang.String[] row)
Add a new peer |
boolean |
addPeer(java.lang.String name,
java.lang.String url)
Deprecated. |
boolean |
addPeerSchema(java.lang.String schema,
java.lang.String peer)
|
boolean |
addSchema(java.lang.String name,
java.lang.String description,
java.lang.String structure)
|
void |
addSchemeProfile(java.lang.String peerName,
java.lang.String schemaName,
java.lang.String modelName)
Add schema-model-peer association |
java.util.Vector |
getAllPeers()
|
java.util.Vector |
getModel(java.lang.String modelName)
Get a model structure from the database |
java.util.Vector |
getModelNames(java.lang.String schemaName)
Get all models that are associated to a particular schema |
java.util.Vector |
getPathwayAbstractDescriptions(java.lang.String schemaName)
Return a list of rows of pathways |
java.lang.String[] |
getPeers(java.lang.String status)
Get a list of peers of a given status. |
java.util.Vector |
getPeersImplementing(java.lang.String schemaName)
|
java.util.Vector |
getPublicSchema(java.lang.String schemaName)
|
java.util.Vector |
getPublicSchemas()
Edited by dmle 31/10/2005: Look for schema list in a joined table Return a list of all schemas including active, inactive and flush |
static P2PDirectoryRepository |
getRepository()
static { //LOAD DRIVER CLASSES try { Class.forName(driver); } catch(Exception e) { e.printStackTrace(); } } private Connection connection; private Statement statement; private ResultSet resultSet; private ResultSetMetaData metaData; private DatabaseMetaData dbMetaData; -- dmle 9/2/2006 |
java.util.Vector |
getSchemasImplementedBy(java.lang.String peerName)
|
protected void |
initialiseRepository()
|
boolean |
isModelExist(java.lang.String modelName)
Check if a model exists in the repository |
static void |
main(java.lang.String[] args)
|
void |
removePeers(java.lang.String flushStatus,
java.lang.String flushTime,
java.lang.String timeInterval)
Remove peers at flush-time. |
void |
test_AddDate(java.lang.String myDate,
java.lang.String myDate1,
long millisecs)
Test adding date values |
java.util.Vector |
test_GetDate()
Test getting date |
void |
test()
|
boolean |
updatePeer(java.lang.String name,
java.lang.String url)
|
boolean |
updatePeer(java.lang.String name,
java.lang.String url,
java.lang.String status,
java.lang.String lastUpdate)
Overloaded method to update peer status |
boolean |
updatePeerAddress(java.lang.String domain,
java.lang.String existingAddress,
java.lang.String newAddress)
Change peer's address to a new one (peer belongs specific domain) |
void |
updatePeersStatus(java.lang.String fromStatus,
java.lang.String toStatus,
java.lang.String updateTime,
java.lang.String timeInterval)
Change inactive peers into flush peers at hold-time |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PUBLIC_SCHEMA_DIRECTORY_SERVER_CFG
| Method Detail |
|---|
public static P2PDirectoryRepository getRepository()
throws java.sql.SQLException
java.sql.SQLException
protected void initialiseRepository()
throws AutoMedException
AutoMedException
public void test()
throws java.lang.Exception
java.lang.Exception
public boolean addPeer(java.lang.String[] row)
throws java.sql.SQLException
java.sql.SQLException
public boolean addPeer(java.lang.String name,
java.lang.String url)
throws java.sql.SQLException
java.sql.SQLException
public boolean addSchema(java.lang.String name,
java.lang.String description,
java.lang.String structure)
throws java.sql.SQLException
java.sql.SQLException
public boolean addPeerSchema(java.lang.String schema,
java.lang.String peer)
throws java.sql.SQLException
java.sql.SQLException
public boolean addPathway(java.lang.Object[] row)
throws java.sql.SQLException
row - an Object array of values of mixed types, one for each column
java.sql.SQLException
public boolean addPathwayTranformation(java.lang.Object[] row)
throws java.sql.SQLException
row - an Object array of values of mixed types, one for each column
java.sql.SQLException
public boolean addDataSource(java.lang.String peerName,
java.lang.String schema,
java.lang.String dsName,
java.lang.String type,
java.lang.String capability)
throws java.sql.SQLException
peerName - dataSource - quality - abstraction -
java.sql.SQLException
public void test_AddDate(java.lang.String myDate,
java.lang.String myDate1,
long millisecs)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector test_GetDate()
throws java.sql.SQLException
java.sql.SQLException
public boolean addModel(java.lang.String name,
java.lang.String description,
java.lang.String structure)
throws java.sql.SQLException
name - the model namedescription - a description about the model (optional - not used at the moment)structure - the XML representation of the model structure
boolean indicates the result of the operation
{@link - SQLException} if there is an error in saving it to database
java.sql.SQLException
public boolean addModel(java.lang.String name,
java.lang.String description,
java.lang.String structure,
java.lang.String[] schemas)
throws java.sql.SQLException
#addModel(name, description, structure) above
name - the model namedescription - a description about the model (optional - not used at the moment)structure - the XML representation of the model structureschemas - an array of schema names associated to this model
boolean indicates the result of the operation
{@link - SQLException} if there is an error in saving it to database
java.sql.SQLException
public void addSchemeProfile(java.lang.String peerName,
java.lang.String schemaName,
java.lang.String modelName)
throws java.sql.SQLException
java.sql.SQLException
public boolean isModelExist(java.lang.String modelName)
throws java.sql.SQLException
modelName - A string representing the unique model name to check
java.sql.SQLException
public boolean updatePeer(java.lang.String name,
java.lang.String url)
throws java.sql.SQLException
java.sql.SQLException
public boolean updatePeer(java.lang.String name,
java.lang.String url,
java.lang.String status,
java.lang.String lastUpdate)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector getPublicSchema(java.lang.String schemaName)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector getModelNames(java.lang.String schemaName)
throws java.sql.SQLException
schemaName - the schema to check
Vector containing the associated model names
{@link - SQLException}
java.sql.SQLException
public java.util.Vector getModel(java.lang.String modelName)
throws java.sql.SQLException
modelName - the model name
{@link - SQLException}
java.sql.SQLException
public java.util.Vector getPublicSchemas()
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector getPathwayAbstractDescriptions(java.lang.String schemaName)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector getPeersImplementing(java.lang.String schemaName)
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector getAllPeers()
throws java.sql.SQLException
java.sql.SQLException
public java.util.Vector getSchemasImplementedBy(java.lang.String peerName)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static void main(java.lang.String[] args)
public java.lang.String[] getPeers(java.lang.String status)
throws java.sql.SQLException
status - a String representing in-active status
String[] an array of names of in-active peers
java.sql.SQLException
public void updatePeersStatus(java.lang.String fromStatus,
java.lang.String toStatus,
java.lang.String updateTime,
java.lang.String timeInterval)
throws java.sql.SQLException
fromStatus - from status AtoStatus - to status BupdateTime - the time (in millisecs) at which this update is occuringtimeInterval - the time interval (in millisecs) to check for
java.sql.SQLException
public boolean updatePeerAddress(java.lang.String domain,
java.lang.String existingAddress,
java.lang.String newAddress)
throws java.sql.SQLException
java.sql.SQLException
public void removePeers(java.lang.String flushStatus,
java.lang.String flushTime,
java.lang.String timeInterval)
throws java.sql.SQLException
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||