Added facet creation even with a provided header
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@135182 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6d0d99f0a8
commit
d8943fa68e
|
@ -516,8 +516,18 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
UUID targetUUID = targetHeader.getUUID();
|
||||
String entityType = getClassProperty(target);
|
||||
|
||||
targetVertex = getEntity(orientGraph, targetUUID, entityType,
|
||||
try {
|
||||
targetVertex = getEntity(orientGraph, targetUUID, entityType,
|
||||
targetClass);
|
||||
}catch(FacetNotFoundException e){
|
||||
/* Facet does not exist. Going to create it */
|
||||
targetVertex = createVertexEntity(orientGraph,
|
||||
getClassProperty(target), Facet.class,
|
||||
target.toString());
|
||||
|
||||
} catch (ResourceRegistryException e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
return targetVertex;
|
||||
|
|
Loading…
Reference in New Issue