entryWriter.write(out);
}
});
// parse new entry
AtomEntry entry = parse(resp.getStream(), AtomEntry.class);
// we expect a CMIS entry
if (entry.getId() == null) {
throw new CmisConnectionException("Received Atom entry is not a CMIS entry!");
}
// set object id
objectId.setValue(entry.getId());
if (changeToken != null) {
changeToken.setValue(null); // just in case
}
lockLinks();
try {
// clean up cache
removeLinks(repositoryId, entry.getId());
// walk through the entry
for (AtomElement element : entry.getElements()) {
if (element.getObject() instanceof AtomLink) {
addLink(repositoryId, entry.getId(), (AtomLink) element.getObject());
} else if (element.getObject() instanceof CmisObjectType) {
// extract new change token
if (changeToken != null) {
object = (CmisObjectType) element.getObject();