Using OpenCMIS, the getAllVersions() call returns all versions of the object, including the Private Working Copy (PWC) if the object is checked out. The PWC will be on the top of the list followed by the latest version.
So, in your case, if you want to do a query for the object, or navigate through the folder tree, or whatever, you can do that. Then ask the object for its versions and you can get the PWC from that list if it is checked out.
Here's a Groovy example:
document = session.getObjectByPath('/versionableExample.txt')
println("Checked out?" + document.versionSeriesCheckedOut)
versions = document.getAllVersions()
for (version in versions) {
println ("Version:" + version.versionLabel + " PWC?:" + version.privateWorkingCopy)
}
This outputs the following assuming a document called versionableExample.txt exists in the root of the Apache Chemistry In-Memory repo that has three versions and is currently checked out:
Checked out?true
Version:V 4.0 PWC?:true
Version:V 3.0 PWC?:false
Version:V 2.0 PWC?:false
Version:V 1.0 PWC?:false
Hope that helps,
Jeff