public static final QName STATE = new QName(NS, "state");
public static final QName FORMAT = new QName(NS, "format");
public static final QName CATEGORIES = new QName(NS, "categories");
public static Asset ToAsset(AssetItem a, UriInfo uriInfo) {
AssetMetadata metadata = new AssetMetadata();
metadata.setUuid(a.getUUID());
metadata.setTitle(a.getTitle());
metadata.setLastModified(a.getLastModified().getTime());
metadata.setCreated(a.getCreatedDate().getTime());
metadata.setCreatedBy(a.getCreator());
metadata.setDisabled(a.getDisabled());
metadata.setFormat(a.getFormat());
metadata.setNote("<![CDATA[ " + a.getCheckinComment() + " ]]>");
List<CategoryItem> categories = a.getCategories();
String[] cats = new String[categories.size()];
int counter = 0;
for (CategoryItem c : categories) {
cats[counter++] = c.getName();