throw new DBException(FaultCodes.COL_DOCUMENT_NOT_FOUND,
"Resource '" + id + "' does not exist in '" + getCanonicalName() + "'");
}
MetaSystemCollection metacol = getMetaSystemCollection();
MetaData meta = metacol.getDocumentMeta(this, id);
/*
TimeRecord rec = null;
if( null == meta || !meta.hasContext() )
rec = getDatabase().getTime(path);
long created = (null != rec) ? rec.getCreatedTime() : System.currentTimeMillis();
long modified = (null != rec) ? rec.getModifiedTime() : System.currentTimeMillis();
*/
// this is wrong.. but it should work for now...
long now = System.currentTimeMillis();
if (null == meta) {
meta = new MetaData(MetaData.DOCUMENT, getCanonicalDocumentName(id), now, now);
metacol.setDocumentMeta(this, id, meta);
} else if (!meta.hasContext()) {
meta.setContext(now, now);
}
return meta;
}