|
ensembl-hive
2.7.0
|
Public Member Functions | |
| public Boolean | is_uri () |
| public Bio::EnsEMBL::Utils::URI | parse_uri () |
| public Bio::EnsEMBL::Utils::URIParser::URI | new () |
| public HashRef | db_schemes () |
| public Boolean | is_db_scheme () |
| public String | scheme () |
| public String | path () |
| public String | user () |
| public String | pass () |
| public String | host () |
| public Int | port () |
| public ArrayRef | param_keys () |
| public Boolean | param_exists_ci () |
| public void | add_param () |
| public ArrayRef | get_params () |
| public HashRef | db_params () |
| public Hash | generate_dbsql_params () |
| protected | _decode_sqlite () |
| public String | generate_uri () |
This object is a generic URI parser which is primarily used in the parsing of database URIs into a more managable data structure. We also provide the resulting URI object
| protected Bio::EnsEMBL::Utils::URI::_decode_sqlite | ( | ) |
Description : Performs path gymnastics to decode into a number of possible
options. The issue with SQLite is that the normal URI scheme
looks like sqlite:///my/path.sqlite/table but how do we know
that the DB name is /my/path.sqlite and the table is
table? The code takes a path, looks for the full path & if it cannot
be found looks for the file a directory back. In the above
example it would have looked for /my/path.sqlite/table,
found it to be non-existant, looked for /my/path.sqlite
and found it. If the path splitting procdure resulted in just 1 file after
the first existence check e.g. sqlite://db.sqlite it assumes
that should be the name. If no file can be found we default to
the full length path.
Caller : internal
Code:
| public void Bio::EnsEMBL::Utils::URI::add_param | ( | ) |
Arg[1] : String; key Arg[1] : Scalar; value Description : Add a key/value to the params map. Multiple inserts of the same key is allowed Returntype : None Exceptions : None Status : Stable
Code:
| public HashRef Bio::EnsEMBL::Utils::URI::db_params | ( | ) |
Description : Storage of parameters used only for database URIs since
they require
Returntype : HashRef; Database name is keyed under dbname and the
table is keyed under table
Exceptions : None
Status : Stable
Code:
| public HashRef Bio::EnsEMBL::Utils::URI::db_schemes | ( | ) |
Description: Returns a hash of scheme names known to be databases Returntype : HashRef Exceptions : None Status : Stable
Code:
| public Hash Bio::EnsEMBL::Utils::URI::generate_dbsql_params | ( | ) |
Arg[1] : boolean $no_table alows you to avoid pushing -TABLE as an
output value
Description : Generates a Hash of Ensembl compatible parameters to be used
to construct a DB object. We combine those parameters
which are deemed to be part of the db_params() method
under -DBNAME and -TABLE. We also search for a number
of optional parameters which are lowercased equivalents
of the construction parameters available from a
Bio::EnsEMBL::DBSQL::DBAdaptor,
Bio::EnsEMBL::DBSQL::DBConnection as well as verbose
being supported.We also convert the scheme type into the driver attribute
Returntype : Hash (not a reference). Output can be put into a DBConnection
constructor.
Exceptions : None
Status : Stable
Code:
| public String Bio::EnsEMBL::Utils::URI::generate_uri | ( | ) |
Description : Generates a URI string from the paramaters in this object Returntype : String Exceptions : None Status : Stable
Code:
| public ArrayRef Bio::EnsEMBL::Utils::URI::get_params | ( | ) |
| public String Bio::EnsEMBL::Utils::URI::host | ( | ) |
Arg[1] : Setter argument Description : Getter/setter for the host attribute Returntype : String Exceptions : None Status : Stable
Code:
| public Boolean Bio::EnsEMBL::Utils::URI::is_db_scheme | ( | ) |
Description: Returns true if the code believes the scheme to be a Database Returntype : Boolean Exceptions : None Status : Stable
Code:
| public Boolean Bio::EnsEMBL::Utils::URI::is_uri | ( | ) |
Arg[1] : Scalar; URI to parse Example :
Description : Looks for the existence of a URI scheme to decide if this is a classical URI. Whilst non-scheme based URIs can still be interprited it is useful to use when you need to know if you are going to work with a URI or not Returntype : Boolean Caller : General Status : Beta
Code:
| public Bio::EnsEMBL::Utils::URIParser::URI Bio::EnsEMBL::Utils::URI::new | ( | ) |
Arg[1] : String; scheme the URI will confrom to Description : New object call Returntype : Bio::EnsEMBL::Utils::URIParser::URI Exceptions : Thrown if scheme is undefined. Status : Stable
Code:
| public Boolean Bio::EnsEMBL::Utils::URI::param_exists_ci | ( | ) |
Arg[1] : String; Key Description : Performs a case-insensitive search for the given key Returntype : Boolean; returns true if your given key was seen Exceptions : None Status : Stable
Code:
| public ArrayRef Bio::EnsEMBL::Utils::URI::param_keys | ( | ) |
Description : Getter for the paramater map keys in the order they were first
seen. Keys should only appear once in this array
Returntype : ArrayRef
Exceptions : None
Status : Stable
Code:
| public Bio::EnsEMBL::Utils::URI Bio::EnsEMBL::Utils::URI::parse_uri | ( | ) |
Arg[1] : Scalar; URI to parse Example :
Description : A URL parser which attempts to convert many different types
of URL into a common data structure.
Returntype : Bio::EnsEMBL::Utils::URI
Caller : General
Status : Beta
Code:
| public String Bio::EnsEMBL::Utils::URI::pass | ( | ) |
Arg[1] : Setter argument Description : Getter/setter for the password attribute Returntype : String Exceptions : None Status : Stable
Code:
| public String Bio::EnsEMBL::Utils::URI::path | ( | ) |
Arg[1] : Setter argument Description : Getter/setter for the path attribute Returntype : String Exceptions : None Status : Stable
Code:
| public Int Bio::EnsEMBL::Utils::URI::port | ( | ) |
Arg[1] : Setter argument Description : Getter/setter for the port attribute Returntype : Integer Exceptions : If port is not a number, less than 1 or not a whole integer Status : Stable
Code:
| public String Bio::EnsEMBL::Utils::URI::scheme | ( | ) |
Description : Getter for the scheme attribute Returntype : String Exceptions : None Status : Stable
Code:
| public String Bio::EnsEMBL::Utils::URI::user | ( | ) |
Arg[1] : Setter argument Description : Getter/setter for the user attribute Returntype : String Exceptions : None Status : Stable
Code: