|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.ac.ic.doc.automed.reps.ModelingProgram
Class representing the graphical representation of a Construct.
ModelingStatement,
ConstructWithModelingProgram,
Construct| Constructor Summary | |
ModelingProgram()
Constructs a new, empty ModelingProgram |
|
| Method Summary | |
void |
add(int pc,
ModelingStatement stmnt)
Inserts the specified statement at the specified position(program counter) in this program. |
void |
add(ModelingStatement stmnt)
Appends the specified statement to the end of this ModelingProgram. |
void |
clear()
Removes all of the statements from this ModelingProgram. |
java.lang.Object |
clone()
Returns a deep copy of this ModelingProgram instance. |
protected static ModelingProgram |
getModelingProgramByCID(int cid)
Returns the ModelingProgram of a Construct. |
ModelingStatement |
getModelingStatementAt(int pc)
Returns the statement at the specified program counter in this program. |
ModelingStatement[] |
getModelingStatements()
Returns an array containing all of the statements in this program in the correct order. |
boolean |
isEmpty()
Tests if this program is empty. |
void |
print()
|
ModelingStatement |
remove(int pc)
Removes the stamement at the specified program counter in this program. |
ModelingStatement |
set(int pc,
ModelingStatement stmnt)
Replaces the statement at the specified program counter in this program with the specified statement. |
int |
size()
Returns the number of statements in this program. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ModelingProgram()
| Method Detail |
public void add(int pc,
ModelingStatement stmnt)
throws AutoRepException
pc - the program counter in the programstmnt - the statement to be added
AutoRepException - if pc is out of range (pc<1 || pc>size())public void add(ModelingStatement stmnt)
stmnt - statement to be appended to this modeling programpublic void clear()
public java.lang.Object clone()
ModelingProgram instance.
clone in class java.lang.ObjectModelingProgram instance.
public ModelingStatement getModelingStatementAt(int pc)
throws AutoRepException
pc - program counter of statement to return
AutoRepException - if pc is out of range (pc<1 || pc>size())public boolean isEmpty()
true if this program has no statements; false otherwise.
public ModelingStatement remove(int pc)
throws AutoRepException
pc - the progam counter of the statement to removed
AutoRepException - if pc is out of range (pc<1 || pc>size())
public ModelingStatement set(int pc,
ModelingStatement stmnt)
throws AutoRepException
pc - program counter of statement to replacestmnt - statement to be stored at the specified program counter.
AutoRepException - if pc is out of range (pc<1 || pc>size())public int size()
public ModelingStatement[] getModelingStatements()
protected static ModelingProgram getModelingProgramByCID(int cid)
throws AutoRepException,
SchemaModelingRepositoryException,
RepositoryAccessException
cid - ID of the Construct
null if the Construct doesn't have a graphical representation
RepositoryAccessException - if the repositories cannot be accessed
AutoRepException
SchemaModelingRepositoryExceptionpublic void print()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||