|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.SSMDR
public class SSMDR
The SSMD library<<
Field Summary | |
---|---|
static java.lang.String |
SSMDR_DataSourceName
|
Constructor Summary | |
---|---|
SSMDR()
|
Method Summary | |
---|---|
static int |
createPattern(java.lang.String name,
java.lang.String value)
Adds a new pattern to the SSMDR. |
static void |
createPatternSobjAssociation(int sfid,
int obid,
int spid,
int gno)
Add the association between ssdpattern and schema object to the SSMDR. |
static int |
createSSDFormat(java.lang.String name)
Adds a new ssdformat to the SSMDR. |
static int |
createSSDPattern(int pid)
Adds a ssdpattern to the SSMDR. |
static java.util.Vector |
getAllPatternNames()
Returns the vector of patterns'name |
static java.lang.String |
getDataSourceName()
Returns the name of the repository in the local database. |
static int |
getGroupNo(int sfid,
int obid)
Returns the group no of ssdpattern and schemaobject in the SSMDR. |
static int |
getOBIDBySFIDSPID(int sfid,
int spid)
Returns the ID of schemaobject in the SSMDR for the particular ssdformat and ssdpattern. |
static int |
getPatternByName(java.lang.String name)
Returns the pattern identifier (PID). |
static int[] |
getPatternIDs()
Returns the IDs of all the patterns found in the SSMDR. |
static java.lang.String |
getPatternName(int pid)
Returns the name of the pattern. |
static java.lang.String |
getPatternValue(int pid)
Returns the value (an actual pattern in regular expression) of the pattern. |
static int |
getPIDBySPID(int spid)
Returns the ssdpattern identifier (SPID). |
static int |
getSFIDByName(java.lang.String name)
Returns the ssd format identifier (SFID) of the ssd format specified by name. Assumption:ssd format names are unique. |
static int |
getSFIDBySID(int sid)
Returns the ssdformat identifier (SFID) of the ssd format specified by schema identifier (SID). |
static int |
getSIDBySFID(int sfid)
Returns the schema identifier (SID) of the ssd format specified by ssd format identifier (SFID). |
static int |
getSPIDByPID(int pid)
Returns the recent ssdpattern identifier (SPID) of the specified pattern. |
static int |
getSPIDBySFIDOBID(int sfid,
int obid)
Returns the ID of ssdpattern in the SSMDR for the particular ssdformat and schemaobject. |
static int[] |
getSPIDsBySFID(int sfid)
Returns the IDs of all the ssdpatterns found in the SSMDR. |
static int[] |
getSSDFormatIDs()
Returns the IDs of all the ssd formats found in the SSMDR. |
static java.lang.String |
getSSDFormatName(int sfid)
Returns the name of the ssd format with the given ssd format identifier. |
static java.lang.String[] |
getSSDFormatNames()
Returns the name of all the ssd formats found in the SSMDR. |
static java.lang.String |
getSSMDR_DataSourceName()
Deprecated. use getDataSourceName() |
static void |
main(java.lang.String[] args)
|
static void |
removeAssociationBySFID(int sfid)
Removes all associations for the given ssdformat identifier (SFID). |
static void |
removePattern(int pid)
Removes a pattern from the SSMDR. |
static void |
removeSSDFormat(int sfid)
Removes a ssd format from the SSMDR. |
static void |
setDataSourceName(java.lang.String ssmd)
Sets the name of the SemiStructured MetaData Repository in the local database. |
static void |
setPatternValue(int pid,
java.lang.String value)
Sets the value of the pattern. |
static void |
setSchema(int sfid,
int sid)
Sets the SID for the ssd format. |
static void |
setSSDFormatName(int sfid,
java.lang.String name)
Sets the name of ssd format. |
static void |
setSSMDR_DataSourceName(java.lang.String ssmd)
Deprecated. use setDataSourceName() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String SSMDR_DataSourceName
Constructor Detail |
---|
public SSMDR()
Method Detail |
---|
public static java.lang.String getDataSourceName()
public static java.lang.String getSSMDR_DataSourceName()
public static void setDataSourceName(java.lang.String ssmd)
SSMDR
by default.
ssmd
- the name of the SemiStructured MetaData Repository in the local database.public static void setSSMDR_DataSourceName(java.lang.String ssmd)
public static int createSSDFormat(java.lang.String name) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
name
- name of the new ssd format.
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static int getSFIDByName(java.lang.String name) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
name
- name of ssd format.
SSMDRException
- if no record for
the specified name is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static int getSFIDBySID(int sid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sid
- identifier of schema.
SSMDRException
- if no record for
the specified name is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static int getSIDBySFID(int sfid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- identifier of ssd format.
SSMDRException
- if no record for
the specified name is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static java.lang.String getSSDFormatName(int sfid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- ssdformat identifier (SFID) of the ssd format.
SSMDRException
- if no record for
the specified SFID is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static void setSSDFormatName(int sfid, java.lang.String name) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- ssd format identifier (SFID) of the ssd format.name
- new name of the ssd format.
SSMDRException
- if no record for
the specified SFID is found in the SSMDR.
java.sql.SQLException
- if the specified name is already in use.
DSRException
java.io.IOException
public static void setSchema(int sfid, int sid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- ssd format identifier (SFID) of the ssd format.sid
- schema identifier (SID) of the schema.
SSMDRException
- if no record for
the specified SFID is found in the SSMDR.
java.sql.SQLException
- if the specified name is already in use.
DSRException
java.io.IOException
public static java.lang.String[] getSSDFormatNames() throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static int[] getSSDFormatIDs() throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static void removeSSDFormat(int sfid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- ssdformat identifier (SFID) of the ssdformat to be removed.
SSMDRException
- if no record for
the specified SFID is found in the SSMDR; or if data dependency of the
specified schema with other data in the SSMDR exists.
java.sql.SQLException
DSRException
java.io.IOException
public static int createPattern(java.lang.String name, java.lang.String value) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
name
- the name the pattern.value
- the value given to the pattern (regular expression).
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static int getPatternByName(java.lang.String name) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
name
- pattern name.
SSMDRException
- if no record for
the specified pattern name is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static java.util.Vector getAllPatternNames() throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
- if no pattern in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static java.lang.String getPatternValue(int pid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier (PID) of the pattern.
SSMDRException
- if no record for
the specified PID is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static java.lang.String getPatternName(int pid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier (PID) of the pattern.
SSMDRException
- if no record for
the specified PID is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static int[] getPatternIDs() throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static void setPatternValue(int pid, java.lang.String value) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier (PID) of pattern.value
- new value assigned to pattern.
SSMDRException
- if no record for
the specified PID is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static void removePattern(int pid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier (PID) of the pattern to be removed.
SSMDRException
- if no record for
the specified PID is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static int createSSDPattern(int pid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier (PID) of pattern.
SSMDRException
- if a
record already exists for the specified SPID.
java.sql.SQLException
DSRException
java.io.IOException
public static int getSPIDByPID(int pid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier.
SSMDRException
- if no record for
the specified pattern name is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static int getPIDBySPID(int spid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
pid
- pattern identifier.
SSMDRException
- if no record for
the specified pattern name is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static void createPatternSobjAssociation(int sfid, int obid, int spid, int gno) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- ssdformat identifier (SFID) of the ssd format which is already created.obid
- schema object of a schema which applies the ssd format.spid
- ssdformat identifier (SPID) of the ssdformat.gno
- a capturing group number used for pattern matching.
SSMDRException
- if a record whose
values match the specified values already exists in the schemaObject_ssdPattern table.
java.sql.SQLException
- if no record for the specified SID or PID is
found in the STR.
DSRException
java.io.IOException
public static int getSPIDBySFIDOBID(int sfid, int obid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static int getOBIDBySFIDSPID(int sfid, int spid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static int getGroupNo(int sfid, int obid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static int[] getSPIDsBySFID(int sfid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
SSMDRException
java.sql.SQLException
DSRException
java.io.IOException
public static void removeAssociationBySFID(int sfid) throws SSMDRException, java.sql.SQLException, DSRException, java.io.IOException
sfid
- the ssdformat identifier (SFID) whose associations are to
be removed.
SSMDRException
- if no record for
the specified SFID is found in the SSMDR.
java.sql.SQLException
DSRException
java.io.IOException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |