* @param source the Source to describe.
*/
public void pushSourceLocks(LockableSource source)
throws SAXException, SourceException {
Enumeration locks = source.getSourceLocks();
SourceLock lock;
if (locks != null && locks.hasMoreElements()) {
this.contentHandler.startElement(URI, LOCKS_NODE_NAME,
LOCKS_NODE_QNAME,
new AttributesImpl());
while (locks.hasMoreElements()) {
lock = (SourceLock) locks.nextElement();
AttributesImpl attributes = new AttributesImpl();
attributes = new AttributesImpl();
attributes.addAttribute("", PRINCIPAL_ATTR_NAME,
PRINCIPAL_ATTR_NAME, "CDATA",
lock.getSubject());
attributes.addAttribute("", TYPE_ATTR_NAME, TYPE_ATTR_NAME,
"CDATA", lock.getType());
attributes.addAttribute("", EXPIRATION_ATTR_NAME,
EXPIRATION_ATTR_NAME, "CDATA",
lock.getExpiration().toString());
attributes.addAttribute("", INHERITABLE_ATTR_NAME,
INHERITABLE_ATTR_NAME, "CDATA",
String.valueOf(lock.isInheritable()));
attributes.addAttribute("", EXCLUSIVE_ATTR_NAME,
EXCLUSIVE_ATTR_NAME, "CDATA",
String.valueOf(lock.isExclusive()));
this.contentHandler.startElement(URI, LOCK_NODE_NAME,
LOCK_NODE_QNAME, attributes);
this.contentHandler.endElement(URI, LOCK_NODE_NAME,
LOCK_NODE_QNAME);