SQLTuple version: 1.2.0.0

hep.aida.ref.sql
Class AIDAURL

java.lang.Object
  extended by hep.aida.ref.sql.AIDAURL

public class AIDAURL
extends Object

AIDAURL manages information about SQL URL.

 $Log: AIDAURL.java,v $
 Revision 1.19  2008/07/25 13:25:02  hrivnac
 oracle schema for tags supported improved

 Revision 1.18  2007/05/23 16:38:43  hrivnac
 logical connections for Plotter; better UML

 Revision 1.17  2007/05/22 23:33:20  hrivnac
 Plotter uses real arguments parsing

 Revision 1.16  2006/12/13 16:38:51  hrivnac
 derby works in JAS3 Plugin

 Revision 1.15  2006/12/13 15:39:29  hrivnac
 derby url modified

 Revision 1.14  2006/12/12 15:21:42  hrivnac
 McKoi replaced with Derby; uppercase-only dbs handled better; moving to JAS 0.8.3

 Revision 1.13  2006/11/10 17:40:02  hrivnac
 WebService updated, long-format Oracle URL allowed, complete db not parsed if only table requested (speed)

 Revision 1.12  2005/09/28 16:21:06  hrivnac
 code cleaning

 Revision 1.11  2005/01/25 16:45:03  hrivnac
 Adding rows uses PreparedStatement

 Revision 1.10  2004/12/08 10:15:38  hrivnac
 ITree created with sensible name for Oracle

 Revision 1.9  2004/10/22 15:32:59  hrivnac
 cleaned

 Revision 1.8  2004/10/22 14:22:44  hrivnac
 properties loading refactored

 Revision 1.7  2004/10/08 15:22:33  hrivnac
 JAS3 plugin works

 Revision 1.6  2004/09/07 14:03:42  hrivnac
 AIDAURL supports with/without tables

 Revision 1.5  2004/07/06 14:24:50  hrivnac
 support for Oracle

 Revision 1.4  2004/05/22 15:12:59  hrivnac
 class id reformated

 Revision 1.3  2004/04/14 15:34:28  hrivnac
 changes required by ColMan

 Revision 1.2  2004/04/14 13:39:46  hrivnac
 1.5 warnings fixed

 Revision 1.1  2004/04/13 15:45:54  hrivnac
 AIDA URL introduced

 

Version:
$Id: AIDAURL.java,v 1.19 2008/07/25 13:25:02 hrivnac Exp $
Author:
J.Hrivnac

Field Summary
private  String _db
           
private  String _name
           
private  String _protocol
           
private  String _schema
           
private  String _storeType
           
private  String _table
           
private  String _url
           
private static Logger log
          Logging .
 
Constructor Summary
AIDAURL(String url)
          Create from String url.
AIDAURL(String url, String schema)
          Create from String url.
 
Method Summary
 String db()
          Give the database URL or filename.
static void main(String[] args)
          Selftest.
 String name()
          Give the name.
private  void parseDBName()
          Analyse url to find information about database.
private  void parseName(String url)
          Divide url into database and table part.
 String protocol()
          Give the protocol name..
 String storeType()
          Give the store type.
 String table()
          Give the table (tuple) name.
 String toString()
           
 String url()
          Give the table (tuple) URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_url

private String _url

_schema

private String _schema

_db

private String _db

_table

private String _table

_name

private String _name

_storeType

private String _storeType

_protocol

private String _protocol

log

private static Logger log
Logging .

Constructor Detail

AIDAURL

public AIDAURL(String url,
               String schema)
        throws IllegalArgumentException
Create from String url.

Parameters:
url - The String url, it should have following form:
  • <file>.aida[/<table>]
  • <file>.root[/<table>]
  • jdbc:[mysql|postgresql]://<host>/<db>[/<table>]
  • jdbc:derby:<db>()[/<table>]
  • jdbc:oracle:thin:@<host>:<port>:<sid>[/<table>]
schema - The schema of the database.
Throws:
IllegalArgumentException - if url doesn't describe AIDA URL.

AIDAURL

public AIDAURL(String url)
        throws IllegalArgumentException
Create from String url.

Parameters:
url - The String url, it should have following form:
  • <file>.aida[/<table>]
  • <file>.root[/<table>]
  • jdbc:[mysql|postgresql]://<host>/<db>[/<table>]
  • jdbc:derby:<db>()[/<table>]
  • jdbc:oracle:thin:@<host>:<port>:<sid>[/<table>]
Throws:
IllegalArgumentException - if url doesn't describe AIDA URL.
Method Detail

parseDBName

private void parseDBName()
Analyse url to find information about database.


parseName

private void parseName(String url)
Divide url into database and table part. Table part may be null.

Parameters:
url - The full url.

url

public String url()
Give the table (tuple) URL.

Returns:
The table (tuple) URL.

db

public String db()
Give the database URL or filename.

Returns:
The database URL or filename.

table

public String table()
Give the table (tuple) name.

Returns:
The table (tuple) name.

storeType

public String storeType()
Give the store type.

Returns:
The store type.

name

public String name()
Give the name.

Returns:
The name.

protocol

public String protocol()
Give the protocol name..

Returns:
The protocol name.

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)
Selftest.


Written by: J.Hrivnac

Documentation built November 9 2010 on Linux by hrivnac