childNode.setData(ModelConfiguration.PREMIS_MODEL.name());
childNode.setParent(node);
node.removeChild(NODE_ID);
node.addChild(NODE_ID, childNode);
TreeNode idNode = addNode(childNode, ModelConfiguration.PremisModel.OBJECT_IDENTIFIER.name());
if (o.getPermanentUri() != null) {
addNode(idNode, ModelConfiguration.PremisModel.ObjectIdentifier.TYPE.name(), "URI");
addNode(idNode, ModelConfiguration.PremisModel.ObjectIdentifier.VALUE.name(),
o.getPermanentUri().toString());
}
if (o.getTitle() != null) {
addNode(childNode, ModelConfiguration.PremisModel.ORIGINAL_NAME.name(), o.getTitle());
}
TreeNode charNode = addNode(childNode, ModelConfiguration.PremisModel.OBJECT_CHARACTERISTICS.name());
if (o.getFormat() != null) {
addNode(charNode, ModelConfiguration.PremisModel.ObjectCharacteristics.FORMAT.name(),
o.getFormat().toString());
}
TreeNode relationshipNode = addNode(childNode, ModelConfiguration.PremisModel.RELATIONSHIP.name());
addNode(relationshipNode,
ModelConfiguration.PremisModel.Relationship.RELATED_OBJECT_IDENTIFIER.name());
if (o.getManifestationOf() != null) {
addNode(idNode,
ModelConfiguration.PremisModel.Relationship.RelatedObjectIdentifier.TYPE.name(), "URI");