if (itemIdentifierRef == null || itemIdentifierRef.equals("")) {
// This item has no linked resource yet. Add one if there is a page file
// attached.
VFSLeaf pageFile = page.getPageFile();
if (pageFile != null) {
CPResource res = new CPResource();
CPFile file = new CPFile(pageFile);
res.addFile(file);
// TODO:GW Set type according to file
res.setType("text/html");
res.setHref(file.getHref());
item.setIdentifierRef(res.getIdentifier());
cpcore.getRootNode().getResources().addResource(res);
}
} else {// this item has already a linked resource
// this is not supported, we don't change linked resources...
}