vector.addElement(new Date(doc.getCreated())); vector.addElement(new Date(doc.getLastModified()));
vector.addElement(new Date(metadata.getCreated())); vector.addElement(new Date(metadata.getLastModified()));
    public Vector getTimestamps(User user, String documentPath)    throws PermissionDeniedException, EXistException {        DBBroker broker = null;        DocumentImpl doc = null;        try {            broker = brokerPool.get(user);            documentPath = XmldbURI.checkPath2(documentPath, DBBroker.ROOT_COLLECTION);            doc = (DocumentImpl) broker.openDocument(documentPath, Lock.READ_LOCK);            if (doc == null) {                LOG.debug("document " + documentPath + " not found!");                throw new EXistException("document not found");            }            Vector vector = new Vector(2);            vector.addElement(new Date(doc.getCreated()));            vector.addElement(new Date(doc.getLastModified()));            return vector;        } finally {            if(doc != null)                doc.getUpdateLock().release(Lock.READ_LOCK);            brokerPool.release(broker);        }    }