Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.rohanclan.ashpool.core
Class TableManager  view TableManager download TableManager.java

java.lang.Object
  extended bycom.rohanclan.ashpool.core.TableManager

public class TableManager
extends java.lang.Object


Field Summary
private  java.io.File datastore
           
private  boolean readonly
           
static java.lang.String TABLECOMPRESS
           
static java.lang.String TABLEEXT
           
static java.lang.String TABLESCHEMA
           
static byte TYPE_SCHEMA
           
static byte TYPE_TABLE
           
 
Constructor Summary
TableManager(java.io.File datasource)
          Creates a new instance of TableManager
 
Method Summary
 void createTable(java.lang.String tablename, java.io.InputStream is, byte type)
          create a table from a stream
 void createTable(java.lang.String tablename, java.lang.String Data, byte type)
          create a new table from a string
 boolean doCreatePhysicalTable(java.lang.String tablename)
           
 boolean doDropTable(java.lang.String tablename)
          drop a table from the datastore, and try to drop the schema too
private  java.lang.String extFromByte(byte type)
          get the string ext from the defined byte
 java.io.File getDatastore()
          get the datastore (the directory) as a file object
 java.lang.String getDatastoreURI()
          get the datastore (the directory) as a String
 java.io.File[] getFileTables()
          get a file array of tables
 java.io.InputStream getSchemaInputStream(java.lang.String tablename)
          get a schema as an input stream
 java.io.File getTableFile(java.lang.String tablename, byte type)
          get a table (xml file) as a file object
 java.lang.String getTableFullPath(java.lang.String tablename, byte type)
          get a table (xml file) as a string path
 java.io.InputStream getTableInputStream(java.lang.String tablename)
          get a table as an input stream
 java.io.InputStream getTableInputStream(java.lang.String tablename, byte type)
          get a table (xml file) as an input stream
 void getTables(AResultSet rs)
          returns the (possible) tables in this datastore
 boolean hasSchema(java.lang.String tablename)
          returns true if the passed table has a schema
 boolean isReadOnly()
          read only datastore?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLEEXT

public static final java.lang.String TABLEEXT
See Also:
Constant Field Values

TABLESCHEMA

public static final java.lang.String TABLESCHEMA
See Also:
Constant Field Values

TABLECOMPRESS

public static final java.lang.String TABLECOMPRESS
See Also:
Constant Field Values

TYPE_TABLE

public static final byte TYPE_TABLE
See Also:
Constant Field Values

TYPE_SCHEMA

public static final byte TYPE_SCHEMA
See Also:
Constant Field Values

datastore

private java.io.File datastore

readonly

private boolean readonly
Constructor Detail

TableManager

public TableManager(java.io.File datasource)
             throws java.lang.Exception
Creates a new instance of TableManager

Method Detail

isReadOnly

public boolean isReadOnly()
read only datastore?


extFromByte

private java.lang.String extFromByte(byte type)
get the string ext from the defined byte


createTable

public void createTable(java.lang.String tablename,
                        java.io.InputStream is,
                        byte type)
                 throws java.io.IOException
create a table from a stream


createTable

public void createTable(java.lang.String tablename,
                        java.lang.String Data,
                        byte type)
                 throws java.io.IOException
create a new table from a string


getDatastore

public java.io.File getDatastore()
get the datastore (the directory) as a file object


getDatastoreURI

public java.lang.String getDatastoreURI()
get the datastore (the directory) as a String


getTableInputStream

public java.io.InputStream getTableInputStream(java.lang.String tablename)
                                        throws java.io.IOException
get a table as an input stream


getSchemaInputStream

public java.io.InputStream getSchemaInputStream(java.lang.String tablename)
                                         throws java.io.IOException
get a schema as an input stream


getTableInputStream

public java.io.InputStream getTableInputStream(java.lang.String tablename,
                                               byte type)
                                        throws java.io.IOException
get a table (xml file) as an input stream


getTableFile

public java.io.File getTableFile(java.lang.String tablename,
                                 byte type)
get a table (xml file) as a file object


getTableFullPath

public java.lang.String getTableFullPath(java.lang.String tablename,
                                         byte type)
get a table (xml file) as a string path


getTables

public void getTables(AResultSet rs)
returns the (possible) tables in this datastore


getFileTables

public java.io.File[] getFileTables()
get a file array of tables


hasSchema

public boolean hasSchema(java.lang.String tablename)
returns true if the passed table has a schema


doDropTable

public boolean doDropTable(java.lang.String tablename)
drop a table from the datastore, and try to drop the schema too


doCreatePhysicalTable

public boolean doCreatePhysicalTable(java.lang.String tablename)