@Override
public Resource create(Resource parent, String name,
Map<String, Object> properties) throws PersistenceException {
final String path = (parent.getPath().equals("/") ? parent.getPath() + name : parent.getPath() + '/' + name);
if ( this.temporaryResources.containsKey(path) ) {
throw new PersistenceException("Path already exists: " + path);
}
synchronized ( this.resources ) {
if ( this.resources.containsKey(path) && !this.deletedResources.contains(path) ) {
throw new PersistenceException("Path already exists: " + path);
}
}
this.deletedResources.remove(path);
if ( properties == null ) {
properties = new HashMap<String, Object>();