} else {
workspace.setTitle("workspace");
}
workspace.setBaseUri( new IRI( workspaceURL ));
Collection collection = workspace.addCollection("collection", href );
Feed feed = getFeed( request );
if ( feed != null ) {
String title = feed.getTitle();
if ( title != null ) {
collection.setTitle(title);
} else {
collection.setTitle("entries");
}
collection.addAccepts("application/atom+xml");
collection.addAccepts("application/json");
List<Category> categories = feed.getCategories();
if ( categories != null ) {
collection.addCategories(categories, false, null);
} else {
collection.addCategories().setFixed(false);
}
} else {
collection.setTitle("entries");
collection.addAccepts("application/atom+xml");
collection.addAccepts("application/json");
collection.addCategories().setFixed(false);
}
workspace.addCollection(collection);
service.addWorkspace(workspace);
//FIXME add prettyPrint support