edu.harvard.cfa.vo.tapclient.vosi
Class Schema

java.lang.Object
  extended by edu.harvard.cfa.vo.tapclient.vosi.Schema

public class Schema
extends java.lang.Object

A named description of a set of logically related tables. The information in this object is only as recent as the call to VosiService#getTableSet that generated this object. To see if a service's tableset has changed, call VosiService#getTableSet again.

   void showSchema(Schema schema) {
        System.out.println(schema+"\t[Schema]");

        for (Table table: schema.getTables()) {
            System.out.println("\t"+table+"\t[Table]");

            for (Column column: table.getIndexedColumns()) {
                System.out.println("\t\t"+column+"\t[Indexed column]");
            }

            for (ForeignKey foreignKey: table.getForeignKeys()) {
                System.out.println("\t\t"+foreignKey+"\t[Foreign key]");
            } 
            System.out.println("");
        }
        System.out.println("");
  }
 


Constructor Summary
protected Schema()
          Constructs a Schema object.
protected Schema(java.lang.String name, java.lang.String title, java.lang.String description, java.lang.String utype, java.util.List<Table> tables)
          Constructs a Schema object.
 
Method Summary
protected  void add(Table newValue)
           
 java.lang.String getDescription()
          Returns the description provided for the schema
 java.lang.String getName()
          Returns the name provided for the schema.
 java.util.List<Table> getTables()
          Returns a list of Table objects representing the tables provided for the schema.
 java.lang.String getTitle()
          Returns the title provided for the schema.
 java.lang.String getUtype()
          Returns the utype, usage-specific or unique type, provided for the schema
 void list(java.io.PrintStream output)
           
 void list(java.io.PrintStream output, java.lang.String indent)
           
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema

protected Schema()
Constructs a Schema object. For use by subclasses.


Schema

protected Schema(java.lang.String name,
                 java.lang.String title,
                 java.lang.String description,
                 java.lang.String utype,
                 java.util.List<Table> tables)
Constructs a Schema object. For use by subclasses.

Method Detail

getName

public java.lang.String getName()
Returns the name provided for the schema.

Returns:
the name of this Schema object or null if not available.

getTitle

public java.lang.String getTitle()
Returns the title provided for the schema.

Returns:
the title of this schema or null if not available.

getDescription

public java.lang.String getDescription()
Returns the description provided for the schema

Returns:
the description of this schema or null if not available

getUtype

public java.lang.String getUtype()
Returns the utype, usage-specific or unique type, provided for the schema

Returns:
the utype of the schema or null if not available.

getTables

public java.util.List<Table> getTables()
Returns a list of Table objects representing the tables provided for the schema.

Returns:
a list of tables in this schema.

add

protected void add(Table newValue)

toString

public java.lang.String toString()
Returns a string representation of this object. This method is intended to be used only for debugging purposes, and the format of the returned string may vary between implementations.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this Schema object.

list

public void list(java.io.PrintStream output)

list

public void list(java.io.PrintStream output,
                 java.lang.String indent)