|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.ac.bbk.dcs.automed.qproc.ASG
public class ASG
Every IQL query is internally represented as an Abstract Syntax Graph (ASG).
| Constructor Summary | |
|---|---|
ASG(Cell n)
|
|
ASG(java.io.File f)
|
|
ASG(java.lang.String s)
|
|
| Method Summary | |
|---|---|
ASG |
copyOfASG()
Creates and returns an exact copy of the ASG. |
static ASG |
emptyQuery()
Returns the ASG representation of the empty query. |
java.lang.String |
formattedString()
Given that the ASG represents a list the string returned has each element separated by carriage returns for more legible output. |
static java.lang.String |
formattedString(ASG g)
If g is an ASG list the string returned has each element separated by carriage returns for more legible output. |
static java.lang.String |
formattedString(Cell n)
If n is the root of an ASG that represents a list, the string returned has each element separated by carriage returns for more legible output. |
static java.lang.String |
fromASG(ASG g)
Returns the text IQL of g. |
static java.lang.String |
fromASG(Cell n)
returns the text IQL of the abstract syntax graph of which n is the root. |
static java.util.ArrayList |
fromASGList(ASG g)
If g represents a list this returns an ArrayList of its Cells. |
static java.util.ArrayList |
fromASGList(Cell n)
If n is the root of an ASG that represents a list, this returns an ArrayList of its Cells. |
static java.util.ArrayList |
fromASGTuple(ASG g)
If g represents a tuple this returns an ArrayList of its Cells. |
static java.util.ArrayList |
fromASGTuple(Cell n)
If n is the root of an ASG that represents a tuple, this returns an ArrayList of its Cells. |
java.util.ArrayList |
listOfSchemes()
Returns a list of the schemes used in the ASG as String objects. |
static java.util.ArrayList |
listOfSchemes(ASG g)
Returns a list of the schemes used in the ASG as String objects. |
static void |
replaceAllSchemaRefs(ASG g,
Schema s)
Replaces all references to Schemas within g by references to s. |
static void |
replaceNullSchemaRefs(ASG g,
Schema s)
Replaces all references to a null Schema object in g with references to s. |
Cell |
root()
Returns the root of the ASG |
static ASG |
toASGList(java.util.ArrayList list)
Generates an ASG list from an ArrayList. |
static ASG |
toASGTuple(java.util.ArrayList list)
Generates an ASG tuple from an ArrayList. |
java.lang.String |
toString()
|
static ASG |
voidQuery()
Returns the ASG representation of the query Void. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ASG(Cell n)
n - the root cell of a graph. This graph will be
copied and packaged as an ASG.
public ASG(java.lang.String s)
throws java.lang.Exception
s - text IQL query
java.lang.Exception
public ASG(java.io.File f)
throws java.lang.Exception
f - text file containing the text of an IQL query.
java.lang.Exception| Method Detail |
|---|
public static ASG toASGList(java.util.ArrayList list)
public static ASG toASGTuple(java.util.ArrayList list)
public static java.util.ArrayList fromASGList(ASG g)
public static java.util.ArrayList fromASGList(Cell n)
public static java.util.ArrayList fromASGTuple(ASG g)
public static java.util.ArrayList fromASGTuple(Cell n)
public static java.lang.String fromASG(ASG g)
public static java.lang.String fromASG(Cell n)
public static java.lang.String formattedString(ASG g)
public static java.lang.String formattedString(Cell n)
public static java.util.ArrayList listOfSchemes(ASG g)
public Cell root()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String formattedString()
public java.util.ArrayList listOfSchemes()
public static ASG emptyQuery()
public static ASG voidQuery()
public static void replaceAllSchemaRefs(ASG g,
Schema s)
public static void replaceNullSchemaRefs(ASG g,
Schema s)
public ASG copyOfASG()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||