if ( !acceptsURI( uri ) )
throw new XMLDBException( ErrorCodes.INVALID_URI, "INVALID_URI" );
Collection collection = null;
try {
ExternalDatabase db = null;
StringBuffer ozoneDB = new StringBuffer();
if ( getProperty( DB_HOST ) == null )
ozoneDB.append( "ozonedb:local:").append( getProperty( DB_NAME ) );
else
ozoneDB.append( "ozonedb:remote://" ).append( getProperty( DB_HOST ) ).append(
":").append( getProperty( DB_PORT ) );
System.out.println("DatabaseImpl.getCollection() - Remote DB: " + getProperty(DB_HOST) + " " + getProperty(DB_PORT));
System.out.println("DatabaseImpl.getCollection() - Local DB: " + getProperty(DB_NAME));
System.out.println("DatabaseImpl.getCollection() - Load Collection: " + getProperty(COL_NAME));
db = ExternalDatabase.openDatabase( ozoneDB.toString() );
if (db == null)
throw new XMLDBException( ErrorCodes.INVALID_DATABASE, "INVALID_DATABASE" );
db.reloadClasses();
collection = CollectionImpl.forName( db, getProperty( COL_NAME ) );
if (collection == null)
throw new XMLDBException( ErrorCodes.INVALID_COLLECTION, "INVALID_COLLECTION" );