|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.ic.doc.automed.SchemaModelingRepository
| Constructor Summary | |
SchemaModelingRepository()
|
|
| Method Summary | |
static void |
createConstructModeling(int cid,
int pc,
java.lang.String method)
Adds a new method invocation to a construct's modeling program |
static int |
createMethod(java.lang.String name,
java.lang.String cl)
Adds a new method to the SMR. |
static void |
createMethodArgument(int meth_id,
int pos,
java.lang.String type)
Adds a new argument to the method's arguments. |
static java.lang.String |
getClassName(int meth_id)
Returns the class name of the method specified by meth_id |
static java.lang.String[] |
getClassNameList()
Returns the class names of all the methods found in the SMR |
static java.lang.String |
getConstructModelingProgramMethod(int cid,
int pc)
Returns the method that is going to be invoked at the specified pc of a construct's modeling program. |
static java.lang.String[] |
getConstructModelingProgramMethodList(int cid)
Returns a list of method invocations of a particular construct's modeling program, ie the methods that are going to be invoked at each program counter. |
static int[] |
getConstructModelingProgramPcList(int cid)
Returns a list of program counters of a particular construct's modeling program. |
static java.lang.String |
getDataSourceName()
Returns the name of the repository in the local database. |
static int[] |
getMethodArgumentsPosList(int meth_id)
Returns a particular methods's list of argument positions. |
static java.lang.String |
getMethodArgumentsType(int meth_id,
int pos)
Returns a particular method's argument type. |
static java.lang.String[] |
getMethodArgumentsTypeList(int meth_id)
Returns a particular methods's list of argument types. |
static int |
getMethodByName(java.lang.String name,
java.lang.String cl)
Returns the ID ( meth_id) of the method specified by name and class, or -1
if a method with the specified name doesn't exist in the specified class. |
static java.lang.String |
getMethodName(int meth_id)
Returns the name of the method specified by meth_id |
static int[] |
getMethodsMethIdList()
Returns the IDs of all the methods found in the SMR |
static java.lang.String[] |
getMethodsNameList()
Returns the names of all the methods found in the SMR |
static java.lang.String |
getSMR_DataSourceName()
Deprecated, use getDataSourceName instead |
static boolean |
isValidMethId(int meth_id)
This method determines if a method with the specified meth_id
exists in the SMR. |
static void |
main(java.lang.String[] args)
|
static void |
removeConstructModelingProgram(int cid)
Removes a particular construct's modeling program |
static void |
removeConstructModelingProgram(int cid,
int pc)
Removes a particular program counter of a constrcut's modeling program |
static void |
removeMethod(int meth_id)
Removes the method from the SMR methods table. |
static void |
removeMethodArgument(int meth_id)
Removes all arguments of a particular method |
static void |
removeMethodArgument(int meth_id,
int pos)
Removes a particular position of a methods's arguments |
static void |
setClassName(int meth_id,
java.lang.String name)
Sets the class name of the method specified by meth_id |
static void |
setConstructModelingProgramMethod(int cid,
int pc,
java.lang.String method)
Sets the method in a specific program counter in the specified construct's modeling program |
static void |
setDataSourceName(java.lang.String str)
Sets the name of the repository in the local database. |
static void |
setMethodArgumentsType(int meth_id,
int pos,
java.lang.String type)
Sets a particular method's argument type. |
static void |
setMethodName(int meth_id,
java.lang.String name)
Sets the name of the method specified by meth_id |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SchemaModelingRepository()
| Method Detail |
public static java.lang.String getDataSourceName()
public static java.lang.String getSMR_DataSourceName()
public static void setDataSourceName(java.lang.String str)
SMR by default.
str - the name of the repository in the local database.
public static int createMethod(java.lang.String name,
java.lang.String cl)
throws SchemaModelingRepositoryException,
RepositoryAccessException
name - name of methodcl - name of the class this method belongs
SchemaModelingRepositoryException - if the arguments
are null, or if a method with the same name in the specified class already exists
RepositoryAccessException - if the repository cannot be accessed
public static int getMethodByName(java.lang.String name,
java.lang.String cl)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id) of the method specified by name and class, or -1
if a method with the specified name doesn't exist in the specified class.
name - name of methodcl - name of the class the method belongs
SchemaModelingRepositoryException - if the
arguments are null
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getMethodName(int meth_id)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id
meth_id - ID of the method
meth_id
SchemaModelingRepositoryException - if no record
for the specified meth_id is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getClassName(int meth_id)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id
meth_id - ID of the method
meth_id
SchemaModelingRepositoryException - if no record
for the specified meth_id is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static int[] getMethodsMethIdList()
throws RepositoryAccessException
null if no records of methods is found in the SMR.
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getMethodsNameList()
throws RepositoryAccessException
null if no records of methods is found in the SMR.
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getClassNameList()
throws RepositoryAccessException
null if no records of methods is found in the SMR.
RepositoryAccessException - if the repository cannot be accessed
public static void setMethodName(int meth_id,
java.lang.String name)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id
meth_id - ID of the methodname - new name of the method
SchemaModelingRepositoryException - if no record
for the specified meth_id is found in the SMR, or if there is already
a method with the specified name in its class, or if the specified name
is null.
RepositoryAccessException - if the repository cannot be accessed
public static void setClassName(int meth_id,
java.lang.String name)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id
meth_id - ID of the methodname - new class name of the method
SchemaModelingRepositoryException - if no record
for the specified meth_id is found in the SMR, or if there is already
a method with the existing name in this class, or if the specified class name
is null.
RepositoryAccessException - if the repository cannot be accessed
public static void removeMethod(int meth_id)
throws SchemaModelingRepositoryException,
RepositoryAccessException
methods table.
meth_id - ID of the statement
SchemaModelingRepositoryException - if no record
for the specified meth_id is found in the SMR, or if there is a definition
for this method in the method_arguments table (dependency conflict)
RepositoryAccessException - if the repository cannot be accessed
public static boolean isValidMethId(int meth_id)
throws RepositoryAccessException
meth_id
exists in the SMR.
true if a record of a method with the specified meth_id
exists in the methods table, or false otherwise.
RepositoryAccessException - if the repository cannot be accessed
public static void createMethodArgument(int meth_id,
int pos,
java.lang.String type)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id - ID of methodpos - position of argument in the methods's argumentstype - class type of this argument
SchemaModelingRepositoryException - if the arguments are invalid (
meth_id or arg_pos is less/equal to zero, or if type
is null),
or if no record for the specified meth_id is found in the SMR, or if a
record already exists with the specified meth_id and pos.
RepositoryAccessException - if the repository cannot be accessed
public static int[] getMethodArgumentsPosList(int meth_id)
throws SchemaModelingRepositoryException,
RepositoryAccessException
null if no arguments exists for the specific method.
meth_id - ID of statement
SchemaModelingRepositoryException - if no record for
the specified meth_id is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getMethodArgumentsTypeList(int meth_id)
throws SchemaModelingRepositoryException,
RepositoryAccessException
null if no arguments exists for the specific method.
meth_id - ID of statement
SchemaModelingRepositoryException - if no record for
the specified meth_id is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getMethodArgumentsType(int meth_id,
int pos)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id - ID of statementpos - position in the method's arguments
SchemaModelingRepositoryException - if no record for
the specified meth_id and posis found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static void setMethodArgumentsType(int meth_id,
int pos,
java.lang.String type)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id - ID of statementpos - position in the method's argumentstype - type to be put in the specified position
SchemaModelingRepositoryException - if type
is null, or if no record for the specified meth_id is
found in the SMR's methods table, or if no record for
the specified meth_id and posis found in the SMR's
method_arguments table.
RepositoryAccessException - if the repository cannot be accessed
public static void removeMethodArgument(int meth_id,
int pos)
throws SchemaModelingRepositoryException,
RepositoryAccessException
meth_id - ID of methodpos - position in the method's arguments to be removed
SchemaModelingRepositoryException - if no record for
the specified meth_id and pos is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static void removeMethodArgument(int meth_id)
throws RepositoryAccessException
meth_id - ID of statement
RepositoryAccessException - if the repository cannot be accessed
public static void createConstructModeling(int cid,
int pc,
java.lang.String method)
throws SchemaModelingRepositoryException,
RepositoryAccessException
cid - ID of constructpc - program counter of method invocation to be addedmethod - method invocation to be added
SchemaModelingRepositoryException - if the arguments are invalid (
pc less/equal to zero, method is null), or if
the cid isn't valid, or if a
record already exists for the specified cid and pc
RepositoryAccessException - if the repository cannot be accessed
public static int[] getConstructModelingProgramPcList(int cid)
throws SchemaModelingRepositoryException,
RepositoryAccessException
null if there isn't a program
for the specific construct.
cid - ID of construct
SchemaModelingRepositoryException - if
the specified cid isn''t valid.
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getConstructModelingProgramMethodList(int cid)
throws SchemaModelingRepositoryException,
RepositoryAccessException
null if there isn't a modeling program
for the specific construct.
cid - ID of construct
SchemaModelingRepositoryException - if
the specified cid isn''t valid.
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getConstructModelingProgramMethod(int cid,
int pc)
throws SchemaModelingRepositoryException,
RepositoryAccessException
cid - ID of constructpc - program counter
SchemaModelingRepositoryException - if no record for
the specified cid and pc is found in the SMR's construct_modeling table.
RepositoryAccessException - if the repository cannot be accessed
public static void setConstructModelingProgramMethod(int cid,
int pc,
java.lang.String method)
throws SchemaModelingRepositoryException,
RepositoryAccessException
cid - ID of constructpc - program counter in the construct's modeling programmethod - method to be invoked at the specified pc
SchemaModelingRepositoryException - if the specified cid
is not valid, or if no record for
the specified cid and pc is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static void removeConstructModelingProgram(int cid,
int pc)
throws SchemaModelingRepositoryException,
RepositoryAccessException
cid - ID of constructpc - program counter
SchemaModelingRepositoryException - if no record for
the specified cid and pc is found in the SMR
RepositoryAccessException - if the repository cannot be accessed
public static void removeConstructModelingProgram(int cid)
throws RepositoryAccessException
cid - ID of construct
RepositoryAccessException - if the repository cannot be accessedpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||