On 4 Jun 2007, at 15:53, Peter Lacey wrote:
public Representation getRepresentation(Variant variant) { Representation result = null; if (variant.getMediaType().equals(MediaType.APPLICATION_XML)) { // create DOMresult = new DomRepresentation(MediaType.APPLICATION_XML, doc);result.setTag(new Tag([your etag], false)); } return result; }
It's really clever, except you still have to create that XML representation that never needs to be sent out.
If there was some getTag() method or something you could override this to check directly with the database on whatever you need to calculate the tag, and hence getRepresentation() wouldn't even need to be called.
To support this I think some kind of getLastModified() would also be cool. (I've made such a thing in my subclass of Resource)
-- Stian Soiland, myGrid team School of Computer Science The University of Manchester http://www.cs.man.ac.uk/~ssoiland/

