if (!docPath.startsWith("/db")) docPath = "/db" + docPath;
docPath = NativeBroker.checkPath(docPath, "/db");
	public DocumentImpl openDocument(String docPath, int lockMode) throws PermissionDeniedException {		if (!docPath.startsWith("/"))			docPath = '/' + docPath;		if (!docPath.startsWith("/db"))		    docPath = "/db" + docPath;		int pos = docPath.lastIndexOf('/');		String collName = docPath.substring(0, pos);		String docName = docPath.substring(pos + 1);				Collection collection = null;		try {            collection = openCollection(collName, lockMode);			if (collection == null) {				LOG.debug("collection " + collName + " not found!");				return null;			}			if (!collection.getPermissions().validate(user, Permission.READ)) {				throw new PermissionDeniedException("permission denied to read collection");			}			DocumentImpl doc = collection.getDocumentWithLock(this, docName, lockMode);			if (doc == null) {//				LOG.debug("document " + docPath + " not found!");				return null;			}	//		if (!doc.getPermissions().validate(user, Permission.READ))	//			throw new PermissionDeniedException("not allowed to read document");			return doc;		} catch (LockException e) {			LOG.warn("Could not acquire lock on document " + docPath, e);		} finally {			if(collection != null)				collection.release();		}		return null;	}