Package | Description |
---|---|
Parsing.LineParsers | |
PrologDB |
Modifier and Type | Method and Description |
---|---|
static TableSchema |
DBLineParsers.parseTableLine(LineToParse l,
ErrorReport er)
a table declaration is on a single line.
|
Modifier and Type | Field and Description |
---|---|
protected TableSchema |
Table.schema
each tbl points to its tablesSchema "schema"
|
protected TableSchema |
Tuple.schema
Every tuple points to its TableSchema of origin this field should be
ignored once a table ls computed
|
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedList<TableSchema> |
Schema.tableSchemas |
Modifier and Type | Method and Description |
---|---|
TableSchema |
TableSchema.add(Column... columns) |
TableSchema |
TableSchema.add(Column c)
add a new column c to 'this' TableSchema; new column is appended to the
existing list of columns
Error is thrown if columns with duplicate names are detected
|
TableSchema |
TableSchema.add(java.lang.String... columns)
adds a sequence of columns
|
TableSchema |
TableSchema.add(java.lang.String k)
adds a column whose name/type is encoded by k
|
TableSchema |
TableSchema.addFirst(Column... columns)
place an array of columns before existing columns of 'this' schema
|
TableSchema |
TableSchema.addFirst(Column c)
add column c as the first of 'this' schema
|
TableSchema |
TableSchema.addFirst(java.lang.String... columns)
add list of columns to the head of a schema
|
TableSchema |
TableSchema.addFirst(java.lang.String k)
adds a column to the head of the list of columns
|
TableSchema |
TableSchema.CopyForSelfJoins(java.lang.String newTableName)
copies table schema (this) for self-joins.
|
TableSchema |
TableSchema.crossProduct(TableSchema otherSchema)
form the cross product of 'this' schema with otherSchema; this is a
concatenation of the column lists and a manufactured table name
|
TableSchema |
Tuple.getSchema()
returns TableSchema of 'this' tuple
|
TableSchema |
SubTableSchema.getSubTableSchema(java.lang.String name)
return tableschema with given SubTableSchema from 'this'
|
TableSchema |
SubTableSchema.getSuper() |
TableSchema |
Schema.getSuperTable(TableSchema s)
return the TableSchema of the super/belongsToSchema table of TableSchema
s
|
TableSchema |
TableSchema.getSuperTableOf()
gets supertable of table schema s; throws Error if 'this' table schema
not part of a database
|
TableSchema |
Table.getTableSchema()
returns schema of tbl
|
TableSchema |
DB.getTableSchema(java.lang.String name)
returns the TableSchema of the table with given SubTableSchema; null if
table is not found
|
TableSchema |
Schema.getTableSchema(java.lang.String tableName)
return the TableSchema with SubTableSchema tableName
|
TableSchema |
DB.getTableSchemaEH(java.lang.String name)
returns the TableSchema of the table with given SubTableSchema; Error is
thrown otherwise
|
TableSchema |
Schema.getTableSchemaEH(java.lang.String tableName)
return the TableSchema with SubTableSchema tableName with built-in error
handling
|
static TableSchema |
TableSchema.read(java.io.File schemafile)
reads prolog schema from File schemafile; errors are reported to out
read only .schema and database files
|
static TableSchema |
TableSchema.read(java.lang.String schemafileName)
reads schema from File schemafileName that contains a single table
declaration; ParseExceptions and Errors are thrown
read only .schema and database files
|
static TableSchema |
TableSchema.read(java.lang.String nameOfSchema,
java.lang.String stringDefOfSchema)
used when it is easier to pass in a string declaration of a TableSchema
rather than building it programmatically
|
TableSchema |
Schema.remove(TableSchema ts)
delete table schema ts
|
Modifier and Type | Method and Description |
---|---|
java.util.List<TableSchema> |
SubTableSchema.getSubTableSchemas() |
java.util.List<TableSchema> |
Schema.getTableSchemas()
return list of TableSchemas of this database schema
|
Modifier and Type | Method and Description |
---|---|
void |
Schema.add(TableSchema... schemas)
for adding schemas in bulk
|
void |
SubTableSchema.add(TableSchema... tschemas)
adding table schemas in bulk as subtables
|
void |
Schema.add(TableSchema tableschema)
add table schema tableschema to 'this' database schema
|
void |
SubTableSchema.add(TableSchema sub)
adds SubTableSchema sub
|
boolean |
SubTableSchema.contains(TableSchema s)
does this subtable schema include TableSchema s1 as subtable?
|
Table |
Table.copy(TableSchema tableSchema)
dup Table by copying each tuple and returning the copied Table.
|
Tuple |
Tuple.copy(TableSchema newSchema)
returns a (deep) copy of a tuple; precondition: newSchema and tableSchema
must have identically defined sets of columns; the schemas may have
different names
|
TupleList |
TupleList.copy(TableSchema tableSchema)
copy tuple list by copying each tuple on the list and returning the
copied list.
|
TableSchema |
TableSchema.crossProduct(TableSchema otherSchema)
form the cross product of 'this' schema with otherSchema; this is a
concatenation of the column lists and a manufactured table name
|
boolean |
TableSchema.equals(TableSchema otherSchema)
returns true if 'this' schema equals otherSchema, false otherwise
equality is based on the same number and sequence of columns
|
void |
TableSchema.equalsEH(TableSchema otherSchema)
asserts if 'this' schema == otherSchema If false, Error is thrown
equality is based on the same number and set of columns
|
SubTableSchema |
DB.getSubTableSchema(TableSchema ts)
returns subtable declaration for a given table schema ts; if no such
declaration exists, null is returned; this declaration lists the
subtables of the given table.
|
SubTableSchema |
Schema.getSubTableSchema(TableSchema ts)
returns subtable object for given tableSchema ts, null if none exists
|
SubTableSchema |
Schema.getSubTableSchemaEH(TableSchema ts)
returns subtable object for given tableSchema ts; throws Error if no such
ts exists
|
TableSchema |
Schema.getSuperTable(TableSchema s)
return the TableSchema of the super/belongsToSchema table of TableSchema
s
|
boolean |
Schema.isGEQ(TableSchema sup,
TableSchema sub) |
boolean |
TableSchema.isSuperTableOf(TableSchema s)
is 'this' schema a supertable (ancestor) of table schema s?
|
static Tuple |
Tuple.parseTupleDecl(java.lang.String line,
int lineno,
TableSchema ts,
ErrorReport er)
parses a line at lineno, expecting to parse a legal prolog tuple
declaration that conforms to table schema ts
|
Table |
Table.project(TableSchema subTableSchema)
projects a Table to the subset of columns of a sub tbl schema.
|
Tuple |
Tuple.project(TableSchema superTableSchema)
projects 'this' tuple to the set of columns of a super table schema; if
table schemas do not match, tuple.getName() throws an Error projection
retains the first set of columns -- columns that are removed are at the
end of a tuple
|
TableSchema |
Schema.remove(TableSchema ts)
delete table schema ts
|
void |
SubTableSchema.remove(TableSchema sub) |
Constructor and Description |
---|
KeyedTable(TableSchema tableSchema,
java.lang.String keyName)
returns KeyTable object that is a table of tableSchema instances
using a column whose name is keyName as the key column;
Error is thrown if no such column exists
|
SubTableSchema(TableSchema supr)
create new SubTable object for belongstoSchema schema supr
|
SubTableSchema(TableSchema supr,
java.util.List<TableSchema> subs)
create subTableSchema declaration for belongstoSchema TableSchema supr
with subtable Schemas subs
|
SubTableSchema(TableSchema supr,
TableSchema... subs) |
SubTableSchema(TableSchema supr,
TableSchema... subs) |
Table(TableSchema schema)
create an empty tbl for TableSchema schema
|
TableSchema(TableSchema ts)
create a copy (not a deep copy) of a given schema
|
Tuple(TableSchema schema)
create an empty tuple for the given schema
|
Constructor and Description |
---|
SubTableSchema(TableSchema supr,
java.util.List<TableSchema> subs)
create subTableSchema declaration for belongstoSchema TableSchema supr
with subtable Schemas subs
|