Hi Ming
Sadly there is no integrated & simple way of doing so, as far as I
remember. I think this is a valid question and I had a similar request
some time ago.
I believe SuRF could be extended by adding raw SPARQL capabilities to
the ResultProxy.
Practically, to fix your problem, you could just gather the subject of
all objects you require, and pass each and every one to a Resource
object:
>>> result = select("?s").where(...)
>>> for entry in ['results']['bindings']:
... resources.append(MusicAlbum(entry['?s']))
However you'll add some load overhead, as attribute access to the
resources will trigger additional queries to load the respective data.
If speed is not an issue for you, this should be fine though.
HTH
-Christoph