|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.ic.doc.automed.TemplateTransformationSyntaxRepository
Manipulate the Template Transformation Syntax Repository, create new statements.
| Constructor Summary | |
TemplateTransformationSyntaxRepository()
|
|
| Method Summary | |
static int |
createStatement(java.lang.String name)
Adds a new statement to the TTSR. |
static void |
createStatementDefinition(int st_id,
int arg_pos,
java.lang.String table_name,
java.lang.String field_name,
java.lang.String description)
Adds a new argument definition to the statement's definitions of arguments. |
static java.lang.String |
getDataSourceName()
Returns the name of the repository in the local database. |
static int |
getStatementByName(java.lang.String name)
Returns the ID ( st_id) of the statement specified by name, or -1
if a statement with the specified name doesn't exist in the TTSR. |
static int[] |
getStatementDefinitionArgPosList(int st_id)
Returns a particular statement's list of argument positions. |
static java.lang.String |
getStatementDefinitionDescription(int st_id,
int arg_pos)
Returns a particular statement's argument definition (only the description field). |
static java.lang.String[] |
getStatementDefinitionDescriptionList(int st_id)
Returns a particular statement's list of argument definitions (only the description field). |
static java.lang.String |
getStatementDefinitionFieldName(int st_id,
int arg_pos)
Returns a particular statement's argument definition (only the field_name field). |
static java.lang.String[] |
getStatementDefinitionFieldNameList(int st_id)
Returns a particular statement's list of argument definitions (only the field_name field). |
static java.lang.String |
getStatementDefinitionTableName(int st_id,
int arg_pos)
Returns a particular statement's argument definition (only the table_name field). |
static java.lang.String[] |
getStatementDefinitionTableNameList(int st_id)
Returns a particular statement's list of argument definitions (only the table_name field). |
static java.lang.String |
getStatementName(int st_id)
Returns the name of the statement specified by st_id |
static java.lang.String[] |
getStatementsNameList()
Returns the names of all the statements found in the TTSR |
static int[] |
getStatementsStIdList()
Returns the IDs of all the statements found in the TTSR |
static boolean |
isValidStId(int st_id)
This method determines if a statement with the specified st_id
exists in the TTSR. |
static void |
main(java.lang.String[] args)
|
static void |
removeStatement(int st_id)
Removes the statement from the TTSR statements table. |
static void |
removeStatementDefinition(int st_id)
Removes all arguments definitions of a particular statement |
static void |
removeStatementDefinition(int st_id,
int arg_pos)
Removes a particular position of a statement's sequence of arguments |
static void |
setDataSourceName(java.lang.String str)
Sets the name of the repository in the local database. |
static void |
setStatementDefinitionDescription(int st_id,
int arg_pos,
java.lang.String description)
Sets a particular statement's argument definition (the description field). |
static void |
setStatementDefinitionFieldName(int st_id,
int arg_pos,
java.lang.String field_name)
Sets a particular statement's argument definition (the field_name field). |
static void |
setStatementDefinitionTableName(int st_id,
int arg_pos,
java.lang.String table_name)
Sets a particular statement's argument definition (the table_name field). |
static void |
setStatementName(int st_id,
java.lang.String name)
Sets the name of the statement specified by st_id |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TemplateTransformationSyntaxRepository()
| Method Detail |
public static int createStatement(java.lang.String name)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
name - name of statement
TemplateTransformationSyntaxRepositoryException - if the specified name
is null, or if a statement with the same name already exists in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static int getStatementByName(java.lang.String name)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
st_id) of the statement specified by name, or -1
if a statement with the specified name doesn't exist in the TTSR.
name - name of statement
TemplateTransformationSyntaxRepositoryException - if the
argument is null, or if no record for the specified statement
is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getStatementName(int st_id)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
st_id
st_id - ID of the statement
st_id
TemplateTransformationSyntaxRepositoryException - if no record
for the specified st_id is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static int[] getStatementsStIdList()
throws RepositoryAccessException
null if no records of statements is found in the TTSR.
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getStatementsNameList()
throws RepositoryAccessException
null if no records of statements is found in the TTSR.
RepositoryAccessException - if the repository cannot be accessed
public static void setStatementName(int st_id,
java.lang.String name)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
st_id
st_id - ID of the statementname - new name of the statement
TemplateTransformationSyntaxRepositoryException - if no record
for the specified st_id is found in the TTSR, or if there is already
a statement with the specified name in the TTSR, or if the specified name
is null.
RepositoryAccessException - if the repository cannot be accessed
public static void removeStatement(int st_id)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
statements table.
st_id - ID of the statement
TemplateTransformationSyntaxRepositoryException - if no record
for the specified st_id is found in the TTSR, or if there is a definition
for this statement in the statement_definition table (dependency conflict)
RepositoryAccessException - if the repository cannot be accessed
public static boolean isValidStId(int st_id)
throws RepositoryAccessException
st_id
exists in the TTSR.
true if a record of a statement with the specified st_id
exists in the statements table, or false otherwise.
RepositoryAccessException - if the repository cannot be accessed
public static void createStatementDefinition(int st_id,
int arg_pos,
java.lang.String table_name,
java.lang.String field_name,
java.lang.String description)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
st_id - ID of statementarg_pos - position of argument in the statement's sequence of argumentstable_name - andfield_name - define the values of this argument, i.e. from
which table and field this argument gets its values.description - explanation of what this argument stands for
TemplateTransformationSyntaxRepositoryException - if the arguments are invalid (
st_id or arg_pos is less/equal to zero, or if either table_name,
field_name is null and description is also null),
or if no record for the specified st_id is found in the TTSR, or if a
record already exists with the specified st_id and arg_pos.
RepositoryAccessException - if the repository cannot be accessed
public static int[] getStatementDefinitionArgPosList(int st_id)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
null if no argument definitions exists for the specific statement.
st_id - ID of statement
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getStatementDefinitionTableNameList(int st_id)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
table_name field).
Returns null if no argument definitions exists for the specific statement.
st_id - ID of statement
table_name)
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getStatementDefinitionFieldNameList(int st_id)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
field_name field).
Returns null if no argument definitions exists for the specific statement.
st_id - ID of statement
field_name)
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String[] getStatementDefinitionDescriptionList(int st_id)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
description field).
Returns null if no argument definitions exists for the specific statement.
st_id - ID of statement
description)
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getStatementDefinitionTableName(int st_id,
int arg_pos)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
table_name field).
st_id - ID of statementarg_pos - position in the statement's sequence of arguments
table_name)
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id and arg_posis found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getStatementDefinitionFieldName(int st_id,
int arg_pos)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
field_name field).
st_id - ID of statementarg_pos - position in the statement's sequence of arguments
field_name)
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id and arg_posis found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static java.lang.String getStatementDefinitionDescription(int st_id,
int arg_pos)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
description field).
st_id - ID of statementarg_pos - position in the statement's sequence of arguments
description)
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id and arg_posis found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static void setStatementDefinitionTableName(int st_id,
int arg_pos,
java.lang.String table_name)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
table_name field).
st_id - ID of statementarg_pos - position in the statement's sequence of argumentstable_name - table name to be put in the specified position
TemplateTransformationSyntaxRepositoryException - if table_name
is null, or if no record for the specified st_id is
found in the TTSR's statements table, or if no record for
the specified st_id and arg_posis found in the TTSR's
statement_definition table.
RepositoryAccessException - if the repository cannot be accessed
public static void setStatementDefinitionFieldName(int st_id,
int arg_pos,
java.lang.String field_name)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
field_name field).
st_id - ID of statementarg_pos - position in the statement's sequence of argumentsfield_name - field name to be put in the specified position
TemplateTransformationSyntaxRepositoryException - if field_name
is null, or if no record for the specified st_id is
found in the TTSR's statements table, or if no record for
the specified st_id and arg_posis found in the TTSR's
statement_definition table.
RepositoryAccessException - if the repository cannot be accessed
public static void setStatementDefinitionDescription(int st_id,
int arg_pos,
java.lang.String description)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
description field).
st_id - ID of statementarg_pos - position in the statement's sequence of argumentsdescription - description to be put in the specified position
TemplateTransformationSyntaxRepositoryException - if description
is null, or if no record for the specified st_id is
found in the TTSR's statements table, or if no record for
the specified st_id and arg_posis found in the TTSR's
statement_definition table.
RepositoryAccessException - if the repository cannot be accessed
public static void removeStatementDefinition(int st_id,
int arg_pos)
throws TemplateTransformationSyntaxRepositoryException,
RepositoryAccessException
st_id - ID of statementarg_pos - position in the statement's sequence of arguments to be removed
TemplateTransformationSyntaxRepositoryException - if no record for
the specified st_id and arg_pos is found in the TTSR
RepositoryAccessException - if the repository cannot be accessed
public static void removeStatementDefinition(int st_id)
throws RepositoryAccessException
st_id - ID of statement
RepositoryAccessException - if the repository cannot be accessedpublic static void main(java.lang.String[] args)
public static java.lang.String getDataSourceName()
public static void setDataSourceName(java.lang.String str)
TTSR by default.
str - the name of the repository in the local database.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||