Package | Description |
---|---|
Parsing.Parsers | |
PrologDB |
Modifier and Type | Method and Description |
---|---|
static TableSchema |
DBLineParsers.parseTableDecl(LineToParse l)
a table declaration is on a single line.
|
Modifier and Type | Field and Description |
---|---|
protected TableSchema |
Table.schema
each table 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 is computed
|
Modifier and Type | Method and Description |
---|---|
TableSchema |
TableSchema.addColumn(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.addColumn(java.lang.String k)
adds a column whose name/type is encoded by k
|
TableSchema |
TableSchema.addColumnFirst(Column c)
add column c as the first of 'this' schema
|
TableSchema |
TableSchema.addColumnFirst(java.lang.String k)
adds a column to the head of the list of columns
|
TableSchema |
TableSchema.addColumns(java.lang.String... columns)
adds a sequence of columns
|
TableSchema |
TableSchema.addColumnsFirst(Column... columns)
place an array of columns before existing columns of 'this' schema
|
TableSchema |
TableSchema.addColumnsFirst(java.lang.String... columns)
add list of columns to the head of a schema
|
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
plus the addition of an id field as first attribute
|
TableSchema |
Table.getSchema()
returns schema of table
|
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 |
DBSchema.getSuperTable(TableSchema s)
return the TableSchema of the super/dbSchema 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 |
DB.getTableSchema(java.lang.String name)
returns the TableSchema of the table with given SubTableSchema; null if
table is not found
|
TableSchema |
DBSchema.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 |
DBSchema.getTableSchemaEH(java.lang.String tableName)
return the TableSchema with SubTableSchema tableName with built-in error
handling
|
static TableSchema |
TableSchema.readSchema(java.io.File schemafile)
reads prolog schema from File schemafile; errors are reported to out
read only .schema and database files
|
static TableSchema |
TableSchema.readSchema(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.readSchema(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
|
Modifier and Type | Method and Description |
---|---|
java.util.List<TableSchema> |
SubTableSchema.getSubTableSchemas() |
java.util.List<TableSchema> |
DBSchema.getTableSchemas()
return list of TableSchemas of this database schema
|
Modifier and Type | Method and Description |
---|---|
void |
SubTableSchema.addSubTableSchema(TableSchema sub)
adds SubTableSchema sub
|
void |
SubTableSchema.addSubTableSchemas(TableSchema... tschemas)
adding table schemas in bulk as subtables
|
void |
DBSchema.addTableSchema(TableSchema tableschema)
add table schema tableschema to 'this' database schema
|
void |
DBSchema.addTableSchemas(TableSchema... schemas)
for adding schemas in bulk
|
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
plus the addition of an id field as first attribute
|
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 |
DBSchema.getSubTableSchema(TableSchema ts)
returns subtable object for given tableSchema ts, null if none exists
|
SubTableSchema |
DBSchema.getSubTableSchemaEH(TableSchema ts)
returns subtable object for given tableSchema ts; throws Error if no such
ts exists
|
TableSchema |
DBSchema.getSuperTable(TableSchema s)
return the TableSchema of the super/dbSchema table of TableSchema s
|
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)
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 table 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
|
void |
Tuple.setNulls(TableSchema ts)
Add the (column,null) pairs of tuple t to the existing tuple.
|
Constructor and Description |
---|
DBSchema(java.lang.String name,
TableSchema... schemas)
create DBSchema that has SubTableSchema and a list of TableSchemas can
incrementally add subtable tableSchemas subsequently -- before schema is
instantiated as a database
|
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 dbSchema schema supr
|
SubTableSchema(TableSchema supr,
java.util.List<TableSchema> subs)
create subTableSchema declaration for dbSchema TableSchema supr with
subtable Schemas subs
|
Table(TableSchema schema)
create an empty table for TableSchema schema
|
Table(TableSchema schema,
TupleList tl)
most primitive table constructor
|
toTable(TableSchema ts)
create table accumulator for 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 dbSchema TableSchema supr with
subtable Schemas subs
|