I'm sorry, I don't understand your purpose. If you want to get some info about portals, pages, etc, so you might use a connection with JCR through the API. But, if you want to get info about users, so you must use another ways, which are related to IDM module.

Could you provide me at least which file should be referenced to create connection, and what Query builder used to retrive profile information, I mean what the query syntax at least? besides, any document was explained gatein jcr & idm archietect would be appreciated.