public class ProcessDiagram
extends java.lang.Object
Constructor and Description |
---|
ProcessDiagram() |
Modifier and Type | Method and Description |
---|---|
Node |
findNode(java.lang.String nodeName)
Looks for a node with the given node name in the table (ArrayList of nodes)
|
boolean |
hasWhiteSpace(java.lang.String str)
Checks if a string contains whitespace or not
|
java.lang.String |
isRelation(java.lang.String strLine)
checks if a line of text represents a relation
and stores the entities and there relationships
|
void |
listOfTables(java.lang.String fileName)
Reads an ACCESS diagram text file and
locates all the table names contained, storing them
in an ArrayList
|
java.lang.String[] |
matchIt(java.lang.String str)
Takes in a string composed of two table names
breaks it apart till it can match both the table names
ie Table1Table2
|
java.util.ArrayList<Node> |
process(java.lang.String fileName)
Opens an ACCESS diagram text file, reads and processes the text file
and stores the entities and there relationships
|
public java.util.ArrayList<Node> process(java.lang.String fileName)
fileName
- The filename of the ACCESS diagrampublic java.lang.String isRelation(java.lang.String strLine)
strLine
- A line of text from an ACCESS diagram text filepublic java.lang.String[] matchIt(java.lang.String str)
str
- A string to testpublic void listOfTables(java.lang.String fileName)
fileName
- The filename of the ACCESS diagrampublic Node findNode(java.lang.String nodeName)
nodeName
- the name of the node we wish to locatepublic boolean hasWhiteSpace(java.lang.String str)
str
- A string to test